From 82c5c350e569d77e2b05321cda553f388d948aa4 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 18 Dec 2024 12:03:46 +0100 Subject: Rename xixanta's fuzz targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They were named with increasing numbers due to the fact that that's the default behaviour from cargo fuzz's command. So, just rename them to proper human-readable names. Signed-off-by: Miquel Sabaté Solà --- .github/workflows/ci.yml | 4 ++-- lib/xixanta/fuzz/Cargo.toml | 8 ++++---- lib/xixanta/fuzz/fuzz_targets/fuzz_target_1.rs | 8 -------- lib/xixanta/fuzz/fuzz_targets/fuzz_target_2.rs | 10 ---------- lib/xixanta/fuzz/fuzz_targets/fuzz_target_assembler.rs | 10 ++++++++++ lib/xixanta/fuzz/fuzz_targets/fuzz_target_parser.rs | 8 ++++++++ 6 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 lib/xixanta/fuzz/fuzz_targets/fuzz_target_1.rs delete mode 100644 lib/xixanta/fuzz/fuzz_targets/fuzz_target_2.rs create mode 100644 lib/xixanta/fuzz/fuzz_targets/fuzz_target_assembler.rs create mode 100644 lib/xixanta/fuzz/fuzz_targets/fuzz_target_parser.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66c9075..0d6e641 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: - name: Fuzzy test the parser run: | cd lib/xixanta - cargo +nightly fuzz run fuzz_target_1 -- -max_total_time=180 + cargo +nightly fuzz run fuzz_target_parser -- -max_total_time=180 fuzz_assembler: runs-on: ubuntu-latest @@ -66,7 +66,7 @@ jobs: - name: Fuzzy test the assembler run: | cd lib/xixanta - cargo +nightly fuzz run fuzz_target_2 -- -max_total_time=180 + cargo +nightly fuzz run fuzz_target_assembler -- -max_total_time=180 fuzz_header: runs-on: ubuntu-latest diff --git a/lib/xixanta/fuzz/Cargo.toml b/lib/xixanta/fuzz/Cargo.toml index 0c0376d..49764ed 100644 --- a/lib/xixanta/fuzz/Cargo.toml +++ b/lib/xixanta/fuzz/Cargo.toml @@ -17,15 +17,15 @@ libfuzzer-sys = "0.4" path = ".." [[bin]] -name = "fuzz_target_1" -path = "fuzz_targets/fuzz_target_1.rs" +name = "fuzz_target_parser" +path = "fuzz_targets/fuzz_target_parser.rs" test = false doc = false bench = false [[bin]] -name = "fuzz_target_2" -path = "fuzz_targets/fuzz_target_2.rs" +name = "fuzz_target_assembler" +path = "fuzz_targets/fuzz_target_assembler.rs" test = false doc = false bench = false diff --git a/lib/xixanta/fuzz/fuzz_targets/fuzz_target_1.rs b/lib/xixanta/fuzz/fuzz_targets/fuzz_target_1.rs deleted file mode 100644 index 442dbbf..0000000 --- a/lib/xixanta/fuzz/fuzz_targets/fuzz_target_1.rs +++ /dev/null @@ -1,8 +0,0 @@ -#![no_main] - -use libfuzzer_sys::fuzz_target; - -fuzz_target!(|data: &[u8]| { - let mut parser = xixanta::parser::Parser::default(); - let _ = parser.parse(data); -}); diff --git a/lib/xixanta/fuzz/fuzz_targets/fuzz_target_2.rs b/lib/xixanta/fuzz/fuzz_targets/fuzz_target_2.rs deleted file mode 100644 index 111bae9..0000000 --- a/lib/xixanta/fuzz/fuzz_targets/fuzz_target_2.rs +++ /dev/null @@ -1,10 +0,0 @@ -#![no_main] - -use libfuzzer_sys::fuzz_target; -use xixanta::assembler::Assembler; -use xixanta::mapping::EMPTY; - -fuzz_target!(|data: &[u8]| { - let mut asm = Assembler::new(EMPTY.to_vec()); - let _ = asm.assemble(data); -}); diff --git a/lib/xixanta/fuzz/fuzz_targets/fuzz_target_assembler.rs b/lib/xixanta/fuzz/fuzz_targets/fuzz_target_assembler.rs new file mode 100644 index 0000000..111bae9 --- /dev/null +++ b/lib/xixanta/fuzz/fuzz_targets/fuzz_target_assembler.rs @@ -0,0 +1,10 @@ +#![no_main] + +use libfuzzer_sys::fuzz_target; +use xixanta::assembler::Assembler; +use xixanta::mapping::EMPTY; + +fuzz_target!(|data: &[u8]| { + let mut asm = Assembler::new(EMPTY.to_vec()); + let _ = asm.assemble(data); +}); diff --git a/lib/xixanta/fuzz/fuzz_targets/fuzz_target_parser.rs b/lib/xixanta/fuzz/fuzz_targets/fuzz_target_parser.rs new file mode 100644 index 0000000..442dbbf --- /dev/null +++ b/lib/xixanta/fuzz/fuzz_targets/fuzz_target_parser.rs @@ -0,0 +1,8 @@ +#![no_main] + +use libfuzzer_sys::fuzz_target; + +fuzz_target!(|data: &[u8]| { + let mut parser = xixanta::parser::Parser::default(); + let _ = parser.parse(data); +}); -- cgit v1.2.3