1 test_description="e2fsck with resize_inode"
2 if ! test -x $DEBUGFS_EXE; then
3 echo "$test_name: $test_description: skipped (no debugfs)"
9 if [ -f $test_dir/expect.gz ]; then
11 gunzip < $test_dir/expect.gz > $EXP1
16 dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
18 echo mke2fs -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384 > $OUT.new
19 $MKE2FS -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 >> $OUT.new 2>&1
21 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
23 echo Exit status is $status >> $OUT.new
25 echo ----------------------------------------------- >> $OUT.new
28 echo "debugfs -R ''set_inode_field <7> block[2] 42'' -w test.img" >> $OUT.new
29 $DEBUGFS -R "set_inode_field <7> block[2] 42" -w $TMPFILE >> $OUT.new 2>&1
31 echo Exit status is $status >> $OUT.new
33 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
35 echo Exit status is $status >> $OUT.new
37 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
39 echo Exit status is $status >> $OUT.new
41 echo ----------------------------------------------- >> $OUT.new
44 echo "debugfs -R ''clri <7>'' -w test.img" >> $OUT.new
45 $DEBUGFS -R "clri <7>" -w $TMPFILE >> $OUT.new 2>&1
47 echo Exit status is $status >> $OUT.new
49 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
51 echo Exit status is $status >> $OUT.new
53 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
55 echo Exit status is $status >> $OUT.new
57 echo ----------------------------------------------- >> $OUT.new
60 echo "debugfs -R ''set_inode_field <7> bmap[524] 57'' -w test.img" >> $OUT.new
61 $DEBUGFS -R "set_inode_field <7> bmap[524] 57" -w $TMPFILE >> $OUT.new 2>&1
63 echo Exit status is $status >> $OUT.new
65 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
67 echo Exit status is $status >> $OUT.new
69 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
71 echo Exit status is $status >> $OUT.new
73 echo ----------------------------------------------- >> $OUT.new
76 echo "debugfs -R ''set_super_value reserved_gdt_blocks 15679'' -w test.img" >> $OUT.new
77 $DEBUGFS -R "set_super_value reserved_gdt_blocks 15679" -w $TMPFILE >> $OUT.new 2>&1
79 echo Exit status is $status >> $OUT.new
81 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
83 echo Exit status is $status >> $OUT.new
85 echo ----------------------------------------------- >> $OUT.new
88 echo "debugfs -R ''set_super_value reserved_gdt_blocks 32'' -w test.img" >> $OUT.new
89 $DEBUGFS -R "set_super_value reserved_gdt_blocks 32" -w $TMPFILE >> $OUT.new 2>&1
91 echo Exit status is $status >> $OUT.new
93 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
95 echo Exit status is $status >> $OUT.new
97 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
99 echo Exit status is $status >> $OUT.new
100 sed -f $cmd_dir/filter.sed $OUT.new > $OUT
106 if [ "$status" = 0 ] ; then
107 echo "$test_name: $test_description: ok"
110 echo "$test_name: $test_description: failed"
111 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
115 unset IMAGE FSCK_OPT OUT EXP