oss-fuzz/infra/base-images/base-runner
correctmost 0fe8dae146
infra: print log data when Python fuzz_target fails (#12502)
## Description

This will make it easier to debug coverage failures that are not
reproducible locally.

The failure that I am trying to debug:
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62231
-
https://oss-fuzz-build-logs.storage.googleapis.com/log-c420cf0c-f073-4c42-b75c-422971ef272e.txt

```
Step #5: Already have image (with digest): gcr.io/oss-fuzz-base/base-runner
Step #5: Entering python fuzzing
Step #5: Error happened getting coverage of fuzz_parse
Step #5: This is likely because Atheris did not exit gracefully
```

Similar log data is displayed in other blocks:

f716590249/infra/base-images/base-runner/coverage (L101-L105)


f716590249/infra/base-images/base-runner/coverage (L149-L153)


f716590249/infra/base-images/base-runner/coverage (L206-L210)


f716590249/infra/base-images/base-runner/coverage (L255-L260)

---

This PR is a continuation of
https://github.com/google/oss-fuzz/pull/12405 with a renamed branch to
avoid trial-build errors:

```
ERROR: (gcloud.builds.submit) INVALID_ARGUMENT: invalid build: invalid build tag "testing-cm/display-coverage-log": must match format "^[\\w][\\w.-]{0,127}$"
```

Co-authored-by: Vitor Guidi <vitorguidi@gmail.com>
2024-10-07 15:06:36 -03:00
..
gocoverage infra: Golang coverage fixes (#9812) 2023-02-28 09:13:22 -05:00
Dockerfile Jazzer Pro (#12375) 2024-08-27 10:57:51 +10:00
README.md [docs] Update base-runner with coverage command. (#9212) 2022-12-19 10:44:16 -05:00
bad_build_check infra: Roll OUR_LLVM_REVISION (#11714) 2024-04-30 09:29:51 +10:00
coverage infra: print log data when Python fuzz_target fails (#12502) 2024-10-07 15:06:36 -03:00
coverage_helper [cifuzz] Fuzz in cifuzz-base (#6142) 2021-08-05 13:27:24 -07:00
download_corpus Revert "Don't create empty corpus archive as it wont unpack. (#3903)" (#4048) 2020-06-30 13:03:44 -07:00
generate_differential_cov_report.py Lint differential cov script (#10570) 2023-06-21 20:02:17 -04:00
install_deps.sh Support building base-runner on aarch64. (#8186) 2022-08-09 04:10:55 +00:00
install_go.sh Update install_go.sh (#10000) 2023-03-29 13:31:51 +11:00
install_java.sh Jazzer Pro (#12375) 2024-08-27 10:57:51 +10:00
install_javascript.sh Update Node.js setup for JavaScript projects (#10941) 2023-09-12 18:09:41 -04:00
jacoco_report_converter.py [infra] Fix jacoco_report_converter.py (#12026) 2024-06-05 11:47:18 +01:00
nyc_report_converter.py Source-based code coverage reporting for Jazzer.js (#9758) 2023-02-23 18:51:21 +11:00
parse_options.py [infra] Add support for custom sanitizer options in run_fuzzer. (#4274) 2020-08-07 12:48:23 -07:00
profraw_update.py Update Clang toolchain from 18.0.0 to 18.1.8 (#12365) 2024-10-01 11:03:06 -03:00
python_coverage_runner_help.py Break up long line (#12184) 2024-07-09 12:25:52 -04:00
rcfilt Rust coverage report (for Suricata) (#4697) 2021-03-08 07:05:35 -08:00
reproduce [infra] Fix reproduce command invoking run_fuzzer for a single testcase (#4338). (#4367) 2020-08-25 11:38:50 -07:00
run_fuzzer Adding Ruby Support into OSS-Fuzz via Ruzzy (#12034) 2024-07-02 08:33:01 -04:00
ruzzy Adding Ruby Support into OSS-Fuzz via Ruzzy (#12034) 2024-07-02 08:33:01 -04:00
targets_list [infra] Make `targets_list` detect JVM/Python targets (#5775) 2021-05-16 18:37:55 +00:00
test_all.py Fix centipede's bad_build_check projects with many targets (#9606) 2023-02-06 18:48:33 -05:00
test_all_test.py [infra][tests][NFC] Change mocked function prefix from "mocked_" to "mock_" (#6198) 2021-08-12 11:25:57 -07:00
test_one.py [base-runner] no longer fail silently in test_one.py (#7776) 2022-05-31 17:07:52 -04:00

README.md

base-runner

Base image for fuzzer runners.

docker run -ti gcr.io/oss-fuzz-base/base-runner <command> <args>

Commands

Command Description
reproduce <fuzzer_name> <fuzzer_options> build all fuzz targets and run specified one with testcase /testcase and given options.
run_fuzzer <fuzzer_name> <fuzzer_options> runs specified fuzzer combining options with .options file
test_all.py runs every binary in /out as a fuzzer for a while to ensure it works.
coverage <fuzzer_name> generate a coverage report for the given fuzzer.

Examples

  • Reproduce using latest OSS-Fuzz build:
docker run --rm -ti -v <testcase_path>:/testcase gcr.io/oss-fuzz/$PROJECT_NAME reproduce <fuzzer_name>
  • Reproduce using local source checkout:
docker run --rm -ti -v <source_path>:/src/$PROJECT_NAME \
                    -v <testcase_path>:/testcase gcr.io/oss-fuzz/$PROJECT_NAME \
                    reproduce <fuzzer_name>