skip "e2fsprogs doesn't support quota" && exit 0
fi
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="9 18 21"
+if [ $(facet_fstype $SINGLEMDS) = "zfs" ]; then
+# bug number for skipped test: LU-2872 LU-2836 LU-2836 LU-2059
+ ALWAYS_EXCEPT="$ALWAYS_EXCEPT 1 3 6 7d"
+# bug number: LU-2887
+ ZFS_SLOW="12a"
+fi
+
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="$ZFS_SLOW 9 18 21"
QUOTALOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log}
delta=$((etime - stime))
if [ $delta -gt 0 ]; then
rate=$((size * 1024 / delta))
- [ $rate -gt 1024 ] ||
- error "SLOW IO for $TSTUSR (user): $rate KB/sec"
+ if [ $(facet_fstype $SINGLEMDS) = "zfs" ]; then
+ # LU-2872 - see LU-2887 for fix
+ [ $rate -gt 256 ] ||
+ error "SLOW IO for $TSTUSR (user): $rate KB/sec"
+ else
+ [ $rate -gt 1024 ] ||
+ error "SLOW IO for $TSTUSR (user): $rate KB/sec"
+ fi
fi
rm -f $TESTFILE
}
# block soft limit
test_3() {
local LIMIT=1 # 1MB
- local GRACE=10 # 10s
+ local GRACE=20 # 20s
local TESTFILE=$DIR/$tdir/$tfile-0
set_ost_qtype "ug" || error "enable ost quota failed"
test_6() {
local LIMIT=3 # 3M
+ # Clear dmesg so watchdog is not triggered by previous
+ # test output
+ do_facet ost1 dmesg -c > /dev/null
+
setup_quota_test
trap cleanup_quota_test EXIT
# no watchdog is triggered
do_facet ost1 dmesg > $TMP/lustre-log-${TESTNAME}.log
- watchdog=$(awk '/sanity-quota test 6/ {start = 1;}
- /Service thread pid/ && /was inactive/ {
- if (start) {
- print;
- }
- }' $TMP/lustre-log-${TESTNAME}.log)
+ watchdog=$(awk '/Service thread pid/ && /was inactive/ \
+ { print; }' $TMP/lustre-log-${TESTNAME}.log)
[ -z "$watchdog" ] || error "$watchdog"
rm -f $TMP/lustre-log-${TESTNAME}.log
# write should continue & succeed
local count=0
+ local o_size=$(stat -c %s $TESTFILE)
+ local c_size
while [ true ]; do
if ! ps -p ${DDPID} > /dev/null 2>&1; then break; fi
- if [ $count -ge 120 ]; then
+ if [ $count -ge 240 ]; then
quota_error u $TSTUSR "dd not finished in $count secs"
fi
count=$((count + 1))
- [ $((count % 10)) -eq 0 ] && echo "Waiting $count secs"
+ if [ $((count % 30)) -eq 0 ]; then
+ c_size=$(stat -c %s $TESTFILE)
+ if [ $c_size -eq $o_size ]; then
+ quota_error u $TSTUSR "file not growed" \
+ "in 30 seconds $o_size/$c_size"
+ else
+ echo "Waiting $count secs. $o_size/$c_size"
+ o_size=$c_size
+ fi
+ fi
sleep 1
done
# trigger reintegration
local procf="osd-$(facet_fstype ost1).$FSNAME-OST*."
procf=${procf}quota_slave.force_reint
- $LCTL set_param $procf=1 || "force reintegration failed"
+ do_facet ost1 $LCTL set_param $procf=1 ||
+ error "force reintegration failed"
echo "Stop mds..."
stop mds1
quota_error -u $TSTUSR "create failed, expect success"
$RUNAS unlinkmany $TESTFILE $((ilimit + 1)) || "unlink failed"
- $LFS rmdir $DIR/${tdir}-1 || "unlink remote dir failed"
+ rmdir $DIR/${tdir}-1 || "unlink remote dir failed"
cleanup_quota_test
resetquota -u $TSTUSR
$RUNAS unlinkmany $TESTFILE1 $((ilimit / 2)) ||
error "unlink mdt1 files failed"
- $LFS rmdir $DIR/${tdir}-1 || error "unlink remote dir failed"
+ rmdir $DIR/${tdir}-1 || error "unlink remote dir failed"
cleanup_quota_test
resetquota -u $TSTUSR
local testfile_size=$(stat -c %s $TESTFILE)
if [ $testfile_size -ne $((BLK_SZ * 1024 * 100)) ] ; then
- quota_error u $TSTUSR "expect $((BLK_SZ * 1024 * 100)),"
+ quota_error u $TSTUSR "expect $((BLK_SZ * 1024 * 100))," \
"got ${testfile_size}. Verifying file failed!"
fi
cleanup_quota_test
# test when mds does failover, the ost still could work well
# this test shouldn't trigger watchdog b=14840
test_18() {
+ # Clear dmesg so watchdog is not triggered by previous
+ # test output
+ do_facet ost1 dmesg -c > /dev/null
+
test_18_sub normal
test_18_sub directio
# check if watchdog is triggered
do_facet ost1 dmesg > $TMP/lustre-log-${TESTNAME}.log
- local watchdog=$(awk '/sanity-quota test 18/ {start = 1;}
- /Service thread pid/ && /was inactive/ {
- if (start) {
- print;
- }
- }' $TMP/lustre-log-${TESTNAME}.log)
+ local watchdog=$(awk '/Service thread pid/ && /was inactive/ \
+ { print; }' $TMP/lustre-log-${TESTNAME}.log)
[ -z "$watchdog" ] || error "$watchdog"
rm -f $TMP/lustre-log-${TESTNAME}.log
}