]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
tests: write f_badjour_encrypted output to log
authorAndreas Dilger <adilger@dilger.ca>
Wed, 5 Jun 2024 20:03:52 +0000 (14:03 -0600)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 24 Oct 2024 23:21:01 +0000 (19:21 -0400)
Write the mke2fs and debugfs output from f_badjour_encrypted/script
into a log file instead of stdout/stderr, so that it doesn't mess
up the "make check" output, and is available if this test ever fails.

   [ Fixed missing definition of $LOG -- TYT ]

Fixes: b0cd09e5 ("e2fsck: don't allow journal to have encrypt flag")
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Link: https://lore.kernel.org/r/20240605200408.55221-1-adilger@dilger.ca
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
tests/f_badjour_encrypted/script

index e6778f1df13f6142f14d6522d0e1b856334d110a..07a8b3dba0e1fc771398c290a35e05df9cd102fe 100644 (file)
@@ -3,9 +3,13 @@ if ! test -x $DEBUGFS_EXE; then
        return 0
 fi
 
-touch $TMPFILE
-$MKE2FS -t ext4 -b 1024 $TMPFILE 2M
-$DEBUGFS -w -R 'set_inode_field <8> flags 0x80800' $TMPFILE
+LOG=$test_name.log
+
+touch $TMPFILE >> $LOG 2>&1
+$MKE2FS -t ext4 -b 1024 $TMPFILE 2M >> $LOG 2>&1
+$DEBUGFS -w -R 'set_inode_field <8> flags 0x80800' $TMPFILE >> $LOG 2>&1
 
 SKIP_GUNZIP="true"
 . $cmd_dir/run_e2fsck
+
+unset LOG