Skip to content

Commit 8362ddb

Browse files
committed
[test][sanitizer] Reduce output noise in test
1 parent 5361a0a commit 8362ddb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

compiler-rt/test/sanitizer_common/TestCases/get_allocated_begin.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ int main(void) {
2525
// does not unpoison it.
2626
const void *start = NULL;
2727
for (int j = 0; j < sizes[i]; j++) {
28-
printf("j: %d\n", j);
2928

3029
start = __sanitizer_get_allocated_begin(array + j);
31-
printf("Start: %p (expected: %p)\n", start, array);
32-
fflush(stdout);
30+
if (array != start) {
31+
printf("j: %d\n", j);
32+
printf("Start: %p (expected: %p)\n", start, array);
33+
fflush(stdout);
34+
}
3335
assert(array == start);
3436
}
3537

0 commit comments

Comments
 (0)