4 Commits

Author SHA1 Message Date
00a311a506 ci: fix jobs not exiting on failure
Some checks failed
Gentoo Utils / build-oci-image (push) Successful in 7s
Gentoo Utils / check-format (push) Successful in 7s
Gentoo Utils / docs (push) Successful in 16s
Gentoo Utils / build (push) Successful in 26s
Gentoo Utils / test (push) Successful in 27s
Gentoo Utils / fuzz (push) Has been cancelled
2025-12-13 22:30:27 -06:00
8765fcd91f ci: build: remove debugging echos
ci: build: remove redundant source
2025-12-13 22:30:27 -06:00
072d9d35c2 ci: add fuzz job
ci: fuzz: add timeout

ci: fuzz: add fuzzer timeout
2025-12-13 22:30:24 -06:00
e7c1d6cc30 scripts: add fuzzer helper script 2025-12-13 22:29:23 -06:00
2 changed files with 12 additions and 3 deletions

View File

@@ -4,7 +4,7 @@ on: [push]
defaults:
run:
shell: bash -le {0}
shell: bash -le -o pipefail {0}
jobs:
build-oci-image:
@@ -126,6 +126,7 @@ jobs:
env:
CC: 'clang'
CXX: 'clang++'
FUZZER_TIMEOUT_S: 300
needs: [build-oci-image, build]
container:
image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }}

View File

@@ -7,9 +7,17 @@ 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 >${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 \
-fork=$(($(nproc) / 2)) \
-fork=2 \
-timeout=2 \
-max_total_time=$FUZZER_TIMEOUT_S \
-timeout_exitcode=0 \
"$@"