The test script has to make sure dd already starts to copy file
before swapping layout, otherwise the attempt to open file1 would
fail.
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I8217c9a38f1d09830c0ab259f65c9716c06736d1
Reviewed-on: http://review.whamcloud.com/5617
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
dd if=$ref1 of=$file1 bs=16k &
local DD_PID=$!
- sleep 0.$((RANDOM % 5 + 1))
+ # Make sure dd starts to copy file
+ while [ ! -f $file1 ]; do sleep 0.1; done
$LFS swap_layouts $file1 $file2
local rc=$?