From 07764c4eeb42f2362758c851ad825fd3b6d27219 Mon Sep 17 00:00:00 2001 From: Lei Feng Date: Tue, 11 Jul 2023 08:13:35 +0800 Subject: [PATCH] LU-16953 tests: wait longer in replay-dual/test_31 Wait until file was created in replay-dual/test_31. Signed-off-by: Lei Feng 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 Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Alex Deiter Reviewed-by: Oleg Drokin --- lustre/tests/replay-dual.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index 707c7dd..62e2fe4 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -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" } -- 1.8.3.1