[PATCH 3/4] tests/nsyscalls.test: only trace the "syscall" syscall on mips o32
James Cowgill
james410 at cowgill.org.uk
Wed Aug 10 10:38:44 UTC 2016
The "syscall" syscall only exists on o32 and causes strace to error out on
64-bit mips ABIs. Pass st_cv_mips_abi from the configure script through to
nsyscalls.test so the MIPS ABI can be checked.
* configure.ac (st_cv_mips_abi): substitute into output files.
* tests/Makefile.am (STRACE_ARCH_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..3d47e69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -231,6 +231,9 @@ if test "$arch" = mips; then
esac
fi
+test -n "$st_cv_mips_abi" || st_sv_mips_abi=unknown
+AC_SUBST(st_cv_mips_abi)
+
AC_ARG_ENABLE([arm-oabi],
[AS_HELP_STRING([--enable-arm-oabi],
[enable OABI support on ARM EABI])],
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3fa3b3b..f0c407c 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) STRACE_ARCH_MIPS_ABI=$(st_cv_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..3b28fd3 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 [ "$STRACE_ARCH" = "mips" ] && [ "$STRACE_ARCH_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