Home | History | Annotate | Download | only in j_ext_dumpe2fs
      1 FSCK_OPT=-fy
      2 OUT=$test_name.log
      3 if [ -f $test_dir/expect.gz ]; then
      4 	EXP=$test_name.tmp
      5 	gunzip < $test_dir/expect.gz > $EXP1
      6 else
      7 	EXP=$test_dir/expect
      8 fi
      9 
     10 gunzip < $test_dir/image.gz > $TMPFILE
     11 
     12 echo "e2fsck external journal" > $OUT.new
     13 $FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
     14 status=$?
     15 echo Exit status is $status >> $OUT.new
     16 
     17 echo "dumpe2fs external journal" >> $OUT.new
     18 $DUMPE2FS $TMPFILE >> $OUT.new 2>&1
     19 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
     20 rm -f $TMPFILE $OUT.new
     21 
     22 cmp -s $OUT $EXP
     23 status=$?
     24 
     25 if [ "$status" = 0 ] ; then
     26 	echo "$test_name: $test_description: ok"
     27 	touch $test_name.ok
     28 else
     29 	echo "$test_name: $test_description: failed"
     30 	diff $DIFF_OPTS $EXP $OUT > $test_name.failed
     31 	rm -f $test_name.tmp
     32 fi
     33 
     34 unset IMAGE FSCK_OPT OUT EXP
     35