]> granicus.if.org Git - strace/commitdiff
tests: treat struct stat mismatch as an error
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 13 Jan 2017 01:14:51 +0000 (01:14 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 13 Jan 2017 01:14:51 +0000 (01:14 +0000)
If the test detects struct stat mismatch, this is likely an error
in definitions of a stat structure that might affect strace as well.
Fail the test instead of skipping it to attract more attention.

* tests/xstatx.c (main): Return 1 instead of 77
in case of struct stat mismatch.

tests/xstatx.c

index 2e0c51d425fb1e1e4aec8aa83f28a0310d0f33e8..23f11e5ca1e4b33c3e03fdf33ca53a787e2b8cf7 100644 (file)
@@ -321,7 +321,7 @@ main(void)
                LOG_STAT_OFFSETOF_SIZEOF(st[0], st_blocks);
 # endif /* !OLD_STAT */
 
-               return 77;
+               return 1;
        }
 
        PRINT_SYSCALL_HEADER(sample);