• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1test_description="remove missing external journal device"
2OUT=$test_name.log
3
4dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
5
6echo mke2fs -q -F -o Linux -b 1024 $TMPFILE >> $OUT
7$MKE2FS -q -F -o Linux -I 128 -b 1024 $TMPFILE >> $OUT 2>&1
8
9echo "debugfs add journal device/UUID" >> $OUT
10$DEBUGFS -w -f - $TMPFILE <<- EOF >> $OUT 2>&1
11	feature has_journal
12	ssv journal_dev 0x9999
13	ssv journal_uuid 1db3f677-6832-4adb-bafc-8e4059c30a33
14EOF
15
16echo "tune2fs -f -O ^has_journal $TMPFILE" >> $OUT
17$TUNE2FS -f -O ^has_journal $TMPFILE >> $OUT 2>&1
18$DUMPE2FS -h $TMPFILE >> $OUT 2>&1
19if [ "$(grep 'Journal UUID:' $OUT)" ]; then
20	mv $test_name.log $test_name.failed
21	echo "$test_name: $test_description: failed"
22else
23	echo "$test_name: $test_description: ok"
24	mv $test_name.log $test_name.ok
25fi
26rm -f $TMPFILE
27