Add missing zstd.h to coregrind Makefile.am noinst_HEADERS
[valgrind.git] / memcheck / tests / solaris / scalar_obsolete.c
blobea030279678033f254ecb94fe7c9311f8ceddc3f
1 /* Test for syscalls that are available on illumos but are removed on
2 Solaris 11. This test is compiled only on illumos. */
4 #include "scalar.h"
6 #include <sys/fcntl.h>
8 __attribute__((noinline))
9 static void sys_open(void)
11 GO(SYS_open, "(2-args) 2s 1m");
12 SY(SYS_open, x0, x0); FAIL;
15 __attribute__((noinline))
16 static void sys_open2(void)
18 GO(SYS_open, "(3-args) 3s 1m");
19 SY(SYS_open, x0, x0 | O_CREAT, x0); FAIL;
22 int main(void)
24 /* Uninitialised, but we know px[0] is 0x0. */
25 long *px = malloc(sizeof(long));
26 x0 = px[0];
28 /* SYS_open 5 */
29 sys_open();
30 sys_open2();
32 /* SYS_link 9 */
33 GO(SYS_link, "2s 2m");
34 SY(SYS_link, x0, x0); FAIL;
36 /* SYS_unlink 10 */
37 GO(SYS_unlink, "1s 1m");
38 SY(SYS_unlink, x0); FAIL;
40 /* SYS_mknod 14 */
41 /* XXX Missing wrapper. */
43 /* SYS_chmod 15 */
44 GO(SYS_chmod, "2s 1m");
45 SY(SYS_chmod, x0, x0); FAIL;
47 /* SYS_chown 16 */
48 GO(SYS_chown, "3s 1m");
49 SY(SYS_chown, x0, x0, x0); FAIL;
51 /* SYS_stat 18 */
52 GO(SYS_stat, "2s 2m");
53 SY(SYS_stat, x0, x0); FAIL;
55 /* SYS_fstat 28 */
56 GO(SYS_fstat, "2s 1m");
57 SY(SYS_fstat, x0, x0); FAIL;
59 /* SYS_access 33 */
60 GO(SYS_access, "2s 1m");
61 SY(SYS_access, x0, x0); FAIL;
63 /* SYS_rmdir 79 */
64 GO(SYS_rmdir, "1s 1m");
65 SY(SYS_rmdir, x0); FAIL;
67 /* SYS_mkdir 80 */
68 GO(SYS_mkdir, "2s 1m");
69 SY(SYS_mkdir, x0, x0); FAIL;
71 /* SYS_lstat 88 */
72 GO(SYS_lstat, "2s 2m");
73 SY(SYS_lstat, x0, x0); FAIL;
75 /* SYS_symlink 89 */
76 GO(SYS_symlink, "2s 2m");
77 SY(SYS_symlink, x0, x0); FAIL;
79 /* SYS_readlink 90 */
80 GO(SYS_readlink, "3s 2m");
81 SY(SYS_readlink, x0, x0, x0 + 1); FAIL;
83 /* SYS_fchmod 93 */
84 GO(SYS_fchmod, "2s 0m");
85 SY(SYS_fchmod, x0 - 1, x0); FAIL;
87 /* SYS_fchown 94 */
88 GO(SYS_fchown, "3s 0m");
89 SY(SYS_fchown, x0, x0, x0); FAIL;
91 /* SYS_lchown 130 */
92 GO(SYS_lchown, "3s 1m");
93 SY(SYS_lchown, x0, x0, x0); FAIL;
95 /* SYS_rename 134 */
96 GO(SYS_rename, "2s 2m");
97 SY(SYS_rename, x0, x0); FAIL;
99 /* SYS_stat64 215 */
100 /* Tested in x86-solaris/scalar_obsolete.c. */
102 /* SYS_lstat64 216 */
103 /* Tested in x86-solaris/scalar_obsolete.c. */
105 /* SYS_fstat64 217 */
106 /* Tested in x86-solaris/scalar_obsolete.c. */
108 /* SYS_open64 225 */
109 /* Tested in x86-solaris/scalar_obsolete.c. */
111 return 0;