1*4b169a6bSchristos /* Test unknown-syscall output.
2*4b169a6bSchristos #progos: linux
3*4b169a6bSchristos #xerror:
4*4b169a6bSchristos #output: Unimplemented syscall: 166 (0x1, 0x2, 0x3, 0x4, 0x5, 0x6)\n
5*4b169a6bSchristos #output: program stopped with signal 4 (*).\n
6*4b169a6bSchristos */
7*4b169a6bSchristos
8*4b169a6bSchristos #include <unistd.h>
9*4b169a6bSchristos #include <stdio.h>
10*4b169a6bSchristos #include <stdlib.h>
11*4b169a6bSchristos #include <errno.h>
12*4b169a6bSchristos
main(void)13*4b169a6bSchristos int main (void)
14*4b169a6bSchristos {
15*4b169a6bSchristos /* The number 166 is chosen because there's a gap for that number in
16*4b169a6bSchristos the CRIS asm/unistd.h. */
17*4b169a6bSchristos int err = syscall (166, 1, 2, 3, 4, 5, 6);
18*4b169a6bSchristos if (err == -1 && errno == ENOSYS)
19*4b169a6bSchristos printf ("ENOSYS\n");
20*4b169a6bSchristos printf ("xyzzy\n");
21*4b169a6bSchristos exit (0);
22*4b169a6bSchristos }
23