Home | History | Annotate | Download | only in j_long_revoke_trans_mcsum_64bit
      1 if test -x $DEBUGFS_EXE; then
      2 
      3 FSCK_OPT=-fy
      4 OUT=$test_name.log
      5 if [ -f $test_dir/expect.gz ]; then
      6 	EXP=$test_name.tmp
      7 	gunzip < $test_dir/expect.gz > $EXP1
      8 else
      9 	EXP=$test_dir/expect
     10 fi
     11 
     12 cp /dev/null $OUT
     13 
     14 $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
     15 
     16 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
     17 status=$?
     18 echo Exit status is $status >> $OUT.new
     19 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
     20 rm -f $OUT.new
     21 
     22 $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
     23 
     24 echo "debugfs write journal" >> $OUT
     25 echo "jo -c" > $TMPFILE.cmd
     26 echo "jw -b 262-4358 /dev/zero" >> $TMPFILE.cmd
     27 echo "jc" >> $TMPFILE.cmd
     28 echo "jo" >> $TMPFILE.cmd
     29 echo "jw -r 262-4358" >> $TMPFILE.cmd
     30 echo "jc" >> $TMPFILE.cmd
     31 #$DEBUGFS_EXE -w $TMPFILE -f $TMPFILE.cmd >> $OUT 2>&1
     32 $DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
     33 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
     34 rm -rf $OUT.new
     35 
     36 $DUMPE2FS $TMPFILE 2>&1 | grep '^Journal features:' >> $OUT
     37 
     38 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
     39 echo "logdump -c" > $TMPFILE.cmd
     40 $DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
     41 rm -rf $TMPFILE.cmd
     42 
     43 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
     44 status=$?
     45 echo Exit status is $status >> $OUT.new
     46 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
     47 rm -f $OUT.new
     48 
     49 rm -f $TMPFILE
     50 
     51 cmp -s $OUT $EXP
     52 status=$?
     53 
     54 if [ "$status" = 0 ] ; then
     55 	echo "$test_name: $test_description: ok"
     56 	touch $test_name.ok
     57 else
     58 	echo "$test_name: $test_description: failed"
     59 	diff $DIFF_OPTS $EXP $OUT > $test_name.failed
     60 	rm -f $test_name.tmp
     61 fi
     62 
     63 unset IMAGE FSCK_OPT OUT EXP
     64 
     65 else #if test -x $DEBUGFS_EXE; then
     66 	echo "$test_name: $test_description: skipped"
     67 fi
     68