Commit Graph

27 Commits

Author SHA1 Message Date
Max Moroz 5dece89e3c
[infra] Add support for dataflow builds to the helper script and build check (#1632). (#2501)
* [infra] Add support for dataflow builds to the helper script and build check (#1632).

* Update travis config file.

* Address self-review comments and specify dataflow sanitizer for zstd as well.

* Fix fuzzing_engines in project.yaml

* Fix bad build check for DFSan.

* Use "hasattr" in helper.py to check the sanitizer argument.

* Address more review comments.

* Remove DataFlow config from zstd.

* fix a typo
2019-06-12 11:08:15 -07:00
Abhishek Arya 4d3073292a
Update test_all 2019-05-28 09:09:33 -07:00
jonathanmetzman 7073fb976c
[i386] Do i386 builds of projects that have opted-in (#2416) 2019-05-15 14:00:57 -07:00
Evgeny Vereshchagin 2361c62433 [infra] make it possible to override the percentage of targets that can be broken (#2419)
10% is an absolutely sensible default in general especially for single-purpose
libraries like json-parsers. When large "umbrella" projects (like systemd) are
fuzzed with 30 fuzzers (and counting (hopefully :-)) covering code scattered all
over their repositories it's too easy to introduce a broken fuzzer or break a couple
of fuzzers accidentally even after running `check_build`. Waiting for two to three
days for ClusterFuzz to open an issue isn't ideal from the point of view of large
open-source project maintainers (where generally contributors come and go) so one
solution would be to run something like when PRs are opened
```sh
helper.py check_build ALLOWED_BROKEN_TARGETS_PERCENTAGE=0 ...
```
and catch issues as early as possible (and fix them while the context isn't
completely faded away).

I also considered changing this with `sed` and rebuilding `base-images/base-runner`
locally but it takes too much time, looks too kludgy (even to me) and is likely to be broken
in a week or so :-)
2019-05-15 06:38:09 -07:00
Abhishek Arya 5c9cdcfc80
Add tinyxml2 xmltest small target exclusion 2018-12-22 02:19:25 -08:00
Abhishek Arya 7de7a3afad
Add checksum_fuzzer to bad build check exclusions
This is due to small number of edges in the fuzz target
2018-11-11 07:16:34 -08:00
Abhishek Arya 3af21b0252
Don't check for LLVMFuzzerTestOneInput when there is no fuzzing engine. (#1579) 2018-06-28 07:08:57 -07:00
jonathanmetzman 9c2fe11666
Fix check for LLVMFuzzerTestOneInput (#1572) 2018-06-26 08:23:56 -07:00
jonathanmetzman 36e576467c
Fix bad build check. (#1568)
* Fix bad build check.

Bad build checks previously just checked that a file is an executable
ELF. This is insufficient because libraries are also executable ELFs.
Add a check that the file contains LLVMFuzzerTestOneInput, in order
to consider a fuzz target.

Also update coverage and test_report for consistency.
2018-06-25 16:35:28 -07:00
Max Moroz 20e55ce3b1
[infra] Enable clange code coverage reports generation for local runs. (#1494)
* [infra] Enable clange code coverage reports generation for local runs.

* Use runner image and move corpus management to the helper.py
.

* Clean up, delete unnecessary stuff, add comments.

* Run fuzz targets in parallel. Do not exit in case of an error.

* Address review feedback, except of the threading thing.

* Fix a typo.

* Use ThreadPool implementatino available in standard python2.7 package.

* Add dry run support + no corpus download option.

* Fix flags handling + add log output in case of an error.

* Append arguments for fuzz target instead of replacing them.

* Remove dry run functionality as it currently errors out after two runs.

* Fix some spacing in the code.

* Update documentation regarding new code coverage script.
2018-06-14 15:00:46 -07:00
jonathanmetzman 7b9bc817cd
Use "jobs -rp" instead of "jobs -p" to avoid infinite loop. (#1411) 2018-05-10 17:47:05 -07:00
Max Moroz 69ffa9bfdf
[infra] Invoke run_fuzzer from bad_build_check for regression testing (fixes #1355). (#1357)
* [infra] Invoke run_fuzzer from bad_build_check for regression testing (fixes #1355).

* Address review comments.
2018-04-26 07:17:44 -07:00
Max Moroz 4df2262466
[infra] Enable bad build checks once again. (#838)
* [infra] Enable bad build checks once again.

* Minor typo.

* [bad_example] Update build flags for reproducing bad instrumentation scenario.

* [bad_example] split bad/no instrumentation case into two different ones.

* Use new approach for partial instrumentation detection + do that only for libFuzzer.

* Rename bad_example_bad_instrumentation into bad_example_partial_instrumentation.

* Calculate number of broken targets and fail if 10+% are broken.

* Multiprocess madness.

* Always run all checks and store all errors + clean up the code and add comments

* Add special handling for the projects with very small fuzz targets.

* Remove unnecessary semicolon.

* Address review comments.

* Address more review comments, small refactoring.
2018-04-17 09:31:53 -07:00
Max Moroz 942b5fbbe1 [infra] Enable bad_build_checks without test_all step that runs all the fuzzers. (#814)
* [infra] Enable bad_build_checks without test_all step that runs all the fuzzers.

* [infra] Add COPY step for test_all_for_bad_build script.

* [infra] Use SKIP_TEST_TARGET_RUN=1 to avoid running all fuzz targets during test_all.

* [infra] Invern the condition in test_all script.

* [infra] Finally fix the condition in test_all.
2017-09-06 11:55:07 -07:00
Max Moroz 4e23946573 [infra] Pass FUZZER_BINARY to bad_build_check instead of FUZZER. 2017-08-08 15:07:45 -07:00
Max Moroz f81476ca75 [infra] Add post build checks for catching and reporting bad builds + add test projects. (#754)
* [WIP] Add post build checks for catching and reporting bad builds + test projects.

* Move all type of issues into a single project. Tested all sanitizers.

* First version of the script for performing bad build checks. Still not ready to commit.\

* Added a valid example that should pass all the checks + fixed instrumentation check.

* Use SIGTERM and the handler calling _exit(0) for the startup crash case.

* Small fixes.

* Ignore startup_crash check_for fuzzing engines other than libFuzzer.

* Use "local" for local variables in the script, fix container name.

* Add COPY step for bad_build_check into base-runner Dockerfile.

* Make bad_build_check temporary noop unless EXPERIMENTAL_BAD_BUILD_CHECK is set to 1.

* Temporary remove test binaries step.

* Remove empty line.

* Remove unnecessary env variable.
2017-08-08 10:54:53 -07:00
robertswiecki 268d8052a2 Support honggfuzz as a FUZZING_ENGINE (#636) 2017-06-01 17:55:01 -07:00
Oliver Chang 2e00fe90d1 [infra] (experimental) Support building with AFL (#396) 2017-02-16 15:09:37 -08:00
Abhishek Arya 5ba44509fe Update test_all 2017-02-16 07:11:13 -08:00
Abhishek Arya d7bd27b071 Update test_all 2017-02-15 13:25:36 -08:00
Abhishek Arya fef863b9ef Update test_all (#393) 2017-02-15 13:16:34 -08:00
Mike Aizatsky 7f162d0fed [infra] pipefail is no longer needed 2016-12-12 16:33:03 -08:00
Mike Aizatsky 598c8ba618 [infra] separate test_report script for jenkins integration
Separate test_report script runs tests and generates junit-style
reports. The script doesn't fail when fuzzer fails, but marks it as
failed instead.

Fixes #168
2016-12-12 16:30:51 -08:00
Oliver Chang 6dde379193 Fix fuzzer executable detection in test_all. (#156) 2016-12-08 12:41:14 -08:00
Mike Aizatsky 0e7acedab3 Update test_all 2016-12-07 14:45:25 -08:00
Mike Aizatsky e92e678188 [infra] specifying testcase for junit report 2016-12-07 12:19:06 -08:00
Mike Aizatsky 01364bf2b7 [infra] extracting base-runner image 2016-11-18 14:53:09 -08:00