The file sysdeps/unix/sysv/linux/tst-skeleton-affinity.c is used to implement the testing for sched_setaffinity and pthread_setaffiniyt_np, among various APIs. In the "test_size" routine we have this code: 152 if (getaffinity (kernel_size, initial_set) < 0) 153 { 154 printf ("error: size %zu: getaffinity: %m\n", size); 155 return false; 156 } 157 if (setaffinity (kernel_size, initial_set) < 0) 158 { 159 printf ("error: size %zu: setaffinity: %m\n", size); 160 return true; 161 } The point being that you should be able to get, and then set the affinity of the process (they should match) and this should be idempotent for the test. But in the "setaffinity" case we "return true;" on error which skips the rest of the tests and silently doesn't report the error. This looks like a typo, and it should be "return false;" for this case?
Patch posted: https://patchwork.sourceware.org/project/glibc/patch/20240815122756.260740-1-carlos@redhat.com/
Fixed with b22923abb046311ac9097a36b97b9b97342bac44