diff --git a/coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch b/coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch new file mode 100644 index 0000000..18681dd --- /dev/null +++ b/coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch @@ -0,0 +1,103 @@ +Upstream patch on top of v8.23 (to be removed with v8.24). +http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=111a2b91da + +From 111a2b91da142bf6fb9edb7836c1979ba698cf6e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Wed, 29 Oct 2014 14:08:05 +0000 +Subject: [PATCH] tests: make inotify-rotate more robust and efficient + +* tests/tail-2/inotify-rotate.sh: Use retry_delay_ +to employ an exponential backoff with a total delay of +up to 25.5s. The 15s delay was seen to trigger a false +failure in http://hydra.nixos.org/build/16546517 +Also remove the .1s sleep in each of the 50 iterations +to reduce the running time of the test and thus the +expensive_ tag on this test was removed. +Also ensure that we use the standard exit procedure +upon failure to avoid any erroneous diagnostics due +to persistent files on NFS. +--- + tests/tail-2/inotify-rotate.sh | 45 +++++++++++++++++++++++------------------- + 1 file changed, 25 insertions(+), 20 deletions(-) + +diff --git tests/tail-2/inotify-rotate.sh b/tests/tail-2/inotify-rotate.sh +index 1c942cc..6b539a6 100755 +--- tests/tail-2/inotify-rotate.sh ++++ tests/tail-2/inotify-rotate.sh +@@ -22,48 +22,53 @@ if test "$VERBOSE" = yes; then + fi + + . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src +-expensive_ + +-# Wait several seconds for grep REGEXP FILE to succeed. +-# Usage: grep_timeout REGEXP FILE +-grep_timeout() ++check_tail_output() + { +- local j +- for j in $(seq 150); do +- grep $1 $2 > /dev/null && return 0 +- sleep 0.1 +- done +- return 1 ++ local delay="$1" ++ grep "$tail_re" out > /dev/null || ++ { sleep $delay; return 1; } + } + ++# Wait up to 25.5 seconds for grep REGEXP 'out' to succeed. ++grep_timeout() { tail_re="$1" retry_delay_ check_tail_output .1 8; } ++ + # For details, see + # http://lists.gnu.org/archive/html/bug-coreutils/2009-11/msg00213.html + ++cleanup_fail() ++{ ++ cat out ++ warn_ $1 ++ kill $pid ++} ++ + # Perform at least this many iterations, because on multi-core systems + # the offending sequence of events can be surprisingly uncommon. + for i in $(seq 50); do + echo $i +- rm -rf k x out ++ rm -f k x out ++ + # Normally less than a second is required here, but with heavy load + # and a lot of disk activity, even 20 seconds is insufficient, which + # leads to this timeout killing tail before the "ok" is written below. + >k && >x || framework_failure_ failed to initialize files +- timeout 40 tail -F k > out 2>&1 & ++ timeout 60 tail -F k > out 2>&1 & + pid=$! +- sleep .1 ++ + echo b > k; + # wait for b to appear in out +- grep_timeout b out || fail_ failed to find b in out +- while :; do grep b out > /dev/null && break; done ++ grep_timeout 'b' || { cleanup_fail 'failed to find b in out'; break; } ++ + mv x k + # wait for tail to detect the rename +- grep_timeout tail: out || { cat out; fail_ failed to detect rename; } ++ grep_timeout 'tail:' || { cleanup_fail 'failed to detect rename'; break; } ++ + echo ok >> k +- found=0 +- # wait up to 10 seconds for "ok" to appear in out +- grep_timeout ok out && found=1 ++ # wait for "ok" to appear in 'out' ++ grep_timeout 'ok' || { cleanup_fail 'failed to detect echoed ok'; break; } ++ + kill $pid +- test $found = 0 && { cat out; fail_ failed to detect echoed '"ok"'; } + done + + wait +-- +1.8.4.5 + diff --git a/coreutils-tests-rm-ext3-perf-increase-timeout.patch b/coreutils-tests-rm-ext3-perf-increase-timeout.patch new file mode 100644 index 0000000..158425c --- /dev/null +++ b/coreutils-tests-rm-ext3-perf-increase-timeout.patch @@ -0,0 +1,20 @@ +Avoid spurious false positives on OBS due to high load. +Increase threshold, as most failures in the last 2 years +have been seen with around 60-63 seconds. +--- + tests/rm/ext3-perf.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: tests/rm/ext3-perf.sh +=================================================================== +--- tests/rm/ext3-perf.sh.orig ++++ tests/rm/ext3-perf.sh +@@ -24,7 +24,7 @@ very_expensive_ + # Using rm -rf to remove a 400k-entry directory takes: + # - 9 seconds with the patch, on a 2-yr-old system + # - 350 seconds without the patch, on a high-end system (disk 20-30% faster) +-threshold_seconds=60 ++threshold_seconds=90 # increased on OBS, was: 60 + + # The number of entries in our test directory. + n=400000 diff --git a/coreutils-testsuite.changes b/coreutils-testsuite.changes index 2576b70..fe28170 100644 --- a/coreutils-testsuite.changes +++ b/coreutils-testsuite.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Sat Nov 1 00:20:55 UTC 2014 - mail@bernhard-voelker.de + +Avoid spurious false positive failures of the testsuite on OBS due +to high load. + +- coreutils-tests-rm-ext3-perf-increase-timeout.patch: + Add patch to increase timeout. + +- coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch: + Add upstream patch. + ------------------------------------------------------------------- Sat Sep 27 17:46:01 UTC 2014 - schwab@linux-m68k.org diff --git a/coreutils-testsuite.spec b/coreutils-testsuite.spec index ca7080d..95f10db 100644 --- a/coreutils-testsuite.spec +++ b/coreutils-testsuite.spec @@ -131,6 +131,13 @@ Patch416: coreutils-fix_false_du_failure_on_newer_xfs.patch Patch500: coreutils-disable_tests.patch Patch501: coreutils-test_without_valgrind.patch +# Upstream patch on top of v8.23 (to be removed in v8.24). +# Avoids a spurious false positive failure due to high load. +Patch502: coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch + +# Avoid false positives on OBS due to high load; increase timeout. +Patch503: coreutils-tests-rm-ext3-perf-increase-timeout.patch + # ================================================ %description These are the GNU core utilities. This package is the union of @@ -174,6 +181,8 @@ the GNU fileutils, sh-utils, and textutils packages. %patch416 %patch500 %patch501 +%patch502 +%patch503 #???## We need to statically link to gmp, otherwise we have a build loop #???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in diff --git a/coreutils.changes b/coreutils.changes index 2576b70..fe28170 100644 --- a/coreutils.changes +++ b/coreutils.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Sat Nov 1 00:20:55 UTC 2014 - mail@bernhard-voelker.de + +Avoid spurious false positive failures of the testsuite on OBS due +to high load. + +- coreutils-tests-rm-ext3-perf-increase-timeout.patch: + Add patch to increase timeout. + +- coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch: + Add upstream patch. + ------------------------------------------------------------------- Sat Sep 27 17:46:01 UTC 2014 - schwab@linux-m68k.org diff --git a/coreutils.spec b/coreutils.spec index b2b42ca..449e8f9 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -131,6 +131,13 @@ Patch416: coreutils-fix_false_du_failure_on_newer_xfs.patch Patch500: coreutils-disable_tests.patch Patch501: coreutils-test_without_valgrind.patch +# Upstream patch on top of v8.23 (to be removed in v8.24). +# Avoids a spurious false positive failure due to high load. +Patch502: coreutils-tests-make-inotify-rotate-more-robust-and-efficient.patch + +# Avoid false positives on OBS due to high load; increase timeout. +Patch503: coreutils-tests-rm-ext3-perf-increase-timeout.patch + # ================================================ %description These are the GNU core utilities. This package is the union of @@ -174,6 +181,8 @@ the GNU fileutils, sh-utils, and textutils packages. %patch416 %patch500 %patch501 +%patch502 +%patch503 #???## We need to statically link to gmp, otherwise we have a build loop #???#sed -i s,'$(LIB_GMP)',%%{_libdir}/libgmp.a,g Makefile.in