@@ -109,6 +109,16 @@ _require_prjquota()
}
#
+# Do we have GETNEXTQUOTA? Querying ID 0 should work.
+#
+_require_getnextquota()
+{
+ _require_test_program "test-nextquota"
+ $here/src/test-nextquota -i 0 -u -d $SCRATCH_DEV &> $seqres.full || \
+ _notrun "No GETNEXTQUOTA support"
+}
+
+#
# ext4 (for now) is unique in that we must enable the project quota feature
# prior to mount. This is a relatively new feature ...
_scratch_enable_pquota()
@@ -59,10 +59,7 @@ _scratch_mkfs >> $seqres.full 2>&1
TYPES="u g"
MOUNT_OPTIONS="-o usrquota,grpquota"
_qmount
-
-# Ok, do we even have GETNEXTQUOTA? Querying ID 0 should work.
-$here/src/test-nextquota -i 0 -u -d $SCRATCH_DEV &> $seqres.full || \
- _notrun "No GETNEXTQUOTA support"
+_require_getnextquota
echo "Launch all quotas"
@@ -57,12 +57,8 @@ _require_scratch
_scratch_mkfs >> $seqres.full 2>&1
MOUNT_OPTIONS="-o usrquota,grpquota"
-
_qmount
-
-# Ok, do we even have GETNEXTQUOTA? Querying ID 0 should work.
-$here/src/test-nextquota -i 0 -u -d $SCRATCH_DEV &> $seqres.full || \
- _notrun "No GETNEXTQUOTA support"
+_require_getnextquota
echo "Launch all quotas"
Add a helper to determine if the kernel supports the GETNEXTQUOTA quotactl. Signed-off-by: Eric Sandeen <sandeen@redhat.com> --- -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html