From 1f629aace86210e2935496bcd1b173718456c470 Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Fri, 28 Apr 2017 19:22:29 +0200 Subject: [PATCH] [wasm] Move the wasm fuzzer corpus to a different directory The current test/fuzzer/wasm directory is used for two things: 1) as the corpus directory for clusterfuzz 2) to test in v8 that the fuzzer runs correctly. With the newly added files from the wasm spec tests this directory grew quite big and adds unnecessary load on the trybots. Therefore I want to do the following steps: 1) In this CL for V8: create a new directory for the clusterfuzz corpus 2) In chromium: use the new corpus directory 3) In v8: clean up the old directory to use it on the trybots. R=bradnelson@chromium.org CC=mmoroz@chromium.org Change-Id: If690022558bb5780edf5a3649fb9745ef9c7407a Reviewed-on: https://chromium-review.googlesource.com/490367 Commit-Queue: Brad Nelson Reviewed-by: Brad Nelson Cr-Commit-Position: refs/heads/master@{#44991} --- .gitignore | 4 ++++ DEPS | 22 ++++++++++++++++++ test/fuzzer/wasm_asmjs_corpus.tar.gz.sha1 | 1 + test/fuzzer/wasm_corpus.tar.gz.sha1 | 1 + tools/wasm/update-wasm-fuzzers.sh | 28 +++++++++++------------ 5 files changed, 42 insertions(+), 14 deletions(-) create mode 100644 test/fuzzer/wasm_asmjs_corpus.tar.gz.sha1 create mode 100644 test/fuzzer/wasm_corpus.tar.gz.sha1 diff --git a/.gitignore b/.gitignore index 6373555964..58444880a6 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,10 @@ /src/inspector/build/closure-compiler /src/inspector/build/closure-compiler.tar.gz /test/benchmarks/data +/test/fuzzer/wasm_corpus +/test/fuzzer/wasm_corpus.tar.gz +/test/fuzzer/wasm_asmjs_corpus +/test/fuzzer/wasm_asmjs_corpus.tar.gz /test/fuzzer/wasm /test/fuzzer/wasm.tar.gz /test/fuzzer/wasm_asmjs diff --git a/DEPS b/DEPS index 104bc90854..a86dcbc7d0 100644 --- a/DEPS +++ b/DEPS @@ -212,6 +212,17 @@ hooks = [ "-s", "v8/test/wasm-spec-tests/tests.tar.gz.sha1", ], }, + { + "name": "wasm_fuzzer_new", + "pattern": ".", + "action": [ "download_from_google_storage", + "--no_resume", + "--no_auth", + "-u", + "--bucket", "v8-wasm-fuzzer", + "-s", "v8/test/fuzzer/wasm_corpus.tar.gz.sha1", + ], + }, { "name": "wasm_fuzzer", "pattern": ".", @@ -223,6 +234,17 @@ hooks = [ "-s", "v8/test/fuzzer/wasm.tar.gz.sha1", ], }, + { + "name": "wasm_asmjs_fuzzer_new", + "pattern": ".", + "action": [ "download_from_google_storage", + "--no_resume", + "--no_auth", + "-u", + "--bucket", "v8-wasm-asmjs-fuzzer", + "-s", "v8/test/fuzzer/wasm_asmjs_corpus.tar.gz.sha1", + ], + }, { "name": "wasm_asmjs_fuzzer", "pattern": ".", diff --git a/test/fuzzer/wasm_asmjs_corpus.tar.gz.sha1 b/test/fuzzer/wasm_asmjs_corpus.tar.gz.sha1 new file mode 100644 index 0000000000..865ca915f2 --- /dev/null +++ b/test/fuzzer/wasm_asmjs_corpus.tar.gz.sha1 @@ -0,0 +1 @@ +cf1777646f8d4557504442e9bd59e908519ffec8 \ No newline at end of file diff --git a/test/fuzzer/wasm_corpus.tar.gz.sha1 b/test/fuzzer/wasm_corpus.tar.gz.sha1 new file mode 100644 index 0000000000..32bfeceb0a --- /dev/null +++ b/test/fuzzer/wasm_corpus.tar.gz.sha1 @@ -0,0 +1 @@ +f6b95b7dd8300efa84b6382f16cfcae4ec9fa108 \ No newline at end of file diff --git a/tools/wasm/update-wasm-fuzzers.sh b/tools/wasm/update-wasm-fuzzers.sh index 7027d21ab8..ab9f84be28 100755 --- a/tools/wasm/update-wasm-fuzzers.sh +++ b/tools/wasm/update-wasm-fuzzers.sh @@ -9,48 +9,48 @@ TOOLS_WASM_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd ${TOOLS_WASM_DIR}/../.. -rm -rf test/fuzzer/wasm -rm -rf test/fuzzer/wasm_asmjs +rm -rf test/fuzzer/wasm_corpus +rm -rf test/fuzzer/wasm_asmjs_corpus tools/dev/gm.py x64.release all -mkdir -p test/fuzzer/wasm -mkdir -p test/fuzzer/wasm_asmjs +mkdir -p test/fuzzer/wasm_corpus +mkdir -p test/fuzzer/wasm_asmjs_corpus # asm.js ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ - --dump-wasm-module-path=./test/fuzzer/wasm_asmjs/" mjsunit/wasm/asm* + --dump-wasm-module-path=./test/fuzzer/wasm_asmjs_corpus/" mjsunit/wasm/asm* ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ - --dump-wasm-module-path=./test/fuzzer/wasm_asmjs/" mjsunit/asm/* + --dump-wasm-module-path=./test/fuzzer/wasm_asmjs_corpus/" mjsunit/asm/* # WASM ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ - --dump-wasm-module-path=./test/fuzzer/wasm/" unittests + --dump-wasm-module-path=./test/fuzzer/wasm_corpus/" unittests ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ - --dump-wasm-module-path=./test/fuzzer/wasm/" wasm-spec-tests/* + --dump-wasm-module-path=./test/fuzzer/wasm_corpus/" wasm-spec-tests/* ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ - --dump-wasm-module-path=./test/fuzzer/wasm/" mjsunit/wasm/* + --dump-wasm-module-path=./test/fuzzer/wasm_corpus/" mjsunit/wasm/* ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ - --dump-wasm-module-path=./test/fuzzer/wasm/" \ + --dump-wasm-module-path=./test/fuzzer/wasm_corpus/" \ $(cd test/; ls cctest/wasm/test-*.cc | \ sed -es/wasm\\///g | sed -es/[.]cc/\\/\\*/g) # Delete items over 20k. -for x in $(find ./test/fuzzer/wasm/ -type f -size +20k) +for x in $(find ./test/fuzzer/wasm_corpus/ -type f -size +20k) do rm $x done -for x in $(find ./test/fuzzer/wasm_asmjs/ -type f -size +20k) +for x in $(find ./test/fuzzer/wasm_asmjs_corpus/ -type f -size +20k) do rm $x done # Upload changes. cd test/fuzzer -upload_to_google_storage.py -a -b v8-wasm-fuzzer wasm -upload_to_google_storage.py -a -b v8-wasm-asmjs-fuzzer wasm_asmjs +upload_to_google_storage.py -a -b v8-wasm-fuzzer wasm_corpus +upload_to_google_storage.py -a -b v8-wasm-asmjs-fuzzer wasm_asmjs_corpus