1test_description="e2undo a non-undo file" 2if test -x $E2UNDO_EXE; then 3 4TDB_FILE=${TMPDIR:-/tmp}/tune2fs-$(basename $TMPFILE).e2undo 5OUT=$test_name.log 6rm -f $TDB_FILE >/dev/null 2>&1 7 8dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1 9dd if=/dev/zero of=$TDB_FILE bs=1k count=512 > /dev/null 2>&1 10 11crc0=`$CRCSUM $TMPFILE` 12echo $CRCSUM before e2undo $crc0 > $OUT 13 14od -tx1 -Ad -c < $TDB_FILE >> $OUT 15 16$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1 17crc3=`$CRCSUM $TMPFILE` 18echo $CRCSUM after e2undo $crc3 >> $OUT 19 20if [ $crc3 = $crc0 ]; then 21 echo "$test_name: $test_description: ok" 22 touch $test_name.ok 23else 24 ln -f $test_name.log $test_name.failed 25 echo "$test_name: $test_description: failed" 26fi 27rm -f $TDB_FILE $TMPFILE 28fi 29