Skip to content

Commit 0534c4f

Browse files
authored
[asan][Darwin] Simplify test (llvm#105599)
Checking order of sections is not a goal of the test. The goal is make sure there is only one "Hello" string and it's in __asan_cstring.
1 parent 820396c commit 0534c4f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

compiler-rt/test/asan/TestCases/Darwin/cstring_section.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
// Test that AddressSanitizer moves constant strings into a separate section.
22

33
// RUN: %clang_asan -c -o %t %s
4-
// RUN: llvm-objdump -s %t | FileCheck %s
4+
// RUN: llvm-objdump -s %t | FileCheck %s --implicit-check-not="Hello."
55

66
// Check that "Hello.\n" is in __asan_cstring and not in __cstring.
77
// CHECK: Contents of section {{.*}}__asan_cstring:
8-
// CHECK: 48656c6c {{.*}} Hello.
9-
// CHECK: Contents of section {{.*}}__const:
10-
// CHECK-NOT: 48656c6c {{.*}} Hello.
11-
// CHECK: Contents of section {{.*}}__cstring:
12-
// CHECK-NOT: 48656c6c {{.*}} Hello.
8+
// CHECK-NEXT: 48656c6c {{.*}} Hello.
139

1410
int main(int argc, char *argv[]) {
1511
argv[0] = "Hello.\n";

0 commit comments

Comments
 (0)