From: Dmitry V. L. <ld...@al...> - 2011-02-23 02:28:26
|
I'm going to add two basic tests for "strace -f" to strace.spec because the PTRACE_O_TRACECLONE test is not portable enough for "make check". timeout(1) from coreutils is available since version 7.0 (release date 2008-10-05) so I suppose it's safe enough to use timeout(1) without explicit versioned BuildRequires. --- a/strace.spec +++ b/strace.spec @@ -8,7 +8,7 @@ URL: http://sourceforge.net/projects/strace/ Source0: http://downloads.sourceforge.net/strace/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: libaio-devel, libacl-devel +BuildRequires: libaio-devel, libacl-devel, time %define strace64_arches ppc64 sparc64 @@ -66,6 +66,14 @@ rm -f %{buildroot}%{_bindir}/strace-graph %{copy64} %{buildroot}%{_bindir}/strace %{buildroot}%{_bindir}/strace64 %endif +%check +%{buildroot}%{_bindir}/strace -dfenone /bin/true 2>&1 | + fgrep -qx 'ptrace_setoptions = 0xe' || + { echo 'kernel lacks PTRACE_O_TRACECLONE support?'; exit 1; } +timeout -s 9 9 \ +%{buildroot}%{_bindir}/strace -f /usr/bin/time /bin/ls || + { echo 'strace -f does not work at all?'; exit 1; } + %clean rm -rf %{buildroot} -- ldv |