1FSCK_OPT=-fn 2OUT=$test_name.log 3EXP=$test_dir/expect 4CONF=$TMPFILE.conf 5 6#gzip -d < $EXP.gz > $EXP 7 8cat > $CONF << ENDL 9[fs_types] 10 ext4h = { 11 features = has_journal,extent,huge_file,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,^resize_inode,^meta_bg,^flex_bg,64bit 12 blocksize = 1024 13 inode_size = 256 14 make_hugefiles = true 15 hugefiles_dir = / 16 hugefiles_slack = 12000K 17 hugefiles_name = aaaaa 18 hugefiles_digits = 4 19 hugefiles_size = 117K 20 zero_hugefiles = false 21 } 22ENDL 23 24echo "mke2fs -F -T ext4h -I 128 test.img 786432" > $OUT 25MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -I 128 $TMPFILE 786432 >> $OUT 2>&1 26rm -f $CONF 27 28# dump and check. if we get this far, we succeeded... 29$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1 30status=$? 31echo Exit status is $status >> $OUT 32 33rm $TMPFILE 34 35# 36# Do the verification 37# 38 39sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new 40mv $OUT.new $OUT 41 42cmp -s $OUT $EXP 43status=$? 44 45if [ "$status" = 0 ] ; then 46 echo "$test_name: $test_description: ok" 47 touch $test_name.ok 48else 49 echo "$test_name: $test_description: failed" 50 diff $DIFF_OPTS $EXP $OUT > $test_name.failed 51fi 52 53unset IMAGE FSCK_OPT OUT EXP CONF 54