]> granicus.if.org Git - strace/commitdiff
tests/nsyscalls.test: only trace the "syscall" syscall on mips o32
authorJames Cowgill <james410@cowgill.org.uk>
Thu, 11 Aug 2016 16:33:02 +0000 (16:33 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 11 Aug 2016 16:47:29 +0000 (16:47 +0000)
The "syscall" syscall only exists on o32 and causes strace to error out on
64-bit mips ABIs. Pass MIPS_ABI from the configure script through to
nsyscalls.test so the MIPS ABI can be checked.

* configure.ac (MIPS_ABI): Substitute into output files.
* tests/Makefile.am (MIPS_ABI): Export via AM_TEST_LOG_FLAGS.
* tests/nsyscalls.test: Restrict special mips handling to mips o32.

configure.ac
tests/Makefile.am
tests/nsyscalls.test

index 4af1649b77aae12aa420995766ac82973e11ad20..985bf076529dadce179a5f46901a3e6c6ef556e7 100644 (file)
@@ -202,6 +202,7 @@ AC_SUBST(arch)
 AC_SUBST(arch_m32)
 AC_SUBST(arch_mx32)
 
+MIPS_ABI=
 if test "$arch" = mips; then
        AC_CACHE_CHECK([for _MIPS_SIM], [st_cv__MIPS_SIM],
                       [AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM],
@@ -229,7 +230,9 @@ if test "$arch" = mips; then
                n64) AC_DEFINE([LINUX_MIPSN64], [1], [Define for _MIPS_SIM_ABI64.]);;
                *) AC_MSG_ERROR([Unsupported _MIPS_SIM]);;
        esac
+       MIPS_ABI="$st_cv_mips_abi"
 fi
+AC_SUBST(MIPS_ABI)
 
 AC_ARG_ENABLE([arm-oabi],
              [AS_HELP_STRING([--enable-arm-oabi],
index 3fa3b3b0e645fbf66aed3c3fa787c5fcf30c9460..6cc1d2bcf0cc5cc11ea3d48da0e8240d066bed2f 100644 (file)
@@ -722,7 +722,7 @@ XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS)
 XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME))
 
 TEST_LOG_COMPILER = env
-AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) $(srcdir)/run.sh
+AM_TEST_LOG_FLAGS = STRACE_ARCH=$(ARCH) MIPS_ABI=$(MIPS_ABI) $(srcdir)/run.sh
 
 EXTRA_DIST = init.sh run.sh match.awk \
             caps.awk \
index 3760831e5f80eb5503246b4e81b344fa3c4c3c20..61f72d520d232f746ab51bf0d972c4334c65e535 100755 (executable)
@@ -4,9 +4,10 @@
 
 . "${srcdir=.}/init.sh"
 
-case "$STRACE_ARCH" in
-       mips) syscall=syscall ;;
-       *) syscall=none ;;
-esac
+if [ "$MIPS_ABI" = "o32" ]; then
+       syscall=syscall
+else
+       syscall=none
+fi
 
 run_strace_match_diff -e trace=$syscall