[compiler-rt] a982844 - minimize_crash.test sometimes one-shots the minimization (fix flaky test) (#225544)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 09:51:23 PDT 2026


Author: Andrew Haberlandt
Date: 2026-09-23T09:51:16-07:00
New Revision: a9828443a2a90a672551f1f59098393601959ed4

URL: https://github.com/llvm/llvm-project/commit/a9828443a2a90a672551f1f59098393601959ed4
DIFF: https://github.com/llvm/llvm-project/commit/a9828443a2a90a672551f1f59098393601959ed4.diff

LOG: minimize_crash.test sometimes one-shots the minimization (fix flaky test) (#225544)

After #223470 it is now possible for `minimize_crash.test` to one-shot
the minimization by applying the EraseBytes mutation 3 times (to go from
size 8=>4=>2=>1).

```
 |            35: SUMMARY: libFuzzer: deadly signal
 |            36: MS: 3 EraseBytes-EraseBytes-EraseBytes-; base unit: 0000000000000000000000000000000000000000
 |            37: 0x2a,
 |            38: *
```

This causes the test to fail because it only prints the `Test unit
written to` line once. This sets `-mutate_depth` to 2 to guarantee that
it won't be one-shot and thus the line will print more than once.

rdar://188078094

Added: 
    

Modified: 
    compiler-rt/test/fuzzer/minimize_crash.test

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/fuzzer/minimize_crash.test b/compiler-rt/test/fuzzer/minimize_crash.test
index de44b8747e04c..1b80558c47629 100644
--- a/compiler-rt/test/fuzzer/minimize_crash.test
+++ b/compiler-rt/test/fuzzer/minimize_crash.test
@@ -10,7 +10,7 @@ CHECK_EXACT: CRASH_MIN: failed to minimize beyond {{.*}}exact_minimized_path{{.*
 RUN: rm %t.dir/not_minimal_crash %t.exact_minimized_path
 
 RUN: echo -n 'abcd*xyz' > %t.dir/not_minimal_crash
-RUN: %run %t-SingleByteInputTest -minimize_crash=1 %t.dir/not_minimal_crash -exact_artifact_path=%t.exact_minimized_path 2>&1 | FileCheck %s --check-prefix=MIN1
+RUN: %run %t-SingleByteInputTest -minimize_crash=1 -mutate_depth=2 %t.dir/not_minimal_crash -exact_artifact_path=%t.exact_minimized_path 2>&1 | FileCheck %s --check-prefix=MIN1
 MIN1: Test unit written to {{.*}}exact_minimized_path
 MIN1: Test unit written to {{.*}}exact_minimized_path
 MIN1: INFO: The input is small enough, exiting


        


More information about the llvm-commits mailing list