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.new
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.new
17 $DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT.new
19 echo Exit status is $status >> $OUT.new
22 echo "resize2fs test.img 5M" >> $OUT.new
23 $RESIZE2FS $TMPFILE 5M >> $OUT.new 2>&1
25 echo Exit status is $status >> $OUT.new
27 # Look at inline extended attribute in resized fs
28 echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT.new
29 $DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT.new
31 echo Exit status is $status >> $OUT.new
33 sed -f $cmd_dir/filter.sed < $OUT.new > $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