From 4447499aaf2906b4a3e1170df5dd1566c2104ddd Mon Sep 17 00:00:00 2001 From: Lei Feng Date: Mon, 10 Jul 2023 15:02:32 +0800 Subject: [PATCH] LU-16953 tests: wait longer in replay-dual/test_31 Wait until file was created in replay-dual/test_31. Lustre-change: https://review.whamcloud.com/51621 Lustre-commit: TBD (from eed10c2ef36c7e1aebec27ce943b80bd0174ddf0) 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/ex/lustre-release/+/51622 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alex Deiter Reviewed-by: Andreas Dilger --- 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 5845f6a..2695b1b 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -901,7 +901,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 @@ -1242,7 +1242,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 @@ -1256,8 +1258,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