1 test_description="remove uninit_bg" 2 OUT=$test_name.log 3 FSCK_OPT=-yf 4 EXP=$test_dir/expect 5 6 if [ $(uname -s) = "Darwin" ]; then 7 # creates a 10GB filesystem 8 echo "$test_name: $DESCRIPTION: skipped for HFS+ (no sparse files)" 9 return 0 10 fi 11 12 cp /dev/null $TMPFILE 13 14 echo mke2fs -q -t ext4 -F -o Linux -b 1024 test.img 1G > $OUT.new 15 $MKE2FS -q -t ext4 -F -o Linux -b 1024 $TMPFILE 1G >> $OUT.new 2>&1 16 17 echo "tune2fs -f -O ^uninit_bg test.img" >> $OUT.new 18 $TUNE2FS -f -O ^uninit_bg $TMPFILE >> $OUT.new 2>&1 19 20 echo " " >> $OUT.new 21 echo fsck $FSCK_OPT -N test_filesys test.img >> $OUT.new 22 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1 23 24 echo " " >> $OUT.new 25 cp /dev/null $TMPFILE 26 echo mke2fs -q -t ext4 -O bigalloc -F -o Linux -b 1024 -C 8192 test.img 10G >> $OUT.new 27 $MKE2FS -q -t ext4 -O bigalloc -F -o Linux -b 1024 -C 8192 $TMPFILE 10G >> $OUT.new 2>&1 28 29 echo "tune2fs -f -O ^uninit_bg test.img" >> $OUT.new 30 $TUNE2FS -f -O ^uninit_bg $TMPFILE >> $OUT.new 2>&1 31 32 echo " " >> $OUT.new 33 echo fsck $FSCK_OPT -N test_filesys test.img >> $OUT.new 34 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1 35 sed -f $cmd_dir/filter.sed < $OUT.new > $OUT 36 37 rm -f $TMPFILE $OUT.new 38 39 # 40 # Do the verification 41 # 42 43 cmp -s $OUT $EXP 44 status=$? 45 46 if [ "$status" = 0 ] ; then 47 echo "$test_name: $test_description: ok" 48 touch $test_name.ok 49 else 50 echo "$test_name: $test_description: failed" 51 diff $DIFF_OPTS $EXP $OUT > $test_name.failed 52 fi 53 54 unset IMAGE FSCK_OPT OUT EXP 55