Injected failure in fuzzer target
To test whether black-box fuzzing is working, this change injects an
assertion failure into tint_black_box_fuzzer_target. Once it has been
established that this failure is found by the black box fuzzers, it
should be removed.
Bug: https://crbug.com/1246587
Change-Id: I408bdb116e817879edcec025f644e6f0f6f8bb73
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65340
Auto-Submit: Alastair Donaldson <afdx@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Alastair Donaldson <afdx@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/fuzzers/tint_black_box_fuzz_target.cc b/fuzzers/tint_black_box_fuzz_target.cc
index 95ed578..bfc1e86 100644
--- a/fuzzers/tint_black_box_fuzz_target.cc
+++ b/fuzzers/tint_black_box_fuzz_target.cc
@@ -97,7 +97,11 @@
if (target_format == "hlsl") {
tint::fuzzers::CommonFuzzer fuzzer(tint::fuzzers::InputFormat::kWGSL,
tint::fuzzers::OutputFormat::kHLSL);
- return fuzzer.Run(data.data(), data.size());
+ int result = fuzzer.Run(data.data(), data.size());
+ assert(false &&
+ "Deliberate temporary assertion failure to check that ClusterFuzz "
+ "black box fuzzer target is working.");
+ return result;
} else if (target_format == "msl") {
tint::fuzzers::DataBuilder builder(data.data(), data.size());
tint::writer::msl::Options options;