1 if [ $(uname -s) = "FreeBSD" ]; then
2 # creates a 96GB filesystem
3 echo "$test_name: $DESCRIPTION: skipped for FreeBSD (no sparse files)"
7 if [ $(uname -s) = "Darwin" ]; then
8 # creates a 96GB filesystem
9 echo "$test_name: $DESCRIPTION: skipped for HFS+ (no sparse files)"
13 if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
14 echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
20 if [ -f $test_dir/expect.gz ]; then
22 gunzip < $test_dir/expect.gz > $EXP1
29 dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
31 echo mke2fs -q -F -o Linux -b 1024 -i 1024 -O ^resize_inode -t ext4 test.img 1024000 > $OUT
32 $MKE2FS -q -F -o Linux -b 1024 -i 1024 -O ^resize_inode -t ext4 \
33 $TMPFILE 1024000 2>&1 |
34 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
36 echo resize2fs -p test.img 10240000 >> $OUT
37 $RESIZE2FS -p $TMPFILE 100000000 2>&1 |
38 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
40 $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
42 echo Exit status is $status >> $OUT.new
43 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
46 $DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
47 $DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
48 $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
49 $TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
51 echo dumpe2fs -h test.img >> $OUT
52 $DUMPE2FS -h $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' >> $OUT
59 if [ "$status" = 0 ] ; then
60 echo "$test_name: $test_description: ok"
63 echo "$test_name: $test_description: failed"
64 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
68 unset IMAGE FSCK_OPT OUT EXP