Skip to content

Commit 7b1aa20

Browse files
committed
[MSAN] Add result printing for failed call in pthread_getaffinity_np.
Will be reverted when test failure is diagnosed. Depends on: https://reviews.llvm.org/D127185 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D127320
1 parent 835fcf2 commit 7b1aa20

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_getaffinity_np.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44

55
#include <assert.h>
66
#include <pthread.h>
7+
#include <stdio.h>
78
#include <sys/sysinfo.h>
89

910
#include <sanitizer/msan_interface.h>
1011

1112
int main() {
1213
cpu_set_t set_x;
1314
int res = pthread_getaffinity_np(pthread_self(), sizeof(set_x), &set_x);
15+
if (res != 0)
16+
printf("res: %d\n", res);
1417
assert(res == 0);
1518
assert(CPU_COUNT_S(sizeof(set_x), &set_x) == get_nprocs());
1619

0 commit comments

Comments
 (0)