[PATCH 10/10] xfstests: skip parts of tests which cannot work on tmpfs

Junho Ryu
2013-12-10T20:12:27Z

Skip generic/076 which tests concurrent access while testing tmpfs
because there are other tests cover the case using fsstress.

Skip generic/277 which requires chattr.

Even if generic/053 will not be able to test exactly what the test has
been intended to test, it will be still useful to have this test to try
out some functionality on tmpfs rather than always failing or being
skipped.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Junho Ryu <jayr@google.com>
---
tests/generic/053 | 6 +++---
tests/generic/076 | 2 ++
tests/generic/277 | 2 ++
3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/tests/generic/053 b/tests/generic/053
index b8bd9e6..885b87c 100755
--- a/tests/generic/053
+++ b/tests/generic/053
@@ -81,9 +81,9 @@ list_acls()

echo "acls before repair:"
list_acls
-_do 'unmount $SCRATCH_DEV' 'umount $SCRATCH_DEV'
-_do 'repair filesystem' '_check_scratch_fs'
-_do 'mount filesytem' '_scratch_mount'
+_do 'unmount $SCRATCH_DEV' '[ $FSTYP = tmpfs ] || umount $SCRATCH_DEV'
+_do 'repair filesystem' '[ $FSTYP = tmpfs ] || _check_scratch_fs'
+_do 'mount filesytem' '[ $FSTYP = tmpfs ] || _scratch_mount'
echo "acls after repair: "
list_acls

diff --git a/tests/generic/076 b/tests/generic/076
index a53840f..faeed2f 100755
--- a/tests/generic/076
+++ b/tests/generic/076
@@ -57,6 +57,8 @@ _supported_os IRIX Linux

_require_scratch

+[ "$FSTYP" = "tmpfs" ] && _notrun "not applicable for the tmpfs file system"
+
echo "*** init fs"

rm -f $seqres.full
diff --git a/tests/generic/277 b/tests/generic/277
index 8461ad9..4672343 100755
--- a/tests/generic/277
+++ b/tests/generic/277
@@ -44,6 +44,8 @@ _supported_fs generic
_supported_os Linux
_require_scratch

+[ "$FSTYP" = "tmpfs" ] && _notrun "not applicable for the tmpfs file system"
+
_scratch_mkfs > /dev/null 2>&1
_scratch_mount

--
1.8.5.1