2 if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then
3 # creates a 96GB filesystem
4 echo "$test_name: $test_description: skipped for $os"
8 if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
9 echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
15 if [ -f $test_dir/expect.gz ]; then
17 gunzip < $test_dir/expect.gz > $EXP1
22 dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
24 echo mke2fs -q -F -o Linux -b 1024 -i 1024 -E stride=8192 -t ext4 test.img 1024000 > $OUT
25 $MKE2FS -q -F -o Linux -b 1024 -i 1024 -E stride=8192 -t ext4 \
26 $TMPFILE 1024000 >> $OUT 2>&1
28 echo resize2fs -p test.img 10240000 >> $OUT
29 $RESIZE2FS -p $TMPFILE 100000000 >> $OUT 2>&1
31 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
33 echo Exit status is $status >> $OUT
35 $DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
36 $DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
37 $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
38 $TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
40 echo dumpe2fs -h test.img >> $OUT
41 $DUMPE2FS -h $TMPFILE >> $OUT 2>&1
42 sed -f $cmd_dir/filter.sed -e '/Block bitmap.*$/N;s/\n Inode bitmap/, Inode bitmap/g' < $OUT > $OUT.new
49 if [ "$status" = 0 ] ; then
50 echo "$test_name: $test_description: ok"
53 echo "$test_name: $test_description: failed"
54 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
58 unset IMAGE FSCK_OPT OUT EXP