From 2899e783af4a9036d1c83854c824bd1680f24cef Mon Sep 17 00:00:00 2001 From: Nithya Balachandran Date: Wed, 4 Mar 2015 19:16:20 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/9798 Tested-by: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- tests/bugs/distribute/bug-1117851.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') 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 $* & } -- cgit