diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/tst-skeleton-affinity.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/tst-skeleton-affinity.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c b/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c index 695c1ccdbd..0f11eeb37c 100644 --- a/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c +++ b/sysdeps/unix/sysv/linux/tst-skeleton-affinity.c @@ -189,6 +189,18 @@ test_size (const struct conf *conf, size_t size) printf ("error: Unexpected CPU %d, expected %d\n", active_cpu, cpu); return false; } + unsigned int numa_cpu, numa_node; + if (getcpu (&numa_cpu, &numa_node) != 0) + { + printf ("error: getcpu: %m\n"); + return false; + } + if ((unsigned int) active_cpu != numa_cpu) + { + printf ("error: Unexpected CPU %d, expected %d\n", + active_cpu, numa_cpu); + return false; + } if (getaffinity (kernel_size, set2) < 0) { printf ("error: size %zu: getaffinity (2): %m\n", size); |