1 /* This is the arm64 variant of memcheck/tests/x86-linux/scalar.h */
2 #include "../../../include/vki/vki-scnums-arm64-linux.h"
9 #include <sys/syscall.h>
11 #include <sys/ptrace.h>
12 #include <sys/types.h>
19 // Since we use vki_unistd.h, we can't include <unistd.h>. So we have to
20 // declare this ourselves.
21 extern long int syscall (long int __sysno
, ...) __THROW
;
23 // Thorough syscall scalar arg checking. Also serves as thorough checking
24 // for (very) basic syscall use. Generally not trying to do anything
25 // meaningful with the syscalls.
27 #define GO(__NR_xxx, s) \
28 fprintf(stderr, "-----------------------------------------------------\n" \
30 "-----------------------------------------------------\n", \
31 __NR_xxx, #__NR_xxx, s);
33 #define SY res = syscall
35 #define FAIL assert(-1 == res);
36 #define SUCC assert(-1 != res);
37 #define SUCC_OR_FAIL /* no test */
41 int myerrno = errno; \
46 fprintf(stderr, "Expected error %s (%d), got %d\n", #E, E, myerrno); \
50 fprintf(stderr, "Expected error %s (%d), got success\n", #E, E); \
55 #define SUCC_OR_FAILx(E) \
57 int myerrno = errno; \
62 fprintf(stderr, "Expected error %s (%d), got %d\n", #E, E, myerrno); \