summaryrefslogtreecommitdiff
path: root/test/misc/tst-syscall6.c
AgeCommit message (Collapse)Author
2018-03-14misc/tst-syscall6: fix build with musl and older kenrel headersBaruch Siach
The RWF_DSYNC and RWF_HIPRI macros were introduced in kernel version 4.6 with the preadv2/pwritev2 system calls. musl libc provides its own syscall definitions, even when the kernel headers are older. This leads to the following build failure: tst-syscall6.c: In function 'main': tst-syscall6.c:32:48: error: 'RWF_DSYNC' undeclared (first use in this function) nio = syscall(SYS_pwritev2, fd, iov, 2, 0, 0, RWF_DSYNC); ^~~~~~~~~ tst-syscall6.c:32:48: note: each undeclared identifier is reported only once for each function it appears in tst-syscall6.c:42:58: error: 'RWF_HIPRI' undeclared (first use in this function) nio = syscall(SYS_preadv2, fd, iov, 1, strlen(str0), 0, RWF_HIPRI); ^~~~~~~~~ Make the code depend also on RWF_HIPRI to fix this failure. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2017-12-22fix compile errors with alphaWaldemar Brodkorb
2017-12-16tst-syscall*: Add tests for syscall() with varargsStafford Horne
Add tests in preparation for genericizing some of the architecture syscall() implementations. This was noticed when testing OR1K and found it had a broken syscall implementation. These tests try to cover the libc syscall() lqyer which has the purpose of passing the syscall number and arguments to the kernel. The actual kernel syscalls chosen have been selected for ease of testing. Signed-off-by: Stafford Horne <shorne@gmail.com>