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>
$LCTL set_param fail_loc=0x80001420
$MULTIOP $DIR1/$tdir/mdtdir/$tfile Osw4096c &
multiops+=($!)
$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
$MULTIOP $DIR2/$tdir/mdtdir/$tfile oO_WRONLY:w4096c &
multiops+=($!)
$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)
sleep 0.5
local mmrif=$($LCTL get_param -n \
mdc.$FSNAME-MDT0000-mdc-*.max_mod_rpcs_in_flight | tail -1)