diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be79f036b143d922c5900ad4419a5b90271a8ab7..377b45241ca1652609088f73b4389a8901b0ac93 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/test/fuzz/fuzz_until.py b/test/fuzz/fuzz_until.py index 280635b35580c8abf84944fa693cd27ccb1eb14c..fc7ce8b245e23ed278684f619432ad4f7e633043 100644 --- a/test/fuzz/fuzz_until.py +++ b/test/fuzz/fuzz_until.py @@ -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