X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsanity.sh;h=5ac4621db87e0f19866fb7c8e8cc8321f759030d;hb=5cb384104b9100d6833534c08597c04fa0ea3680;hp=db9807c84f4f45e869f2976e40bb93d1ecc9e8b7;hpb=a5b42797d1cd20dcce06be0d3b5cf33578e5c864;p=fs%2Flustre-release.git diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index db9807c..5ac4621 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -8026,10 +8026,14 @@ test_130d() { $SETSTRIPE -S 65536 -c $OSTCOUNT $fm_file||error "setstripe on $fm_file" [ "$(facet_fstype ost$(($($GETSTRIPE -i $fm_file) + 1)))" = "zfs" ] && skip "ORI-366/LU-1941: FIEMAP unimplemented on ZFS" && return - dd if=/dev/zero of=$fm_file bs=1M count=$OSTCOUNT || error "dd failed on $fm_file" + + local actual_stripecnt=$($GETSTRIPE -c $fm_file) + dd if=/dev/zero of=$fm_file bs=1M count=$actual_stripecnt || + error "dd failed on $fm_file" filefrag -ves $fm_file || error "filefrag $fm_file failed" - filefrag_op=`filefrag -ve $fm_file | grep -A 100 "ext:" | grep -v "ext:" | grep -v "found"` + filefrag_op=`filefrag -ve $fm_file | grep -A 100 "ext:" | + grep -v "ext:" | grep -v "found"` last_lun=`echo $filefrag_op | cut -d: -f5` @@ -8053,7 +8057,7 @@ test_130d() { (( tot_len += ext_len )) last_lun=$frag_lun done - if (( num_luns != OSTCOUNT || tot_len != 1024 )); then + if (( num_luns != actual_stripecnt || tot_len != 1024 )); then cleanup_130 error "FIEMAP on $fm_file failed; returned wrong number of luns or wrong len for OST $last_lun" return