summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Moyer <jmoyer@redhat.com>2013-01-31 15:57:02 -0500
committerJeff Moyer <jmoyer@redhat.com>2013-01-31 15:57:02 -0500
commitb564776250eaff47728eb63c25bbefcfd1c0c240 (patch)
tree1ce255f6df0ddc512cab27724c41291ff3cf54a6
parentd88423b54b84a483a36ee5c9c20397ce3102385b (diff)
downloadlibaio-b564776250eaff47728eb63c25bbefcfd1c0c240.tar.gz
fix test case 16 to work on arm64
aarch64 does not implement "legacy" system calls such as eventfd. It does, of course, support eventfd2, so use that instead. Reported-by: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
-rw-r--r--harness/cases/16.t10
1 files changed, 10 insertions, 0 deletions
diff --git a/harness/cases/16.t b/harness/cases/16.t
index c3157cc..5a546ff 100644
--- a/harness/cases/16.t
+++ b/harness/cases/16.t
@@ -18,6 +18,12 @@
#define SYS_eventfd 318
#elif defined(__alpha__)
#define SYS_eventfd 478
+#elif defined(__aarch64__)
+/* arm64 does not implement eventfd, only eventfd2 */
+#define USE_EVENTFD2
+#ifndef SYS_eventfd2
+#define SYS_eventfd2 19
+#endif /* __aarch64__ */
#else
#error define SYS_eventfd for your arch!
#endif
@@ -39,7 +45,11 @@ int test_main(void)
struct timespec notime = { .tv_sec = 0, .tv_nsec = 0 };
buf = malloc(SIZE); assert(buf);
+#ifndef USE_EVENTFD2
efd = syscall(SYS_eventfd, 0);
+#else
+ efd = syscall(SYS_eventfd2, 0, 0);
+#endif
if (efd < 0) {
if (errno == ENOSYS) {
printf("No eventfd support. [SKIPPING]\n");