Change injected failure from assert to abort
An assertion failure had been injected to check that black box fuzzing is working, but as ClusterFuzz runs a release mode build this was not triggering. This change turns the assertion failure into an abort. Once it has been established that the abort is triggered by the black box fuzzers, it should be removed. Bug: https://crbug.com/1246587 Change-Id: I5afcea97132e5a7f13df4ba353121deccc901e60 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65901 Reviewed-by: Ben Clayton <bclayton@google.com> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Alastair Donaldson <afdx@google.com>
This commit is contained in:
parent
22daca166b
commit
8b2181c98f
|
@ -98,9 +98,11 @@ int main(int argc, const char** argv) {
|
||||||
tint::fuzzers::CommonFuzzer fuzzer(tint::fuzzers::InputFormat::kWGSL,
|
tint::fuzzers::CommonFuzzer fuzzer(tint::fuzzers::InputFormat::kWGSL,
|
||||||
tint::fuzzers::OutputFormat::kHLSL);
|
tint::fuzzers::OutputFormat::kHLSL);
|
||||||
int result = fuzzer.Run(data.data(), data.size());
|
int result = fuzzer.Run(data.data(), data.size());
|
||||||
assert(false &&
|
if (result == 0) {
|
||||||
"Deliberate temporary assertion failure to check that ClusterFuzz "
|
// TODO(afdx): Deliberate temporary abort to check that ClusterFuzz black
|
||||||
"black box fuzzer target is working.");
|
// box fuzzer target is working
|
||||||
|
abort();
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
} else if (target_format == "msl") {
|
} else if (target_format == "msl") {
|
||||||
tint::fuzzers::DataBuilder builder(data.data(), data.size());
|
tint::fuzzers::DataBuilder builder(data.data(), data.size());
|
||||||
|
|
Loading…
Reference in New Issue