1 if test -x $RESIZE2FS_EXE; then
5 if [ -f $test_dir/expect.gz ]; then
7 gunzip < $test_dir/expect.gz > $EXP1
14 dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
16 echo mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384 > $OUT
17 $MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 2>&1 \
18 | sed -e '1d' | grep -v "automatically checked" |
19 grep -v "whichever comes first" >> $OUT
21 echo resize2fs test.img 65536 >> $OUT
22 $RESIZE2FS $TMPFILE 65536 2>&1 | sed -e '1d' >> $OUT
24 $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
26 echo Exit status is $status >> $OUT.new
27 sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
30 $DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
31 $DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
32 $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
33 $TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
35 echo dumpe2fs test.img >> $OUT
36 $DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
38 echo "--------------------------------" >> $OUT
40 dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
42 echo mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 65536 >> $OUT
43 $MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 65536 2>&1 \
44 | sed -e '1d' | grep -v "automatically checked" |
45 grep -v "whichever comes first" >> $OUT
47 echo resize2fs test.img 16384 >> $OUT
48 $RESIZE2FS $TMPFILE 16384 2>&1 | sed -e '1d' >> $OUT
50 $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
52 echo Exit status is $status >> $OUT.new
53 sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
56 $DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
57 $DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
58 $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
59 $TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
61 echo dumpe2fs test.img >> $OUT
62 $DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
64 echo "--------------------------------" >> $OUT
66 echo resize2fs test.img 165536 >> $OUT
67 $RESIZE2FS $TMPFILE 165536 2>&1 | sed -e '1d' >> $OUT
69 $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
71 echo Exit status is $status >> $OUT.new
72 sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
75 $DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
76 $DEBUGFS -R "set_super_value hash_seed null" -w $TMPFILE >/dev/null 2>&1
77 $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
78 $TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
80 echo dumpe2fs test.img >> $OUT
81 $DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
83 rm -f $test_name.ok $test_name.failed $TMPFILE
87 if [ "$status" = 0 ] ; then
92 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
96 unset IMAGE FSCK_OPT OUT EXP
98 else #if test -x $RESIZE2FS; then
99 rm -f $test_name.ok $test_name.failed