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.
This commit is contained in:
Дмитрий Левин 2016-01-01 23:09:02 +00:00
parent f32126ba79
commit 10eab9db85
3 changed files with 17 additions and 7 deletions

View File

@ -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

View 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

View File

@ -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'