ceph: skip ceph/001-ceph/003 if test_dummy_encryption is enabled.
Some tests on ceph require changing the layout of new files, which is
forbidden when the files are encrypted. Skip these tests if the
test_dummy_encryption mount option is being used.
Cc: Luis Henriques <lhenriques@suse.de>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
diff --git a/common/rc b/common/rc
index 7973ceb..6e233fc 100644
--- a/common/rc
+++ b/common/rc
@@ -3844,14 +3844,14 @@
# "opt1 opt2 opt3"
_normalize_mount_options()
{
- echo $MOUNT_OPTIONS | sed -n 's/-o\s*\(\S*\)/\1/gp'| sed 's/,/ /g'
+ echo "$1" | sed -n 's/-o\s*\(\S*\)/\1/gp'| sed 's/,/ /g'
}
-# skip test if MOUNT_OPTIONS contains the given strings
+# skip test if argument contains the given strings
# Both dax and dax=always are excluded if dax or dax=always is passed
-_exclude_scratch_mount_option()
+_exclude_mount_option()
{
- local mnt_opts=$(_normalize_mount_options)
+ local mnt_opts=$(_normalize_mount_options $1)
while [ $# -gt 0 ]; do
local pattern=$1
@@ -3864,6 +3864,16 @@
done
}
+_exclude_scratch_mount_option()
+{
+ _exclude_mount_option "$MOUNT_OPTIONS"
+}
+
+_exclude_test_mount_option()
+{
+ _exclude_mount_option "$TEST_FS_MOUNT_OPTS"
+}
+
_require_atime()
{
_exclude_scratch_mount_option "noatime"
diff --git a/tests/ceph/001 b/tests/ceph/001
index c00de30..5a82856 100755
--- a/tests/ceph/001
+++ b/tests/ceph/001
@@ -22,6 +22,7 @@
_supported_fs ceph
_require_xfs_io_command "copy_range"
+_exclude_test_mount_option "test_dummy_encryption"
_require_attrs
_require_test
diff --git a/tests/ceph/002 b/tests/ceph/002
index 9bc728f..ac3d65b 100755
--- a/tests/ceph/002
+++ b/tests/ceph/002
@@ -30,6 +30,7 @@
_supported_fs ceph
_require_xfs_io_command "copy_range"
+_exclude_test_mount_option "test_dummy_encryption"
_require_attrs
_require_test
diff --git a/tests/ceph/003 b/tests/ceph/003
index faedb48..2d6cb39 100755
--- a/tests/ceph/003
+++ b/tests/ceph/003
@@ -18,6 +18,7 @@
_supported_fs ceph
_require_xfs_io_command "copy_range"
+_exclude_test_mount_option "test_dummy_encryption"
_require_attrs
_require_test