Whamcloud - gitweb
LU-16984 tests: replay-dual/31 checks file from DIR2 62/51762/2
authorLei Feng <flei@whamcloud.com>
Wed, 26 Jul 2023 00:52:10 +0000 (08:52 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 31 Aug 2023 06:33:34 +0000 (06:33 +0000)
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 <flei@whamcloud.com>
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 <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/replay-dual.sh

index 62e2fe4..9043d62 100755 (executable)
@@ -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)