| 1 |
FSCK_OPT=-fn |
| 2 |
OUT=$test_name.log |
| 3 |
EXP=$test_dir/expect |
| 4 |
CONF=$TMPFILE.conf |
| 5 |
|
| 6 |
#gzip -d < $EXP.gz > $EXP |
| 7 |
|
| 8 |
cat > $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 |
} |
| 22 |
ENDL |
| 23 |
|
| 24 |
echo "mke2fs -F -T ext4h -I 128 test.img 786432" > $OUT |
| 25 |
MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -I 128 $TMPFILE 786432 >> $OUT 2>&1 |
| 26 |
rm -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 |
| 30 |
status=$? |
| 31 |
echo Exit status is $status >> $OUT |
| 32 |
|
| 33 |
rm $TMPFILE |
| 34 |
|
| 35 |
# |
| 36 |
# Do the verification |
| 37 |
# |
| 38 |
|
| 39 |
sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new |
| 40 |
mv $OUT.new $OUT |
| 41 |
|
| 42 |
cmp -s $OUT $EXP |
| 43 |
status=$? |
| 44 |
|
| 45 |
if [ "$status" = 0 ] ; then |
| 46 |
echo "$test_name: $test_description: ok" |
| 47 |
touch $test_name.ok |
| 48 |
else |
| 49 |
echo "$test_name: $test_description: failed" |
| 50 |
diff $DIFF_OPTS $EXP $OUT > $test_name.failed |
| 51 |
fi |
| 52 |
|
| 53 |
unset IMAGE FSCK_OPT OUT EXP CONF |