diff options
Diffstat (limited to 'compiler-rt/lib/asan/lit_tests')
-rw-r--r-- | compiler-rt/lib/asan/lit_tests/TestCases/printf-2.c | 8 | ||||
-rw-r--r-- | compiler-rt/lib/asan/lit_tests/TestCases/printf-4.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/printf-2.c b/compiler-rt/lib/asan/lit_tests/TestCases/printf-2.c index 960c81862df..a31d2e56a0d 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/printf-2.c +++ b/compiler-rt/lib/asan/lit_tests/TestCases/printf-2.c @@ -1,7 +1,9 @@ // RUN: %clang_asan -O2 %s -o %t -// RUN: ASAN_OPTIONS=check_printf=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s -// RUN: ASAN_OPTIONS=check_printf=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s -// RUN: %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s +// We need replace_str=0 and replace_intrin=0 to avoid reporting errors in +// strlen() and memcpy() called by printf(). +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s #include <stdio.h> #include <stdlib.h> diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/printf-4.c b/compiler-rt/lib/asan/lit_tests/TestCases/printf-4.c index 970b7c6f14f..e93c60ca939 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/printf-4.c +++ b/compiler-rt/lib/asan/lit_tests/TestCases/printf-4.c @@ -1,7 +1,9 @@ // RUN: %clang_asan -O2 %s -o %t -// RUN: ASAN_OPTIONS=check_printf=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s -// RUN: ASAN_OPTIONS=check_printf=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s -// RUN: %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s +// We need replace_str=0 and replace_intrin=0 to avoid reporting errors in +// strlen() and memcpy() called by puts(). +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=1 not %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0:check_printf=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s +// RUN: ASAN_OPTIONS=replace_str=0:replace_intrin=0 %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s #include <stdio.h> int main() { |