Remove WGSL and SPIR-V reader fuzzers
Fuzzing of the WGSL and SPIR-V readers is well covered by fuzzers that do both reading and writing. This change removes the fuzzers that only do reading. Fixes: tint:1254 Change-Id: Ice93016a6e95be7a2e8418387c35f20be13266e5 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66923 Auto-Submit: Alastair Donaldson <afdx@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
parent
c34f08dd45
commit
54180d6631
|
@ -87,17 +87,6 @@ if (build_with_chromium) {
|
|||
]
|
||||
}
|
||||
|
||||
if (tint_build_wgsl_reader) {
|
||||
fuzzer_test("tint_wgsl_reader_fuzzer") {
|
||||
sources = [ "tint_wgsl_reader_fuzzer.cc" ]
|
||||
deps = [ ":tint_fuzzer_common_with_init" ]
|
||||
dict = "dictionary.txt"
|
||||
libfuzzer_options = tint_fuzzer_common_libfuzzer_options
|
||||
seed_corpus = fuzzer_corpus_wgsl_dir
|
||||
seed_corpus_deps = [ ":tint_generate_wgsl_corpus" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (tint_build_wgsl_reader && tint_build_wgsl_writer) {
|
||||
fuzzer_test("tint_ast_clone_fuzzer") {
|
||||
sources = [ "tint_ast_clone_fuzzer.cc" ]
|
||||
|
@ -300,9 +289,6 @@ if (build_with_chromium) {
|
|||
testonly = true
|
||||
deps = []
|
||||
|
||||
if (tint_build_wgsl_reader) {
|
||||
deps += [ ":tint_wgsl_reader_fuzzer" ]
|
||||
}
|
||||
if (tint_build_wgsl_reader && tint_build_wgsl_writer) {
|
||||
deps += [
|
||||
":tint_ast_clone_fuzzer",
|
||||
|
|
|
@ -32,10 +32,6 @@ function(add_tint_fuzzer NAME)
|
|||
target_compile_options(${NAME} PRIVATE -Wno-missing-prototypes)
|
||||
endfunction()
|
||||
|
||||
if (${TINT_BUILD_WGSL_READER})
|
||||
add_tint_fuzzer(tint_wgsl_reader_fuzzer)
|
||||
endif()
|
||||
|
||||
if (${TINT_BUILD_WGSL_READER} AND ${TINT_BUILD_WGSL_WRITER})
|
||||
add_tint_fuzzer(tint_wgsl_reader_wgsl_writer_fuzzer)
|
||||
endif()
|
||||
|
@ -60,10 +56,6 @@ if (${TINT_BUILD_WGSL_READER} AND ${TINT_BUILD_MSL_WRITER})
|
|||
add_tint_fuzzer(tint_wgsl_reader_msl_writer_fuzzer)
|
||||
endif()
|
||||
|
||||
if (${TINT_BUILD_SPV_READER})
|
||||
add_tint_fuzzer(tint_spv_reader_fuzzer)
|
||||
endif()
|
||||
|
||||
if (${TINT_BUILD_SPV_READER} AND ${TINT_BUILD_WGSL_WRITER})
|
||||
add_tint_fuzzer(tint_spv_reader_wgsl_writer_fuzzer)
|
||||
endif()
|
||||
|
|
|
@ -154,12 +154,6 @@ int CommonFuzzer::Run(const uint8_t* data, size_t size) {
|
|||
break;
|
||||
}
|
||||
#endif // TINT_BUILD_SPV_READER
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (output_ == OutputFormat::kNone) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!program.IsValid()) {
|
||||
|
@ -323,8 +317,6 @@ int CommonFuzzer::Run(const uint8_t* data, size_t size) {
|
|||
#endif // TINT_BUILD_MSL_WRITER
|
||||
break;
|
||||
}
|
||||
case OutputFormat::kNone:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -34,9 +34,9 @@ void GenerateWgslOptions(DataBuilder* b, writer::wgsl::Options* options);
|
|||
void GenerateHlslOptions(DataBuilder* b, writer::hlsl::Options* options);
|
||||
void GenerateMslOptions(DataBuilder* b, writer::msl::Options* options);
|
||||
|
||||
enum class InputFormat { kWGSL, kSpv, kNone };
|
||||
enum class InputFormat { kWGSL, kSpv };
|
||||
|
||||
enum class OutputFormat { kWGSL, kSpv, kHLSL, kMSL, kNone };
|
||||
enum class OutputFormat { kWGSL, kSpv, kHLSL, kMSL };
|
||||
|
||||
class CommonFuzzer {
|
||||
public:
|
||||
|
|
|
@ -100,9 +100,6 @@ void LogWgslError(const std::string& message,
|
|||
case OutputFormat::kWGSL:
|
||||
error_type = "WGSL -> WGSL";
|
||||
break;
|
||||
default:
|
||||
assert(false && "All output formats should've been handled");
|
||||
break;
|
||||
}
|
||||
auto error_path = error_dir.empty() ? error_dir : error_dir + "/wgsl/";
|
||||
LogError(wgsl_count++, error_type, message,
|
||||
|
|
Loading…
Reference in New Issue