From: James Nunez Date: Wed, 7 Aug 2019 15:56:50 +0000 (-0600) Subject: LU-12639 tests: initialize variable sanity 317 X-Git-Tag: 2.12.57~7 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c00be06a1f8f27eb5bd8bb47086d0f1e5b5f5f50;p=fs%2Flustre-release.git LU-12639 tests: initialize variable sanity 317 sanity test 317 checks the file system type of $facet, but facet is not initiaized in the test. Replace the check of the facet file system type with the variable ost1_FSTYPE. The call to return after skip is removed. Fixes: 6115eb7fd55a ("LU-10370 ofd: truncate does not update blocks count on client") Test-Parameters: trivial Test-Parameters: fstype=zfs envdefinitions=ONLY=317 testlist=sanity Signed-off-by: James Nunez Change-Id: If67c4d786e4d23752effd1aaebc82bb1be8aceb5 Reviewed-on: https://review.whamcloud.com/35716 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index a8ecfae..ec3d67e 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -19390,14 +19390,13 @@ run_test 316 "lfs mv" test_317() { [ $MDS1_VERSION -lt $(version_code 2.11.53) ] && skip "Need MDS version at least 2.11.53" + if [ "$ost1_FSTYPE" == "zfs" ]; then + skip "LU-10370: no implementation for ZFS" + fi + local trunc_sz local grant_blk_size - if [ "$(facet_fstype $facet)" == "zfs" ]; then - skip "LU-10370: no implementation for ZFS" && return - fi - - stack_trap "rm -f $DIR/$tfile" EXIT grant_blk_size=$($LCTL get_param osc.$FSNAME*.import | awk '/grant_block_size:/ { print $2; exit; }') # @@ -19405,7 +19404,8 @@ test_317() { # blocks count. # dd if=/dev/zero of=$DIR/$tfile bs=5M count=1 conv=fsync || - error "Create file : $DIR/$tfile" + error "Create file $DIR/$tfile failed" + stack_trap "rm -f $DIR/$tfile" EXIT for trunc_sz in 2097152 4097 4000 509 0; do $TRUNCATE $DIR/$tfile $trunc_sz ||