Some of the newer verity tests don't work properly on systems where
fs.verity.require_signatures is enabled, either because they forget to
disable it at the beginning of the test, or they forget to re-enable it
afterwards, or both. Fix this.
Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
. ./common/filter
. ./common/verity
+# Override the default cleanup function.
+_cleanup()
+{
+ cd /
+ _restore_fsverity_signatures
+ rm -f $tmp.*
+}
+
# real QA test starts here
_supported_fs btrfs
_require_scratch_verity
_require_xfs_io_command "pread"
_require_xfs_io_command "pwrite"
_require_btrfs_corrupt_block
+_disable_fsverity_signatures
get_ino() {
local file=$1
rm -f $img
$LVM_PROG vgremove -f -y $vgname >>$seqres.full 2>&1
losetup -d $loop_dev >>$seqres.full 2>&1
+ _restore_fsverity_signatures
}
# Import common functions.
_require_scratch_verity
_require_btrfs_command inspect-internal dump-tree
_require_test_program "log-writes/replay-log"
+_disable_fsverity_signatures
sync_loop() {
i=$1
. ./common/preamble
_begin_fstest auto quick verity
+# Override the default cleanup function.
+_cleanup()
+{
+ cd /
+ _restore_fsverity_signatures
+ rm -f $tmp.*
+}
+
. ./common/filter
. ./common/verity
. ./common/preamble
_begin_fstest auto quick verity
+# Override the default cleanup function.
+_cleanup()
+{
+ cd /
+ _restore_fsverity_signatures
+ rm -f $tmp.*
+}
# Import common functions.
. ./common/filter
_require_math
_require_scratch_verity
_require_fsverity_max_file_size_limit
+_disable_fsverity_signatures
_scratch_mkfs_verity &>> $seqres.full
_scratch_mount