[PATCH v2 2/3] tests/nsyscalls.test: only trace the "syscall" syscall on mips o32
James Cowgill
james410 at cowgill.org.uk
Thu Aug 11 16:33:02 UTC 2016
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 | 3 +++
tests/Makefile.am | 2 +-
tests/nsyscalls.test | 9 +++++----
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4af1649..985bf07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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],
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3fa3b3b..6cc1d2b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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 \
diff --git a/tests/nsyscalls.test b/tests/nsyscalls.test
index 3760831..61f72d5 100755
--- a/tests/nsyscalls.test
+++ b/tests/nsyscalls.test
@@ -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
--
2.8.1
More information about the Strace-devel
mailing list