ci: fuzz: clean up fuzzer script a bit
All checks were successful
Gentoo Utils / build-oci-image (push) Successful in 7s
Gentoo Utils / grep (push) Successful in 2s
Gentoo Utils / check-format (push) Successful in 8s
Gentoo Utils / docs (push) Successful in 12s
Gentoo Utils / build (push) Successful in 20s
Gentoo Utils / test (push) Successful in 29s
Gentoo Utils / fuzz (push) Successful in 47s
All checks were successful
Gentoo Utils / build-oci-image (push) Successful in 7s
Gentoo Utils / grep (push) Successful in 2s
Gentoo Utils / check-format (push) Successful in 8s
Gentoo Utils / docs (push) Successful in 12s
Gentoo Utils / build (push) Successful in 20s
Gentoo Utils / test (push) Successful in 29s
Gentoo Utils / fuzz (push) Successful in 47s
This commit is contained in:
@@ -154,7 +154,7 @@ jobs:
|
|||||||
which emerge
|
which emerge
|
||||||
meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized build
|
meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized build
|
||||||
meson compile atom_parser_fuzzer:alias -C build
|
meson compile atom_parser_fuzzer:alias -C build
|
||||||
timeout 10m ./scripts/fuzz.sh
|
timeout 10m ./scripts/atom_parser_fuzz.sh
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
check-format:
|
check-format:
|
||||||
|
|||||||
15
scripts/atom_parser_fuzz.sh
Executable file
15
scripts/atom_parser_fuzz.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
in=$(mktemp -u) || exit $?
|
||||||
|
out=$(mktemp -u) || exit $?
|
||||||
|
|
||||||
|
mkfifo ${in} ${out} || exit $?
|
||||||
|
|
||||||
|
./scripts/atom.py <${in} >${out} \
|
||||||
|
| ./build/fuzz/atom/parser/fuzzer >${in} <${out} \
|
||||||
|
./build/atom_parser_fuzzer_corpus \
|
||||||
|
-max_total_time=${FUZZER_TIMEOUT_S:-600} \
|
||||||
|
-only_ascii=1 \
|
||||||
|
-timeout=2 \
|
||||||
|
-timeout_exitcode=0 \
|
||||||
|
"$@"
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
CWD="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
|
|
||||||
PROJECT_DIR=$(realpath "${CWD}/../")
|
|
||||||
|
|
||||||
in=$(mktemp -u) || exit $?
|
|
||||||
out=$(mktemp -u) || exit $?
|
|
||||||
|
|
||||||
mkfifo ${in} ${out} || exit $?
|
|
||||||
|
|
||||||
if [[ -z "$FUZZER_TIMEOUT_S" ]]; then
|
|
||||||
FUZZER_TIMEOUT_S=600
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
${PROJECT_DIR}/scripts/atom.py <${in} >${out} \
|
|
||||||
| ${PROJECT_DIR}/build/fuzz/atom/parser/fuzzer -max_total_time=$FUZZER_TIMEOUT_S >${in} <${out} \
|
|
||||||
${PROJECT_DIR}/build/atom_parser_fuzzer_corpus \
|
|
||||||
-only_ascii=1 \
|
|
||||||
-timeout=2 \
|
|
||||||
-max_total_time=$FUZZER_TIMEOUT_S \
|
|
||||||
-timeout_exitcode=0 \
|
|
||||||
"$@"
|
|
||||||
Reference in New Issue
Block a user