From: Jinshan Xiong Date: Wed, 6 Mar 2013 18:25:38 +0000 (-0800) Subject: LU-2918 tests: sanity 184c to start copy before layout swap X-Git-Tag: 2.3.63~71 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=187a94923310521cc0dd37e52a461a1fd3c3b27a LU-2918 tests: sanity 184c to start copy before layout swap 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 Change-Id: I8217c9a38f1d09830c0ab259f65c9716c06736d1 Reviewed-on: http://review.whamcloud.com/5617 Tested-by: Hudson Reviewed-by: Keith Mannthey Reviewed-by: Jian Yu Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 8778301..af29ca2 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -9532,7 +9532,8 @@ test_184c() { 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=$?