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 3s
Gentoo Utils / check-format (push) Successful in 7s
Gentoo Utils / docs (push) Successful in 13s
Gentoo Utils / build (push) Successful in 20s
Gentoo Utils / test (push) Successful in 28s
Gentoo Utils / fuzz (push) Successful in 36s
All checks were successful
Gentoo Utils / build-oci-image (push) Successful in 7s
Gentoo Utils / grep (push) Successful in 3s
Gentoo Utils / check-format (push) Successful in 7s
Gentoo Utils / docs (push) Successful in 13s
Gentoo Utils / build (push) Successful in 20s
Gentoo Utils / test (push) Successful in 28s
Gentoo Utils / fuzz (push) Successful in 36s
This commit is contained in:
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