I saw this test fail again. Tripling the size of the tree seems to be enough...
While waiting for 200 trials to complete I suspended the job, and upon resumption, one iteration failed. The second patch prevents that sort of problem by making the test script ignore TSTP and STOP signals. >From 5c501f6fba5c1e2c4b45ce3f44b2da58d559ebe7 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Tue, 25 Jan 2011 11:09:27 +0100 Subject: [PATCH 1/2] tests: avoid rare FP failure in new du test * tests/du/move-dir-while-traversing: Create an even larger tree to avoid a false-positive failure due to du terminating before the rename is triggered. --- tests/du/move-dir-while-traversing | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/du/move-dir-while-traversing b/tests/du/move-dir-while-traversing index 9605831..c711e02 100755 --- a/tests/du/move-dir-while-traversing +++ b/tests/du/move-dir-while-traversing @@ -63,9 +63,11 @@ 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 +# Five 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 +# Using 10 iterations was not enough, either. +# Using 30, I saw no failure in 200 trials. +for i in $(seq 30); 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 & -- 1.7.3.5.38.gb312b >From 56699864f63fe69259d4a5c1f94498762d8df78d Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Tue, 25 Jan 2011 12:36:22 +0100 Subject: [PATCH 2/2] tests: avoid FP failure due to suspension * tests/du/move-dir-while-traversing: Prohibit suspension, to avoid false-positive failure. --- tests/du/move-dir-while-traversing | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tests/du/move-dir-while-traversing b/tests/du/move-dir-while-traversing index c711e02..2a60d6e 100755 --- a/tests/du/move-dir-while-traversing +++ b/tests/du/move-dir-while-traversing @@ -70,6 +70,10 @@ long=d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z for i in $(seq 30); do mkdir -p $t/3/a/b/c/$i/$long || framework_failure done + +# Prohibit suspension, which could otherwise cause a timeout-induced FP failure. +trap '' STOP TSTP + timeout 6 ./inotify-watch-for-dir-access.py $t/3/a/b > start-msg & # Wait for the watcher to start... -- 1.7.3.5.38.gb312b
