mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 10:49:14 +00:00
Revert "fuzzing: Add supportsErrorInjection option to DawnWireServerFuzzer"
This reverts commit f58f69f66b.
Reason for revert: This breaks the MSVC build because the whitebox end2end tests try to both import and export the error injector symbols from libdawn_native
Original change's description:
> fuzzing: Add supportsErrorInjection option to DawnWireServerFuzzer
>
> This option will be used by backends that support error injection so
> that errors can be injected into a "clean" corpus to generate a seed
> corpus with good examples of injected error conditions.
>
> Bug: dawn:295
> Change-Id: I837acdde6dd4274adb56edf8e4307427f8d6333b
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14681
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
TBR=cwallez@chromium.org,kainino@chromium.org,enga@chromium.org
Change-Id: I14a15fcd094d431cbb8a29d5642a4a7fe6a11f4c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:295
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14741
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
2cb76ab598
commit
87d3138158
@@ -20,39 +20,29 @@
|
||||
# Exit if anything fails
|
||||
set -e
|
||||
|
||||
if [ "$#" -lt 3 ]; then
|
||||
if [ "$#" -ne 3 ]; then
|
||||
cat << EOF
|
||||
|
||||
Usage:
|
||||
$0 <out_dir> <fuzzer_name> <test_name> [additional_test_args...]
|
||||
$0 <out_dir> <fuzzer_name> <test_name>
|
||||
|
||||
Example:
|
||||
$0 out/fuzz dawn_wire_server_and_vulkan_backend_fuzzer dawn_end2end_tests --gtest_filter=*Vulkan
|
||||
$0 out/fuzz dawn_wire_server_and_frontend_fuzzer dawn_end2end_tests
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
all_args=("$@")
|
||||
out_dir=$1
|
||||
fuzzer_name=$2
|
||||
test_name=$3
|
||||
additional_test_args=("${all_args[@]:3}")
|
||||
|
||||
testcase_dir="/tmp/testcases/${fuzzer_name}/"
|
||||
injected_error_testcase_dir="/tmp/testcases/${fuzzer_name}_injected/"
|
||||
minimized_testcase_dir="/tmp/testcases/${fuzzer_name}_minimized/"
|
||||
|
||||
# Print commands so it's clear what is being executed
|
||||
set -x
|
||||
|
||||
# Make a directory for temporarily storing testcases
|
||||
mkdir -p "$testcase_dir"
|
||||
|
||||
# Make an empty directory for temporarily storing testcases with injected errors
|
||||
rm -rf "$injected_error_testcase_dir"
|
||||
mkdir -p "$injected_error_testcase_dir"
|
||||
|
||||
# Make an empty directory for temporarily storing minimized testcases
|
||||
rm -rf "$minimized_testcase_dir"
|
||||
mkdir -p "$minimized_testcase_dir"
|
||||
@@ -64,16 +54,10 @@ fuzzer_binary="${out_dir}/${fuzzer_name}"
|
||||
test_binary="${out_dir}/${test_name}"
|
||||
|
||||
# Run the test binary
|
||||
$test_binary --use-wire --wire-trace-dir="$testcase_dir" $additional_test_args
|
||||
$test_binary --use-wire --wire-trace-dir="$testcase_dir"
|
||||
|
||||
# Run the fuzzer over the testcases to inject errors
|
||||
$fuzzer_binary --injected-error-testcase-dir="$injected_error_testcase_dir" -runs=0 "$testcase_dir"
|
||||
|
||||
# Run the fuzzer to minimize the testcases + injected errors
|
||||
$fuzzer_binary -merge=1 "$minimized_testcase_dir" "$injected_error_testcase_dir" "$testcase_dir"
|
||||
|
||||
# Turn off command printing
|
||||
set +x
|
||||
# Run the fuzzer to minimize the corpus
|
||||
$fuzzer_binary -merge=1 "$minimized_testcase_dir" "$testcase_dir"
|
||||
|
||||
if [ -z "$(ls -A $minimized_testcase_dir)" ]; then
|
||||
cat << EOF
|
||||
|
||||
Reference in New Issue
Block a user