]> granicus.if.org Git - strace/commitdiff
nsyscalls.test: add mips o32 support
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 30 Apr 2016 17:15:04 +0000 (17:15 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 5 May 2016 18:04:33 +0000 (18:04 +0000)
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.

tests/nsyscalls.c
tests/nsyscalls.test

index 81a90aa5dda87d376e9a50b3cc45d09f6b9f250a..25f0719fedbdf56f9eea854520b97a8862c3d594 100644 (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;
index 46f9b0a052f0c97eed21eeb825bfabab3d7482d4..3760831e5f80eb5503246b4e81b344fa3c4c3c20 100755 (executable)
@@ -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