0001
0002
0003
0004
0005
0006
0007
0008
0009 #define _GNU_SOURCE
0010 #include <errno.h>
0011 #include <stdio.h>
0012 #include <unistd.h>
0013 #include <sys/syscall.h>
0014
0015 #include "utils.h"
0016
0017
0018 #define DO_TEST(_name, _num) \
0019 static int test_##_name(void) \
0020 { \
0021 int rc; \
0022 printf("Testing " #_name); \
0023 errno = 0; \
0024 rc = syscall(_num, -1, 0, 0, 0, 0, 0); \
0025 printf("\treturned %d, errno %d\n", rc, errno); \
0026 return errno == ENOSYS; \
0027 }
0028
0029 #include "ipc.h"
0030 #undef DO_TEST
0031
0032 static int ipc_unmuxed(void)
0033 {
0034 int tests_done = 0;
0035
0036 #define DO_TEST(_name, _num) \
0037 FAIL_IF(test_##_name()); \
0038 tests_done++;
0039
0040 #include "ipc.h"
0041 #undef DO_TEST
0042
0043
0044
0045
0046
0047
0048
0049 SKIP_IF(tests_done == 0);
0050
0051 return 0;
0052 }
0053
0054 int main(void)
0055 {
0056 return test_harness(ipc_unmuxed, "ipc_unmuxed");
0057 }