[compiler-rt] 0534c4f - [asan][Darwin] Simplify test (#105599)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 23:41:36 PDT 2024


Author: Vitaly Buka
Date: 2024-08-21T23:41:33-07:00
New Revision: 0534c4f693d4643e71f7a02c7937b655fdcd9c82

URL: https://github.com/llvm/llvm-project/commit/0534c4f693d4643e71f7a02c7937b655fdcd9c82
DIFF: https://github.com/llvm/llvm-project/commit/0534c4f693d4643e71f7a02c7937b655fdcd9c82.diff

LOG: [asan][Darwin] Simplify test (#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.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/Darwin/cstring_section.c b/compiler-rt/test/asan/TestCases/Darwin/cstring_section.c
index d72b0ba8a8bb33..93ed009bb197de 100644
--- a/compiler-rt/test/asan/TestCases/Darwin/cstring_section.c
+++ b/compiler-rt/test/asan/TestCases/Darwin/cstring_section.c
@@ -1,15 +1,11 @@
 // Test that AddressSanitizer moves constant strings into a separate section.
 
 // RUN: %clang_asan -c -o %t %s
-// RUN: llvm-objdump -s %t | FileCheck %s
+// RUN: llvm-objdump -s %t | FileCheck %s --implicit-check-not="Hello."
 
 // Check that "Hello.\n" is in __asan_cstring and not in __cstring.
 // CHECK: Contents of section {{.*}}__asan_cstring:
-// CHECK: 48656c6c {{.*}} Hello.
-// CHECK: Contents of section {{.*}}__const:
-// CHECK-NOT: 48656c6c {{.*}} Hello.
-// CHECK: Contents of section {{.*}}__cstring:
-// CHECK-NOT: 48656c6c {{.*}} Hello.
+// CHECK-NEXT: 48656c6c {{.*}} Hello.
 
 int main(int argc, char *argv[]) {
   argv[0] = "Hello.\n";


        


More information about the llvm-commits mailing list