3 if [ "$(grep -c 'define HAVE_MAGIC_H' ../lib/config.h)" -eq 0 ]; then
4 echo "$test_name: skipped (no magic)"
9 IMAGE=$test_dir/image.bz2
11 bzip2 -d < $IMAGE > $TMPFILE
12 $DD if=/dev/zero of=$TMPFILE conv=notrunc oflag=append bs=1024k count=16 > /dev/null 2>&1
14 # Run fsck to fix things?
15 if [ -x $DEBUGFS_EXE ]; then
18 EXP=$test_dir/expect.nodebugfs
21 rm -rf $test_name.failed $test_name.ok
23 echo "*** e2fsck" > $OUT
24 $FSCK $FSCK_OPT $TMPFILE >> $OUT 2>&1
25 echo "*** debugfs" >> $OUT
26 test -x $DEBUGFS_EXE && $DEBUGFS -R 'quit' $TMPFILE >> $OUT 2>&1
27 echo "*** tune2fs" >> $OUT
28 $TUNE2FS -i 0 $TMPFILE >> $OUT 2>&1
29 echo "*** mke2fs" >> $OUT
30 $MKE2FS -n $TMPFILE >> $OUT 2>&1
32 sed -f $cmd_dir/filter.sed -e "s|$TMPFILE|test.img|g" < $OUT > $OUT.new
35 # Figure out what happened
36 if cmp -s $EXP $OUT; then
37 echo "$test_name: $test_description: ok"
40 echo "$test_name: $test_description: failed"
41 diff -u $EXP $OUT >> $test_name.failed
43 unset EXP OUT FSCK_OPT IMAGE