Whamcloud - gitweb
LU-14869 test: improve sanity-flr/200a 45/54345/2
authorBobi Jam <bobijam@whamcloud.com>
Mon, 11 Mar 2024 02:47:25 +0000 (10:47 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 23 Mar 2024 06:12:14 +0000 (06:12 +0000)
Make sure "flock -x" successfully returned before running mirror
resync so that it won't get into running read holding shared flock.

Test-Parameters: trivial testlist=sanity-flr env=ONLY=200a,ONLY_REPEAT=10
Test-Parameters: trivial testlist=sanity-flr env=ONLY=200a,ONLY_REPEAT=10
Test-Parameters: trivial testlist=sanity-flr env=ONLY=200a,ONLY_REPEAT=10
Test-Parameters: trivial testlist=sanity-flr env=ONLY=200a,ONLY_REPEAT=10
Test-Parameters: trivial testlist=sanity-flr env=ONLY=200a,ONLY_REPEAT=10
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I6383af5d5761980d24af19efd4a4ac899f369a7d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54345
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-flr.sh

index 7ed4281..b1c05df 100644 (file)
@@ -3403,7 +3403,7 @@ resync_file_200() {
                echo -n "resync file $tf with '$cmd' .."
 
                if [[ $lock_taken = "true" ]]; then
-                       flock -x 200
+                       flock -x 200 &&
                        $cmd $tf &> /dev/null && echo "done" || echo "failed"
                        flock -u 200
                else