diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_getaffinity_np.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_getaffinity_np.cpp index 49c40d3287bc41..b9b072fa352a10 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_getaffinity_np.cpp +++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_getaffinity_np.cpp @@ -11,22 +11,16 @@ #include #include -#include #include #include int main() { - cpu_set_t set_x; + cpu_set_t set_x[4]; pthread_t tid = pthread_self(); - int res = pthread_getaffinity_np(tid, sizeof(set_x), &set_x); - if (res != 0) { - fprintf(stderr, "tid: %lu\n", tid); - fprintf(stderr, "sizeof(set_x): %d\n", sizeof(set_x)); - fprintf(stderr, "res: %d\n", res); - } + int res = pthread_getaffinity_np(tid, sizeof(set_x), set_x); assert(res == 0); - assert(CPU_COUNT_S(sizeof(set_x), &set_x) == get_nprocs()); + assert(CPU_COUNT_S(sizeof(set_x), set_x) == get_nprocs()); return 0; }