[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coreutils] [PATCH] tests: avoid FP failure in new du test
From: |
Jim Meyering |
Subject: |
[coreutils] [PATCH] tests: avoid FP failure in new du test |
Date: |
Tue, 18 Jan 2011 22:36:17 +0100 |
I noticed that the new du test would occasionally fail
because du would complete too quickly.
Making the tree about ten times larger solved the problem:
(5x was not enough; see comments below)
>From 7e72d4fe9da159d42efe0845b0f36e2ea9d7c3b1 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 18 Jan 2011 22:32:33 +0100
Subject: [PATCH] tests: avoid FP failure in new du test
* tests/du/move-dir-while-traversing: Create a larger tree to
avoid a false-positive failure due to du terminating before
the rename is triggered.
---
tests/du/move-dir-while-traversing | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/tests/du/move-dir-while-traversing
b/tests/du/move-dir-while-traversing
index fe1615c..9605831 100755
--- a/tests/du/move-dir-while-traversing
+++ b/tests/du/move-dir-while-traversing
@@ -58,9 +58,16 @@ notifier.loop()
EOF
chmod a+x inotify-watch-for-dir-access.py
-long=d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z
t=T/U
-mkdir -p $t/3/a/b/c/$long d2 || framework_failure
+mkdir d2 || framework_failure
+long=d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z
+# One iteration of this loop creates a tree with which
+# du sometimes completes its traversal before the above rename.
+# Even 5 iterations was not enough in 2 of 7 "make -j20 check" runs on a
+# 6/12-core system. However, using "10", I saw no failure in 20 trials.
+for i in $(seq 10); do
+ mkdir -p $t/3/a/b/c/$i/$long || framework_failure
+done
timeout 6 ./inotify-watch-for-dir-access.py $t/3/a/b > start-msg &
# Wait for the watcher to start...
--
1.7.3.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [coreutils] [PATCH] tests: avoid FP failure in new du test,
Jim Meyering <=