1test_description="enable csum seed via tune2fs" 2 3trap "rm -rf $TMPFILE $TMPFILE.conf" EXIT INT QUIT 4dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1 5OUT=$test_name.log 6EXP=$test_dir/expect 7rm -rf $OUT 8 9# Test command line option 10echo "create fs without csum_seed" >> $OUT 11$MKE2FS -O metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1 12$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT 13 14echo "turn on csum_seed" >> $OUT 15$TUNE2FS -O metadata_csum_seed $TMPFILE > /dev/null 2>&1 16$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT 17 18echo "change uuid" >> $OUT 19$TUNE2FS -U 1dd136c6-e47a-4833-9bf5-519f8aacabe4 $TMPFILE > /dev/null 2>&1 20$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT 21 22echo "check filesystem" >> $OUT 23$FSCK $FSCK_OPT -fy $TMPFILE > /dev/null 2>&1 24echo "fsck returns $?" >> $OUT 25$DUMPE2FS $TMPFILE 2>&1 | egrep '(Checksum seed:|UUID)' >> $OUT 26 27cmp -s $OUT $EXP 28status=$? 29 30if [ "$status" = 0 ] ; then 31 echo "$test_name: $test_description: ok" 32 touch $test_name.ok 33else 34 echo "$test_name: $test_description: failed" 35 diff $DIFF_OPTS $EXP $OUT > $test_name.failed 36 rm -f $test_name.tmp 37fi 38 39