summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNithya Balachandran <nbalacha@redhat.com>2015-03-04 19:16:20 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2015-03-04 08:27:29 -0800
commit2899e783af4a9036d1c83854c824bd1680f24cef (patch)
tree62231d43a2850d751e5b184fc5392fd2f37d80cb
parent9c5011b8e49e34d736ba7cfadc0802e8b80682a7 (diff)
tests: Spurious failure in bug-1117851.t
This test runs file renames in a loop in the background and writes to a status file to indicate that it is done. However, the status file was also created in the background and was sometimes not created in time before the test which checked the contents. Change-Id: Ida29456fbdc006f1da84a5f25a629cc6fa9830f4 BUG: 1163543 Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/9798 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
-rwxr-xr-xtests/bugs/distribute/bug-1117851.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/bugs/distribute/bug-1117851.t b/tests/bugs/distribute/bug-1117851.t
index c93a05e1d47..b269f4aec3c 100755
--- a/tests/bugs/distribute/bug-1117851.t
+++ b/tests/bugs/distribute/bug-1117851.t
@@ -16,7 +16,6 @@ create_files () {
move_files_inner () {
sfile=$M0/status_$(basename $1)
- echo "running" > $sfile
for i in {1..1000}; do
src=$(printf %s/src%04d $1 $i)
dst=$(printf %s/dst%04d $1 $i)
@@ -26,6 +25,11 @@ move_files_inner () {
}
move_files () {
+ #Create the status file here to prevent spurious failures
+ #caused by the file not being created in time by the
+ #background process
+ sfile=$M0/status_$(basename $1)
+ echo "running" > $sfile
move_files_inner $* &
}