3 if ! test -x $DEBUGFS_EXE; then
4 echo "$test_name: $test_description: skipped (no debugfs)"
8 IMAGE=$test_dir/image.gz
10 gzip -d < $IMAGE > $TMPFILE
11 #e2label $TMPFILE test_filesys
13 # Run fsck to fix things?
17 $FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 > $OUT.new
18 echo "Exit status is $?" >> $OUT.new
20 echo "debugfs cat uninit file" >> $OUT.new
21 echo "ex /a" > $TMPFILE.cmd
22 echo "cat /a" >> $TMPFILE.cmd
23 $DEBUGFS -w -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
25 sed -f $cmd_dir/filter.sed < $OUT.new > $OUT
26 rm -f $OUT.new $TMPFILE $TMPFILE.cmd
28 # Figure out what happened
29 if cmp -s $EXP $OUT; then
30 echo "$test_name: $test_description: ok"
33 echo "$test_name: $test_description: failed"
34 diff -u $EXP $OUT >> $test_name.failed
36 unset EXP OUT FSCK_OPT IMAGE