[PATCH 08/12] fstests: properly test for v1 encryption policies in encrypt tests

Daniel Vacek <[email protected]>
Newsgroups org.kernel.vger.linux-xfs,net.sourceforge.lists.linux-f2fs-devel,org.kernel.vger.fstests,org.kernel.vger.linux-btrfs,org.kernel.vger.linux-ext4,org.kernel.vger.linux-fscrypt
Message-ID <[email protected]>
From: Josef Bacik <[email protected]>

With btrfs adding fscrypt support we're limiting the usage to plain
v2 policies only.  This means we need to update the _require's for
generic/593 that tests both v1 and v2 policies.  The other sort of
tests will be split into two tests in later patches.

Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: Daniel Vacek <[email protected]>
---
 common/encrypt    | 2 ++
 tests/generic/593 | 1 +
 2 files changed, 3 insertions(+)

diff --git a/common/encrypt b/common/encrypt
index 81c3d032..4c3fd904 100644
--- a/common/encrypt
+++ b/common/encrypt
@@ -68,6 +68,8 @@ _require_scratch_encryption()
 	# policy required by the test.
 	if [ $# -ne 0 ]; then
 		_require_encryption_policy_support $SCRATCH_MNT "$@"
+	else
+		_require_encryption_policy_support $SCRATCH_MNT -v 1
 	fi
 
 	_scratch_unmount
diff --git a/tests/generic/593 b/tests/generic/593
index 05f868f9..a80c28f2 100755
--- a/tests/generic/593
+++ b/tests/generic/593
@@ -15,6 +15,7 @@ _begin_fstest auto quick encrypt
 . ./common/filter
 . ./common/encrypt
 
+_require_scratch_encryption -v 1
 _require_scratch_encryption -v 2
 _require_command "$KEYCTL_PROG" keyctl
 
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.