aboutsummaryrefslogtreecommitdiff
path: root/infra
AgeCommit message (Collapse)Author
2021-08-26rust coverage : only wrap cargo fuzz build (#6307)Catena cyber
Project image-rs uses cargo fuzz list
2021-08-26Fix exception in build. (#6323)Oliver Chang
Have build_project.Project() take in project.yaml contents and parse that.
2021-08-26[Ubuntu upgrade] Copy files from base-builder/ to base-builder-new/ (#6322)jonathanmetzman
Two of these changes that are important for the Ubuntu upgrade are the changes to "compile" and write_labels.py"
2021-08-26[cifuzz] Fix bug caused by Ubuntu upgrade. (#6318)jonathanmetzman
* [cifuzz] Fix bug caused by Ubuntu upgrade. systemd-detect-virt isn't being found. * fix
2021-08-26[cifuzz] Handle upgrade to Ubuntu 20.04 (#6249)jonathanmetzman
Handle upgrade to Ubuntu 20.04 1. Don't do any special handling for MSAN anymore. It isn't needed. 2. Don't do any special handling for msan-libs-builder it doesn't exist anymore. Related: https://github.com/google/oss-fuzz/issues/6180
2021-08-26[Ubuntu upgrade] Upgrade images to Ubuntu 20.04 (#6305)jonathanmetzman
Related: #6180.
2021-08-26[Ubuntu upgrade][infra] Remove deploy for msan-build (#6314)jonathanmetzman
Related: #6180
2021-08-25[build][infra] Improve build functions. (#6296)jonathanmetzman
Important functional changes involve mostly improvements to the command line scripts (this doesn't affect the build infra, only local use): 1. Make sure scripts use the same builder as builds requested by infra, otherwise builds will be very slow and will fail for larger projects. 2. Allow users to specify --test-images to use base images with suffix "-testing" 3. Allow script users to specify --parallel for parallel builds. 4. Allow script users to specify --testing so that builds are uploaded to testing buckets. 5. Allow script users to specify --branch so that builds use specified branch instead of master. 6. Clone oss-fuzz with depth 1 for improved speed and space usage. 7. Use logging instead of writing to stderr or print. 8. Allow scripts to accept multiple projects. 9. Allow script to keep executing after failure to get build steps. 10. Change scripts to use python3. 11. Tag more so builds are easier to query. 12. Log the gcb page for each build. Other changes include major refactoring: 1. Don't construct image names from scratch using format strings each time they are used. Provide a helper function for this. 2. Provide a helper function, get_env instead of constructing the env from scratch each time. 3. Move compile step into its own function: get_compile_step. 4. Move upload steps into their own helper function get_upload_steps. 5. Don't misuse the name image_project when we really mean cloud project. 6. Move cleanup step into its own helper function: get_cleanup_step. 7. Exit with returncode of main function from build_project. 8. Add unittests for build_project. 9. Make request_build share run_build code with build_project. 10. Use proper spacing in comments. 11. Test builds other than libfuzzer-ASAN-x86_64. Test other sanitizers, fuzzers and architectures 12. Make build_and_run_coverage share more code with build_project. 13. Move tests for build_and_run_coverage_test.py out of requst_coverage_test.py into their own file. 14. Use single quotes for strings. 15. Store state for a build in Build object instead of passing it everywhere. 16. Don't abuse project_yaml dict for storing project state. Use a Project object instead. 17. Better variable naming. 18. Use more classes instead of passing around arguments. 19. Use more f-strings. 20. Make scripts share main function. 21. Begin comments with uppercase and end with period. 22. Don't import functions or classes as dictated by style guide. 23. Share more test code in test_utils Related: #6180.
2021-08-25[Ubuntu upgrade] Remove support for prebuilt MSAN libraries. (#6280)jonathanmetzman
This is done in anticipation of the upgrade to Ubuntu 20.04 which wont support this. We'll do this first so we can handle any breakages caused by this step before needing to handle breakages caused by the upgrade. However, there shouldn't be any breakages due to #6281, but there may be some projects we overlooked. The only exception to this is libcxx. Related: #6180.
2021-08-24[Ubuntu upgrade][infra] Fix issue with write_labels.py (#6290)jonathanmetzman
/usr/bin/python3 doesn't exist and isn't pythonic. Change shebang to "/usr/bin/env python3" Related: #6180
2021-08-23[Ubuntu Upgrade] Raise threshold MSAN calls in for bad build check. (#6272)jonathanmetzman
Raise the threshold as honggfuzz builds in focal seem to have more calls. Related: #6180.
2021-08-23add swift (#6270)asraa
Signed-off-by: Asra Ali <asraa@google.com>
2021-08-23Fix coverage command and misc fixes (#6262)jonathanmetzman
2021-08-19[infra] Add a script for building all base-images with "-testing" (#6248)jonathanmetzman
suffix and pushing them to gcr.io/oss-fuzz-base. This is useful for testing changes to images. I used it to test changes I made for #6180. This does not support msan as that image is being removed. Also lint.
2021-08-20New base builder without lang specific installation + swift base (#5986)asraa
Removes unnecessary stuff in base-builder image to create a base-builder-new, and then adds a base-builder-swift on top of this that swift projects can use (without JVM/Go/etc fuzzing).
2021-08-17Don't upload builds in run_fuzzers. (#6151)Oliver Chang
The current way adds a lot of ordering assumptions, and doesn't fit too well with parallel batch fuzzing either. Add a "upload-build" boolean action input that can be added to "build_fuzzers" to upload latest builds instead. Builds are now uploaded by commit hash, rather than a fixed "latest" name. ClusterFuzzLite's download_latest_build will check the last 3 commits and download the first available build by git hash.
2021-08-16Update fuzzers to new Atheris version (#6060)Bitshift
* Update fuzzers to new Atheris version * Pin new atheris version * Change = to == * Change path where Atheris fuzzers ld_preload from * Update hypothesis fuzzer to work with new atheris * Set version to 2.0.1 * Switch to Atheris 2.0.4 * Correct spelling of pygments_fuzzer decorator * instrument yaml_reader * Change to latest Atheris * Set atheris version to 2.0.6
2021-08-12[infra][tests][NFC] Change mocked function prefix from "mocked_" to "mock_" ↵jonathanmetzman
(#6198) Also rename mock_ functions to have impl suffix so we can use mock_ in place of mocked_
2021-08-11[helper] Change logging from error to info (#6200)jonathanmetzman
2021-08-11[infra] Enable Jazzer support for UBSan C++ features (#6202)Fabian Meumertzheim
Jazzer now links in the UBSan C++ runtime and thus support the vptr and function sanitizer settings.
2021-08-10[cifuzz] Add pruning task (#6188)jonathanmetzman
Fixes: #6064
2021-08-10[infra][build] Switch to f-strings. (#6182)jonathanmetzman
2021-08-10[presubmit][NFC] Use descriptive tone in docstrings (#6192)jonathanmetzman
2021-08-09[infra] Upgrade cmake to latest release (3.21.1) (#6185)Robert Löhning
Qt now requires 3.20 or higher.
2021-08-06[cifuzz][nfc] Switch log info to log error (#6178)jonathanmetzman
2021-08-06Bump jinja2 from 2.10 to 2.11.3 in /infra/ci (#6172)dependabot[bot]
Bumps [jinja2](https://github.com/pallets/jinja) from 2.10 to 2.11.3. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/2.10...2.11.3) --- updated-dependencies: - dependency-name: jinja2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-05[cifuzz] Speculative fix for issue with seed corpus/backup corpus (#6175)jonathanmetzman
This should fix #6173
2021-08-05[cifuzz] Add feedback for bad build check (#6174)jonathanmetzman
2021-08-05[cifuzz] Fuzz in cifuzz-base (#6142)jonathanmetzman
Fixes: #5926
2021-08-05[ClusterFuzzLite][docs] Start writing docs (#6165)jonathanmetzman
I started writing some important docs, such as overview, build_integration, and running_clusterfuzzlite. However, most important docs are still TODO. This PR at least adds a skeleton for those docs.
2021-08-05infra: add coverage sanitizer option (#6171)DavidKorczynski
* infra: add coverage sanitizer option * fix lint
2021-08-04[presubmit][NFC] Fix copyright linejonathanmetzman
2021-08-04[infra][NFC] Use one source of truth for engines, languages etc. (#6163)jonathanmetzman
Do this only where it makes sense. For example, since CIFuzz doesn't support dataflow, maintain a separate source of truth.
2021-08-04[CIFuzz] Force external to use .clusterfuzzlite for build integrations. (#6167)jonathanmetzman
2021-08-04[CIFuzz][NFC] Add function for setting env vars in docker command. (#6162)jonathanmetzman
2021-08-04[CIFuzz][helper] Fix external project support and add tests. (#6161)jonathanmetzman
2021-08-04[CIFuzz] Add support for external projects to helper.py (#6141)jonathanmetzman
Add support to helper.py for external projects for all subcommands except `download_corpora`. External users just need to specify `build_integration_path`, `project_src_path` and `external`. Also do a big refactor to pass a project object as part of args instead of a string containing the name of the project or its path. Related: #6125
2021-08-03[cifuzz] Only grab github-specific env vars on github (#6150)jonathanmetzman
This removes need for non-OSS-Fuzz users to fake using OSS-Fuzz. Fixes: #6129
2021-08-03[infra][NFC] Use "testcase" instead of test_case for consistency. (#6159)jonathanmetzman
2021-08-03[cifuzz][NFC] Move default configs to config_utils.py (#6157)jonathanmetzman
2021-08-03[cifuzz][NFC] Move Workspace to workspace_utils. (#6158)jonathanmetzman
In hindsight, it doesn't have a lot to do with the rest of config_utils. And config_utils is getting crowded.
2021-08-03[cifuzz] Add basic end-to-end tests. (#6139)jonathanmetzman
This test doesn't really do diffing or affected fuzzers properly. Nor does it check the workspace for existence of certain things, nor does check the filesystem for proof things happened. It is still a WIP.
2021-08-03[helper] Switch from print to log (#6149)jonathanmetzman
2021-08-02[cifuzz] Create validate method on BaseConfig (#6135)jonathanmetzman
* [cifuzz] Create validate method on BaseConfig Use it to validate that either OSS_FUZZ_PROJECT_NAME or BUILD_INTEGRATION_PATH is set. Also use it to validate that workspace is set (rather than duplicate code). Add tests. * Use env var hack to bypass valdiation * fix * fix * fmt * fix * tmp * fix
2021-07-30[cifuzz] Don't delete base-runner (#6143)jonathanmetzman
We shouldn't delete it, because we need to use it again. This saves about 13 seconds per run. Fixes: #5982
2021-07-30Handle CI fuzz builds from events other than push or pull_request. (#6055)Oliver Chang
Don't try to find unaffected fuzzers by diffing against a base commit as they don't exist in those contexts. For #6053.
2021-07-29[CIFuzz] Allow users to specify if unreproducible crashes are reported (#6138)jonathanmetzman
2021-07-29[NFC][cifuzz] Improve env var handling. (#6137)jonathanmetzman
Also delete useless TODOs.
2021-07-29[CIFuzz] Change behavior of PROJECT_SRC_PATH to be clearer. (#6136)jonathanmetzman
Don't assume that path is relative to workspace if it is not absolute. Only make this assumption on GitHub where it will always be true. Also, add tests.
2021-07-29[cifuzz] Implement get_files_covered_by_target for external users (#6132)jonathanmetzman
This should mostly complete support for affected fuzzers for external users. This implementation is still imperfect however. It relies on the name of the repo being the same as the name of the directory in $SRC/ that the repo is checked out in (i.e. repo must be checked out in $SRC/$REPO_NAME).