From: James Nunez Date: Tue, 8 Jan 2019 21:04:06 +0000 (-0700) Subject: LU-10447 tests: replace $SET/$GETSTRIPE in replay tests X-Git-Tag: 2.12.51~37 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=8d2c98744c1234c9720ff5accbf986449e024dbc LU-10447 tests: replace $SET/$GETSTRIPE in replay tests $SETSTRIPE and $GETSTRIPE were needed when we used the standalone 'lstripe' utility. 'lstripe' hasn't been used for years and we need to clean up all remnants of it. Replace all instances of $SETSTRIPE with '$LFS setstripe' and $GETSTRIPE with '$LFS getstripe' in the replay-dual, replay-ost-single, and replay-single test suites. Test-Parameters: trivial testlist=replay-dual,replay-ost-single,replay-single Signed-off-by: James Nunez Change-Id: I3902142061ddb3c8860b6983d5ec55383aeb25a9 Reviewed-on: https://review.whamcloud.com/33918 Reviewed-by: Elena Gryaznova Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Wei Liu Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index 5e75e4f..e9c6be9 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -335,11 +335,11 @@ test_14b() { local beforeused=$(df -P $DIR | tail -1 | awk '{ print $3 }') mkdir -p $MOUNT1/$tdir - $SETSTRIPE -i 0 $MOUNT1/$tdir + $LFS setstripe -i 0 $MOUNT1/$tdir replay_barrier $SINGLEMDS createmany -o $MOUNT1/$tdir/$tfile- 5 - $SETSTRIPE -i 0 $MOUNT2/$tfile-2 + $LFS setstripe -i 0 $MOUNT2/$tfile-2 dd if=/dev/zero of=$MOUNT2/$tfile-2 bs=1M count=5 createmany -o $MOUNT1/$tdir/$tfile-3- 5 umount $MOUNT2 @@ -897,7 +897,7 @@ run_test 24 "reconstruct on non-existing object" test_25() { cancel_lru_locks osc - $SETSTRIPE -i 0 -c 1 $DIR/$tfile + $LFS setstripe -i 0 -c 1 $DIR/$tfile # get lock for the 1st client dd if=/dev/zero of=$DIR/$tfile count=1 >/dev/null || @@ -1007,7 +1007,7 @@ test_26() { run_test 26 "dbench and tar with mds failover" test_28() { - $SETSTRIPE -i 0 -c 1 $DIR2/$tfile + $LFS setstripe -i 0 -c 1 $DIR2/$tfile dd if=/dev/zero of=$DIR2/$tfile bs=4096 count=1 #define OBD_FAIL_LDLM_SRV_BL_AST 0x324 diff --git a/lustre/tests/replay-ost-single.sh b/lustre/tests/replay-ost-single.sh index c35afd6..f7d4d4a 100755 --- a/lustre/tests/replay-ost-single.sh +++ b/lustre/tests/replay-ost-single.sh @@ -43,8 +43,8 @@ rm -rf $DIR/[df][0-9]* TDIR=$DIR/d0.${TESTSUITE} mkdir -p $TDIR -$SETSTRIPE $TDIR -i 0 -c 1 -$GETSTRIPE $TDIR +$LFS setstripe $TDIR -i 0 -c 1 +$LFS getstripe $TDIR test_0a() { zconf_umount $(hostname) $MOUNT -f @@ -199,7 +199,7 @@ test_6() { local before=$(kbytesfree) dd if=/dev/urandom bs=4096 count=1280 of=$f || error "dd failed" - $GETSTRIPE $f || error "$GETSTRIPE $f failed" + $LFS getstripe $f || error "$LFS getstripe $f failed" local stripe_index=$(lfs getstripe -i $f) sync @@ -398,7 +398,7 @@ run_test 8e "Verify that ptlrpc resends request on -EINPROGRESS" test_9() { [ $(lustre_version_code ost1) -ge $(version_code 2.6.54) ] || { skip "Need OST version at least 2.6.54"; return; } - $SETSTRIPE -i 0 -c 1 $DIR/$tfile || error "setstripe failed" + $LFS setstripe -i 0 -c 1 $DIR/$tfile || error "setstripe failed" # LU-1573 - Add duplicate write to generate grants dd if=/dev/zero of=$DIR/$tfile count=1 bs=1M > /dev/null || diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index d3ece5c..8b3810c 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -955,7 +955,7 @@ test_41() { local f=$MOUNT/$tfile # make sure the start of the file is ost1 - $SETSTRIPE -S $((128 * 1024)) -i 0 $f + $LFS setstripe -S $((128 * 1024)) -i 0 $f do_facet client dd if=/dev/zero of=$f bs=4k count=1 || error "dd on client failed" cancel_lru_locks osc @@ -1857,8 +1857,8 @@ test_65b() #bug 3055 $LCTL dk > /dev/null # Slow down a request to the current service time, this is critical # because previous tests may have caused this value to increase. - $SETSTRIPE --stripe-index=0 --stripe-count=1 $DIR/$tfile || - error "$SETSTRIPE failed for $DIR/$tfile" + $LFS setstripe --stripe-index=0 --stripe-count=1 $DIR/$tfile || + error "$LFS setstripe failed for $DIR/$tfile" multiop $DIR/$tfile Ow1yc REQ_DELAY=`lctl get_param -n osc.${FSNAME}-OST0000-osc-*.timeouts | @@ -1870,8 +1870,8 @@ test_65b() #bug 3055 do_facet ost1 $LCTL set_param fail_loc=0x224 rm -f $DIR/$tfile - $SETSTRIPE --stripe-index=0 --stripe-count=1 $DIR/$tfile || - error "$SETSTRIPE failed" + $LFS setstripe --stripe-index=0 --stripe-count=1 $DIR/$tfile || + error "$LFS setstripe failed" # force some real bulk transfer multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c @@ -1974,7 +1974,8 @@ test_67b() #bug 3055 osc.$mdtosc.prealloc_next_id) mkdir -p $DIR/$tdir/${OST} || error "mkdir $DIR/$tdir/${OST} failed" - $SETSTRIPE -i 0 -c 1 $DIR/$tdir/${OST} || error "$SETSTRIPE failed" + $LFS setstripe -i 0 -c 1 $DIR/$tdir/${OST} || + error "$LFS setstripe failed" echo "Creating to objid $last_id on ost $OST..." #define OBD_FAIL_OST_PAUSE_CREATE 0x223 do_facet ost1 "$LCTL set_param fail_val=20000" @@ -2016,8 +2017,8 @@ test_68 () #bug 13813 do_facet ost1 "echo $TIMEOUT >> $ldlm_enqueue_min_r" mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed" - $SETSTRIPE --stripe-index=0 -c 1 $DIR/$tdir || - error "$SETSTRIPE failed for $DIR/$tdir" + $LFS setstripe --stripe-index=0 -c 1 $DIR/$tdir || + error "$LFS setstripe failed for $DIR/$tdir" #define OBD_FAIL_LDLM_PAUSE_CANCEL 0x312 $LCTL set_param fail_val=$(($TIMEOUT - 1)) $LCTL set_param fail_loc=0x80000312 @@ -2382,7 +2383,8 @@ test_70f_loop(){ DD_OPTS= mkdir -p $DIR/$tdir || error "cannot create $DIR/$tdir directory" - $SETSTRIPE -c -1 $DIR/$tdir || error "cannot $SETSTRIPE $DIR/$tdir" + $LFS setstripe -c -1 $DIR/$tdir || + error "cannot $LFS setstripe $DIR/$tdir" touch $stopflag while [ -f $stopflag ]; do @@ -3176,7 +3178,7 @@ test_87a() { do_facet ost1 "lctl set_param -n obdfilter.${ost1_svc}.sync_journal 0" replay_barrier ost1 - $SETSTRIPE -i 0 -c 1 $DIR/$tfile + $LFS setstripe -i 0 -c 1 $DIR/$tfile dd if=/dev/urandom of=$DIR/$tfile bs=1024k count=8 || error "dd to $DIR/$tfile failed" cksum=$(md5sum $DIR/$tfile | awk '{print $1}') @@ -3194,7 +3196,7 @@ test_87b() { do_facet ost1 "lctl set_param -n obdfilter.${ost1_svc}.sync_journal 0" replay_barrier ost1 - $SETSTRIPE -i 0 -c 1 $DIR/$tfile + $LFS setstripe -i 0 -c 1 $DIR/$tfile dd if=/dev/urandom of=$DIR/$tfile bs=1024k count=8 || error "dd to $DIR/$tfile failed" sleep 1 # Give it a chance to flush dirty data @@ -3214,7 +3216,7 @@ test_88() { #bug 17485 mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed" mkdir -p $TMP/$tdir || error "mkdir $TMP/$tdir failed" - $SETSTRIPE -i 0 -c 1 $DIR/$tdir || error "$SETSTRIPE" + $LFS setstripe -i 0 -c 1 $DIR/$tdir || error "$LFS setstripe failed" replay_barrier ost1 replay_barrier $SINGLEMDS @@ -3307,7 +3309,7 @@ test_89() { local blocks1=$(calc_osc_kbytes_used) local write_size=$(fs_log_size) - $SETSTRIPE -i 0 -c 1 $DIR/$tdir/$tfile + $LFS setstripe -i 0 -c 1 $DIR/$tdir/$tfile [ $write_size -lt 1024 ] && write_size=1024 dd if=/dev/zero bs=${write_size}k count=10 of=$DIR/$tdir/$tfile sync @@ -3421,9 +3423,9 @@ test_90() { # bug 19494 [[ $(echo $list | wc -w) -eq 2 ]] || error_noexit "lfs find reports the wrong list of affected files ${#list[@]}" - echo "Check getstripe: $GETSTRIPE -r --obd $obd" - list=$($GETSTRIPE -r --obd $obd $dir) - echo "$list" + echo "Check getstripe: $LFS getstripe -r --obd $obd" + list=$($LFS getstripe -r --obd $obd $dir) + echo "$list" for file in all f$index; do echo "$list" | grep $dir/$file || error_noexit "lfs getsripe does not report the affected $obd for $file" @@ -3442,8 +3444,8 @@ test_93a() { cancel_lru_locks osc - $SETSTRIPE -i 0 -c 1 $DIR/$tfile || - error "$SETSTRIPE $DIR/$tfile failed" + $LFS setstripe -i 0 -c 1 $DIR/$tfile || + error "$LFS setstripe $DIR/$tfile failed" dd if=/dev/zero of=$DIR/$tfile bs=1024 count=1 || error "dd to $DIR/$tfile failed" #define OBD_FAIL_TGT_REPLAY_RECONNECT 0x715