[MemProf] Make test more resilient to cpu scheduling
authorTeresa Johnson <tejohnson@google.com>
Tue, 31 Jan 2023 19:01:42 +0000 (11:01 -0800)
committerTeresa Johnson <tejohnson@google.com>
Tue, 31 Jan 2023 19:17:01 +0000 (11:17 -0800)
Loosen up the matching so that occasional cpu migrations don't break the
test. This showed up occasionally in internal testing.

Differential Revision: https://reviews.llvm.org/D143000

compiler-rt/test/memprof/TestCases/test_merge_mib.cpp

index f9cdfc3..72928b0 100644 (file)
@@ -12,7 +12,7 @@
 // CHECK-NEXT:  access_count (ave/min/max): 30.00 / 20 / 40
 // Unfortunately there is not a reliable way to check the ave/min/max lifetime.
 // CHECK-NEXT:  lifetime (ave/min/max):
-// CHECK-NEXT:  num migrated: {{[0-1]}}, num lifetime overlaps: 0, num same alloc cpu: 1, num same dealloc_cpu: 1
+// CHECK-NEXT:  num migrated: {{[0-1]}}, num lifetime overlaps: 0, num same alloc cpu: {{[0-1]}}, num same dealloc_cpu: {{[0-1]}}
 // CHECK: Stack for id [[STACKID]]:
 // CHECK-NEXT: #0 {{.*}} in operator new
 // CHECK-NEXT: #1 {{.*}} in main {{.*}}:[[@LINE+7]]