1test_description="e2undo with mke2fs -z and non-32k-aligned bdev size" 2if test -x $E2UNDO_EXE; then 3 4TDB_FILE=${TMPDIR:-/tmp}/mke2fs-$(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 9yes "abc123abc123abc" | dd bs=1k count=8 >> $TMPFILE 2> /dev/null 10 11crc0=`$CRCSUM $TMPFILE` 12echo $CRCSUM before mke2fs $crc0 > $OUT 13 14echo using mke2fs to test e2undo >> $OUT 15$MKE2FS -q -F -o Linux -T ext4 -E lazy_itable_init=1 -b 1024 -z $TDB_FILE $TMPFILE >> $OUT 2>&1 16crc1=`$CRCSUM $TMPFILE` 17echo $CRCSUM after mke2fs $crc1 >> $OUT 18 19$E2UNDO $TDB_FILE $TMPFILE >> $OUT 2>&1 20crc2=`$CRCSUM $TMPFILE` 21echo $CRCSUM after e2undo $crc2 >> $OUT 22 23if [ $crc0 = $crc2 ] && [ $crc1 != $crc2 ]; then 24 echo "$test_name: $test_description: ok" 25 touch $test_name.ok 26else 27 ln -f $test_name.log $test_name.failed 28 echo "$test_name: $test_description: failed" 29fi 30rm -f $TDB_FILE $TMPFILE 31fi 32