nsyscalls.test: add mips o32 support

Out-of-range syscalls looks differently on mips o32.

* tests/nsyscalls.c (main): Handle LINUX_MIPSO32.
* tests/nsyscalls.test: Trace syscall called "syscall" on mips.
This commit is contained in:
Дмитрий Левин 2016-04-30 17:15:04 +00:00
parent 1e9c966398
commit 6331fd4b32
2 changed files with 13 additions and 1 deletions

View File

@ -71,9 +71,15 @@ main(void)
};
long rc = syscall(nr, a[0], a[1], a[2], a[3], a[4], a[5]);
#ifdef LINUX_MIPSO32
printf("syscall(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx)"
" = %ld ENOSYS (%m)\n", nr,
a[0], a[1], a[2], a[3], a[4], a[5], rc);
#else
printf("syscall_%lu(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx)"
" = %ld (errno %d)\n", nr & (~SYSCALL_BIT),
a[0], a[1], a[2], a[3], a[4], a[5], rc, errno);
#endif
puts("+++ exited with 0 +++");
return 0;

View File

@ -3,4 +3,10 @@
# Check decoding of out-of-range syscalls.
. "${srcdir=.}/init.sh"
run_strace_match_diff -e trace=none
case "$STRACE_ARCH" in
mips) syscall=syscall ;;
*) syscall=none ;;
esac
run_strace_match_diff -e trace=$syscall