[compiler-rt] dc46783 - [memprof][test] Make test_terse.cpp robust (sched_getcpu may happens to change)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 26 00:46:05 PDT 2021


Author: Fangrui Song
Date: 2021-03-26T00:45:58-07:00
New Revision: dc46783f7f61f54618b4cf1b0b325fdad304d109

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

LOG: [memprof][test] Make test_terse.cpp robust (sched_getcpu may happens to change)

```
/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/test/memprof/TestCases/test_terse.cpp:11:11: error: CHECK: expected string not found in input
// CHECK: MIB:[[STACKID:[0-9]+]]/1/40.00/40/40/20.00/20/20/[[AVELIFETIME:[0-9]+]].00/[[AVELIFETIME]]/[[AVELIFETIME]]/0/0/0/0
          ^
<stdin>:1:1: note: scanning from here
MIB:StackID/AllocCount/AveSize/MinSize/MaxSize/AveAccessCount/MinAccessCount/MaxAccessCount/AveLifetime/MinLifetime/MaxLifetime/NumMigratedCpu/NumLifetimeOverlaps/NumSameAllocCpu/NumSameDeallocCpu
^
<stdin>:4:1: note: possible intended match here
MIB:134217729/1/40.00/40/40/20.00/20/20/7.00/7/7/1/0/0/0
```

Added: 
    

Modified: 
    compiler-rt/test/memprof/TestCases/test_terse.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/memprof/TestCases/test_terse.cpp b/compiler-rt/test/memprof/TestCases/test_terse.cpp
index 4ac0d5e77278..04763008016e 100644
--- a/compiler-rt/test/memprof/TestCases/test_terse.cpp
+++ b/compiler-rt/test/memprof/TestCases/test_terse.cpp
@@ -8,7 +8,7 @@
 // RUN: %clangxx_memprof -DFREE -O0 %s -o %t
 // RUN: %env_memprof_opts=log_path=stderr:print_terse=1 %run %t 2>&1 | FileCheck %s
 
-// CHECK: MIB:[[STACKID:[0-9]+]]/1/40.00/40/40/20.00/20/20/[[AVELIFETIME:[0-9]+]].00/[[AVELIFETIME]]/[[AVELIFETIME]]/0/0/0/0
+// CHECK: MIB:[[STACKID:[0-9]+]]/1/40.00/40/40/20.00/20/20/[[AVELIFETIME:[0-9]+]].00/[[AVELIFETIME]]/[[AVELIFETIME]]/{{[01]}}/0/0/0
 // CHECK: Stack for id [[STACKID]]:
 // CHECK-NEXT: #0 {{.*}} in operator new
 // CHECK-NEXT: #1 {{.*}} in main {{.*}}:[[@LINE+6]]


        


More information about the llvm-commits mailing list