X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=blobdiff_plain;f=common.quota;h=ccedfc62f0c3dfd777f7bd861695610716b44b2b;hp=732fe8b12ef46666f5c7e83f170f8ad91f553447;hb=fb22b1e9e241cb4bd52fbfa1e081c29031b0a24d;hpb=3c6d3d88656a9f4e253eebbb3d80c3499a4048a6 diff --git a/common.quota b/common.quota index 732fe8b1..ccedfc62 100644 --- a/common.quota +++ b/common.quota @@ -42,9 +42,9 @@ _require_quota() src/feature -q $TEST_DEV [ $? -ne 0 ] && _notrun "Installed kernel does not support XFS quota" - [ ! -x /usr/sbin/repquota ] && _notrun "Quota user tools not installed" + [ ! -x /sbin/quotaon ] && _notrun "Quota user tools not installed" - /usr/sbin/repquota -m -s -a >/dev/null 2>&1 + /sbin/quotaon -x 2>&1 | grep "option requires an argument -- x" >/dev/null [ $? -ne 0 ] && _notrun "Installed quota tools do not support XFS" } @@ -84,7 +84,10 @@ _choose_gid() _filter_repquota() { - perl -ne 's/^(\w+)\s+([-|+])/[NAME] \2/g; print' + perl -ne " + s/^(\w+)\s+([-|+])/[NAME] \2/g; + s,$SCRATCH_DEV,[DEVICE],g; + print" } _qmount() @@ -92,7 +95,7 @@ _qmount() umount $SCRATCH_DEV >/dev/null 2>&1 mount -t xfs $SCRATCH_DEV $SCRATCH_MNT || _fail "qmount failed" chmod ugo+rwx $SCRATCH_MNT - misc/quot $SCRATCH_DEV >>$seq.full 2>&1 + [ -x /usr/sbin/quot ] && quot $SCRATCH_DEV >>$seq.full 2>&1 } # make sure this script returns success