ppc64: Arguments to iselInt128Expr_to_32x4 should be initialized.
[valgrind.git] / memcheck / tests / solaris / scalar.c
blobfef2d6994b9b2658728108d290ee470983aafb63
1 /* Basic syscall test, see memcheck/tests/x86-linux/scalar.c for more info. */
3 #include "scalar.h"
4 #include "config.h"
6 #include <bsm/audit.h>
7 #include <nfs/nfs.h>
8 #include <nfs/nfssys.h>
9 #include <sys/acl.h>
10 #include <sys/door.h>
11 #include <sys/fcntl.h>
12 #include <sys/fstyp.h>
13 #include <sys/lgrp_user.h>
14 #if defined(HAVE_SYS_LGRP_USER_IMPL_H)
15 #include <sys/lgrp_user_impl.h>
16 #endif /* HAVE_SYS_LGRP_USER_IMPL_H */
17 #include <sys/mman.h>
18 #include <sys/modctl.h>
19 #include <sys/mount.h>
20 #include <sys/port_impl.h>
21 #include <sys/priocntl.h>
22 #include <sys/priv.h>
23 #include <sys/sem_impl.h>
24 #include <sys/sendfile.h>
25 #include <sys/shm_impl.h>
26 #include <sys/termios.h>
27 #include <sys/ucontext.h>
28 #include <sys/utsname.h>
29 #include <sys/tsol/tndb.h>
30 #include <sys/tsol/tsyscall.h>
32 /* Helper functions. These are necessary if we've got two tests for a single
33 syscall. In that case, Memcheck can sometimes merge error messages. Doing
34 each test in its own function prevents that. */
35 __attribute__((noinline))
36 static void sys_mount(void)
38 GO(SYS_mount, "(4-arg, table variant) 4s 2m");
39 SY(SYS_mount, x0 + 1, x0, x0, x0); FAIL;
42 __attribute__((noinline))
43 static void sys_mount2(void)
45 GO(SYS_mount, "(4-arg) 4s 3m");
46 SY(SYS_mount, x0 + 1, x0, x0, x0 + 256); FAIL;
49 __attribute__((noinline))
50 static void sys_mount3(void)
52 GO(SYS_mount, "(6-arg) 6s 4m");
53 SY(SYS_mount, x0 + 1, x0, x0 | MS_DATA, x0 + 256, x0 + 1, x0 + 1); FAIL;
56 __attribute__((noinline))
57 static void sys_mount4(void)
59 GO(SYS_mount, "(8-arg) 8s 5m");
60 SY(SYS_mount, x0 + 1, x0, x0 | MS_OPTIONSTR, x0 + 256, x0 + 1, x0 + 1,
61 x0 + 1, x0 + 1); FAIL;
64 __attribute__((noinline))
65 static void sys_pgrpsys(void)
67 GO(SYS_pgrpsys, "(GETPGRP) 1s 0m");
68 SY(SYS_pgrpsys, x0); SUCC;
71 __attribute__((noinline))
72 static void sys_pgrpsys2(void)
74 GO(SYS_pgrpsys, "(GETSID) 2s 0m");
75 SY(SYS_pgrpsys, x0 + 2, x0); SUCC;
78 __attribute__((noinline))
79 static void sys_pgrpsys3(void)
81 GO(SYS_pgrpsys, "(GETPGID) 2s 0m");
82 SY(SYS_pgrpsys, x0 + 4, x0); SUCC;
85 __attribute__((noinline))
86 static void sys_shmsys(void)
88 GO(SYS_shmsys, "(SHMAT) 4s 0m");
89 SY(SYS_shmsys, x0 + SHMAT, x0, x0 - 1, x0); FAIL;
92 __attribute__((noinline))
93 static void sys_shmsys2(void)
95 GO(SYS_shmsys, "(SHMCTL,SHM_LOCK) 3s 0m");
96 SY(SYS_shmsys, x0 + SHMCTL, x0, x0 + SHM_LOCK); FAIL;
99 __attribute__((noinline))
100 static void sys_shmsys3(void)
102 GO(SYS_shmsys, "(SHMCTL,SHM_UNLOCK) 3s 0m");
103 SY(SYS_shmsys, x0 + SHMCTL, x0, x0 + SHM_UNLOCK); FAIL;
106 __attribute__((noinline))
107 static void sys_shmsys4(void)
109 GO(SYS_shmsys, "(SHMCTL,IPC_RMID) 3s 0m");
110 SY(SYS_shmsys, x0 + SHMCTL, x0, x0 + IPC_RMID); FAIL;
113 __attribute__((noinline))
114 static void sys_shmsys5(void)
116 GO(SYS_shmsys, "(SHMCTL,IPC_SET) 4s 3m");
117 SY(SYS_shmsys, x0 + SHMCTL, x0, x0 + IPC_SET, x0 + 1); FAIL;
120 __attribute__((noinline))
121 static void sys_shmsys6(void)
123 struct shmid_ds buf;
124 buf.shm_perm.uid = x0 + 1;
125 buf.shm_perm.gid = x0 + 1;
126 buf.shm_perm.mode = x0 + 1;
128 GO(SYS_shmsys, "(SHMCTL,IPC_SET) 6s 0m");
129 SY(SYS_shmsys, x0 + SHMCTL, x0, x0 + IPC_SET, &buf); FAIL;
132 __attribute__((noinline))
133 static void sys_shmsys7(void)
135 GO(SYS_shmsys, "(SHMCTL,IPC_STAT) 4s 1m");
136 SY(SYS_shmsys, x0 + SHMCTL, x0, x0 + IPC_STAT, x0 + 1); FAIL;
139 __attribute__((noinline))
140 static void sys_shmsys8(void)
142 GO(SYS_shmsys, "(SHMCTL,IPC_SET64) 4s 3m");
143 SY(SYS_shmsys, x0 + SHMCTL, x0, x0 + IPC_SET64, x0 + 1); FAIL;
146 __attribute__((noinline))
147 static void sys_shmsys9(void)
149 struct shmid_ds64 buf;
150 buf.shmx_perm.ipcx_uid = x0 + 1;
151 buf.shmx_perm.ipcx_gid = x0 + 1;
152 buf.shmx_perm.ipcx_mode = x0 + 1;
154 GO(SYS_shmsys, "(SHMCTL,IPC_SET64) 6s 0m");
155 SY(SYS_shmsys, x0 + SHMCTL, x0, x0 + IPC_SET64, &buf); FAIL;
158 __attribute__((noinline))
159 static void sys_shmsys10(void)
161 GO(SYS_shmsys, "(SHMCTL,IPC_STAT64) 4s 1m");
162 SY(SYS_shmsys, x0 + SHMCTL, x0, x0 + IPC_STAT64, x0 + 1); FAIL;
165 __attribute__((noinline))
166 static void sys_shmsys11(void)
168 GO(SYS_shmsys, "(SHMDT) 2s 0m");
169 SY(SYS_shmsys, x0 + SHMDT, x0 - 1); FAIL;
172 __attribute__((noinline))
173 static void sys_shmsys12(void)
175 GO(SYS_shmsys, "(SHMGET) 4s 0m");
176 SY(SYS_shmsys, x0 + SHMGET, x0, x0, x0); FAIL;
179 __attribute__((noinline))
180 static void sys_shmsys13(void)
182 GO(SYS_shmsys, "(SHMIDS) 4s 2m");
183 SY(SYS_shmsys, x0 + SHMIDS, x0 + 1, x0 + 1, x0 + 1); FAIL;
186 __attribute__((noinline))
187 static void sys_semsys(void)
189 GO(SYS_semsys, "(SEMCTL,IPC_STAT) 5s 1m");
190 SY(SYS_semsys, x0 + SEMCTL, x0, x0, x0 + IPC_STAT, x0 + 1); FAIL;
193 __attribute__((noinline))
194 static void sys_semsys2(void)
196 GO(SYS_semsys, "(SEMCTL,IPC_SET) 5s 1m");
197 SY(SYS_semsys, x0 + SEMCTL, x0, x0, x0 + IPC_SET, x0 + 1); FAIL;
200 __attribute__((noinline))
201 static void sys_semsys3(void)
203 GO(SYS_semsys, "(SEMCTL,IPC_STAT64) 5s 1m");
204 SY(SYS_semsys, x0 + SEMCTL, x0, x0, x0 + IPC_STAT64, x0 + 1); FAIL;
207 __attribute__((noinline))
208 static void sys_semsys4(void)
210 GO(SYS_semsys, "(SEMCTL,IPC_SET64) 5s 1m");
211 SY(SYS_semsys, x0 + SEMCTL, x0, x0, x0 + IPC_SET64, x0 + 1); FAIL;
214 __attribute__((noinline))
215 static void sys_semsys5(void)
217 GO(SYS_semsys, "(SEMCTL,IPC_RMID) 3s 0m");
218 SY(SYS_semsys, x0 + SEMCTL, x0, x0, x0 + IPC_RMID); FAIL;
221 __attribute__((noinline))
222 static void sys_semsys6(void)
224 GO(SYS_semsys, "(SEMCTL,GETALL) 4s 0m");
225 SY(SYS_semsys, x0 + SEMCTL, x0, x0, x0 + GETALL, x0 + 1); FAIL;
228 __attribute__((noinline))
229 static void sys_semsys7(void)
231 GO(SYS_semsys, "(SEMCTL,SETALL) 4s 0m");
232 SY(SYS_semsys, x0 + SEMCTL, x0, x0, x0 + SETALL, x0 + 1); FAIL;
235 __attribute__((noinline))
236 static void sys_semsys8(void)
238 GO(SYS_semsys, "(SEMCTL,GETVAL) 4s 0m");
239 SY(SYS_semsys, x0 + SEMCTL, x0, x0, x0 + GETVAL); FAIL;
242 __attribute__((noinline))
243 static void sys_semsys9(void)
245 GO(SYS_semsys, "(SEMCTL,SETVAL) 5s 0m");
246 SY(SYS_semsys, x0 + SEMCTL, x0, x0, x0 + SETVAL, x0 + 2); FAIL;
249 __attribute__((noinline))
250 static void sys_semsys10(void)
252 GO(SYS_semsys, "(SEMCTL,GETPID) 4s 0m");
253 SY(SYS_semsys, x0 + SEMCTL, x0, x0, x0 + GETPID); FAIL;
256 __attribute__((noinline))
257 static void sys_semsys11(void)
259 GO(SYS_semsys, "(SEMCTL,GETNCNT) 4s 0m");
260 SY(SYS_semsys, x0 + SEMCTL, x0, x0, x0 + GETNCNT); FAIL;
263 __attribute__((noinline))
264 static void sys_semsys12(void)
266 GO(SYS_semsys, "(SEMCTL,GETZCNT) 4s 0m");
267 SY(SYS_semsys, x0 + SEMCTL, x0, x0, x0 + GETZCNT); FAIL;
270 __attribute__((noinline))
271 static void sys_semsys13(void)
273 GO(SYS_semsys, "(SEMGET) 4s 0m");
274 SY(SYS_semsys, x0 + SEMGET, x0, x0, x0); FAIL;
277 __attribute__((noinline))
278 static void sys_semsys14(void)
280 GO(SYS_semsys, "(SEMOP) 4s 1m");
281 SY(SYS_semsys, x0 + SEMOP, x0, x0 + 1, x0 + 1); FAIL;
284 __attribute__((noinline))
285 static void sys_semsys15(void)
287 GO(SYS_semsys, "(SEMIDS) 4s 2m");
288 SY(SYS_semsys, x0 + SEMIDS, x0 + 1, x0 + 1, x0 + 1); FAIL;
291 __attribute__((noinline))
292 static void sys_semsys16(void)
294 GO(SYS_semsys, "(SEMTIMEDOP) 5s 2m");
295 SY(SYS_semsys, x0 + SEMTIMEDOP, x0, x0 + 1, x0 + 1, x0 + 1); FAIL;
298 __attribute__((noinline))
299 static void sys_fcntl(void)
301 GO(SYS_fcntl, "(GETFD) 2s 0m");
302 SY(SYS_fcntl, x0 - 1, x0 + F_GETFD); FAILx(EBADF);
305 __attribute__((noinline))
306 static void sys_fcntl2(void)
308 GO(SYS_fcntl, "(DUPFD) 3s 0m");
309 SY(SYS_fcntl, x0 - 1, x0 + F_DUPFD, x0); FAILx(EBADF);
312 __attribute__((noinline))
313 static void sys_fcntl3(void)
315 GO(SYS_fcntl, "(DUPFD_CLOEXEC) 3s 0m");
316 SY(SYS_fcntl, x0 - 1, x0 + F_DUPFD_CLOEXEC, x0); FAILx(EBADF);
319 __attribute__((noinline))
320 static void sys_fcntl4(void)
322 GO(SYS_fcntl, "(GETLK) 3s 5m");
323 SY(SYS_fcntl, x0 - 1, x0 + F_GETLK, x0); FAILx(EBADF);
326 __attribute__((noinline))
327 static void sys_openat(void)
329 GO(SYS_openat, "(3-args) 3s 1m");
330 SY(SYS_openat, x0 - 1, x0, x0); FAIL;
333 __attribute__((noinline))
334 static void sys_openat2(void)
336 GO(SYS_openat, "(4-args) 4s 1m");
337 SY(SYS_openat, x0 - 1, x0, x0 | O_CREAT, x0); FAIL;
340 __attribute__((noinline))
341 static void sys_tasksys(void)
343 GO(SYS_tasksys, "(settaskid) 3s 0m");
344 SY(SYS_tasksys, x0 + 0, x0, x0); FAIL;
347 __attribute__((noinline))
348 static void sys_tasksys2(void)
350 GO(SYS_tasksys, "(gettaskid) 1s 0m");
351 SY(SYS_tasksys, x0 + 1); SUCC;
354 __attribute__((noinline))
355 static void sys_tasksys3(void)
357 GO(SYS_tasksys, "(getprojid) 1s 0m");
358 SY(SYS_tasksys, x0 + 2); SUCC;
361 __attribute__((noinline))
362 static void sys_tasksys4(void)
364 GO(SYS_tasksys, "(projlist) 3s 1m");
365 /* ARG2 and ARG3 are ignored */
366 SY(SYS_tasksys, x0 + 3, x0, x0, x0 + 1, x0 + 2); FAIL;
369 __attribute__((noinline))
370 static void sys_sendfilev(void)
372 GO(SYS_sendfilev, "(SENDFILEV) 5s 2m");
373 SY(SYS_sendfilev, x0 + SENDFILEV, x0 - 1, x0 + 1, x0 + 2, x0 + 1); FAIL;
376 __attribute__((noinline))
377 static void sys_sendfilev2(void)
379 struct sendfilevec vec[2];
380 vec[0].sfv_fd = SFV_FD_SELF;
381 vec[0].sfv_off = (off_t)(x0 + 1);
382 vec[0].sfv_len = x0 + 1;
383 vec[0].sfv_flag = 0; // should be set to zero according to man page
384 vec[1].sfv_fd = x0 - 1;
385 vec[1].sfv_off = x0;
386 vec[1].sfv_len = x0 + 1;
387 vec[1].sfv_flag = 0; // should be set to zero according to man page
389 GO(SYS_sendfilev, "(SENDFILEV) 4s 2m");
390 SY(SYS_sendfilev, x0 + SENDFILEV, x0 - 1, vec, 2, x0 + 1); FAIL;
393 __attribute__((noinline))
394 static void sys_sendfilev3(void)
396 GO(SYS_sendfilev, "(SENDFILEV64) 5s 2m");
397 SY(SYS_sendfilev, x0 + SENDFILEV64, x0 - 1, x0 + 1, x0 + 2, x0 + 1); FAIL;
400 __attribute__((noinline))
401 static void sys_sendfilev4(void)
403 struct sendfilevec64 vec[2];
404 vec[0].sfv_fd = SFV_FD_SELF;
405 vec[0].sfv_off = (off_t)(x0 + 1);
406 vec[0].sfv_len = x0 + 1;
407 vec[0].sfv_flag = 0; // should be set to zero according to man page
408 vec[1].sfv_fd = x0 - 1;
409 vec[1].sfv_off = x0;
410 vec[1].sfv_len = x0 + 1;
411 vec[1].sfv_flag = 0; // should be set to zero according to man page
413 GO(SYS_sendfilev, "(SENDFILEV64) 4s 2m");
414 SY(SYS_sendfilev, x0 + SENDFILEV64, x0 - 1, vec, 2, x0 + 1); FAIL;
417 __attribute__((noinline))
418 static void sys_privsys(void)
420 GO(SYS_privsys, "(PRIVSYS_SETPPRIV) 5s 1m");
421 SY(SYS_privsys, x0 + PRIVSYS_SETPPRIV, x0, x0, x0, x0 + 1); FAIL;
424 __attribute__((noinline))
425 static void sys_privsys2(void)
427 GO(SYS_privsys, "(PRIVSYS_GETPPRIV) 5s 1m");
428 SY(SYS_privsys, x0 + PRIVSYS_GETPPRIV, x0, x0, x0, x0 + 1); FAIL;
431 __attribute__((noinline))
432 static void sys_privsys3(void)
434 GO(SYS_privsys, "(PRIVSYS_GETIMPLINFO) 5s 1m");
435 SY(SYS_privsys, x0 + PRIVSYS_GETIMPLINFO, x0, x0, x0, x0 + 1); FAIL;
438 __attribute__((noinline))
439 static void sys_privsys4(void)
441 GO(SYS_privsys, "(PRIVSYS_SETPFLAGS) 3s 0m");
442 SY(SYS_privsys, x0 + PRIVSYS_SETPFLAGS, x0, x0 + 2); FAIL;
445 __attribute__((noinline))
446 static void sys_privsys5(void)
448 GO(SYS_privsys, "(PRIVSYS_GETPFLAGS) 2s 0m");
449 SY(SYS_privsys, x0 + PRIVSYS_GETPFLAGS, x0); FAIL;
452 __attribute__((noinline))
453 static void sys_privsys6(void)
455 GO(SYS_privsys, "(PRIVSYS_ISSETUGID) 1s 0m");
456 SY(SYS_privsys, x0 + PRIVSYS_ISSETUGID); SUCC;
459 __attribute__((noinline))
460 static void sys_privsys7(void)
462 GO(SYS_privsys, "(PRIVSYS_PFEXEC_REG) 2s 0m");
463 SY(SYS_privsys, x0 + PRIVSYS_PFEXEC_REG, x0 - 1); FAILx(EBADF);
466 __attribute__((noinline))
467 static void sys_privsys8(void)
469 GO(SYS_privsys, "(PRIVSYS_PFEXEC_UNREG) 2s 0m");
470 SY(SYS_privsys, x0 + PRIVSYS_PFEXEC_UNREG, x0 - 1); FAILx(EBADF);
473 __attribute__((noinline))
474 static void sys_ucredsys(void)
476 GO(SYS_ucredsys, "(UCREDSYS_UCREDGET) 3s 1m");
477 SY(SYS_ucredsys, x0 + 0, x0, x0 + 1); FAIL;
480 __attribute__((noinline))
481 static void sys_ucredsys2(void)
483 GO(SYS_ucredsys, "(UCREDSYS_GETPEERUCRED) 3s 1m");
484 SY(SYS_ucredsys, x0 + 1, x0 - 1, x0 + 1); FAILx(EBADF);
487 __attribute__((noinline))
488 static void sys_sysfs(void)
490 GO(SYS_sysfs, "(GETFSIND) 2s 1m");
491 SY(SYS_sysfs, x0 + GETFSIND, x0 + 1); FAIL;
494 __attribute__((noinline))
495 static void sys_sysfs2(void)
497 GO(SYS_sysfs, "(GETFSTYP) 3s 1m");
498 SY(SYS_sysfs, x0 + GETFSTYP, x0, x0 + 1); FAIL;
501 __attribute__((noinline))
502 static void sys_sysfs3(void)
504 GO(SYS_sysfs, "(GETNFSTYP) 1s 0m");
505 SY(SYS_sysfs, x0 + GETNFSTYP); SUCC;
508 __attribute__((noinline))
509 static void sys_context(void)
511 GO(SYS_context, "(GETCONTEXT) 2s 1m");
512 SY(SYS_context, x0 + GETCONTEXT, x0); FAILx(EFAULT);
515 __attribute__((noinline))
516 static void sys_context2(void)
518 /* The setcontext() wrapper has to call ML_(safe_to_deref) before doing the
519 PRE_READ_*() stuff, therefore the 0m parameter. */
520 GO(SYS_context, "(SETCONTEXT) 2s 0m");
521 SY(SYS_context, x0 + SETCONTEXT, x0 + 1); FAILx(EFAULT);
524 __attribute__((noinline))
525 static void sys_context3(void)
527 GO(SYS_context, "(GETUSTACK) 2s 1m");
528 SY(SYS_context, x0 + GETUSTACK, x0); FAILx(EFAULT);
531 __attribute__((noinline))
532 static void sys_context4(void)
534 GO(SYS_context, "(SETUSTACK) 2s 1m");
535 SY(SYS_context, x0 + SETUSTACK, x0); FAILx(EFAULT);
538 __attribute__((noinline))
539 static void sys_statvfs(void)
541 GO(SYS_statvfs, "2s 2m");
542 SY(SYS_statvfs, x0 + 1, x0 + 1); FAIL;
545 __attribute__((noinline))
546 static int sys_statvfs2(void)
548 const char path[] = "/";
549 struct statvfs stats;
551 GO(SYS_statvfs, "4s 0m");
552 SY(SYS_statvfs, x0 + path, x0 + &stats); SUCC;
554 size_t basetype_len = strlen(stats.f_basetype);
555 size_t fstr_len = strlen(stats.f_fstr);
557 /* Now check that memory after the strings is reported uninitialized. */
558 int x = 0;
559 if (stats.f_basetype[basetype_len + 2] != ' ') x = -1; else x = -2;
560 if (stats.f_fstr[fstr_len + 2] != ' ') x = -3; else x = -4;
561 return x;
564 __attribute__((noinline))
565 static void sys_nfssys(void)
567 GO(SYS_nfssys, "(NFS_REVAUTH) 2s 1m");
568 SY(SYS_nfssys, x0 + NFS_REVAUTH, x0); FAIL;
571 __attribute__((noinline))
572 static void sys_priocntlsys(void)
574 pcinfo_t pcinfo;
575 pcinfo.pc_clname[0] = x0 + 'T';
576 pcinfo.pc_clname[1] = x0 + 'S';
577 pcinfo.pc_clname[2] = x0;
579 GO(SYS_priocntlsys, "(GETCID) 6s 0m");
580 SY(SYS_priocntlsys, x0 + 1, x0, x0 + PC_GETCID, x0 + &pcinfo, x0); SUCC;
583 __attribute__((noinline))
584 static void sys_priocntlsys2(void)
586 pcinfo_t pcinfo;
587 pcinfo.pc_cid = x0 + 1;
589 GO(SYS_priocntlsys, "(GETCLINFO) 6s 0m");
590 SY(SYS_priocntlsys, x0 + 1, x0, x0 + PC_GETCLINFO, x0 + &pcinfo, x0); SUCC;
593 __attribute__((noinline))
594 static void sys_priocntlsys3(void)
596 GO(SYS_priocntlsys, "(SETPARMS) 5s 2m");
597 SY(SYS_priocntlsys, x0 + 1, x0, x0 + PC_SETPARMS, x0, x0); FAIL;
600 __attribute__((noinline))
601 static void sys_priocntlsys4(void)
603 GO(SYS_priocntlsys, "(GETPARMS) 5s 2m");
604 SY(SYS_priocntlsys, x0 + 1, x0, x0 + PC_GETPARMS, x0, x0); FAIL;
607 __attribute__((noinline))
608 static void sys_priocntlsys5(void)
610 GO(SYS_priocntlsys, "(GETPRIRANGE) 5s 2m");
611 SY(SYS_priocntlsys, x0 + 1, x0, x0 + PC_GETPRIRANGE, x0, x0); FAIL;
614 __attribute__((noinline))
615 static void sys_priocntlsys6(void)
617 GO(SYS_priocntlsys, "(DONICE) 5s 2m");
618 SY(SYS_priocntlsys, x0 + 1, x0, x0 + PC_DONICE, x0, x0); FAIL;
621 __attribute__((noinline))
622 static void sys_priocntlsys7(void)
624 GO(SYS_priocntlsys, "(SETXPARMS) 5s 3m");
625 SY(SYS_priocntlsys, x0 + 1, x0, x0 + PC_SETXPARMS, x0, x0 + 1); FAIL;
628 __attribute__((noinline))
629 static void sys_priocntlsys8(void)
631 GO(SYS_priocntlsys, "(GETXPARMS) 5s 3m");
632 SY(SYS_priocntlsys, x0 + 1, x0, x0 + PC_GETXPARMS, x0 + 1, x0 + 1); FAIL;
635 __attribute__((noinline))
636 static void sys_priocntlsys9(void)
638 GO(SYS_priocntlsys, "(SETDFLCL) 5s 1m");
639 SY(SYS_priocntlsys, x0 + 1, x0, x0 + PC_SETDFLCL, x0, x0); FAIL;
642 __attribute__((noinline))
643 static void sys_priocntlsys10(void)
645 GO(SYS_priocntlsys, "(GETDFLCL) 5s 1m");
646 SY(SYS_priocntlsys, x0 + 1, x0, x0 + PC_GETDFLCL, x0 + 1, x0); FAIL;
649 __attribute__((noinline))
650 static void sys_priocntlsys11(void)
652 GO(SYS_priocntlsys, "(DOPRIO) 5s 2m");
653 SY(SYS_priocntlsys, x0 + 1, x0, x0 + PC_DOPRIO, x0, x0); FAIL;
656 __attribute__((noinline))
657 static void sys_uname(void)
659 GO(SYS_uname, "1s 1m");
660 SY(SYS_uname, x0 + 1); FAIL;
663 __attribute__((noinline))
664 static int sys_uname2(void)
666 struct utsname name;
668 GO(SYS_uname, "6s 0m");
669 SY(SYS_uname, x0 + &name); SUCC;
671 size_t sysname_len = strlen(name.sysname);
672 size_t nodename_len = strlen(name.nodename);
673 size_t release_len = strlen(name.release);
674 size_t version_len = strlen(name.version);
675 size_t machine_len = strlen(name.machine);
677 /* Now check that memory after the strings is reported uninitialized. */
678 int x = 0;
679 if (name.sysname[sysname_len + 2] != ' ') x = -1; else x = -2;
680 if (name.nodename[nodename_len + 2] != ' ') x = -3; else x = -4;
681 if (name.release[release_len + 2] != ' ') x = -5; else x = -6;
682 if (name.version[version_len + 2] != ' ') x = -7; else x = -8;
683 if (name.machine[machine_len + 2] != ' ') x = -9; else x = -10;
684 return x;
687 __attribute__((noinline))
688 static void sys_modctl(void)
690 GO(SYS_modctl, "(MODLOAD) 4s 1m");
691 SY(SYS_modctl, x0 + MODLOAD, x0 + 1, x0 - 1, x0 - 1); FAIL;
694 __attribute__((noinline))
695 static void sys_modctl2(void)
697 GO(SYS_modctl, "(MODUNLOAD) 2s 0m");
698 SY(SYS_modctl, x0 + MODUNLOAD, x0 + 1); FAIL;
701 __attribute__((noinline))
702 static void sys_modctl3(void)
704 GO(SYS_modctl, "(MODINFO) 3s 4m");
705 SY(SYS_modctl, x0 + MODINFO, x0 + 1, x0 - 1); FAIL;
708 __attribute__((noinline))
709 static void sys_lgrpsys(void)
711 GO(SYS_lgrpsys, "(LGRP_SYS_MEMINFO) 3s 1m");
712 SY(SYS_lgrpsys, x0 + LGRP_SYS_MEMINFO, x0 + 0, x0 + 1); FAIL;
715 __attribute__((noinline))
716 static void sys_lgrpsys2(void)
718 GO(SYS_lgrpsys, "(LGRP_SYS_MEMINFO) 3s 1m");
719 SY(SYS_lgrpsys, x0 + LGRP_SYS_MEMINFO, x0 + 1, x0 + 1); FAIL;
722 __attribute__((noinline))
723 static void sys_lgrpsys3(void)
725 meminfo_t minfo;
726 minfo.mi_inaddr = (void *)(x0 + 1);
727 minfo.mi_info_req = (void *)(x0 + 1);
728 minfo.mi_info_count = x0 + 1;
729 minfo.mi_outdata = (void *)(x0 + 1);
730 minfo.mi_validity = (void *)(x0 + 1);
732 GO(SYS_lgrpsys, "(LGRP_SYS_MEMINFO) 4s 4m");
733 SY(SYS_lgrpsys, x0 + LGRP_SYS_MEMINFO, x0 + 1, x0 + &minfo); FAIL;
736 __attribute__((noinline))
737 static void sys_lgrpsys4(void)
739 GO(SYS_lgrpsys, "(LGRP_SYS_GENERATION) 2s 0m");
740 SY(SYS_lgrpsys, x0 + LGRP_SYS_GENERATION, x0 + 0); SUCC;
743 __attribute__((noinline))
744 static void sys_lgrpsys5(void)
746 GO(SYS_lgrpsys, "(LGRP_SYS_VERSION) 2s 0m");
747 SY(SYS_lgrpsys, x0 + LGRP_SYS_VERSION, x0 + 0); SUCC;
750 __attribute__((noinline))
751 static void sys_lgrpsys6(void)
753 GO(SYS_lgrpsys, "(LGRP_SYS_SNAPSHOT) 3s 1m");
754 SY(SYS_lgrpsys, x0 + LGRP_SYS_SNAPSHOT, x0 + 10, x0 + 1); FAIL;
757 __attribute__((noinline))
758 static void sys_rusagesys(void)
760 GO(SYS_rusagesys, "(_RUSAGESYS_GETRUSAGE) 2s 1m");
761 SY(SYS_rusagesys, x0 + _RUSAGESYS_GETRUSAGE, x0 + 1); FAIL;
764 __attribute__((noinline))
765 static void sys_rusagesys2(void)
767 GO(SYS_rusagesys, "(_RUSAGESYS_GETRUSAGE_CHLD) 2s 1m");
768 SY(SYS_rusagesys, x0 + _RUSAGESYS_GETRUSAGE_CHLD, x0 + 1); FAIL;
771 __attribute__((noinline))
772 static void sys_rusagesys3(void)
774 GO(SYS_rusagesys, "(_RUSAGESYS_GETRUSAGE_LWP) 2s 1m");
775 SY(SYS_rusagesys, x0 + _RUSAGESYS_GETRUSAGE_LWP, x0 + 1); FAIL;
778 __attribute__((noinline))
779 static void sys_rusagesys4(void)
781 GO(SYS_rusagesys, "(_RUSAGESYS_GETVMUSAGE) 5s 1m");
782 SY(SYS_rusagesys, x0 + _RUSAGESYS_GETVMUSAGE, x0, x0, x0 + 1, x0 + 1);
783 FAIL;
786 __attribute__((noinline))
787 static void sys_rusagesys5(void)
789 size_t nres = 10;
791 GO(SYS_rusagesys, "(_RUSAGESYS_GETVMUSAGE) 5s 1m");
792 SY(SYS_rusagesys, x0 + _RUSAGESYS_GETVMUSAGE, x0, x0, x0 + 1, x0 + &nres);
793 FAIL;
796 __attribute__((noinline))
797 static void sys_port(void)
799 GO(SYS_port, "(PORT_CREATE) 1s 0m");
800 SY(SYS_port, (x0 + PORT_CREATE) | PORT_SYS_NOPORT); SUCC;
803 __attribute__((noinline))
804 static void sys_port2(void)
806 GO(SYS_port, "(PORT_ASSOCIATE,PORT_SOURCE_FD) 6s 0m");
807 SY(SYS_port, x0 + PORT_ASSOCIATE, x0 - 1, x0 + PORT_SOURCE_FD, x0, x0,
808 x0); FAILx(EBADF);
811 __attribute__((noinline))
812 static void sys_port3(void)
814 GO(SYS_port, "(PORT_ASSOCIATE,PORT_SOURCE_FILE) 6s 1m");
815 SY(SYS_port, x0 + PORT_ASSOCIATE, x0 - 1, x0 + PORT_SOURCE_FILE, x0, x0,
816 x0); FAILx(EBADF);
819 __attribute__((noinline))
820 static void sys_port4(void)
822 GO(SYS_port, "(PORT_DISSOCIATE,PORT_SOURCE_FD) 6s 0m");
823 SY(SYS_port, x0 + PORT_DISSOCIATE, x0 - 1, x0 + PORT_SOURCE_FD, x0, x0,
824 x0); FAILx(EBADF);
827 __attribute__((noinline))
828 static void sys_port5(void)
830 GO(SYS_port, "(PORT_DISSOCIATE,PORT_SOURCE_FILE) 6s 1m");
831 SY(SYS_port, x0 + PORT_DISSOCIATE, x0 - 1, x0 + PORT_SOURCE_FILE, x0, x0,
832 x0); FAILx(EBADF);
835 __attribute__((noinline))
836 static void sys_port6(void)
838 GO(SYS_port, "(PORT_SEND) 4s 0m");
839 SY(SYS_port, x0 + PORT_SEND, x0 - 1, x0, x0); FAILx(EBADF);
842 __attribute__((noinline))
843 static void sys_port7(void)
845 GO(SYS_port, "(PORT_SENDN) 6s 2m");
846 SY(SYS_port, (x0 + PORT_SENDN) | PORT_SYS_NOPORT, x0, x0, x0 + 1, x0,
847 x0); FAIL;
850 __attribute__((noinline))
851 static void sys_port8(void)
853 GO(SYS_port, "(PORT_GET) 6s 1m");
854 SY(SYS_port, x0 + PORT_GET, x0 - 1, x0, x0, x0, x0); FAILx(EBADF);
857 __attribute__((noinline))
858 static void sys_port9(void)
860 GO(SYS_port, "(PORT_GETN) 5s 2m");
861 SY(SYS_port, x0 + PORT_GETN, x0 - 1, x0, x0 + 1, x0, x0 + 1); FAILx(EBADF);
864 __attribute__((noinline))
865 static void sys_port10(void)
867 GO(SYS_port, "(PORT_ALERT) 5s 0m");
868 SY(SYS_port, x0 + PORT_ALERT, x0 - 1, x0, x0, x0); FAILx(EBADF);
871 __attribute__((noinline))
872 static void sys_port11(void)
874 GO(SYS_port, "(PORT_DISPATCH) 6s 0m");
875 SY(SYS_port, x0 + PORT_DISPATCH, x0 - 1, x0, x0, x0, x0); FAILx(EBADF);
878 __attribute__((noinline))
879 static void sys_labelsys(void)
881 GO(SYS_labelsys, "(TSOL_SYSLABELING) 1s 0m");
882 SY(SYS_labelsys, x0 + TSOL_SYSLABELING); SUCC;
885 __attribute__((noinline))
886 static void sys_labelsys2(void)
888 GO(SYS_labelsys, "(TSOL_TNRH) 3s 1m");
889 SY(SYS_labelsys, x0 + TSOL_TNRH, x0 + TNDB_GET, x0 + 1); FAIL;
892 __attribute__((noinline))
893 static void sys_labelsys3(void)
895 GO(SYS_labelsys, "(TSOL_TNRHTP) 3s 1m");
896 SY(SYS_labelsys, x0 + TSOL_TNRHTP, x0 + TNDB_GET, x0 + 1); FAIL;
899 __attribute__((noinline))
900 static void sys_labelsys4(void)
902 GO(SYS_labelsys, "(TSOL_TNMLP) 3s 1m");
903 SY(SYS_labelsys, x0 + TSOL_TNMLP, x0 + TNDB_GET, x0 + 1); FAIL;
906 __attribute__((noinline))
907 static void sys_labelsys5(void)
909 GO(SYS_labelsys, "(TSOL_GETLABEL) 3s 2m");
910 SY(SYS_labelsys, x0 + TSOL_GETLABEL, x0 + 1, x0 + 1); FAIL;
913 __attribute__((noinline))
914 static void sys_labelsys6(void)
916 GO(SYS_labelsys, "(TSOL_FGETLABEL) 3s 1m");
917 SY(SYS_labelsys, x0 + TSOL_FGETLABEL, x0 - 1, x0 + 1); FAILx(EBADF);
920 __attribute__((noinline))
921 static void sys_acl(void)
923 GO(SYS_acl, "(SETACL) 4s 2m");
924 SY(SYS_acl, x0, x0 + SETACL, x0 + 1, x0 + 1); FAIL;
927 __attribute__((noinline))
928 static void sys_acl2(void)
930 GO(SYS_acl, "(GETACL) 4s 2m");
931 SY(SYS_acl, x0, x0 + GETACL, x0 + 1, x0); FAIL;
934 __attribute__((noinline))
935 static void sys_acl3(void)
937 GO(SYS_acl, "(GETACLCNT) 4s 1m");
938 SY(SYS_acl, x0, x0 + GETACLCNT, x0, x0); FAIL;
941 __attribute__((noinline))
942 static void sys_acl4(void)
944 GO(SYS_acl, "(ACE_SETACL) 4s 2m");
945 SY(SYS_acl, x0, x0 + ACE_SETACL, x0 + 1, x0 + 1); FAIL;
948 __attribute__((noinline))
949 static void sys_acl5(void)
951 GO(SYS_acl, "(ACE_GETACL) 4s 2m");
952 SY(SYS_acl, x0, x0 + ACE_GETACL, x0 + 1, x0); FAIL;
955 __attribute__((noinline))
956 static void sys_acl6(void)
958 GO(SYS_acl, "(ACE_GETACLCNT) 4s 1m");
959 SY(SYS_acl, x0, x0 + ACE_GETACLCNT, x0, x0); FAIL;
962 __attribute__((noinline))
963 static void sys_auditsys(void)
965 GO(SYS_auditsys, "(BSM_GETAUID) 2s 1m");
966 SY(SYS_auditsys, x0 + BSM_GETAUID, x0); FAIL;
969 __attribute__((noinline))
970 static void sys_auditsys2(void)
972 GO(SYS_auditsys, "(BSM_SETAUID) 2s 1m");
973 SY(SYS_auditsys, x0 + BSM_SETAUID, x0); FAIL;
976 __attribute__((noinline))
977 static void sys_auditsys3(void)
979 GO(SYS_auditsys, "(BSM_GETAUDIT) 2s 1m");
980 SY(SYS_auditsys, x0 + BSM_GETAUDIT, x0); FAIL;
983 __attribute__((noinline))
984 static void sys_auditsys4(void)
986 GO(SYS_auditsys, "(BSM_SETAUDIT) 2s 1m");
987 SY(SYS_auditsys, x0 + BSM_SETAUDIT, x0); FAIL;
990 __attribute__((noinline))
991 static void sys_auditsys5(void)
993 GO(SYS_auditsys, "(BSM_AUDIT) 3s 1m");
994 /* The following syscall can succeed if auditing is not enabled. */
995 SY(SYS_auditsys, x0 + BSM_AUDIT, x0, x0 + 1); /*FAIL;*/
998 __attribute__((noinline))
999 static void sys_auditsys6(void)
1001 GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETPOLICY) 3s 1m");
1002 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETPOLICY, x0); FAIL;
1005 __attribute__((noinline))
1006 static void sys_auditsys7(void)
1008 GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETPOLICY) 3s 1m");
1009 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETPOLICY, x0); FAIL;
1012 __attribute__((noinline))
1013 static void sys_auditsys8(void)
1015 GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETKMASK) 3s 1m");
1016 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETKMASK, x0); FAIL;
1019 __attribute__((noinline))
1020 static void sys_auditsys9(void)
1022 GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETKMASK) 3s 1m");
1023 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETKMASK, x0); FAIL;
1026 __attribute__((noinline))
1027 static void sys_auditsys10(void)
1029 GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETQCTRL) 3s 1m");
1030 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETQCTRL, x0); FAIL;
1033 __attribute__((noinline))
1034 static void sys_auditsys11(void)
1036 GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETQCTRL) 3s 1m");
1037 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETQCTRL, x0 + 1); FAIL;
1040 __attribute__((noinline))
1041 static void sys_auditsys12(void)
1043 GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETCWD) 4s 1m");
1044 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETCWD, x0, x0 + 1); FAIL;
1047 __attribute__((noinline))
1048 static void sys_auditsys13(void)
1050 GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETCAR) 4s 1m");
1051 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETCAR, x0, x0 + 1); FAIL;
1054 __attribute__((noinline))
1055 static void sys_auditsys14(void)
1057 GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETUMASK) 3s 1m");
1058 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETUMASK, x0); FAIL;
1061 __attribute__((noinline))
1062 static void sys_auditsys15(void)
1064 GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETSMASK) 3s 1m");
1065 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETSMASK, x0); FAIL;
1068 __attribute__((noinline))
1069 static void sys_auditsys16(void)
1071 GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETCOND) 3s 1m");
1072 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETCOND, x0); FAIL;
1075 __attribute__((noinline))
1076 static void sys_auditsys17(void)
1078 GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETCOND) 3s 1m");
1079 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETCOND, x0); FAIL;
1082 __attribute__((noinline))
1083 static void sys_auditsys18(void)
1085 GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETCLASS) 3s 0m");
1086 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETCLASS, x0); FAIL;
1089 __attribute__((noinline))
1090 static void sys_auditsys19(void)
1092 GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETCLASS) 3s 0m");
1093 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETCLASS, x0 + 1); FAIL;
1096 __attribute__((noinline))
1097 static void sys_auditsys20(void)
1099 au_evclass_map_t classmap;
1100 classmap.ec_number = x0;
1101 classmap.ec_class = x0;
1103 GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETCLASS) 4s 0m");
1104 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETCLASS, &classmap); FAIL;
1107 __attribute__((noinline))
1108 static void sys_auditsys21(void)
1110 GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETPINFO) 3s 0m");
1111 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETPINFO, x0); FAIL;
1114 __attribute__((noinline))
1115 static void sys_auditsys22(void)
1117 GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETPMASK) 3s 1m");
1118 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETPMASK, x0); FAIL;
1121 __attribute__((noinline))
1122 static void sys_auditsys23(void)
1124 GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETPINFO_ADDR) 4s 0m");
1125 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETPINFO_ADDR, x0,
1126 x0 + 1); FAIL;
1129 __attribute__((noinline))
1130 static void sys_auditsys24(void)
1132 GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETKAUDIT) 4s 1m");
1133 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETKAUDIT, x0, x0 + 1); FAIL;
1136 __attribute__((noinline))
1137 static void sys_auditsys25(void)
1139 GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETKAUDIT) 4s 1m");
1140 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETKAUDIT, x0, x0 + 1); FAIL;
1143 __attribute__((noinline))
1144 static void sys_auditsys26(void)
1146 GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETAMASK) 3s 1m");
1147 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETAMASK, x0); FAIL;
1150 __attribute__((noinline))
1151 static void sys_auditsys27(void)
1153 GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETAMASK) 3s 1m");
1154 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETAMASK, x0); FAIL;
1157 __attribute__((noinline))
1158 static void sys_auditsys28(void)
1160 GO(SYS_auditsys, "(BSM_GETAUDIT_ADDR) 3s 1m");
1161 SY(SYS_auditsys, x0 + BSM_GETAUDIT_ADDR, x0 + 1, x0 + 1); FAIL;
1164 __attribute__((noinline))
1165 static void sys_auditsys29(void)
1167 GO(SYS_auditsys, "(BSM_SETAUDIT_ADDR) 3s 1m");
1168 SY(SYS_auditsys, x0 + BSM_SETAUDIT_ADDR, x0, x0 + 1); FAIL;
1171 __attribute__((noinline))
1172 static void sys_auditsys30(void)
1174 GO(SYS_auditsys, "(BSM_AUDITDOOR) 2s 0m");
1175 SY(SYS_auditsys, x0 + BSM_AUDITDOOR, x0); FAIL;
1178 __attribute__((noinline))
1179 static void sys_timer_create(void)
1181 GO(SYS_timer_create, "3s 4m");
1182 SY(SYS_timer_create, x0, x0 + 1, x0 + 1); FAIL;
1185 __attribute__((noinline))
1186 static void sys_timer_create2(void)
1188 struct sigevent evp;
1189 evp.sigev_notify = x0 + SIGEV_THREAD;
1190 evp.sigev_value.sival_ptr = (void *)(x0 + 1);
1192 GO(SYS_timer_create, "5s 2m");
1193 SY(SYS_timer_create, x0, &evp, x0 + 1); FAIL;
1196 __attribute__((noinline))
1197 static void sys_facl(void)
1199 GO(SYS_facl, "(SETACL) 4s 1m");
1200 SY(SYS_facl, x0 - 1, x0 + SETACL, x0 + 1, x0 + 1); FAILx(EBADF);
1203 __attribute__((noinline))
1204 static void sys_facl2(void)
1206 GO(SYS_facl, "(GETACL) 4s 1m");
1207 SY(SYS_facl, x0 - 1, x0 + GETACL, x0 + 1, x0); FAILx(EBADF);
1210 __attribute__((noinline))
1211 static void sys_facl3(void)
1213 GO(SYS_facl, "(GETACLCNT) 4s 0m");
1214 SY(SYS_facl, x0 - 1, x0 + GETACLCNT, x0, x0); FAILx(EBADF);
1217 __attribute__((noinline))
1218 static void sys_facl4(void)
1220 GO(SYS_facl, "(ACE_SETACL) 4s 1m");
1221 SY(SYS_facl, x0 - 1, x0 + ACE_SETACL, x0 + 1, x0 + 1); FAILx(EBADF);
1224 __attribute__((noinline))
1225 static void sys_facl5(void)
1227 GO(SYS_facl, "(ACE_GETACL) 4s 1m");
1228 SY(SYS_facl, x0 - 1, x0 + ACE_GETACL, x0 + 1, x0); FAILx(EBADF);
1231 __attribute__((noinline))
1232 static void sys_facl6(void)
1234 GO(SYS_facl, "(ACE_GETACLCNT) 4s 0m");
1235 SY(SYS_facl, x0 - 1, x0 + ACE_GETACLCNT, x0, x0); FAILx(EBADF);
1238 __attribute__((noinline))
1239 static void sys_door(void)
1241 GO(SYS_door, "(DOOR_CREATE) 4s 0m");
1242 SY(SYS_door, x0, x0, x0, x0, x0, x0 + DOOR_CREATE); SUCC;
1245 __attribute__((noinline))
1246 static void sys_door2(void)
1248 GO(SYS_door, "(DOOR_REVOKE) 2s 0m");
1249 SY(SYS_door, x0, x0, x0, x0, x0, x0 + DOOR_REVOKE); FAIL;
1252 __attribute__((noinline))
1253 static void sys_door3(void)
1255 GO(SYS_door, "(DOOR_INFO) 3s 1m");
1256 SY(SYS_door, x0, x0 - 1, x0, x0, x0, x0 + DOOR_INFO); FAIL;
1259 __attribute__((noinline))
1260 static void sys_door4(void)
1262 GO(SYS_door, "(DOOR_CALL) 3s 6m");
1263 SY(SYS_door, x0 - 1, x0, x0, x0, x0, x0 + DOOR_CALL); FAILx(EBADF);
1266 __attribute__((noinline))
1267 static void sys_door5(void)
1269 door_arg_t params;
1270 params.data_ptr = (void *)(x0 + 1);
1271 params.data_size = x0 + 1;
1272 params.desc_ptr = (void *)(x0 + 1);
1273 params.desc_num = x0 + 1;
1274 params.rbuf = (void *)(x0 + 1);
1275 params.rsize = x0 + 1;
1277 GO(SYS_door, "(DOOR_CALL) 9s 2m");
1278 SY(SYS_door, x0, x0 + &params, x0, x0, x0, x0 + DOOR_CALL); FAIL;
1281 __attribute__((noinline))
1282 static void sys_door6(void)
1284 GO(SYS_door, "(DOOR_SETPARAM) 4s 0m");
1285 SY(SYS_door, x0, x0 - 1, x0 + 1, x0, x0, x0 + DOOR_SETPARAM); FAIL;
1288 __attribute__((noinline))
1289 static void sys_pset(void)
1291 GO(SYS_pset, "(CREATE) 2s 1m");
1292 SY(SYS_pset, x0 + PSET_CREATE, x0 + 1); FAIL;
1295 __attribute__((noinline))
1296 static void sys_pset2(void)
1298 GO(SYS_pset, "(DESTROY) 2s 0m");
1299 SY(SYS_pset, x0 + PSET_DESTROY, x0); FAIL;
1302 __attribute__((noinline))
1303 static void sys_pset3(void)
1305 GO(SYS_pset, "(ASSIGN) 4s 1m");
1306 SY(SYS_pset, x0 + PSET_ASSIGN, x0 + 1, x0 + 1, x0 + 1); FAIL;
1309 __attribute__((noinline))
1310 static void sys_pset4(void)
1312 GO(SYS_pset, "(INFO) 5s 3m");
1313 SY(SYS_pset, x0 + PSET_INFO, x0 + 1, x0 + 1, x0 + 1, x0 + 1); FAIL;
1316 __attribute__((noinline))
1317 static void sys_pset5(void)
1319 int type;
1320 uint_t numcpus = x0 + 1;
1322 GO(SYS_pset, "(INFO) 5s 1m");
1323 SY(SYS_pset, x0 + PSET_INFO, x0 + 1, x0 + &type, x0 + &numcpus,
1324 x0 + 1); FAIL;
1327 __attribute__((noinline))
1328 static void sys_pset6(void)
1330 GO(SYS_pset, "(BIND) 5s 1m");
1331 SY(SYS_pset, x0 + PSET_BIND, x0 + 1, x0 + 1, x0 + 1, x0 + 1); FAIL;
1334 __attribute__((noinline))
1335 static void sys_pset7(void)
1337 GO(SYS_pset, "(BIND_LWP) 5s 1m");
1338 SY(SYS_pset, x0 + PSET_BIND_LWP, x0 + 1, x0 + 1, x0 + 1, x0 + 1); FAIL;
1341 __attribute__((noinline))
1342 static void sys_pset8(void)
1344 GO(SYS_pset, "(GETLOADAVG) 4s 1m");
1345 SY(SYS_pset, x0 + PSET_GETLOADAVG, x0 + 1, x0 + 1, x0 + 1); FAIL;
1348 __attribute__((noinline))
1349 static void sys_pset9(void)
1351 GO(SYS_pset, "(LIST) 3s 1m");
1352 SY(SYS_pset, x0 + PSET_LIST, x0 + 1, x0 + 1); FAIL;
1355 __attribute__((noinline))
1356 static void sys_pset10(void)
1358 uint_t numpsets = x0 + 1;
1360 GO(SYS_pset, "(LIST) 3s 1m");
1361 SY(SYS_pset, x0 + PSET_LIST, x0 + 1, x0 + &numpsets);
1364 __attribute__((noinline))
1365 static void sys_pset11(void)
1367 GO(SYS_pset, "(SETATTR) 3s 0m");
1368 SY(SYS_pset, x0 + PSET_SETATTR, x0, x0); FAIL;
1371 __attribute__((noinline))
1372 static void sys_pset12(void)
1374 GO(SYS_pset, "(GETATTR) 3s 1m");
1375 SY(SYS_pset, x0 + PSET_GETATTR, x0, x0 + 1); FAIL;
1378 __attribute__((noinline))
1379 static void sys_pset13(void)
1381 GO(SYS_pset, "(ASSIGN_FORCED) 4s 1m");
1382 SY(SYS_pset, x0 + PSET_ASSIGN_FORCED, x0 + 1, x0 + 1, x0 + 1); FAIL;
1385 __attribute__((noinline))
1386 static void sys_lwp_rwlock(void)
1388 GO(SYS_lwp_rwlock_sys, "(RDLOCK) 3s 8m");
1389 SY(SYS_lwp_rwlock_sys, x0, x0, x0 + 1); FAIL;
1392 __attribute__((noinline))
1393 static void sys_lwp_rwlock2(void)
1395 GO(SYS_lwp_rwlock_sys, "(WRLOCK) 3s 8m");
1396 SY(SYS_lwp_rwlock_sys, x0 + 1, x0, x0 + 1); FAIL;
1399 __attribute__((noinline))
1400 static void sys_lwp_rwlock3(void)
1402 GO(SYS_lwp_rwlock_sys, "(TRYRDLOCK) 2s 7m");
1403 SY(SYS_lwp_rwlock_sys, x0 + 2, x0); FAIL;
1406 __attribute__((noinline))
1407 static void sys_lwp_rwlock4(void)
1409 GO(SYS_lwp_rwlock_sys, "(TRYWRLOCK) 2s 7m");
1410 SY(SYS_lwp_rwlock_sys, x0 + 3, x0); FAIL;
1413 __attribute__((noinline))
1414 static void sys_lwp_rwlock5(void)
1416 GO(SYS_lwp_rwlock_sys, "(UNLOCK) 2s 2m");
1417 SY(SYS_lwp_rwlock_sys, x0 + 4, x0); FAIL;
1420 __attribute__((noinline))
1421 static void sys_zone(void)
1423 GO(SYS_zone, "(ZONE_CREATE) 2s 12m");
1424 SY(SYS_zone, x0 + ZONE_CREATE, x0); FAIL;
1427 __attribute__((noinline))
1428 static void sys_zone2(void)
1430 zone_def zd;
1431 zd.zone_name = (void *)(x0 + 1);
1432 zd.zone_root = (void *)(x0 + 1);
1433 zd.zone_privs = (void *)x0;
1434 zd.zone_privssz = x0 + 1;
1435 zd.rctlbuf = (void *)x0;
1436 zd.rctlbufsz = x0 + 1;
1437 zd.extended_error = (void *)x0;
1438 zd.zfsbuf = (void *)x0;
1439 zd.zfsbufsz = x0 + 1;
1440 zd.match = x0;
1441 zd.doi = x0;
1442 zd.label = (void *)(x0 + 1);
1443 zd.flags = x0;
1445 GO(SYS_zone, "(create) 2s 19m");
1446 SY(SYS_zone, x0 + ZONE_CREATE, x0 + &zd); FAIL;
1449 __attribute__((noinline))
1450 static void sys_zone3(void)
1452 GO(SYS_zone, "(ZONE_DESTROY) 2s 0m");
1453 SY(SYS_zone, x0 + ZONE_DESTROY, x0); FAIL;
1456 __attribute__((noinline))
1457 static void sys_zone4(void)
1459 GO(SYS_zone, "(ZONE_GETATTR) 5s 1m");
1460 SY(SYS_zone, x0 + ZONE_GETATTR, x0, x0, x0, x0 + 1); FAIL;
1463 __attribute__((noinline))
1464 static void sys_zone5(void)
1466 GO(SYS_zone, "(ZONE_ENTER) 2s 0m");
1467 SY(SYS_zone, x0 + ZONE_ENTER, x0); FAIL;
1470 __attribute__((noinline))
1471 static void sys_zone6(void)
1473 GO(SYS_zone, "(ZONE_LIST) 3s 1m");
1474 SY(SYS_zone, x0 + ZONE_LIST, x0 + 1, x0 + 1); FAIL;
1477 __attribute__((noinline))
1478 static void sys_zone7(void)
1480 uint_t numzones = x0 + 1;
1482 GO(SYS_zone, "(ZONE_LIST) 3s 1m");
1483 SY(SYS_zone, x0 + ZONE_LIST, x0 + 1, x0 + &numzones); FAIL;
1486 __attribute__((noinline))
1487 static void sys_zone8(void)
1489 GO(SYS_zone, "(ZONE_SHUTDOWN) 2s 0m");
1490 SY(SYS_zone, x0 + ZONE_SHUTDOWN, x0); FAIL;
1493 __attribute__((noinline))
1494 static void sys_zone9(void)
1496 GO(SYS_zone, "(ZONE_LOOKUP) 2s 1m");
1497 SY(SYS_zone, x0 + ZONE_LOOKUP, x0 + 1); FAIL;
1500 __attribute__((noinline))
1501 static void sys_zone10(void)
1503 GO(SYS_zone, "(ZONE_BOOT) 2s 0m");
1504 SY(SYS_zone, x0 + ZONE_BOOT, x0); FAIL;
1507 __attribute__((noinline))
1508 static void sys_zone11(void)
1510 GO(SYS_zone, "(ZONE_SETATTR) 5s 1m");
1511 SY(SYS_zone, x0 + ZONE_SETATTR, x0, x0, x0, x0 + 1); FAIL;
1514 __attribute__((noinline))
1515 static void sys_zone12(void)
1517 GO(SYS_zone, "(ZONE_ADD_DATALINK) 3s 0m");
1518 SY(SYS_zone, x0 + ZONE_ADD_DATALINK, x0, x0); FAIL;
1521 __attribute__((noinline))
1522 static void sys_zone13(void)
1524 GO(SYS_zone, "(ZONE_DEL_DATALINK) 3s 0m");
1525 SY(SYS_zone, x0 + ZONE_DEL_DATALINK, x0, x0); FAIL;
1528 __attribute__((noinline))
1529 static void sys_zone14(void)
1531 GO(SYS_zone, "(ZONE_CHECK_DATALINK) 3s 1m");
1532 SY(SYS_zone, x0 + ZONE_CHECK_DATALINK, x0, x0); FAIL;
1535 __attribute__((noinline))
1536 static void sys_zone15(void)
1538 GO(SYS_zone, "(ZONE_LIST_DATALINK) 4s 1m");
1539 SY(SYS_zone, x0 + ZONE_LIST_DATALINK, x0, x0 + 1, x0 + 1); FAIL;
1542 __attribute__((noinline))
1543 static void sys_zone16(void)
1545 int dlnum = x0 + 1;
1547 GO(SYS_zone, "(ZONE_LIST_DATALINK) 4s 1m");
1548 SY(SYS_zone, x0 + ZONE_LIST_DATALINK, x0, x0 + &dlnum, x0 + 1); FAIL;
1551 __attribute__((noinline))
1552 static void sys_getpeername(void)
1554 GO(SYS_getpeername, "4s 1m");
1555 SY(SYS_getpeername, x0 - 1, x0 + 1, x0, x0); FAILx(EBADF);
1558 __attribute__((noinline))
1559 static void sys_getpeername2(void)
1561 socklen_t size = x0 + 10;
1563 GO(SYS_getpeername, "4s 1m");
1564 SY(SYS_getpeername, x0 - 1, x0 + 1, &size, x0); FAILx(EBADF);
1567 int main(void)
1569 /* Uninitialised, but we know px[0] is 0x0. */
1570 long *px = malloc(sizeof(long));
1571 x0 = px[0];
1573 /* SYS_syscall 0 */
1574 /* SPARC only. */
1576 /* SYS_exit 1 */
1577 /* Tested below. */
1579 /* SYS_read 3 */
1580 GO(SYS_read, "3s 0m");
1581 SY(SYS_read, x0 - 1, x0, x0 + 1); FAILx(EBADF);
1582 /* Note that above should be preferably "3s 1m" test.. */
1584 /* SYS_write 4 */
1585 GO(SYS_write, "3s 1m");
1586 SY(SYS_write, x0 + 1, x0, x0 + 1); FAIL;
1588 /* SYS_open 5 */
1589 /* Tested in scalar_obsolete.c. */
1591 /* SYS_close 6 */
1592 GO(SYS_close, "1s 0m");
1593 SY(SYS_close, x0 - 1); FAILx(EBADF);
1595 /* SYS_linkat 7 */
1596 GO(SYS_linkat, "5s 2m");
1597 SY(SYS_linkat, x0 - 1, x0 + 1, x0 - 1, x0 + 1, x0); FAIL;
1599 /* SYS_link 9 */
1600 /* Tested in scalar_obsolete.c. */
1602 /* SYS_unlink 10 */
1603 /* Tested in scalar_obsolete.c. */
1605 /* SYS_symlinkat 11 */
1606 GO(SYS_symlinkat, "3s 2m");
1607 SY(SYS_symlinkat, x0 + 1, x0 - 1, x0 + 1); FAIL;
1609 /* SYS_chdir 12 */
1610 GO(SYS_chdir, "1s 1m");
1611 SY(SYS_chdir, x0); FAIL;
1613 /* SYS_time 13 */
1614 GO(SYS_time, "0s 0m");
1615 SY(SYS_time); SUCC;
1617 /* SYS_mknod 14 */
1618 /* Tested in scalar_obsolete.c. */
1620 /* SYS_chmod 15 */
1621 /* Tested in scalar_obsolete.c. */
1623 /* SYS_chown 16 */
1624 /* Tested in scalar_obsolete.c. */
1626 /* SYS_brk 17 */
1627 GO(SYS_brk, "1s 0m");
1628 SY(SYS_brk, x0); SUCC;
1630 /* SYS_stat 18 */
1631 /* Tested in scalar_obsolete.c. */
1633 /* SYS_lseek 19 */
1634 GO(SYS_lseek, "3s 0m");
1635 SY(SYS_lseek, x0 - 1, x0, x0); FAILx(EBADF);
1637 /* SYS_getpid 20 */
1638 GO(SYS_getpid, "0s 0m");
1639 SY(SYS_getpid); SUCC;
1641 /* SYS_mount 21 */
1642 sys_mount();
1643 sys_mount2();
1644 sys_mount3();
1645 sys_mount4();
1647 /* SYS_readlinkat 22 */
1648 GO(SYS_readlinkat, "4s 2m");
1649 SY(SYS_readlinkat, x0 - 1, x0, x0, x0 + 1); FAIL;
1651 /* SYS_setuid 23 */
1652 GO(SYS_setuid, "1s 0m");
1653 SY(SYS_setuid, x0 - 1); FAIL;
1655 /* SYS_getuid 24 */
1656 GO(SYS_getuid, "0s 0m");
1657 SY(SYS_getuid); SUCC;
1659 /* SYS_stime 25 */
1660 GO(SYS_stime, "1s 0m");
1661 SY(SYS_stime, x0); FAIL;
1663 /* SYS_pcsample 26 */
1664 /* XXX Missing wrapper. */
1666 /* SYS_alarm 27 */
1667 GO(SYS_alarm, "1s 0m");
1668 SY(SYS_alarm, x0); SUCC;
1670 /* SYS_fstat 28 */
1671 /* Tested in scalar_obsolete.c. */
1673 /* SYS_pause 29 */
1674 /* Don't bother to test this. */
1675 GO(SYS_pause, "ignore");
1677 /* SYS_stty 31 */
1678 GO(SYS_stty, "2s 1m");
1679 SY(SYS_stty, x0 - 1, x0 + 1); FAIL;
1681 /* SYS_gtty 32 */
1682 GO(SYS_gtty, "2s 1m");
1683 SY(SYS_gtty, x0 - 1, x0 + 1); FAIL;
1685 /* SYS_access 33 */
1686 /* Tested in scalar_obsolete.c. */
1688 /* SYS_nice 34 */
1689 /* XXX Missing wrapper. */
1691 /* SYS_statfs 35 */
1692 /* XXX Missing wrapper. */
1694 /* SYS_sync 36 */
1695 /* XXX Missing wrapper. */
1697 /* SYS_kill 37 */
1698 GO(SYS_kill, "2s 0m");
1699 SY(SYS_kill, x0, x0); SUCC;
1701 /* SYS_fstatfs 38 */
1702 /* XXX Missing wrapper. */
1704 /* SYS_pgrpsys 39 */
1705 sys_pgrpsys();
1706 sys_pgrpsys2();
1707 sys_pgrpsys3();
1709 /* SYS_uucopystr 40 */
1710 /* XXX Missing wrapper. */
1712 /* SYS_pipe 42 */
1713 /* Don't bother to test this. */
1714 GO(SYS_pipe, "ignore");
1716 /* SYS_times 43 */
1717 GO(SYS_times, "1s 1m");
1718 SY(SYS_times, x0 + 1); FAIL;
1720 /* SYS_profil 44 */
1721 /* XXX Missing wrapper. */
1723 /* SYS_faccessat 45 */
1724 GO(SYS_faccessat, "4s 1m");
1725 SY(SYS_faccessat, x0 - 1, x0 + 1, x0, x0); FAIL;
1727 /* SYS_setgid 46 */
1728 GO(SYS_setgid, "1s 0m");
1729 SY(SYS_setgid, x0 - 1); FAIL;
1731 /* SYS_getgid 47 */
1732 GO(SYS_getgid, "0s 0m");
1733 SY(SYS_getgid); SUCC;
1735 /* SYS_mknodat 48 */
1736 GO(SYS_mknodat, "4s 1m");
1737 SY(SYS_mknodat, x0 - 1, x0 + 1, x0, x0); FAIL;
1739 /* SYS_msgsys 49 */
1740 /* XXX Missing wrapper. */
1742 /* SYS_sysi86 50 */
1743 /* TODO Add test. */
1744 GO(SYS_sysi86, "incoming");
1746 /* SYS_acct 51 */
1747 /* XXX Missing wrapper. */
1749 /* SYS_shmsys 52 */
1750 sys_shmsys();
1751 sys_shmsys2();
1752 sys_shmsys3();
1753 sys_shmsys4();
1754 sys_shmsys5();
1755 sys_shmsys6();
1756 sys_shmsys7();
1757 sys_shmsys8();
1758 sys_shmsys9();
1759 sys_shmsys10();
1760 sys_shmsys11();
1761 sys_shmsys12();
1762 sys_shmsys13();
1764 /* SYS_semsys 53 */
1765 sys_semsys();
1766 sys_semsys2();
1767 sys_semsys3();
1768 sys_semsys4();
1769 sys_semsys5();
1770 sys_semsys6();
1771 sys_semsys7();
1772 sys_semsys8();
1773 sys_semsys9();
1774 sys_semsys10();
1775 sys_semsys11();
1776 sys_semsys12();
1777 sys_semsys13();
1778 sys_semsys14();
1779 sys_semsys15();
1780 sys_semsys16();
1782 /* SYS_ioctl 54 */
1783 GO(SYS_ioctl, "3s 1m");
1784 SY(SYS_ioctl, x0, x0 + TCGETS, x0); FAIL;
1786 /* SYS_uadmin 55 */
1787 /* XXX Missing wrapper. */
1789 /* SYS_fchownat 56 */
1790 GO(SYS_fchownat, "5s 1m");
1791 SY(SYS_fchownat, x0 - 1, x0 + 1, x0, x0, x0); FAIL;
1793 /* SYS_utssys 57 */
1794 /* XXX Missing wrapper. */
1796 /* SYS_fdsync 58 */
1797 GO(SYS_fdsync, "2s 0m");
1798 SY(SYS_fdsync, x0 - 1, x0); FAILx(EBADF);
1800 /* SYS_execve 59 */
1801 /* illumos ignores the fourth argument. */
1802 GO(SYS_execve, "3s 1m");
1803 SY(SYS_execve, x0, x0, x0, 0); FAIL;
1804 /* More cases tested in execx.c */
1806 /* SYS_umask 60 */
1807 GO(SYS_umask, "1s 0m");
1808 SY(SYS_umask, x0 + 022); SUCC;
1810 /* SYS_chroot 61 */
1811 GO(SYS_chroot, "1s 1m");
1812 SY(SYS_chroot, x0 + 1); FAIL;
1814 /* SYS_fcntl 62 */
1815 sys_fcntl();
1816 sys_fcntl2();
1817 sys_fcntl3();
1818 sys_fcntl4();
1820 /* SYS_ulimit 63 */
1821 /* XXX Missing wrapper. */
1823 /* SYS_renameat 64 */
1824 GO(SYS_renameat, "4s 2m");
1825 SY(SYS_renameat, x0 - 1, x0, x0, x0); FAIL;
1827 /* SYS_unlinkat 65 */
1828 GO(SYS_unlinkat, "3s 1m");
1829 SY(SYS_unlinkat, x0 - 1, x0, x0); FAIL;
1831 /* SYS_fstatat 66 */
1832 GO(SYS_fstatat, "4s 2m");
1833 SY(SYS_fstatat, x0 - 1, x0 + 1, x0, x0); FAIL;
1835 /* SYS_fstatat64 67 */
1836 /* Tested in x86-solaris/scalar.c. */
1838 /* SYS_openat 68 */
1839 sys_openat();
1840 sys_openat2();
1842 /* SYS_openat64 69 */
1843 /* Tested in x86-solaris/scalar.c. */
1845 /* SYS_tasksys 70 */
1846 sys_tasksys();
1847 sys_tasksys2();
1848 sys_tasksys3();
1849 sys_tasksys4();
1851 /* SYS_acctctl 71 */
1852 /* XXX Missing wrapper. */
1854 /* SYS_exacctsys 72 */
1855 /* XXX Missing wrapper. */
1857 /* SYS_getpagesizes 73 */
1858 GO(SYS_getpagesizes, "3s 1m");
1859 SY(SYS_getpagesizes, x0, x0 + 1, x0 + 1); FAIL;
1861 /* SYS_rctlsys 74 */
1862 /* XXX Missing wrapper. */
1864 /* SYS_sidsys 75 */
1865 /* XXX Missing wrapper. */
1867 /* SYS_lwp_park 77 */
1868 /* Don't bother to test this. */
1869 GO(SYS_lwp_park, "ignore");
1871 /* SYS_sendfilev 78 */
1872 sys_sendfilev();
1873 sys_sendfilev2();
1874 sys_sendfilev3();
1875 sys_sendfilev4();
1877 /* SYS_rmdir 79 */
1878 /* Tested in scalar_obsolete.c. */
1880 /* SYS_mkdir 80 */
1881 /* Tested in scalar_obsolete.c. */
1883 /* SYS_getdents 81 */
1884 GO(SYS_getdents, "3s 1m");
1885 SY(SYS_getdents, x0, x0, x0 + 1); FAIL;
1887 /* SYS_Privsys 82 */
1888 sys_privsys();
1889 sys_privsys2();
1890 sys_privsys3();
1891 sys_privsys4();
1892 sys_privsys5();
1893 sys_privsys6();
1894 sys_privsys7();
1895 sys_privsys8();
1897 /* SYS_ucredsys 83 */
1898 sys_ucredsys();
1899 sys_ucredsys2();
1901 /* SYS_sysfs 84 */
1902 sys_sysfs();
1903 sys_sysfs2();
1904 sys_sysfs3();
1906 /* SYS_getmsg 85 */
1907 GO(SYS_getmsg, "4s 1m");
1908 SY(SYS_getmsg, x0, x0, x0, x0); FAIL;
1910 /* SYS_putmsg 86 */
1911 GO(SYS_putmsg, "4s 0m");
1912 SY(SYS_putmsg, x0, x0, x0, x0);
1914 /* SYS_lstat 88 */
1915 /* Tested in scalar_obsolete.c. */
1917 /* SYS_symlink 89 */
1918 /* Tested in scalar_obsolete.c. */
1920 /* SYS_readlink 90 */
1921 /* Tested in scalar_obsolete.c. */
1923 /* SYS_setgroups 91 */
1924 GO(SYS_setgroups, "2s 1m");
1925 SY(SYS_setgroups, x0 + 1, x0 + 1); FAIL;
1927 /* SYS_getgroups 92 */
1928 GO(SYS_getgroups, "2s 1m");
1929 SY(SYS_getgroups, x0 + 1, x0 + 1); FAIL;
1931 /* SYS_fchmod 93 */
1932 /* Tested in scalar_obsolete.c. */
1934 /* SYS_fchown 94 */
1935 /* Tested in scalar_obsolete.c. */
1937 /* SYS_sigprocmask 95 */
1938 GO(SYS_sigprocmask, "3s 2m");
1939 SY(SYS_sigprocmask, x0, x0 + 1, x0 + 1); FAILx(EFAULT);
1941 /* SYS_sigsuspend 96 */
1942 GO(SYS_sigsuspend, "1s 1m");
1943 SY(SYS_sigsuspend, x0 + 1); FAILx(EFAULT);
1945 /* SYS_sigaltstack 97 */
1946 GO(SYS_sigaltstack, "2s 2m");
1947 SY(SYS_sigaltstack, x0 + 1, x0 + 1); FAILx(EFAULT);
1949 /* SYS_sigaction 98 */
1950 GO(SYS_sigaction, "3s 4m");
1951 SY(SYS_sigaction, x0, x0 + 1, x0 + 1); FAILx(EFAULT);
1953 /* SYS_sigpending 99 */
1954 GO(SYS_sigpending, "2s 1m");
1955 SY(SYS_sigpending, x0, x0 + 1);
1957 /* SYS_context 100 */
1958 sys_context();
1959 sys_context2();
1960 sys_context3();
1961 sys_context4();
1963 /* SYS_fchmodat 101 */
1964 GO(SYS_fchmodat, "4s 1m");
1965 SY(SYS_fchmodat, x0 - 1, x0 + 1, x0, x0); FAIL;
1967 /* SYS_mkdirat 102 */
1968 GO(SYS_mkdirat, "3s 1m");
1969 SY(SYS_mkdirat, x0 - 1, x0, x0); FAIL;
1971 /* SYS_statvfs 103 */
1972 sys_statvfs();
1973 sys_statvfs2();
1975 /* SYS_fstatvfs 104 */
1976 GO(SYS_fstatvfs, "2s 1m");
1977 SY(SYS_fstatvfs, x0 - 1, x0 + 1); FAILx(EBADF);
1979 /* SYS_getloadavg 105 */
1980 /* XXX Missing wrapper. */
1982 /* SYS_nfssys 106 */
1983 sys_nfssys();
1984 /* :TODO: Add test cases when other opcodes are implemented. */
1986 /* SYS_waitid 107 */
1987 GO(SYS_waitid, "4s 1m");
1988 SY(SYS_waitid, x0 - 1, x0, x0, x0); FAIL;
1990 /* SYS_sigsendsys 108 */
1991 GO(SYS_sigsendsys, "2s 1m");
1992 SY(SYS_sigsendsys, x0 - 1, x0); FAIL;
1994 /* SYS_hrtsys 109 */
1995 /* XXX Missing wrapper. */
1997 /* SYS_utimesys 110 */
1998 /* SYS_utimensat 110 */
1999 /* Tested in scalar_utimesys and scalar_utimensat. */
2001 /* SYS_sigresend 111 */
2002 GO(SYS_sigresend, "3s 2m");
2003 SY(SYS_sigresend, x0, x0 + 1, x0); FAIL;
2005 /* SYS_priocntlsys 112 */
2006 sys_priocntlsys();
2007 sys_priocntlsys2();
2008 sys_priocntlsys3();
2009 sys_priocntlsys4();
2010 sys_priocntlsys5();
2011 sys_priocntlsys6();
2012 sys_priocntlsys7();
2013 sys_priocntlsys8();
2014 sys_priocntlsys9();
2015 sys_priocntlsys10();
2016 sys_priocntlsys11();
2018 /* SYS_pathconf 113 */
2019 GO(SYS_pathconf, "2s 1m");
2020 SY(SYS_pathconf, x0, x0); FAIL;
2022 /* SYS_mincore 114 */
2023 /* XXX Missing wrapper. */
2025 /* SYS_mmap 115 */
2026 GO(SYS_mmap, "6s 0m");
2027 SY(SYS_mmap, x0, x0, x0, x0, x0, x0); FAILx(EINVAL);
2029 /* SYS_mprotect 116 */
2030 GO(SYS_mprotect, "3s 0m");
2031 SY(SYS_mprotect, x0, x0, x0); FAILx(EINVAL);
2033 /* SYS_munmap 117 */
2034 GO(SYS_munmap, "2s 0m");
2035 SY(SYS_munmap, x0, x0); FAILx(EINVAL);
2037 /* SYS_fpathconf 118 */
2038 /* XXX Missing wrapper. */
2040 /* SYS_vfork 119 */
2041 /* XXX Missing wrapper. */
2043 /* SYS_fchdir 120 */
2044 GO(SYS_fchdir, "1s 0m");
2045 SY(SYS_fchdir, x0 - 1); FAILx(EBADF);
2047 /* SYS_readv 121 */
2048 GO(SYS_readv, "3s 1m");
2049 SY(SYS_readv, x0, x0, x0 + 1); FAIL;
2051 /* SYS_writev 122 */
2052 GO(SYS_writev, "3s 1m");
2053 SY(SYS_writev, x0, x0, x0 + 1); FAIL;
2055 /* SYS_mmapobj 127 */
2056 GO(SYS_mmapobj, "5s 2m");
2057 SY(SYS_mmapobj, x0 - 1, x0 | MMOBJ_PADDING, x0, x0, x0); FAILx(EBADF);
2059 /* SYS_setrlimit 128 */
2060 GO(SYS_setrlimit, "2s 1m");
2061 SY(SYS_setrlimit, x0, x0); FAIL;
2063 /* SYS_getrlimit 129 */
2064 GO(SYS_getrlimit, "2s 1m");
2065 SY(SYS_getrlimit, x0, x0); FAIL;
2067 /* SYS_lchown 130 */
2068 /* Tested in scalar_obsolete.c. */
2070 /* SYS_memcntl 131 */
2071 GO(SYS_memcntl, "6s 1m");
2072 SY(SYS_memcntl, x0, x0, x0 | MC_HAT_ADVISE, x0, x0, x0); FAIL;
2074 /* SYS_getpmsg 132 */
2075 GO(SYS_getpmsg, "5s 2m");
2076 SY(SYS_getpmsg, x0, x0, x0, x0, x0); FAIL;
2078 /* SYS_putpmsg 133 */
2079 GO(SYS_putpmsg, "5s 0m");
2080 SY(SYS_putpmsg, x0, x0, x0, x0, x0); FAIL;
2082 /* SYS_rename 134 */
2083 /* Tested in scalar_obsolete.c. */
2085 /* SYS_uname 135 */
2086 sys_uname();
2087 sys_uname2();
2089 /* SYS_setegid 136 */
2090 GO(SYS_setegid, "1s 0m");
2091 SY(SYS_setegid, x0 - 1); FAIL;
2093 /* SYS_sysconfig 137 */
2094 GO(SYS_sysconfig, "1s 0m");
2095 SY(SYS_sysconfig, x0 - 1); FAIL;
2097 /* SYS_adjtime 138 */
2098 /* XXX Missing wrapper. */
2100 /* SYS_systeminfo 139 */
2101 GO(SYS_systeminfo, "3s 1m");
2102 SY(SYS_systeminfo, x0 + 1, x0, x0 + 1); FAIL;
2104 /* SYS_sharefs 140 */
2105 /* XXX Missing wrapper. */
2107 /* SYS_seteuid 141 */
2108 GO(SYS_seteuid, "1s 0m");
2109 SY(SYS_seteuid, x0 - 1); FAIL;
2111 /* SYS_forksys 142 */
2112 GO(SYS_forksys, "2s 0m");
2113 SY(SYS_forksys, x0, x0 - 1); FAIL;
2115 /* SYS_sigtimedwait 144 */
2116 GO(SYS_sigtimedwait, "3s 3m");
2117 SY(SYS_sigtimedwait, x0 - 1, x0 - 1, x0 - 1); FAIL;
2119 /* SYS_lwp_info 145 */
2120 /* XXX Missing wrapper. */
2122 /* SYS_yield 146 */
2123 GO(SYS_yield, "0s 0m");
2124 SY(SYS_yield); SUCC;
2126 /* SYS_lwp_sema_post 148 */
2127 GO(SYS_lwp_sema_post, "1s 3m");
2128 SY(SYS_lwp_sema_post, x0); FAIL;
2130 /* SYS_lwp_sema_trywait 149 */
2131 /* XXX Missing wrapper. */
2133 /* SYS_lwp_detach 150 */
2134 GO(SYS_lwp_detach, "1s 0m");
2135 SY(SYS_lwp_detach, x0); FAIL;
2137 /* SYS_corectl 151 */
2138 /* XXX Missing wrapper. */
2140 /* SYS_modctl 152 */
2141 sys_modctl();
2142 sys_modctl2();
2143 sys_modctl3();
2145 /* SYS_fchroot 153 */
2146 GO(SYS_fchroot, "1s 0m");
2147 SY(SYS_fchroot, x0 - 1); FAILx(EBADF);
2149 /* SYS_vhangup 155 */
2150 /* XXX Missing wrapper. */
2152 /* SYS_gettimeofday 156 */
2153 GO(SYS_gettimeofday, "1s 1m");
2154 SY(SYS_gettimeofday, x0 + 1); FAIL;
2156 /* SYS_getitimer 157 */
2157 GO(SYS_getitimer, "2s 2m");
2158 SY(SYS_getitimer, x0, x0 + 1); FAIL;
2160 /* SYS_setitimer 158 */
2161 GO(SYS_setitimer, "3s 4m");
2162 SY(SYS_setitimer, x0, x0 + 1, x0 + 1); FAIL;
2164 /* SYS_lwp_create 159 */
2165 /* In the lwp_create() wrapper, we unfortunately have to call
2166 ML_(safe_to_deref) before doing the PRE_READ_*() stuff, therefore only 1m
2167 parameter. */
2168 GO(SYS_lwp_create, "3s 1m");
2169 SY(SYS_lwp_create, x0, x0, x0 + 1); FAILx(EINVAL);
2171 /* SYS_lwp_exit 160 */
2172 /* Don't bother to test this. */
2173 GO(SYS_lwp_exit, "ignore");
2175 /* SYS_lwp_suspend 161 */
2176 GO(SYS_lwp_suspend, "1s 0m");
2177 SY(SYS_lwp_suspend, x0 - 1); FAIL;
2179 /* SYS_lwp_continue 162 */
2180 GO(SYS_lwp_continue, "1s 0m");
2181 SY(SYS_lwp_continue, x0 - 1); FAIL;
2183 /* SYS_lwp_kill 163 */
2184 /* SYS_lwp_sigqueue 163 */
2185 /* Tested in scalar_lwp_kill and scalar_lwp_sigqueue. */
2187 /* SYS_lwp_self 164 */
2188 GO(SYS_lwp_self, "0s 0m");
2189 SY(SYS_lwp_self); SUCC;
2191 /* SYS_lwp_sigmask 165 */
2192 GO(SYS_lwp_sigmask, "5s 0m");
2193 SY(SYS_lwp_sigmask, x0, x0, x0, x0, x0); FAIL;
2195 /* SYS_lwp_private 166 */
2196 /* Tested in amd64-solaris/scalar and x86-solaris/scalar */
2198 /* SYS_lwp_wait 167 */
2199 GO(SYS_lwp_wait, "2s 1m");
2200 SY(SYS_lwp_wait, x0 - 1, x0 + 1); FAIL;
2202 /* SYS_lwp_mutex_wakeup 168 */
2203 GO(SYS_lwp_mutex_wakeup, "2s 2m");
2204 SY(SYS_lwp_mutex_wakeup, x0, x0); FAIL;
2206 /* SYS_lwp_cond_wait 170 */
2207 GO(SYS_lwp_cond_wait, "4s 5m");
2208 SY(SYS_lwp_cond_wait, x0 + 1, x0 + 1, x0 + 1, x0); FAIL;
2210 /* SYS_lwp_cond_signal 171 */
2211 GO(SYS_lwp_cond_signal, "1s 2m");
2212 SY(SYS_lwp_cond_signal, x0); FAIL;
2214 /* SYS_lwp_cond_broadcast 172 */
2215 GO(SYS_lwp_cond_broadcast, "1s 2m");
2216 SY(SYS_lwp_cond_broadcast, x0); FAIL;
2218 /* SYS_pread 173 */
2219 GO(SYS_pread, "4s 1m");
2220 SY(SYS_pread, x0 - 1, x0, x0 + 1, x0); FAILx(EBADF);
2222 /* SYS_pwrite 174 */
2223 GO(SYS_pwrite, "4s 1m");
2224 SY(SYS_pwrite, x0 - 1, x0, x0 + 1, x0); FAILx(EBADF);
2226 /* SYS_llseek 175 */
2227 /* Tested in x86-solaris/scalar.c. */
2229 /* SYS_inst_sync 176 */
2230 /* XXX Missing wrapper. */
2232 /* SYS_brand 177 */
2233 /* XXX Missing wrapper. */
2235 /* SYS_kaio 178 */
2236 /* XXX Missing wrapper. */
2238 /* SYS_cpc 179 */
2239 /* XXX Missing wrapper. */
2241 /* SYS_lgrpsys 180 */
2242 sys_lgrpsys();
2243 sys_lgrpsys2();
2244 sys_lgrpsys3();
2245 sys_lgrpsys4();
2246 sys_lgrpsys5();
2247 sys_lgrpsys6();
2249 /* SYS_rusagesys 181 */
2250 sys_rusagesys();
2251 sys_rusagesys2();
2252 sys_rusagesys3();
2253 sys_rusagesys4();
2254 sys_rusagesys5();
2256 /* SYS_port 182 */
2257 sys_port();
2258 sys_port2();
2259 sys_port3();
2260 sys_port4();
2261 sys_port5();
2262 sys_port6();
2263 sys_port7();
2264 sys_port8();
2265 sys_port9();
2266 sys_port10();
2267 sys_port11();
2269 /* SYS_pollsys 183 */
2270 GO(SYS_pollsys, "4s 5m");
2271 SY(SYS_pollsys, x0, x0 + 1, x0 + 1, x0 + 1); FAIL;
2273 /* SYS_labelsys 184 */
2274 sys_labelsys();
2275 sys_labelsys2();
2276 sys_labelsys3();
2277 sys_labelsys4();
2278 sys_labelsys5();
2279 sys_labelsys6();
2281 /* SYS_acl 185 */
2282 sys_acl();
2283 sys_acl2();
2284 sys_acl3();
2285 sys_acl4();
2286 sys_acl5();
2287 sys_acl6();
2289 /* SYS_auditsys 186 */
2290 sys_auditsys();
2291 sys_auditsys2();
2292 sys_auditsys3();
2293 sys_auditsys4();
2294 sys_auditsys5();
2295 sys_auditsys6();
2296 sys_auditsys7();
2297 sys_auditsys8();
2298 sys_auditsys9();
2299 sys_auditsys10();
2300 sys_auditsys11();
2301 sys_auditsys12();
2302 sys_auditsys13();
2303 sys_auditsys14();
2304 sys_auditsys15();
2305 sys_auditsys16();
2306 sys_auditsys17();
2307 sys_auditsys18();
2308 sys_auditsys19();
2309 sys_auditsys20();
2310 sys_auditsys21();
2311 sys_auditsys22();
2312 sys_auditsys23();
2313 sys_auditsys24();
2314 sys_auditsys25();
2315 sys_auditsys26();
2316 sys_auditsys27();
2317 sys_auditsys28();
2318 sys_auditsys29();
2319 sys_auditsys30();
2321 /* SYS_processor_bind 187 */
2322 /* XXX Missing wrapper. */
2324 /* SYS_processor_info 188 */
2325 /* XXX Missing wrapper. */
2327 /* SYS_p_online 189 */
2328 GO(SYS_p_online, "2s 0m");
2329 SY(SYS_p_online, x0, x0); FAILx(EINVAL);
2331 /* SYS_sigqueue 190 */
2332 GO(SYS_sigqueue, "5s 1m");
2333 SY(SYS_sigqueue, x0 - 1, x0, x0 + 1, x0, x0 - 1); FAIL;
2335 /* SYS_clock_gettime 191 */
2336 GO(SYS_clock_gettime, "2s 1m");
2337 SY(SYS_clock_gettime, x0, x0); FAIL;
2339 /* SYS_clock_settime 192 */
2340 GO(SYS_clock_settime, "2s 1m");
2341 SY(SYS_clock_settime, x0, x0); FAIL;
2343 /* SYS_clock_getres 193 */
2344 GO(SYS_clock_getres, "2s 1m");
2345 SY(SYS_clock_getres, x0 + 1, x0 + 1); FAIL;
2347 /* SYS_timer_create 194 */
2348 sys_timer_create();
2349 sys_timer_create2();
2351 /* SYS_timer_delete 195 */
2352 GO(SYS_timer_delete, "1s 0m");
2353 SY(SYS_timer_delete, x0 + 1); FAIL;
2355 /* SYS_timer_settime 196 */
2356 GO(SYS_timer_settime, "4s 2m");
2357 SY(SYS_timer_settime, x0, x0, x0 + 1, x0 + 2); FAIL;
2359 /* SYS_timer_gettime 197 */
2360 GO(SYS_timer_gettime, "2s 1m");
2361 SY(SYS_timer_gettime, x0, x0 + 1); FAIL;
2363 /* SYS_timer_getoverrun 198 */
2364 GO(SYS_timer_getoverrun, "1s 0m");
2365 SY(SYS_timer_getoverrun, x0); FAIL;
2367 /* SYS_nanosleep 199 */
2368 GO(SYS_nanosleep, "2s 2m");
2369 SY(SYS_nanosleep, x0, x0 + 1); FAIL;
2371 /* SYS_facl 200 */
2372 sys_facl();
2373 sys_facl2();
2374 sys_facl3();
2375 sys_facl4();
2376 sys_facl5();
2377 sys_facl6();
2379 /* SYS_door 201 */
2380 sys_door();
2381 sys_door2();
2382 sys_door3();
2383 sys_door4();
2384 sys_door5();
2385 sys_door6();
2386 /* XXX Additional sys_door variants still unimplemented. */
2388 /* SYS_setreuid 202 */
2389 GO(SYS_setreuid, "2s 0m");
2390 SY(SYS_setreuid, x0 - 1, x0 - 1); SUCC;
2392 /* SYS_setregid 203 */
2393 GO(SYS_setregid, "2s 0m");
2394 SY(SYS_setregid, x0 - 1, x0 - 1); SUCC;
2396 /* SYS_install_utrap 204 */
2397 /* XXX Missing wrapper. */
2399 /* SYS_signotify 205 */
2400 /* XXX Missing wrapper. */
2402 /* SYS_schedctl 206 */
2403 GO(SYS_schedctl, "0s 0m");
2404 SY(SYS_schedctl); SUCC;
2406 /* SYS_pset 207 */
2407 sys_pset();
2408 sys_pset2();
2409 sys_pset3();
2410 sys_pset4();
2411 sys_pset5();
2412 sys_pset6();
2413 sys_pset7();
2414 sys_pset8();
2415 sys_pset9();
2416 sys_pset10();
2417 sys_pset11();
2418 sys_pset12();
2419 sys_pset13();
2421 /* SYS_sparc_utrap_install 208 */
2422 /* XXX Missing wrapper. */
2424 /* SYS_resolvepath 209 */
2425 GO(SYS_resolvepath, "3s 2m");
2426 SY(SYS_resolvepath, x0, x0, x0 + 1); FAIL;
2428 /* SYS_lwp_mutex_timedlock 210 */
2429 GO(SYS_lwp_mutex_timedlock, "3s 7m");
2430 SY(SYS_lwp_mutex_timedlock, x0, x0 + 1, x0); FAIL;
2432 /* SYS_lwp_sema_timedwait 211 */
2433 GO(SYS_lwp_sema_timedwait, "3s 4m");
2434 SY(SYS_lwp_sema_timedwait, x0, x0 + 1, x0); FAIL;
2436 /* SYS_lwp_rwlock_sys 212 */
2437 sys_lwp_rwlock();
2438 sys_lwp_rwlock2();
2439 sys_lwp_rwlock3();
2440 sys_lwp_rwlock4();
2441 sys_lwp_rwlock5();
2443 /* SYS_getdents64 213 */
2444 /* Tested in x86-solaris/scalar.c. */
2446 /* SYS_mmap64 214 */
2447 /* Tested in x86-solaris/scalar.c. */
2449 /* SYS_stat64 215 */
2450 /* Tested in x86-solaris/scalar_obsolete.c. */
2452 /* SYS_lstat64 216 */
2453 /* Tested in x86-solaris/scalar_obsolete.c. */
2455 /* SYS_fstat64 217 */
2456 /* Tested in x86-solaris/scalar_obsolete.c. */
2458 /* SYS_statvfs64 218 */
2459 /* Tested in x86-solaris/scalar.c. */
2461 /* SYS_fstatvfs64 219 */
2462 /* Tested in x86-solaris/scalar.c. */
2464 /* SYS_setrlimit64 220 */
2465 /* Tested in x86-solaris/scalar.c. */
2467 /* SYS_getrlimit64 221 */
2468 /* Tested in x86-solaris/scalar.c. */
2470 /* SYS_pread64 222 */
2471 /* Tested in x86-solaris/scalar.c. */
2473 /* SYS_pwrite64 223 */
2474 /* Tested in x86-solaris/scalar.c. */
2476 /* SYS_open64 225 */
2477 /* Tested in x86-solaris/scalar_obsolete.c. */
2479 /* SYS_rpcsys 226 */
2480 /* XXX Missing wrapper. */
2482 /* SYS_zone 227 */
2483 sys_zone();
2484 sys_zone2();
2485 sys_zone3();
2486 sys_zone4();
2487 sys_zone5();
2488 sys_zone6();
2489 sys_zone7();
2490 sys_zone8();
2491 sys_zone9();
2492 sys_zone10();
2493 sys_zone11();
2495 2013-09-22 Petr Pavlu -- The following test crashes my system because of
2496 a kernel bug (illumos), commenting it out for now.
2497 sys_zone12();
2499 sys_zone13();
2501 2013-09-22 Petr Pavlu -- The following test provides an incorrect result
2502 because of a kernel bug (illumos), commenting it out for now.
2503 sys_zone14();
2505 sys_zone15();
2507 2013-09-22 Petr Pavlu -- The following test provides an incorrect result
2508 because of a kernel bug (illumos), commenting it out for now.
2509 sys_zone16();
2512 /* SYS_autofssys 228 */
2513 /* XXX Missing wrapper. */
2515 /* SYS_getcwd 229 */
2516 GO(SYS_getcwd, "2s 1m");
2517 SY(SYS_getcwd, x0, x0 + 1); FAIL;
2519 /* SYS_so_socket 230 */
2520 GO(SYS_so_socket, "5s 1m");
2521 SY(SYS_so_socket, x0, x0, x0, x0 + 1, x0); FAIL;
2523 /* SYS_so_socketpair 231 */
2524 GO(SYS_so_socketpair, "1s 1m");
2525 SY(SYS_so_socketpair, x0); FAIL;
2527 /* SYS_bind 232 */
2528 GO(SYS_bind, "4s 0m");
2529 SY(SYS_bind, x0, x0, x0, x0); FAIL;
2531 /* SYS_listen 233 */
2532 GO(SYS_listen, "3s 0m");
2533 SY(SYS_listen, x0, x0, x0); FAIL;
2535 /* SYS_accept 234 */
2536 /* Illumos added a new version of the accept() syscall which takes an extra
2537 flag parameter. This is trivially handled in the syscall wrapper but it
2538 is not tested here so it is not necessary to have two versions of the
2539 stderr.exp file. */
2540 GO(SYS_accept, "4s 0m");
2541 SY(SYS_accept, x0, x0, x0, x0, 0); FAIL;
2543 /* SYS_connect 235 */
2544 GO(SYS_connect, "4s 0m");
2545 SY(SYS_connect, x0, x0, x0, x0); FAIL;
2547 /* SYS_shutdown 236 */
2548 GO(SYS_shutdown, "3s 0m");
2549 SY(SYS_shutdown, x0 - 1, x0, x0); FAILx(EBADF);
2551 /* SYS_recv 237 */
2552 GO(SYS_recv, "4s 1m");
2553 SY(SYS_recv, x0, x0, x0 + 1, x0); FAIL;
2555 /* SYS_recvfrom 238 */
2556 GO(SYS_recvfrom, "6s 1m");
2557 SY(SYS_recvfrom, x0, x0, x0 + 1, x0, x0, x0); FAIL;
2559 /* SYS_recvmsg 239 */
2560 GO(SYS_recvmsg, "3s 0m");
2561 SY(SYS_recvmsg, x0, x0, x0); FAIL;
2563 /* SYS_send 240 */
2564 GO(SYS_send, "4s 1m");
2565 SY(SYS_send, x0, x0, x0 + 1, x0); FAIL;
2567 /* SYS_sendmsg 241 */
2568 GO(SYS_sendmsg, "3s 0m");
2569 SY(SYS_sendmsg, x0, x0, x0); FAIL;
2571 /* SYS_sendto 242 */
2572 GO(SYS_sendto, "6s 1m");
2573 SY(SYS_sendto, x0, x0, x0 + 1, x0, x0, x0); FAIL;
2575 /* SYS_getpeername 243 */
2576 sys_getpeername();
2577 sys_getpeername2();
2579 /* SYS_getsockname 244 */
2580 GO(SYS_getsockname, "4s 1m");
2581 SY(SYS_getsockname, x0, x0, x0, x0); FAIL;
2583 /* SYS_getsockopt 245 */
2584 GO(SYS_getsockopt, "6s 0m");
2585 SY(SYS_getsockopt, x0, x0, x0, x0, x0, x0); FAIL;
2587 /* SYS_setsockopt 246 */
2588 GO(SYS_setsockopt, "6s 1m");
2589 SY(SYS_setsockopt, x0, x0, x0, x0, x0 + 1, x0); FAIL;
2591 /* SYS_sockconfig 247 */
2592 /* XXX Missing wrapper. */
2594 /* SYS_ntp_gettime 248 */
2595 /* XXX Missing wrapper. */
2597 /* SYS_ntp_adjtime 249 */
2598 /* XXX Missing wrapper. */
2600 /* SYS_lwp_mutex_unlock 250 */
2601 /* XXX Missing wrapper. */
2603 /* SYS_lwp_mutex_trylock 251 */
2604 /* XXX Missing wrapper. */
2606 /* SYS_lwp_mutex_register 252 */
2607 GO(SYS_lwp_mutex_register, "2s 1m");
2608 SY(SYS_lwp_mutex_register, x0, x0); FAIL;
2610 /* SYS_cladm 253 */
2611 /* XXX Missing wrapper. */
2613 /* SYS_uucopy 254 */
2614 GO(SYS_uucopy, "3s 2m");
2615 SY(SYS_uucopy, x0, x0, x0 + 1); FAIL;
2617 /* SYS_umount2 255 */
2618 GO(SYS_umount2, "2s 1m");
2619 SY(SYS_umount2, x0, x0); FAIL;
2621 /* No such syscall... */
2622 #if 0
2623 GO(9999, "1e");
2624 SY(9999); FAIL;
2625 #endif
2627 /* SYS_exit 1 */
2628 GO(SYS_exit, "1s 0m");
2629 SY(SYS_exit, x0); FAIL;
2631 assert(0);
2632 return 0;