From 93b407fa883f5b467dee02c69ee2eb96cb91a7f4 Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Tue, 22 Jul 2025 14:10:25 +0200 Subject: [PATCH] Fix the `nu-path` fuzz-target (#16188) This code didn't compile, fixed provisionally by always running the codepath with tilde expansion. @IanManske worth discussing what we may want to fuzz here. --- crates/nu-path/fuzz/README.md | 2 +- crates/nu-path/fuzz/fuzz_targets/path_fuzzer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/nu-path/fuzz/README.md b/crates/nu-path/fuzz/README.md index ab16045b3e..c2a01ccb45 100644 --- a/crates/nu-path/fuzz/README.md +++ b/crates/nu-path/fuzz/README.md @@ -5,4 +5,4 @@ # Quick start guide - Install cargo-fuzz by `cargo install cargo-fuzz` - Make output directory `mkdir out` -- Run the fuzzer with `cargo fuzz run parse out` +- Run the fuzzer with `cargo fuzz run path out` diff --git a/crates/nu-path/fuzz/fuzz_targets/path_fuzzer.rs b/crates/nu-path/fuzz/fuzz_targets/path_fuzzer.rs index 1a265cc44d..cc03144922 100644 --- a/crates/nu-path/fuzz/fuzz_targets/path_fuzzer.rs +++ b/crates/nu-path/fuzz/fuzz_targets/path_fuzzer.rs @@ -17,6 +17,6 @@ fuzz_target!(|data: &[u8]| { // Here, we're assuming a second path for the "relative to" aspect. // For simplicity, we're just using the current directory. let current_dir = std::path::Path::new("."); - let _ = expand_path_with(path, ¤t_dir); + let _ = expand_path_with(path, ¤t_dir, true); } });