Commit Graph

120 Commits

Author SHA1 Message Date
Catena cyber 07ea81ba3e
[infra] Add code coverage report generation for Go projects (#3142)
* Golang coverage report

* Enables golang coverage report for gonids and go-dns

* Generates summary for golang coverage reports

* Performance profile for golang projects
2020-11-19 00:14:30 -08:00
Max Moroz e4d3fb0f8c
[infra][docs] Be more explicit about code coverage being supported for C/C++ only (#4284). (#4303)
* [infra][docs] Be more explicit about code coverage being supported for C/C++ only (#4284).

* fix typos and pass env variable
2020-08-12 09:32:05 -07:00
Abhishek Arya dbeab81f5d
Add corpus-dir to run_fuzzer, for later use in coverage cmd. (#4191)
* Add corpus-dir to run_fuzzer, for later use in coverage cmd.

* Update as per comment.
2020-07-24 16:41:45 -07:00
Max Moroz 70d278bb53
[infra] Rename msan-builder to msan-libs-builder (#3388). (#4190)
* [infra] Rename msan-builder to msan-libs-builder and add (broken) dfsan-libs-builder (#3388).

* remove dfsan-libs-builder for now

* presubmit format
2020-07-24 12:38:00 -07:00
Max Moroz a9d0062a55
[infra] Rename base-msan-builder image to base-sanitizer-libs-builder (#3388). (#4187)
* [infra] Rename base-msan-builder image to base-sanitizer-builder (#3388).

* rename to base-sanitizer-libs-builder
2020-07-23 16:36:58 -07:00
Max Moroz 33295d69f7
[infra] Do not pass empty port value to docker. (#4110) 2020-07-10 15:49:46 -07:00
Oliver Chang 4a51ecb61f
build_specified_commit: Handle build.sh which are part of upstream repo. (#3932)
This is a best effort attempt to parse the relevant copy command from
the Dockerfile.

Also add a main function to build_specified_commit to make it easier to
test.
2020-06-10 17:12:28 +10:00
Oliver Chang e8ef609568
Relax project language requirement. (#3846)
This is necessary for the bisector to be able to build older revisions.

Print a warning instead.
2020-05-20 08:17:24 +10:00
Abhishek Arya 22443e5230
Parse project language and use in infra/helper.py (#3834)
* Parse project language and use in infra/helper.py

* Fix exception message.
2020-05-17 19:22:36 -07:00
Oliver Chang 1e83b88e95
Quick fix for helper.py build_fuzzers. (#3832) 2020-05-18 11:02:26 +10:00
Oliver Chang 2d972c9162
Add a better check for crash during bisection. (#3758) 2020-05-04 16:50:25 +10:00
Oliver Chang 6b79797ed3
helper: Clean /work as well if --clean is specified. (#3738) 2020-04-30 15:32:17 +10:00
Oliver Chang aa045b9b37
Bisector fixes. (#3601)
- Copy /src from host instead of checking out repo on host. This fixes
  issues with dependencies in the main repo.
- Add some more logging.
2020-04-14 11:38:23 +10:00
Abhishek Arya f4878b30fc
Add check_build for Honggfuzz targets, enable in travis. (#3596) 2020-04-08 14:24:34 -07:00
Leo Neat 4c01a56101
OSSFUZZ to OSS_FUZZ (#3535)
Changing the helper variable OSSFUZZ_DIR name to OSS_FUZZ_DIR as per request in #3516.
2020-03-24 10:04:27 -07:00
Jakub Jelen 3c248cdc57
[infra] helper: Add possibility to pass source directory to gdb/shell commands to ease local debugging (#3465)
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2020-03-10 16:49:10 -07:00
jonathanmetzman db6b6e7fd2 [infra] helper: fix regression introducing attribute error when reproducing crashes (#3246) 2020-01-16 13:54:23 -08:00
jonathanmetzman bf3592de30
[infra] Make helper.py presubmit-clean (#3237) 2020-01-15 13:37:07 -08:00
Leo Neat 14582175d0 [infra] Scripts for building fuzzers with CIFuzz (#3207) 2020-01-15 13:30:57 -08:00
Leo Neat cca04a14f4 [infra] Fix env variable in the helper.py repoduce command (#3230) 2020-01-14 10:50:35 -08:00
jonathanmetzman 345d49adba
Reland Make bad_build_check more likely to catch hardcoding /out (#3180) (#3205)
This reverts commit 689c3f4b65.
2020-01-08 08:02:45 -08:00
jonathanmetzman 689c3f4b65
Revert "Make bad_build_check more likely to catch hardcoding /out (#3180)" (#3197)
Revert so that we don't get two errors in a row.

This reverts commit 14bdd9332c.
2020-01-07 08:23:13 -08:00
Leo Neat 9532d4781a [infra] Fixing bisection to work with more OSS-Fuzz projects (#3152)
* Max comments

* Added bisection tests

* Added test cases

* Docker run command added to build_specific commit

* Infer main repo uses docker image rather than docker file

* Added mores tests for repo infer

* With verbosity

* Formatting

* Bisection fixed

* Formatting updates

* Oliver small comments.

* Script infer main repo

* Detect repo and test module finished

* Detect main repo from script

* Regex searching

* Regex searching

* Max comments + bisector test script

* Oliver comments

* Max's comments

* String concat update

* Jonathan comments
2020-01-06 12:17:26 -08:00
jonathanmetzman 14bdd9332c
Make bad_build_check more likely to catch hardcoding /out (#3180) 2020-01-06 10:48:35 -08:00
Leo Neat 2c05fb229f [infra] Add support for Bisecting Git Commits Introducing Crashes(#3119) 2019-12-16 16:48:49 -08:00
jonathanmetzman a0b29b879f
Remove trailing whitespace (#3135) 2019-12-16 15:30:12 -08:00
Leo Neat 2dd2a0fdcc [infra] Add functionality to check out a specific commit for a project (#3092)
* Starting the git python API

* repo manager working with tests

* Docker repo manager working, can update image with specific commit

* Working bisection

* Formatting and linting

* Working bisection

* Specific commit checkout

* Specific commit checkout

* Removed bisector and updated helper

* remove branch bug

* Max comments

* Added tests for infer main repo

* Oliver comments

* helper.py function names change

* Oliver comments pt. 2

* Olivers comments

* Formatting updates

* Removing DockerRepoManager class

* Removing DockerRepoManager class

* Changing from copying repo to docker image to mounting repo on docker image

* Jonathan comments

* Build image from commit tests

* Oliver comments pt.3

* Oliver comments pt.4

* Linting

* Max comments pt. 2

* change check commit exists

* Max comments pt. 3

* Regex updated

* Formatting updates
2019-12-12 09:26:37 -08:00
jonathanmetzman c4202c2f48
Revert "Use "x86" instead of "i386" for better name recognition. (#2685)" (#2687)
This reverts commit 0c6cc5cae8.
2019-08-12 10:54:18 -07:00
jonathanmetzman 0c6cc5cae8
Use "x86" instead of "i386" for better name recognition. (#2685)
It seems more people understand x86 than i386, use this term instead.
2019-08-12 10:35:16 -07:00
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
Evgeny Vereshchagin 91a17744a0 infra: skip files whose names start with afl while looking for fuzz targets (#2445)
This should help to get rid of the "WARNING: corpus for systemd_afl-showmap not found:"
messages (that are harmless but confusing a bit). In general _get_fuzz_targets
should probably be in sync with ./infra/base-images/base-runner/test_all (where a file
is considered a fuzz target if grep can find "ELF" in it and so on).
2019-05-24 11:06:22 -07:00
jonathanmetzman 3976a002af
[i386] Improve linking and bad build check (#2410)
Improve linking by copying i386 libs instead of adding `-L` to `CXXFLAGS`
Get bad_build_check working for i386 binaries and add architecture check.
2019-05-14 10:18:02 -07:00
jonathanmetzman c60fcd7247
Add initial support for i386 builds (#2347)
This feature is not yet officially supported
2019-05-13 15:01:25 -07:00
jonathanmetzman 3df307ad59
use immutable default arguments (#2341) 2019-04-22 12:28:07 -07:00
jonathanmetzman c3d7aba005
Prevent misuse of check_build (#2340)
Don't allow using check_build with builds it doesn't actually support.
2019-04-22 09:50:11 -07:00
Max Moroz 946d0603ba
[infra] Enabling DataFlow build configuration (#1632). (#2292)
* [infra] Enabling DataFlow build configuration (#1632).

* Copy all data flow scripts from the libFuzzer repo.
2019-04-09 07:25:14 -07:00
Evgeny Vereshchagin 8f5657fae3 infra: add a command for downloading all corpora for a project from GCS (#2010)
This partly addresses https://github.com/google/oss-fuzz/issues/2006.
2018-12-11 14:30:54 +11:00
Max Moroz 6def182595
[infra] Clarify "run_fuzzer" and "shell" commands and remove "profile". (#1939) 2018-11-09 09:24:54 -08:00
Evgeny Vereshchagin 3358b336be [infra]: place the findings of fuzzers run with `helper.py run_fuzzer` in $OUT (#1922)
When `libFuzzer` is used as a fuzzing engine it conveniently puts
everything it finds into its working directory, which happens to
be $OUT. When any other engine is used, the output is sent to /tmp,
which disappears as soon as the container stops. That makes it
unnecessarily hard to extract reproducers found by afl for further analysis
without joining the mount namespace of a running container and
almost impossible with `honggfuzz`, that exits immediately after a crash.
2018-11-08 09:27:46 +11:00
Max Moroz 7703e360de
[infra] Remove sancov and rename "profile" to "coverage". (#1839)
* [infra] Remove sancov and rename "profile" to "coverage".

* Bring coverage flags back.

* Update projects files that rely on SANITIZER="profile".
2018-10-01 06:43:21 -07:00
Max Moroz f1e7093d22
[infra] profile command: do not fail hard if some fuzz targets have no corpus. (#1719)
* [infra] profile command: do not fail hard if some fuzz targets have no corpus.

* Change listing to corpus_listing to be more explicit.

* Address review comment from Abhishek
2018-08-16 11:41:39 -07:00
Max Moroz dc8b440fe9
[infra] Follow-up for the incorrect extraction of WORKDIR from a Dockerfile (#1699). (#1702)
* [infra] Follow-up for the incorrect extraction of WORKDIR from a Dockerfile (#1699).

* Return an error if local checkout used with "WORKDIR /src".
2018-08-09 18:04:37 -07:00
Max Moroz 8d3e462bd6
[infra] Prevent mounting local checkout to $SRC + clean up Dockerfiles (#1699). (#1700) 2018-08-09 12:29:31 -07:00
Max Moroz 645a0375fe
[infra] Support extra arguments for llvm-cov + update the binaries. (#1629)
* [infra] Support extra arguments for llvm-cov + update the binaries.

* Slightly change the doc to be less confusing.
2018-07-19 15:58:58 -07:00
Oliver Chang 621cb43076
helper: Better support for building from local source (#1589). (#1595)
Parse WORKDIR from the Dockerfile and use that to mount in the local
source.
2018-07-04 14:23:23 +10:00
Abhishek Arya 4e87bd622d
Revert "Add support for running perffuzz in infra/helper.py (#1540)" (#1578)
This reverts commit 7f26e2fd92.
2018-06-28 06:11:32 -07:00
Abhishek Arya 7f26e2fd92
Add support for running perffuzz in infra/helper.py (#1540)
* Add support for running perffuzz in infra/helper.py
https://github.com/carolemieux/perffuzz

* Update compile_perffuzz

* Update run_fuzzer
2018-06-19 15:02:00 -07:00
Max Moroz 9874e09f53
[infra] helper.py: support "profile" command for a single fuzz target with arbitrary corpus location. (#1535)
* [infra] helper.py: support "profile" command for a single fuzz target with arbitrary corpus location.

* Address review feedback.

* Update code_coverage.md page.
2018-06-18 14:19:48 -07:00
Alex Gaynor d48b11f529 [infra] helper.py: rewrite conditional to be more readable and idiomatic (#1534)
* Rewerite conditional to be more readable and idiomatic

* In fact, simplify further
2018-06-18 11:13:36 -07:00
Max Moroz 6d72d18132 [infra] helper.py profile: do not append project name prefix to fuzz target name if it is there. 2018-06-18 10:57:09 -07:00