[PATCH v7 12/14] tests/xettimeofday: Skip tests if __NR_gettimeofday syscall isn't defined

Alistair Francis alistair.francis at wdc.com
Fri Apr 17 16:47:22 UTC 2020


New y2038 safe 32-bit architectures don't have the
__NR_gettimeofday/__NR_settimeofday syscalls, so let's skip the test.

Signed-off-by: Alistair Francis <alistair.francis at wdc.com>
---
 tests/xettimeofday.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/xettimeofday.c b/tests/xettimeofday.c
index c0c3e78e..172d7afe 100644
--- a/tests/xettimeofday.c
+++ b/tests/xettimeofday.c
@@ -7,6 +7,9 @@
  */
 
 #include "tests.h"
+
+#ifdef __NR_gettimeofday
+
 #include <assert.h>
 #include <stdio.h>
 #include <stdint.h>
@@ -64,3 +67,9 @@ main(void)
 	puts("+++ exited with 0 +++");
 	return 0;
 }
+
+#else
+
+SKIP_MAIN_UNDEFINED("__NR_gettimeofday")
+
+#endif /* __NR_gettimeofday */
-- 
2.26.0



More information about the Strace-devel mailing list