[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: avoid sort-spinlock-abuse false positive under heavy load
From: |
Jim Meyering |
Subject: |
[PATCH] tests: avoid sort-spinlock-abuse false positive under heavy load |
Date: |
Fri, 17 Jun 2011 12:04:13 +0200 |
I have just seen this unwarranted failure again:
sort (GNU coreutils) 8.12.86-cd27-dirty
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and Paul Eggert.
+ grep '^#define HAVE_PTHREAD_T 1'
/h/j/w/co/cu/tests/torture/coreutils/test/coreutils-8.12.86-cd27-dirty/lib/config.h
+ seq 100000
+ mkfifo_or_skip_ fifo
+ test 1 = 1
+ mkfifo fifo
+ ulimit -t 7
+ sort --parallel=2 in
++ seq 80
+ for i in '$(seq 80)'
+ read line
+ echo 1
1
+ sleep .1
./misc/sort-spinlock-abuse: line 37: 8828 Killed sort --parallel=2 in > fifo
+ fail=1
+ Exit 1
+ set +e
+ exit 1
+ exit 1
+ remove_tmp_
+ __st=1
+ cleanup_
That was one time too many, so with this change,
the offending test is relegated to being run at least
once per release, when I run the very expensive tests
as outlined in README-release.
>From 640023b63fe4609e6e98b1b988b292ef2707ea60 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 17 Jun 2011 12:01:10 +0200
Subject: [PATCH] tests: avoid sort-spinlock-abuse false positive under heavy
load
* tests/misc/sort-spinlock-abuse: Classify as "very expensive" to
avoid unwarranted failure once and for all.
---
tests/misc/sort-spinlock-abuse | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/tests/misc/sort-spinlock-abuse b/tests/misc/sort-spinlock-abuse
index 4cf8866..0e1c86b 100755
--- a/tests/misc/sort-spinlock-abuse
+++ b/tests/misc/sort-spinlock-abuse
@@ -20,6 +20,12 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
print_ver_ sort
+# This isn't terribly expensive, but it must not be run under heavy load.
+# Since the "very expensive" are already run only with -j1, adding this
+# test to the list ensures it still gets _some_ (albeit minimal) coverage
+# while not causing false-positive failures in day to day runs.
+very_expensive_
+
grep '^#define HAVE_PTHREAD_T 1' "$CONFIG_HEADER" > /dev/null ||
skip_ 'requires pthreads'
--
1.7.6.rc0.293.g40857
- [PATCH] tests: avoid sort-spinlock-abuse false positive under heavy load,
Jim Meyering <=