summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/esan/TestCases/workingset-samples.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/test/esan/TestCases/workingset-samples.cpp')
-rw-r--r--compiler-rt/test/esan/TestCases/workingset-samples.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/compiler-rt/test/esan/TestCases/workingset-samples.cpp b/compiler-rt/test/esan/TestCases/workingset-samples.cpp
index cb0ce01e878..6ca1a2ccc23 100644
--- a/compiler-rt/test/esan/TestCases/workingset-samples.cpp
+++ b/compiler-rt/test/esan/TestCases/workingset-samples.cpp
@@ -1,5 +1,5 @@
// RUN: %clang_esan_wset -O0 %s -o %t 2>&1
-// RUN: %env_esan_opts=verbosity=1 %run %t 2>&1 | FileCheck %s
+// RUN: %run %t 2>&1 | FileCheck %s
#include <sched.h>
#include <stdlib.h>
@@ -19,8 +19,21 @@ int main(int argc, char **argv) {
for (int i = 0; i < size; ++i)
buf[i] = i;
munmap(buf, size);
- // CHECK: {{.*}}EfficiencySanitizer: snapshot {{.*}}
- // CHECK-NEXT: {{.*}}EfficiencySanitizer: snapshot {{.*}}
+ // We only check for a few samples here to reduce the chance of flakiness.
+ // CHECK: =={{[0-9]+}}== Total number of samples: {{[0-9]+}}
+ // CHECK-NEXT: =={{[0-9]+}}== Samples array #0 at period 20 ms
+ // CHECK-NEXT: =={{[0-9]+}}==# 0: {{[ 0-9]+}} KB ({{[ 0-9]+}} cache lines)
+ // CHECK-NEXT: =={{[0-9]+}}==# 1: {{[ 0-9]+}} KB ({{[ 0-9]+}} cache lines)
+ // CHECK-NEXT: =={{[0-9]+}}==# 2: {{[ 0-9]+}} KB ({{[ 0-9]+}} cache lines)
+ // CHECK-NEXT: =={{[0-9]+}}==# 3: {{[ 0-9]+}} KB ({{[ 0-9]+}} cache lines)
+ // CHECK: =={{[0-9]+}}== Samples array #1 at period 80 ms
+ // CHECK-NEXT: =={{[0-9]+}}==# 0: {{[ 0-9]+}} KB ({{[ 0-9]+}} cache lines)
+ // CHECK: =={{[0-9]+}}== Samples array #2 at period 320 ms
+ // CHECK: =={{[0-9]+}}== Samples array #3 at period 1280 ms
+ // CHECK: =={{[0-9]+}}== Samples array #4 at period 5120 ms
+ // CHECK: =={{[0-9]+}}== Samples array #5 at period 20 sec
+ // CHECK: =={{[0-9]+}}== Samples array #6 at period 81 sec
+ // CHECK: =={{[0-9]+}}== Samples array #7 at period 327 sec
// CHECK: {{.*}} EfficiencySanitizer: the total working set size: 32 MB (5242{{[0-9][0-9]}} cache lines)
return 0;
}
OpenPOWER on IntegriCloud