diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/tst-getcpu.c | 11 |
2 files changed, 13 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2012-06-04 Mike Frysinger <vapier@gentoo.org> + + * sysdeps/unix/sysv/linux/tst-getcpu.c (do_test): Call perror when + cpu2 is -1 and errno is not ENOSYS. + 2012-06-04 H.J. Lu <hongjiu.lu@intel.com> [BZ #14117] diff --git a/sysdeps/unix/sysv/linux/tst-getcpu.c b/sysdeps/unix/sysv/linux/tst-getcpu.c index bf3cb57..77baebc 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) { |