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>
This commit is contained in:
parent
9c5011b8e4
commit
2899e783af
@ -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 $* &
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user