summaryrefslogtreecommitdiffstats
path: root/tests/t_ext_jnl_rm/script
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:49:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:49:25 +0000
commit464df1d5e5ab1322e2dd0a7796939fff1aeefa9a (patch)
tree6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /tests/t_ext_jnl_rm/script
parentInitial commit. (diff)
downloade2fsprogs-464df1d5e5ab1322e2dd0a7796939fff1aeefa9a.tar.xz
e2fsprogs-464df1d5e5ab1322e2dd0a7796939fff1aeefa9a.zip
Adding upstream version 1.47.0.upstream/1.47.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/t_ext_jnl_rm/script')
-rw-r--r--tests/t_ext_jnl_rm/script26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/t_ext_jnl_rm/script b/tests/t_ext_jnl_rm/script
new file mode 100644
index 0000000..b2af80c
--- /dev/null
+++ b/tests/t_ext_jnl_rm/script
@@ -0,0 +1,26 @@
+test_description="remove missing external journal device"
+OUT=$test_name.log
+
+dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
+
+echo mke2fs -q -F -o Linux -b 1024 $TMPFILE >> $OUT
+$MKE2FS -q -F -o Linux -I 128 -b 1024 $TMPFILE >> $OUT 2>&1
+
+echo "debugfs add journal device/UUID" >> $OUT
+$DEBUGFS -w -f - $TMPFILE <<- EOF >> $OUT 2>&1
+ feature has_journal
+ ssv journal_dev 0x9999
+ ssv journal_uuid 1db3f677-6832-4adb-bafc-8e4059c30a33
+EOF
+
+echo "tune2fs -f -O ^has_journal $TMPFILE" >> $OUT
+$TUNE2FS -f -O ^has_journal $TMPFILE >> $OUT 2>&1
+$DUMPE2FS -h $TMPFILE >> $OUT 2>&1
+if [ "$(grep 'Journal UUID:' $OUT)" ]; then
+ mv $test_name.log $test_name.failed
+ echo "$test_name: $test_description: failed"
+else
+ echo "$test_name: $test_description: ok"
+ mv $test_name.log $test_name.ok
+fi
+rm -f $TMPFILE