[compiler-rt] 99e5f60 - [test][fuzzer] Deflake fork.test

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 00:57:50 PDT 2023


Author: Vitaly Buka
Date: 2023-09-01T00:57:35-07:00
New Revision: 99e5f6066ee505259ccf08b6b2dab8808cc39e9f

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

LOG: [test][fuzzer] Deflake fork.test

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/fuzzer/fork.test b/compiler-rt/test/fuzzer/fork.test
index 5c176871e100e4..f32000c2be9a37 100644
--- a/compiler-rt/test/fuzzer/fork.test
+++ b/compiler-rt/test/fuzzer/fork.test
@@ -14,8 +14,12 @@ RUN: not %run %t-OutOfMemoryTest -fork=1 -ignore_ooms=0  -rss_limit_mb=128 2>&1
 # access-violation is the error thrown on Windows. Address will be smaller on i386.
 CRASH: {{SEGV|access-violation}} on unknown address 0x00000000
 RUN: %cpp_compiler %S/ShallowOOMDeepCrash.cpp -o %t-ShallowOOMDeepCrash
-RUN: not %run %t-ShallowOOMDeepCrash -fork=1 -rss_limit_mb=128 2>&1 | FileCheck %s --check-prefix=CRASH
+# Run multiple times to deflake. Sometimes rss_limit_mb kill process before SEGV.
+RUN: not %run %t-ShallowOOMDeepCrash -fork=1 -rss_limit_mb=128 >%t-ShallowOOMDeepCrash.log 2>&1
+RUN: not %run %t-ShallowOOMDeepCrash -fork=1 -rss_limit_mb=128 >>%t-ShallowOOMDeepCrash.log 2>&1
+RUN: not %run %t-ShallowOOMDeepCrash -fork=1 -rss_limit_mb=128 >>%t-ShallowOOMDeepCrash.log 2>&1
+RUN: FileCheck %s --check-prefix=CRASH --input-file=%t-ShallowOOMDeepCrash.log
 
 MAX_TOTAL_TIME: INFO: fuzzed for {{.*}} seconds, wrapping up soon
 MAX_TOTAL_TIME: INFO: exiting: {{.*}} time:
-RUN: not %run %t-ShallowOOMDeepCrash -fork=1 -rss_limit_mb=128 -ignore_crashes=1 -max_total_time=10 2>&1 | FileCheck %s  --check-prefix=MAX_TOTAL_TIME
+RUN: not %run %t-ShallowOOMDeepCrash -fork=1 -rss_limit_mb=128 -ignore_crashes=1 -max_total_time=30 2>&1 | FileCheck %s  --check-prefix=MAX_TOTAL_TIME


        


More information about the llvm-commits mailing list