
* Add tests for QASAN from aflplusplus * refactor asan module to use the builder pattern * move injection tests to the new tests directory
30 lines
711 B
Bash
Executable File
30 lines
711 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
if [[ ! -x "$QEMU_LAUNCHER" ]]; then
|
|
echo "env variable QEMU_LAUNCHER does not point to a valid executable"
|
|
echo "QEMU_LAUNCHER should point to qemu_launcher location, but points to ${QEMU_LAUNCHER} instead."
|
|
exit 1
|
|
fi
|
|
|
|
cd "$SCRIPT_DIR"
|
|
|
|
make
|
|
|
|
mkdir in || true
|
|
|
|
echo aaaaaaaaaa > in/a
|
|
|
|
timeout 10s "$QEMU_LAUNCHER" -o out -i in -j ../../injections.toml -v -- ./static >/dev/null 2>fuzz.log || true
|
|
if ! grep -Ei "found.*injection" fuzz.log; then
|
|
echo "Fuzzer does not generate any testcases or any crashes"
|
|
echo "Logs:"
|
|
cat fuzz.log
|
|
exit 1
|
|
else
|
|
echo "Fuzzer is working"
|
|
fi
|
|
|
|
make clean |