Whamcloud - gitweb
LU-16953 tests: wait longer in replay-dual/test_31 21/51621/3
authorLei Feng <flei@whamcloud.com>
Tue, 11 Jul 2023 00:13:35 +0000 (08:13 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Jul 2023 16:45:31 +0000 (16:45 +0000)
Wait until file was created in replay-dual/test_31.

Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial testlist=replay-dual env=ONLY=31,ONLY_REPEAT=100
Change-Id: I847beb51d53e667f1599c9693aa5eb099dcf9435
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51621
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/replay-dual.sh

index 707c7dd..62e2fe4 100755 (executable)
@@ -904,7 +904,7 @@ test_24 () {
 }
 run_test 24 "reconstruct on non-existing object"
 
-# end commit on sharing tests 
+# end commit on sharing tests
 
 test_25() {
        cancel_lru_locks osc
@@ -1184,7 +1184,9 @@ test_31() {
        $LCTL set_param fail_loc=0x80001420
        $MULTIOP $DIR1/$tdir/mdtdir/$tfile Osw4096c &
        multiops+=($!)
-       sleep 0.5
+       while [ ! -f $DIR1/$tdir/mdtdir/$tfile ]; do
+               sleep 0.5
+       done
        $MULTIOP $DIR2/$tdir/mdtdir/$tfile oO_WRONLY:w4096c &
        multiops+=($!)
        sleep 0.5
@@ -1198,8 +1200,15 @@ test_31() {
        wait $failpid
        local failed=0
 
+       echo "pids: ${multiops[@]}"
        for pid in "${multiops[@]}"; do
-               wait $pid || ((failed++))
+               local rc=0
+
+               wait $pid || rc=$?
+               if (( $rc != 0 )); then
+                       echo "wait $pid failed, rc = $rc"
+                       ((failed++))
+               fi
        done
        ((failed == 0)) || error "$failed multiops failed"
 }