Home | History | Annotate | Download | only in test
      1 REQUIRES: lsan
      2 RUN: not LLVMFuzzer-LeakTest -runs=100000 -detect_leaks=1 2>&1 | FileCheck %s --check-prefix=LEAK_DURING
      3 LEAK_DURING: ERROR: LeakSanitizer: detected memory leaks
      4 LEAK_DURING: Direct leak of 4 byte(s) in 1 object(s) allocated from:
      5 LEAK_DURING-NOT: DONE
      6 LEAK_DURING-NOT: Done
      7 
      8 RUN: not LLVMFuzzer-LeakTest -runs=0 -detect_leaks=1 %S 2>&1 | FileCheck %s --check-prefix=LEAK_IN_CORPUS
      9 LEAK_IN_CORPUS: ERROR: LeakSanitizer: detected memory leaks
     10 LEAK_IN_CORPUS: INFO: a leak has been found in the initial corpus.
     11 
     12 
     13 RUN: not LLVMFuzzer-LeakTest -runs=100000 -detect_leaks=0 2>&1 | FileCheck %s --check-prefix=LEAK_AFTER
     14 RUN: not LLVMFuzzer-LeakTest -runs=100000                 2>&1 | FileCheck %s --check-prefix=LEAK_DURING
     15 LEAK_AFTER: Done 100000 runs in
     16 LEAK_AFTER: ERROR: LeakSanitizer: detected memory leaks
     17 
     18 RUN: not LLVMFuzzer-LeakTest -runs=100000 -max_len=1 2>&1 | FileCheck %s --check-prefix=MAX_LEN_1
     19 MAX_LEN_1: Test unit written to ./leak-7cf184f4c67ad58283ecb19349720b0cae756829
     20 
     21 RUN: not LLVMFuzzer-LeakTimeoutTest -timeout=1 2>&1 | FileCheck %s --check-prefix=LEAK_TIMEOUT
     22 LEAK_TIMEOUT: ERROR: libFuzzer: timeout after
     23 LEAK_TIMEOUT-NOT: LeakSanitizer
     24 
     25 RUN: LLVMFuzzer-AccumulateAllocationsTest -detect_leaks=1 -runs=100000 2>&1 | FileCheck %s --check-prefix=ACCUMULATE_ALLOCS
     26 ACCUMULATE_ALLOCS: INFO: libFuzzer disabled leak detection after every mutation
     27