Skip to content
Snippets Groups Projects
Commit 8eb98e29 authored by Egor Ivkov's avatar Egor Ivkov Committed by Dmitry Ivanov
Browse files

test/fuzz: batch fuzzing in ci stub

NO_DOC=internal
NO_TEST=internal
NO_CHANGELOG=internal
parent a0813e32
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,24 @@ fuzz-check-build:
- python3 infra/helper.py build_fuzzers --external .. --sanitizer=address
- python3 infra/helper.py check_build --external .. --sanitizer=address
# Run fuzzers until they satisfy stop criterias
# XXX: Just a stub for now, it probably needs a custom runner
# and support for running several fuzzers
fuzz-run:
tags: [shell_p_t]
when: manual
script:
# Clone oss-fuzz instead of adding it as a submodule
# as we don't want it to be checked by static analyzers - it's used only for fuzzing
- git clone https://github.com/google/oss-fuzz.git
- cd oss-fuzz
# Checkout a fixed oss-fuzz commit to guarantee reproducible builds
- git checkout e8e124996508f1e4ffe566896638c7213ab440d5
- python3 infra/helper.py build_image --no-pull --external ..
- python3 infra/helper.py build_fuzzers --external .. --sanitizer=address
- cd ..
- python3 test/fuzz/fuzz_until.py swim_proto_meta_fuzzer
.pack:
tags:
- shell_p_t
......
......@@ -72,9 +72,9 @@ class Supervisor:
self.latest_n_inputs = 0
self.latest_new_path = self.start_time
def criterias_satisfied(self) -> bool:
def criteria_satisfied(self) -> bool:
"""Indicates whether stopping criteria of the corresponding fuzzer
are satisfied. E.g. it was running long enogh and covered paths."""
are satisfied. E.g. it was running long enough and covered enough paths."""
# Coverage increased at least twice in comparison with corpus
cov = False
......@@ -164,7 +164,5 @@ class Supervisor:
# The script takes the fuzzing target name as the first argument.
# Then it runs the fuzzing target until either stopping criterias are satisfied
# or fuzzer detects a bug and fails.
# TODO: support running several fuzzers
if __name__ == "__main__":
Supervisor(sys.argv[1]).run()
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment