Split out xfs & generic quota existence tests
authorEric Sandeen <sandeen@sandeen.net>
Mon, 10 Aug 2009 18:18:50 +0000 (13:18 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Mon, 10 Aug 2009 18:18:50 +0000 (13:18 -0500)
Make a new test to test for generic quota tools, for
generic filesystem testing.  Move the existing quota test
to a new "xfs" name.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Lachlan McIlroy <lmcilroy@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 files changed:
050
052
054
081
106
107
108
116
118
134
196
common.quota

diff --git a/050 b/050
index abb806a761673e20ac44335ad8782e0024c27507..306a7b5326e8d198a94d157b6105a482e67a6a52 100755 (executable)
--- a/050
+++ b/050
@@ -55,7 +55,7 @@ cp /dev/null $seq.full
 chmod a+rwx $seq.full  # arbitrary users will write here
 
 _require_scratch
-_require_quota
+_require_xfs_quota
 
 bsoft=100
 bhard=500
diff --git a/052 b/052
index 16c78de65b422518da6a968b1bc0e91c7d9d4377..3d8bb9e1e971faa62922a2f367d5a7c65be0ad76 100755 (executable)
--- a/052
+++ b/052
@@ -54,7 +54,7 @@ _supported_os IRIX Linux
 rm -f $seq.full
 
 _require_scratch
-_require_quota
+_require_xfs_quota
 _require_nobody
 
 # setup a default run
diff --git a/054 b/054
index b495e51fd2e043a65d9f6cc70d6b98b5f74e39c8..b38efab1b1ed209cd31098878e6546900557d0aa 100755 (executable)
--- a/054
+++ b/054
@@ -52,7 +52,7 @@ cp /dev/null $seq.full
 chmod ugo+rwx $seq.full
 
 _require_scratch
-_require_quota
+_require_xfs_quota
 
 _filter_stat()
 {
diff --git a/081 b/081
index 303648452c81d2f91be3f4531b35a63d591bb2a0..c8eba80b0c3e3c759be72e5f3a49c981961c7085 100755 (executable)
--- a/081
+++ b/081
@@ -54,7 +54,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # prelim
 rm -f $seq.full $tmp.*
 _require_scratch
-_require_quota
+_require_xfs_quota
 _require_v2log
  
 echo "*** init FS"
diff --git a/106 b/106
index 71549795aecfab6a3c7f34fa7354dd61ba997327..30f740bffe6cc9a68aa80433658175f7578132b2 100755 (executable)
--- a/106
+++ b/106
@@ -42,7 +42,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 _supported_fs xfs
 _supported_os Linux #IRIX
 _require_scratch
-_require_quota
+_require_xfs_quota
 _require_prjquota
 
 # real QA test starts here
diff --git a/107 b/107
index cfa82136ab26f6393025fc279a94d228836bc285..f36dc214aba648bd9803006bf879f956b7a20f82 100755 (executable)
--- a/107
+++ b/107
@@ -54,7 +54,7 @@ s/Inode: \#\d+ \(\d+ blocks, \d+ extents\)/Inode: #[INO] (X blocks, Y extents)/;
 _supported_fs xfs
 _supported_os Linux #IRIX
 _require_scratch
-_require_quota
+_require_xfs_quota
 _require_prjquota
 
 # real QA test starts here
diff --git a/108 b/108
index 3f3e1fb6742da44db78e4ee32e011cbda3ecf505..3a1fee94df2ee1cbf3d61f0cddbb8fdf6af08b76 100755 (executable)
--- a/108
+++ b/108
@@ -49,7 +49,7 @@ s,$SCRATCH_DEV,[SCR_DEV],;
 _supported_fs xfs
 _supported_os Linux #IRIX
 _require_scratch
-_require_quota
+_require_xfs_quota
 _require_prjquota
 
 test_files()
diff --git a/116 b/116
index 8394054a5397e69c0545292a2be92adfbb269776..e902ce9049808e3d2c4e3d588f56a3af823c006c 100755 (executable)
--- a/116
+++ b/116
@@ -51,7 +51,7 @@ _supported_fs xfs
 _supported_os IRIX Linux
 
 _require_scratch
-_require_quota
+_require_xfs_quota
 
 mkfs.xfs -f $SCRATCH_DEV >/dev/null 2>&1
 mount -o uquota $SCRATCH_DEV $SCRATCH_MNT
diff --git a/118 b/118
index 6b28055f2b23be69ad75f086444527f8a36b710a..cb0e5ee6fee48824ec821124bd09acfc50038841 100755 (executable)
--- a/118
+++ b/118
@@ -52,7 +52,7 @@ _supported_fs xfs
 _supported_os IRIX Linux
 
 _require_scratch
-_require_quota
+_require_xfs_quota
 
 _chowning_file()
 {
diff --git a/134 b/134
index fc2ab74a8b55551f6499843a8d4c9b3cede7dd58..f00e1f0a042304728a2c128763e0a6ccfcbb1319 100755 (executable)
--- a/134
+++ b/134
@@ -50,7 +50,7 @@ _cleanup()
 _supported_fs xfs
 _supported_os Linux IRIX
 
-_require_quota
+_require_xfs_quota
 
 dir=$SCRATCH_MNT/project
 
diff --git a/196 b/196
index 7768618a95c9da2d93ede4e7f299098d16d749f5..5da36596b579b0860c3cabd353125557b9457759 100755 (executable)
--- a/196
+++ b/196
@@ -51,7 +51,7 @@ _supported_fs xfs
 _supported_os Linux
 
 _require_scratch
-_require_quota
+_require_xfs_quota
 
 #
 # Setup temporary replacements for /etc/projects and /etc/projid
index a9dfb4221a0f28ff8daa52d725fbd29cd8dd6f5d..e2a78724bee487da1851981911ca3f016eb809ab 100644 (file)
 #
 
 #
-# checks that the XFS quota support in the kernel is enabled
+# checks that the generic quota support in the kernel is enabled
 # and that we have valid quota user tools installed.
 #
 _require_quota()
+{
+    [ -x /usr/bin/quota ] || _notrun "Quota user tools not installed"
+    _scratch_mount "-o usrquota,grpquota"
+    ret=$?
+    umount $SCRATCH_MNT
+    [ $ret -ne 0 ] && _notrun "Installed kernel does not support quota"
+}
+
+#
+# checks that the XFS quota support in the kernel is enabled
+# and that we have valid quota user tools installed.
+#
+_require_xfs_quota()
 {
     src/feature -q $TEST_DEV
     [ $? -ne 0 ] && _notrun "Installed kernel does not support XFS quota"
-    [ -x /usr/sbin/xfs_quota ] || _notrun "Quota user tools not installed"
+    [ -x /usr/sbin/xfs_quota ] || _notrun "XFS quota user tools not installed"
 }
 
 #