]> granicus.if.org Git - strace/commitdiff
tests: enable strace-k.test only for --with-libunwind configurations
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 1 Jan 2016 23:09:02 +0000 (23:09 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 1 Jan 2016 23:09:02 +0000 (23:09 +0000)
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.

bootstrap
tests/Makefile.am
tests/strace-k.test

index 1044ce2277b32f11aeeee3dc35516e3ca7a62b60..395fc80ea113c5a8e98ff79d137d1c1d0441707e 100755 (executable)
--- 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
index 6c8f07c9dfded51262df74f2db4cce318059ac79..386a2c26868ec527d5ef48c7488d7242856c54ec 100644 (file)
@@ -1,6 +1,6 @@
 # Automake input for strace tests.
 #
-# Copyright (c) 2011-2015 Dmitry V. Levin <ldv@altlinux.org>
+# Copyright (c) 2011-2016 Dmitry V. Levin <ldv@altlinux.org>
 # 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
 
index 1cc6302c460e4f90a1e16e4dd0c3b4dde050117b..5919bacbb9fa333ef2972262a153db878f63bc17 100755 (executable)
@@ -3,7 +3,7 @@
 # Ensure that strace -k works.
 #
 # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
-# Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+# Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
 # 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'