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 rm -f $OUT.new 14 15 echo mke2fs -q -t ext4 -F -o Linux -b 1024 $TMPFILE 1G >> $OUT.new 16 $MKE2FS -q -t ext4 -F -o Linux -b 1024 $TMPFILE 1G >> $OUT.new 2>&1 17 18 echo "tune2fs -f -O ^uninit_bg $TMPFILE" >> $OUT.new 19 $TUNE2FS -f -O ^uninit_bg $TMPFILE >> $OUT.new 2>&1 20 21 echo " " >> $OUT.new 22 echo fsck $FSCK_OPT -N test_filesys test.img >> $OUT.new 23 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1 24 25 echo " " >> $OUT.new 26 cp /dev/null $TMPFILE 27 echo mke2fs -q -t ext4 -O bigalloc -F -o Linux -b 1024 -C 8192 $TMPFILE 10G >> $OUT.new 28 $MKE2FS -q -t ext4 -O bigalloc -F -o Linux -b 1024 -C 8192 $TMPFILE 10G >> $OUT.new 2>&1 29 30 echo "tune2fs -f -O ^uninit_bg $TMPFILE" >> $OUT.new 31 $TUNE2FS -f -O ^uninit_bg $TMPFILE >> $OUT.new 2>&1 32 33 echo " " >> $OUT.new 34 echo fsck $FSCK_OPT -N test_filesys test.img >> $OUT.new 35 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1 36 37 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT 38 39 rm -f $OUT.new $TMPFILE 40 41 # 42 # Do the verification 43 # 44 45 cmp -s $OUT $EXP 46 status=$? 47 48 if [ "$status" = 0 ] ; then 49 echo "$test_name: $test_description: ok" 50 touch $test_name.ok 51 else 52 echo "$test_name: $test_description: failed" 53 diff $DIFF_OPTS $EXP $OUT > $test_name.failed 54 fi 55 56 unset IMAGE FSCK_OPT OUT EXP 57