1 if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
2 echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
6 IMAGE=$test_dir/image.gz
11 gunzip < $IMAGE > $TMPFILE
13 echo "resize2fs test" > $OUT
15 # Look at existing inline extended attribute
16 echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT
17 $DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT
19 echo Exit status is $status >> $OUT
22 echo "resize2fs test.img 5M" >> $OUT
23 $RESIZE2FS $TMPFILE 5M 2>&1 >> $OUT.new 2>&1
25 echo Exit status is $status >> $OUT.new
26 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
28 # Look at inline extended attribute in resized fs
29 echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT
30 $DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT
32 echo Exit status is $status >> $OUT
43 if [ "$status" = 0 ] ; then
44 echo "$test_name: $test_description: ok"
47 echo "$test_name: $test_description: failed"
48 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
51 unset IMAGE FSCK_OPT OUT EXP