From ce2a5d5b9aa5a72bf9abc97e013630c5466d1cef Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 20 Dec 2023 15:15:20 +0100 Subject: [PATCH] expr fuzz: add missing ops. found thanks to oss fuzz coverage (#5557) * expr fuzz: add missing ops. found thanks to oss fuzz coverage https://storage.googleapis.com/oss-fuzz-coverage/rust-coreutils/reports/20231118/linux/src/rust-coreutils/src/uu/expr/src/syntax_tree.rs.html Co-authored-by: Daniel Hofstetter --- fuzz/fuzz_targets/fuzz_expr.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fuzz/fuzz_targets/fuzz_expr.rs b/fuzz/fuzz_targets/fuzz_expr.rs index ce5535b16..9f2d28603 100644 --- a/fuzz/fuzz_targets/fuzz_expr.rs +++ b/fuzz/fuzz_targets/fuzz_expr.rs @@ -21,7 +21,9 @@ static CMD_PATH: &str = "expr"; fn generate_expr(max_depth: u32) -> String { let mut rng = rand::thread_rng(); - let ops = ["+", "-", "*", "/", "%", "<", ">", "=", "&", "|"]; + let ops = [ + "+", "-", "*", "/", "%", "<", ">", "=", "&", "|", "!=", "<=", ">=", ":", "index", "length", "substr", + ]; let mut expr = String::new(); let mut depth = 0;