From: Dmitry V. Levin Date: Fri, 17 Mar 2017 20:15:20 +0000 (+0000) Subject: tests: check unexpected syscall errors returned by stat family syscalls X-Git-Tag: v4.17~154 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0da50397e89d5ae0136f3f26a644e8361a7512d;p=strace tests: check unexpected syscall errors returned by stat family syscalls * tests/xstatx.c (main) [!OLD_STAT]: Do not skip the test in case of EOVERFLOW. Treat errors other than ENOSYS and EOVERFLOW as fatal. --- diff --git a/tests/xstatx.c b/tests/xstatx.c index 874f3090..6eb760b5 100644 --- a/tests/xstatx.c +++ b/tests/xstatx.c @@ -237,13 +237,11 @@ main(void) # endif if ((rc = TEST_SYSCALL_INVOKE(sample, st))) { -# if OLD_STAT - if (errno != EOVERFLOW) -# endif - { + if (errno != EOVERFLOW) { + rc = (errno == ENOSYS) ? 77 : 1; perror(TEST_SYSCALL_STR); (void) unlink(sample); - return 77; + return rc; } } (void) unlink(sample);