[v8][inspector][fuzzer] Use script to generate corpus
We currently use the existing v8 inspector tests as seed for the inspector fuzzer. They don't work well for a couple of reasons though: 1) The inspector tests use utilities defined in the 'protocol-test.js' file, which is preloaded automatically by the inspector test runner. That file is part of the corpus, so the fuzzer might get lucky and combine 'protocol-test.js' with another corpus file, but in most cases it won't. 2) The inspector fuzzer does not provide all utils that the inspector-test executable provides. In particular, file access is prohibited, i.e. `utils.read` and `utils.load` are not available. 3) Some tests load more files as prerequisite, e.g. all wasm tests load the 'wasm-inspector-test.js' file which defines wasm-specific utilities. 4) The current corpus also includes the '*-expected.txt' files, which is not a big problem, but adds files to the corpus which are not interesting for the fuzzer. This CL fixes all these issues by generating the corpus via a small python script. The script scans the v8/test/inspector directory for '*.js' files, and generates a respective fuzzer corpus file in the output directly. This file includes a copy of the 'protocol-test.js' file, and all `utils.load` calls are resolved as well. R=mbarbella@chromium.org CC=machenbach@chromium.org, szuend@chromium.org Bug: chromium:1142437 Change-Id: I1f15182b7afcc7741c9daf96af8e734af3325f54 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2563552Reviewed-by:Martin Barbella <mbarbella@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#831926}
Showing
Please register or sign in to comment