diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2017-03-17 20:15:20 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2017-03-17 20:15:20 +0000 |
commit | f0da50397e89d5ae0136f3f26a644e8361a7512d (patch) | |
tree | ceea1fd8935260b17c686051b3491a2726e65429 | |
parent | c465b2ee0e5791891866d2be42f87b2bcbf7ab35 (diff) | |
download | strace-f0da50397e89d5ae0136f3f26a644e8361a7512d.tar.gz |
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.
-rw-r--r-- | tests/xstatx.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/xstatx.c b/tests/xstatx.c index 874f30902..6eb760b54 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); |