1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright 2015, Michael Ellerman, IBM Corp.
5 * This test simply tests that certain syscalls are implemented. It doesn't
6 * actually exercise their logic in any way.
13 #include <sys/syscall.h>
18 #define DO_TEST(_name, _num) \
19 static int test_##_name(void) \
22 printf("Testing " #_name); \
24 rc = syscall(_num, -1, 0, 0, 0, 0, 0); \
25 printf("\treturned %d, errno %d\n", rc, errno); \
26 return errno == ENOSYS; \
32 static int ipc_unmuxed(void)
36 #define DO_TEST(_name, _num) \
37 FAIL_IF(test_##_name()); \
44 * If we ran no tests then it means none of the syscall numbers were
45 * defined, possibly because we were built against old headers. But it
46 * means we didn't really test anything, so instead of passing mark it
47 * as a skip to give the user a clue.
49 SKIP_IF(tests_done
== 0);
56 return test_harness(ipc_unmuxed
, "ipc_unmuxed");