From: Dmitry V. Levin Date: Fri, 1 Jan 2016 23:09:02 +0000 (+0000) Subject: tests: enable strace-k.test only for --with-libunwind configurations X-Git-Tag: v4.12~778 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10eab9db854ddd285da0a1c5218207aab18bae68;p=strace tests: enable strace-k.test only for --with-libunwind configurations Also, since -k option does not support multiple personalities, add strace-k.test to XFAIL_TESTS when running mpers tests. * tests/Makefile.am (MPERS_NAME, LIBUNWIND_TESTS, XFAIL_TESTS_, XFAIL_TESTS_m32, XFAIL_TESTS_mx32, XFAIL_TESTS): New variables. [USE_LIBUNWIND] (LIBUNWIND_TESTS): Add strace-k.test. (TESTS): Replace strace-k.test with $(LIBUNWIND_TESTS). * bootstrap: Substitute MPERS_NAME variable in tests-*/Makefile.am. * tests/strace-k.test: Do not check for -k option availability. --- diff --git a/bootstrap b/bootstrap index 1044ce22..395fc80e 100755 --- a/bootstrap +++ b/bootstrap @@ -4,7 +4,8 @@ for m in m32 mx32; do tests=tests-$m rm -rf $tests mkdir $tests - sed "s/@arch@/@arch_$m@/;s/^ARCH_MFLAGS[[:space:]]*=.*/& -$m/" \ + s='[[:space:]]*' + sed "s/@arch@/@arch_$m@/;s/^MPERS_NAME$s=.*/& $m/;s/^ARCH_MFLAGS$s=.*/& -$m/" \ tests/Makefile.am > $tests/Makefile.am for f in tests/*; do case "${f##*/}" in diff --git a/tests/Makefile.am b/tests/Makefile.am index 6c8f07c9..386a2c26 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ # Automake input for strace tests. # -# Copyright (c) 2011-2015 Dmitry V. Levin +# Copyright (c) 2011-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,6 +27,7 @@ OS = linux ARCH = @arch@ +MPERS_NAME = ARCH_MFLAGS = AM_CFLAGS = $(WARN_CFLAGS) AM_CPPFLAGS = $(ARCH_MFLAGS) \ @@ -163,6 +164,12 @@ uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64 stack_fcall_SOURCES = stack-fcall.c \ stack-fcall-0.c stack-fcall-1.c stack-fcall-2.c stack-fcall-3.c +if USE_LIBUNWIND +LIBUNWIND_TESTS = strace-k.test +else +LIBUNWIND_TESTS = +endif + TESTS = \ strace-f.test \ qual_syscall.test \ @@ -275,7 +282,12 @@ TESTS = \ detach-stopped.test \ detach-running.test \ restart_syscall.test \ - strace-k.test + $(LIBUNWIND_TESTS) + +XFAIL_TESTS_ = +XFAIL_TESTS_m32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS_mx32 = $(LIBUNWIND_TESTS) +XFAIL_TESTS = $(XFAIL_TESTS_$(MPERS_NAME)) net-fd.log: net.log diff --git a/tests/strace-k.test b/tests/strace-k.test index 1cc6302c..5919bacb 100755 --- a/tests/strace-k.test +++ b/tests/strace-k.test @@ -3,7 +3,7 @@ # Ensure that strace -k works. # # Copyright (c) 2014 Masatake YAMATO -# Copyright (c) 2014-2015 Dmitry V. Levin +# Copyright (c) 2014-2016 Dmitry V. Levin # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -30,9 +30,6 @@ . "${srcdir=.}/init.sh" -$STRACE -h | grep '^[[:space:]]*-k[[:space:]]' > /dev/null || - skip_ 'strace -k is not available' - # strace -k is implemented using /proc/$pid/maps [ -f /proc/self/maps ] || framework_skip_ '/proc/self/maps is not available'