forked from OSchip/llvm-project
[asan] Remove "rm -f" in tests where it was needed only because of >>
llvm-svn: 313843
This commit is contained in:
parent
0e370cf1a7
commit
d7f0361ab1
|
@ -2,10 +2,9 @@
|
|||
//
|
||||
// RUN: %clang_asan -fsanitize-recover=address -pthread %s -o %t
|
||||
//
|
||||
// RUN: rm -f %t.log
|
||||
// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t 100 >>%t.log 2>&1 || true
|
||||
// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t 100 >%t.log 2>&1 || true
|
||||
// Collision will almost always get triggered but we still need to check the unlikely case:
|
||||
// RUN: FileCheck --check-prefix=CHECK-COLLISION %s < %t.log || FileCheck --check-prefix=CHECK-NO-COLLISION %s < %t.log
|
||||
// RUN: FileCheck --check-prefix=CHECK-COLLISION %s <%t.log || FileCheck --check-prefix=CHECK-NO-COLLISION %s <%t.log
|
||||
|
||||
#define _SVID_SOURCE 1 // SA_NODEFER
|
||||
|
||||
|
|
|
@ -2,21 +2,18 @@
|
|||
//
|
||||
// RUN: %clangxx_asan -fsanitize-recover=address -pthread %s -o %t
|
||||
//
|
||||
// RUN: rm -f 1.txt
|
||||
// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t 1 10 >>1.txt 2>&1
|
||||
// RUN: FileCheck %s < 1.txt
|
||||
// RUN: grep 'ERROR: AddressSanitizer: use-after-poison' 1.txt | count 10
|
||||
// RUN: FileCheck --check-prefix=CHECK-NO-COLLISION %s < 1.txt
|
||||
// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t 1 10 >%t.log 2>&1
|
||||
// RUN: FileCheck %s <%t.log
|
||||
// RUN: grep 'ERROR: AddressSanitizer: use-after-poison' %t.log | count 10
|
||||
// RUN: FileCheck --check-prefix=CHECK-NO-COLLISION %s <%t.log
|
||||
//
|
||||
// Collisions are unlikely but still possible so we need the ||.
|
||||
// RUN: rm -f 10.txt
|
||||
// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false:exitcode=0 %run %t 10 20 2>&1 | cat > 10.txt
|
||||
// RUN: FileCheck --check-prefix=CHECK-COLLISION %s < 10.txt || FileCheck --check-prefix=CHECK-NO-COLLISION %s < 10.txt
|
||||
// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false:exitcode=0 %run %t 10 20 >%t.log 2>&1
|
||||
// RUN: FileCheck --check-prefix=CHECK-COLLISION %s <%t.log || FileCheck --check-prefix=CHECK-NO-COLLISION %s <%t.log
|
||||
//
|
||||
// Collisions are unlikely but still possible so we need the ||.
|
||||
// RUN: rm -f 20.txt
|
||||
// RUN: %env_asan_opts=halt_on_error=false:exitcode=0 %run %t 10 20 2>&1 | cat > 20.txt
|
||||
// RUN: FileCheck --check-prefix=CHECK-COLLISION %s < 20.txt || FileCheck --check-prefix=CHECK-NO-COLLISION %s < 20.txt
|
||||
// RUN: %env_asan_opts=halt_on_error=false:exitcode=0 %run %t 10 20 >%t.log 2>&1
|
||||
// RUN: FileCheck --check-prefix=CHECK-COLLISION %s <%t.log || FileCheck --check-prefix=CHECK-NO-COLLISION %s <%t.log
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
// RUN: %env_asan_opts=halt_on_error=false %run %t 2>&1 | FileCheck %s
|
||||
//
|
||||
// Check that we die after reaching different reports number threshold.
|
||||
// RUN: rm -f %t1.log
|
||||
// RUN: %env_asan_opts=halt_on_error=false not %run %t 1 >> %t1.log 2>&1
|
||||
// RUN: %env_asan_opts=halt_on_error=false not %run %t 1 >%t1.log 2>&1
|
||||
// RUN: grep 'ERROR: AddressSanitizer: stack-buffer-overflow' %t1.log | count 25
|
||||
//
|
||||
// Check suppress_equal_pcs=true behavior is equal to default one.
|
||||
|
@ -15,7 +14,7 @@
|
|||
//
|
||||
// Check suppress_equal_pcs=false behavior isn't equal to default one.
|
||||
// RUN: rm -f %t2.log
|
||||
// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t >> %t2.log 2>&1
|
||||
// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t >%t2.log 2>&1
|
||||
// RUN: grep 'ERROR: AddressSanitizer: stack-buffer-overflow' %t2.log | count 30
|
||||
|
||||
#define ACCESS_ARRAY_FIVE_ELEMENTS(array, i) \
|
||||
|
|
Loading…
Reference in New Issue