1 if ! test -x $DEBUGFS_EXE; then
2 echo "$test_name: $test_description: skipped (no debugfs)"
8 if [ -f $test_dir/expect.gz ]; then
10 gunzip < $test_dir/expect.gz > $EXP1
17 $MKE2FS -F -o Linux -b 1024 -O ^64bit,has_journal,metadata_csum -T ext4 $TMPFILE 524288 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT 2>&1
19 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
21 echo Exit status is $status >> $OUT.new
22 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
25 $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
27 echo "debugfs write journal" >> $OUT
28 echo "jo -c" > $TMPFILE.cmd
29 echo "jw -b 260-4356 /dev/zero" >> $TMPFILE.cmd
30 echo "jc" >> $TMPFILE.cmd
31 $DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
32 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
35 $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
37 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
38 echo "logdump -c" > $TMPFILE.cmd
39 $DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
42 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
44 echo Exit status is $status >> $OUT.new
45 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
53 if [ "$status" = 0 ] ; then
54 echo "$test_name: $test_description: ok"
57 echo "$test_name: $test_description: failed"
58 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
62 unset IMAGE FSCK_OPT OUT EXP