test_description="create/convert raw/qcow2 images" if test -x $E2IMAGE_EXE; then ORIG_IMAGES="image1024.orig image2048.orig image4096.orig" RAW_IMG=_image.raw QCOW2_IMG=_image.qcow2 QCOW2_TO_RAW=_image.qcow2.raw OUT=$test_name.log CRC=$SRCDIR/$test_name/$test_name.crc CRC_TMP=$test_name.crc.tmp rm -f $test_name/_image.* $CRC_TMP $OUT >/dev/null 2>&1 ( for i in $ORIG_IMAGES; do ORIG_IMG=$test_name/$i echo $ORIG_IMG >> $CRC_TMP bunzip2 < $SRCDIR/$ORIG_IMG.bz2 > $i echo "$($CRCSUM $i) $i" >> $CRC_TMP rm -f $RAW_IMG echo "e2image -r $ORIG_IMG $RAW_IMG" $E2IMAGE -r $i $RAW_IMG echo "$($CRCSUM $RAW_IMG) $RAW_IMG" >> $CRC_TMP echo "e2image -Q $ORIG_IMG $QCOW2_IMG" $E2IMAGE -Q $i $QCOW2_IMG echo "$($CRCSUM $QCOW2_IMG) $QCOW2_IMG" >> $CRC_TMP rm -f $QCOW2_TO_RAW echo "e2image -r $QCOW2_IMG $QCOW2_TO_RAW" $E2IMAGE -r $i $QCOW2_TO_RAW echo "$($CRCSUM $QCOW2_TO_RAW) $QCOW2_TO_RAW" >> $CRC_TMP rm -f $i done ) >> $OUT 2>&1 echo "checksum:" >> $OUT cat $CRC_TMP >> $OUT echo "" >> $OUT diff $CRC $CRC_TMP >> $OUT 2>&1 if [ $? -eq 0 ]; then echo "$test_name: $test_description: ok" touch $test_name.ok else ln -f $test_name.log $test_name.failed echo "$test_name: $test_description: failed" fi rm -f _image.* $CRC_TMP >/dev/null 2>&1 else #if test -x $E2IMAGE_EXE; then echo "$test_name: $test_description: skipped" fi