diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/tst-getcpu.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/tst-getcpu.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/tst-getcpu.c b/sysdeps/unix/sysv/linux/tst-getcpu.c index bf3cb57dd8..77baebc0a8 100644 --- a/sysdeps/unix/sysv/linux/tst-getcpu.c +++ b/sysdeps/unix/sysv/linux/tst-getcpu.c @@ -31,10 +31,15 @@ do_test (void) else { int cpu2 = sched_getcpu (); - if (cpu2 == -1 && errno == ENOSYS) + if (cpu2 == -1) { - puts ("getcpu syscall not implemented"); - return 0; + if (errno == ENOSYS) + { + puts ("getcpu syscall not implemented"); + return 0; + } + perror ("getcpu failed"); + result = 1; } if (cpu2 != cpu) { |