summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShyam <srangana@redhat.com>2014-09-02 12:37:07 -0400
committerVijay Bellur <vbellur@redhat.com>2014-09-02 11:48:51 -0700
commit4adfb6fb7c371c6bc03acdaf61f1cca496388356 (patch)
treecc193d6b5aa9dd100066319118d766a0eda7d022
parent4ce3db8e508e715a43352b082e861fd0e729951f (diff)
cluster/dht: Modified test case to note rename failures as errors
The bug referenced in this change, had an race condition that is now fixed by the following commits that are posted for review. http://review.gluster.org/#/c/8563/ http://review.gluster.org/#/c/8570/ These changes would now make the winning client not fail a rename, in case it failed to rename the linkto file. Hence when one client wins the link race, and the other still deletes the linkto file, the rename failure by the winning client is not a critical failure, hence it resolves the issue posted in the bug. As a result modifying the test case to treat the rename failures as errors, to catch any future issues. Change-Id: Ibe9caac7ee87dcbc4f581cfbd36173b734859ccb BUG: 1123950 Signed-off-by: Shyam <srangana@redhat.com> Reviewed-on: http://review.gluster.org/8579 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rwxr-xr-xtests/bugs/bug-1117851.t20
1 files changed, 7 insertions, 13 deletions
diff --git a/tests/bugs/bug-1117851.t b/tests/bugs/bug-1117851.t
index 8292058cf2f..94f3104fedc 100755
--- a/tests/bugs/bug-1117851.t
+++ b/tests/bugs/bug-1117851.t
@@ -31,26 +31,18 @@ move_files () {
check_files () {
errors=0
- warnings=0
for i in {1..1000}; do
if [ ! -f $(printf %s/dst%04d $1 $i) ]; then
if [ -f $(printf %s/src%04d $1 $i) ]; then
- # We do hit this sometimes, though very rarely.
- # It's a bug. It's just not *this* bug.
- # Therefore, instead of allowing it to cause
- # spurious test failures, we let it slide for
- # now. Some day, when that other bug is fixed,
- # I hope I remember to come back and strengthen
- # this test accordingly.
echo "file $i didnt get moved" > /dev/stderr
- #warnings=$((warnings+1))
+ errors=$((errors+1))
else
echo "file $i is MISSING" > /dev/stderr
errors=$((errors+1))
fi
fi
done
- if [ $((errors+warnings)) != 0 ]; then
+ if [ $((errors)) != 0 ]; then
: ls -l $1 > /dev/stderr
fi
return $errors
@@ -84,9 +76,11 @@ TEST move_files $M1
# It's regrettable that renaming 1000 files might take more than 30 seconds,
# but on our test systems sometimes it does, so double the time from what we'd
-# use otherwise.
-EXPECT_WITHIN 60 "done" cat $M0/status_0
-EXPECT_WITHIN 60 "done" cat $M1/status_1
+# use otherwise. There still seem to be some spurious failures, 1 in 20 when
+# this does not complete, added an additional 15 seconds to take false reports
+# out of the system, during test runs.
+EXPECT_WITHIN 75 "done" cat $M0/status_0
+EXPECT_WITHIN 75 "done" cat $M1/status_1
TEST umount $M0
TEST umount $M1