[PATCH 3/4] tests/nsyscalls.test: only trace the "syscall" syscall on mips o32

Dmitry V. Levin ldv at altlinux.org
Thu Aug 11 02:32:33 UTC 2016


On Wed, Aug 10, 2016 at 11:38:44AM +0100, James Cowgill wrote:
> 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)
> +

I'd rather call it MIPS_ABI, e.g.

MIPS_ABI=
if test "$arch" = mips; then
	...
	case "$st_cv_mips_abi" in
	...
	esac
	MIPS_ABI=$st_cv_mips_abi
fi
AC_SUBST(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

Then this would change to
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..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

and this could be simplified to

if [ "$MIPS_ABI" = o32 ]; then


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160811/392656c8/attachment.bin>


More information about the Strace-devel mailing list