diff --git a/casr/src/bin/casr-afl.rs b/casr/src/bin/casr-afl.rs index 0a368c6d..cc09953f 100644 --- a/casr/src/bin/casr-afl.rs +++ b/casr/src/bin/casr-afl.rs @@ -76,14 +76,14 @@ fn main() -> Result<()> { .help("Output directory with triaged reports") ) .arg( - Arg::new("seed") - .short('s') - .long("seed") - .env("CASR_SEED_DIR") + Arg::new("base") + .short('b') + .long("base") + .env("CASR_BASE_DIR") .action(ArgAction::Set) .value_parser(clap::value_parser!(PathBuf)) - .value_name("SEED_DIR") - .help("Seed directory with previously triaged reports") + .value_name("BASE_DIR") + .help("Base directory with previously triaged reports") ) .arg( Arg::new("force-remove") diff --git a/casr/src/bin/casr-libfuzzer.rs b/casr/src/bin/casr-libfuzzer.rs index baf0a38b..b5d3356f 100644 --- a/casr/src/bin/casr-libfuzzer.rs +++ b/casr/src/bin/casr-libfuzzer.rs @@ -75,14 +75,14 @@ fn main() -> Result<()> { .help("Output directory with triaged reports") ) .arg( - Arg::new("seed") - .short('s') - .long("seed") - .env("CASR_SEED_DIR") + Arg::new("base") + .short('b') + .long("base") + .env("CASR_BASE_DIR") .action(ArgAction::Set) .value_parser(clap::value_parser!(PathBuf)) - .value_name("SEED_DIR") - .help("Seed directory with previously triaged reports") + .value_name("BASE_DIR") + .help("Base directory with previously triaged reports") ) .arg( Arg::new("force-remove") diff --git a/casr/src/triage.rs b/casr/src/triage.rs index 16c4a5cb..fcd7fa64 100644 --- a/casr/src/triage.rs +++ b/casr/src/triage.rs @@ -159,11 +159,11 @@ pub fn fuzzing_crash_triage_pipeline( bail!("No crashes found"); } - let seed_mode = matches.contains_id("seed"); + let base_mode = matches.contains_id("base"); let output_dir = initialize_dirs(matches)?; - let casrep_dir = if seed_mode { + let casrep_dir = if base_mode { output_dir.join("casrep") } else { output_dir.to_path_buf() @@ -238,7 +238,7 @@ pub fn fuzzing_crash_triage_pipeline( } if !matches.get_flag("no-cluster") { - if seed_mode { + if base_mode { info!("Accumulating CASR reports..."); let casr_cluster_u = Command::new(&casr_cluster) .arg("-u") diff --git a/casr/src/util.rs b/casr/src/util.rs index d87a997f..2494707c 100644 --- a/casr/src/util.rs +++ b/casr/src/util.rs @@ -325,9 +325,9 @@ pub fn initialize_dirs(matches: &clap::ArgMatches) -> Result<&PathBuf> { } } - if let Some(seed_dir) = matches.get_one::("seed") { - copy_dir(seed_dir, output_dir) - .with_context(|| format!("Couldn't copy seed directory {}", seed_dir.display()))?; + if let Some(base_dir) = matches.get_one::("base") { + copy_dir(base_dir, output_dir) + .with_context(|| format!("Couldn't copy base directory {}", base_dir.display()))?; // Get casrep dir let casrep_dir = output_dir.join("casrep"); if !casrep_dir.exists() && fs::create_dir_all(&casrep_dir).is_err() { diff --git a/casr/tests/tests.rs b/casr/tests/tests.rs index 2ecec6f0..c7d47812 100644 --- a/casr/tests/tests.rs +++ b/casr/tests/tests.rs @@ -3951,7 +3951,7 @@ fn test_casr_libfuzzer() { let paths = [ abs_path("tests/casr_tests/casrep/libfuzzer_crashes_xlnt"), - abs_path("tests/tmp_tests_casr/casr_libfuzzer_seed"), + abs_path("tests/tmp_tests_casr/casr_libfuzzer_base"), abs_path("tests/tmp_tests_casr/casr_libfuzzer_out"), abs_path("tests/casr_tests/bin/load_fuzzer"), ]; @@ -4039,11 +4039,11 @@ fn test_casr_libfuzzer() { // Remove several clusters let cluster_paths = [ - abs_path("tests/tmp_tests_casr/casr_libfuzzer_seed/cl2"), - abs_path("tests/tmp_tests_casr/casr_libfuzzer_seed/cl20"), - abs_path("tests/tmp_tests_casr/casr_libfuzzer_seed/cl21"), - abs_path("tests/tmp_tests_casr/casr_libfuzzer_seed/cl22"), - abs_path("tests/tmp_tests_casr/casr_libfuzzer_seed/cl23"), + abs_path("tests/tmp_tests_casr/casr_libfuzzer_base/cl2"), + abs_path("tests/tmp_tests_casr/casr_libfuzzer_base/cl20"), + abs_path("tests/tmp_tests_casr/casr_libfuzzer_base/cl21"), + abs_path("tests/tmp_tests_casr/casr_libfuzzer_base/cl22"), + abs_path("tests/tmp_tests_casr/casr_libfuzzer_base/cl23"), ]; for path in cluster_paths { let _ = fs::remove_dir_all(path); @@ -4051,7 +4051,7 @@ fn test_casr_libfuzzer() { let mut cmd = Command::new(*EXE_CASR_LIBFUZZER.read().unwrap()); cmd.args([ - "-i", &paths[0], "-s", &paths[1], "-o", &paths[2], "-f", "--", &paths[3], + "-i", &paths[0], "-b", &paths[1], "-o", &paths[2], "-f", "--", &paths[3], ]) .env( "PATH",