From 5b1ee8eea93e3f53d68ca3d19e53ba86b6d3c85f6617b12dd0eef3e116769d91 Mon Sep 17 00:00:00 2001 From: Tomas Cech Date: Mon, 16 Nov 2015 10:24:21 +0000 Subject: [PATCH] Accepting request 344700 from home:WernerFink:branches:devel:tools - Add some package to the build requires to make test suite work. That is haveged to generate entropy, sysvinit-tools to have the tools to control start and stop of haveged, and the package time to make the test on /usr/bin/time possible. OBS-URL: https://build.opensuse.org/request/show/344700 OBS-URL: https://build.opensuse.org/package/show/devel:tools/strace?expand=0&rev=54 --- strace.changes | 8 ++++++++ strace.spec | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/strace.changes b/strace.changes index 9af3c69..0ad41f7 100644 --- a/strace.changes +++ b/strace.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Nov 16 09:19:37 UTC 2015 - werner@suse.de + +- Add some package to the build requires to make test suite work. + That is haveged to generate entropy, sysvinit-tools to have the + tools to control start and stop of haveged, and the package time + to make the test on /usr/bin/time possible. + ------------------------------------------------------------------- Thu Oct 22 06:06:58 UTC 2015 - normand@linux.vnet.ibm.com diff --git a/strace.spec b/strace.spec index 70717b2..276d449 100644 --- a/strace.spec +++ b/strace.spec @@ -45,6 +45,7 @@ Patch13: 0013-aarch64-properly-decode-generic-syscalls.patch Patch14: 0014-stat64-v.test-add-newfstatat-syscall-support.patch Patch15: 0015-tests-uid-use-fchown-instead-of-chown.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: haveged BuildRequires: libacl-devel BuildRequires: libaio-devel # libunwind is broken on ppc and ppc64 and aarch64 @@ -52,6 +53,10 @@ BuildRequires: libaio-devel BuildRequires: libunwind-devel %endif BuildRequires: lksctp-tools-devel +%if 0%{suse_version} > 1140 +BuildRequires: sysvinit-tools +BuildRequires: time +%endif BuildRequires: xz # bug437293 %ifarch ppc64 @@ -109,7 +114,14 @@ make %{?_smp_mflags} # Have to exclude make check for qemu builds, which apparently don't support PTRACE. %if !(0%{?qemu_user_space_build}) %check +haveged=$(PATH=$PATH:/sbin:/usr/sbin type -p haveged) +if test -n "$haveged" && ! /sbin/checkproc $haveged ; then + $haveged --pidfile=$PWD/haveged.pid < /dev/null 1>&0 2>&0 || true +fi make check || { cat tests/test-suite.log; exit 1; } +if test -s $PWD/haveged.pid ; then + /sbin/killproc -p $PWD/haveged.pid $haveged +fi %endif %install