FreeBSD regtest: remove test for version 13+ syscalls
[valgrind.git] / memcheck / tests / freebsd / scalar.h
blobe6404fd1303ae1ed4ccd0e0b3ed5fa60cc17503d
1 #include <assert.h>
2 #include <errno.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <unistd.h>
6 #include <sys/syscall.h>
8 #define GO(syscall_num, param) \
9 fprintf(stderr, "---------------------------------------------------------\n" \
10 "%3d:%24s %s\n" \
11 "---------------------------------------------------------\n", \
12 syscall_num, #syscall_num, param);
14 #define SY res = syscall
16 #define FAIL assert(res == -1);
17 #define SUCC assert(res != -1);
18 #define FAILx(E) \
19 do { \
20 int myerrno = errno; \
21 if (res == -1) { \
22 if (myerrno == E) { \
23 /* as expected */ \
24 } \
25 else { \
26 fprintf(stderr, "Expected error %s (%d), got %d\n", #E, E, myerrno); \
27 exit(1); \
28 } \
29 } \
30 else { \
31 fprintf(stderr, "Expected error %s (%d), got success\n", #E, E); \
32 exit(1); \
33 } \
34 } while (0);
36 #define FAKE_GO(str) \
37 fprintf(stderr, "---------------------------------------------------------\n" \
38 "%s\n" \
39 "---------------------------------------------------------\n", \
40 str);
42 #define FAKE_SY(msg) \
43 fprintf(stderr, "%s", (msg));
45 /* Module variables. */
46 static long x0;
47 static long res;