From 3c0b1fbf34086409f8295a6d7bf68e4dff746966 Mon Sep 17 00:00:00 2001 From: Lei Feng Date: Wed, 26 Jul 2023 08:52:10 +0800 Subject: [PATCH] LU-16984 tests: replay-dual/31 checks file from DIR2 In replay-dual/test_31, check file existence from DIR2. Add more messages for diagnosis. Fixes: 07764c4eeb ("LU-16953 tests: wait longer in replay-dual/test_31") Signed-off-by: Lei Feng Test-Parameters: trivial testlist=replay-dual env=ONLY=31,ONLY_REPEAT=100 Change-Id: Iee679ee94ac2cb51baad1651bfaddf452fafdbd1 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51762 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Patrick Farrell Reviewed-by: Oleg Drokin --- lustre/tests/replay-dual.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index 62e2fe4..9043d62 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -1184,11 +1184,20 @@ test_31() { $LCTL set_param fail_loc=0x80001420 $MULTIOP $DIR1/$tdir/mdtdir/$tfile Osw4096c & multiops+=($!) - while [ ! -f $DIR1/$tdir/mdtdir/$tfile ]; do - sleep 0.5 + + for (( i=0; i<10; i++ )); do + if [ -w $DIR2/$tdir/mdtdir/$tfile ]; then + echo "file $DIR2/$tdir/mdtdir/$tfile is ready" + break + else + echo "file $DIR2/$tdir/mdtdir/$tfile is not ready, wait 0.5 second..." + sleep 0.5 + fi done + $MULTIOP $DIR2/$tdir/mdtdir/$tfile oO_WRONLY:w4096c & multiops+=($!) + sleep 0.5 local mmrif=$($LCTL get_param -n \ mdc.$FSNAME-MDT0000-mdc-*.max_mod_rpcs_in_flight | tail -1) -- 1.8.3.1