Message ID | 936037a6c2bcf5553145862c5358e175621983b0.1696969376.git.josef@toxicpanda.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fstests: fscrypt test updates | expand |
On Tue, Oct 10, 2023 at 04:26:05PM -0400, Josef Bacik wrote: > I noticed we don't run fsstress with fscrypt in any of our tests, and > this was helpful in uncovering a couple of symlink related corner cases > for the btrfs support work. Add a basic test that creates a encrypted > directory and runs fsstress in that directory. > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> > --- > tests/generic/736 | 38 ++++++++++++++++++++++++++++++++++++++ > tests/generic/736.out | 3 +++ > 2 files changed, 41 insertions(+) > create mode 100644 tests/generic/736 > create mode 100644 tests/generic/736.out This might be worth adding, but the way this sort of thing is tested on other filesystems is through implementing the test_dummy_encryption mount option and then doing a full run of xfstests with test_dummy_encryption enabled. That's more comprehensive than just running fsstress. - Eric
On 10/11/23 04:26, Josef Bacik wrote: > I noticed we don't run fsstress with fscrypt in any of our tests, and > this was helpful in uncovering a couple of symlink related corner cases > for the btrfs support work. Add a basic test that creates a encrypted > directory and runs fsstress in that directory. > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> Looks good. Reviewed-by: Anand Jain <anand.jain@oracle.com>
diff --git a/tests/generic/736 b/tests/generic/736 new file mode 100644 index 00000000..0ef37d7e --- /dev/null +++ b/tests/generic/736 @@ -0,0 +1,38 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright 2023 Meta +# +# FS QA Test No. generic/5736 +# +# Run fscrypt on an encrypted directory +# + +. ./common/preamble +_begin_fstest auto quick encrypt +echo + +# Import common functions. +. ./common/filter +. ./common/encrypt + +# real QA test starts here +_supported_fs generic +_require_scratch_encryption -v 2 + +_scratch_mkfs_encrypted &>> $seqres.full +_scratch_mount + +dir=$SCRATCH_MNT/dir +mkdir $dir + +_set_encpolicy $dir $TEST_KEY_IDENTIFIER +_add_enckey $SCRATCH_MNT "$TEST_RAW_KEY" + +args=$(_scale_fsstress_args -p 4 -n 10000 -p 2 $FSSTRESS_AVOID -d $dir) +echo "Run fsstress $args" >>$seqres.full + +$FSSTRESS_PROG $args >> $seqres.full + +# success, all done +status=0 +exit diff --git a/tests/generic/736.out b/tests/generic/736.out new file mode 100644 index 00000000..022754df --- /dev/null +++ b/tests/generic/736.out @@ -0,0 +1,3 @@ +QA output created by 736 + +Added encryption key with identifier 69b2f6edeee720cce0577937eb8a6751
I noticed we don't run fsstress with fscrypt in any of our tests, and this was helpful in uncovering a couple of symlink related corner cases for the btrfs support work. Add a basic test that creates a encrypted directory and runs fsstress in that directory. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- tests/generic/736 | 38 ++++++++++++++++++++++++++++++++++++++ tests/generic/736.out | 3 +++ 2 files changed, 41 insertions(+) create mode 100644 tests/generic/736 create mode 100644 tests/generic/736.out