1if test -x $RESIZE2FS_EXE; then 2 3IMAGE=$test_dir/image.gz 4FSCK_OPT=-yf 5OUT=$test_name.log 6EXP=$test_dir/expect 7 8gunzip < $IMAGE > $TMPFILE 9 10echo "resize2fs test" > $OUT 11 12# Look at existing inline extended attribute 13echo "debugfs -R ''stat file'' $TMPFILE 2>&1 | grep ''^Inode\|in inode body\|name = ''" >> $OUT 14$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|name = " >> $OUT 15status=$? 16echo Exit status is $status >> $OUT 17 18# resize it 19echo "resize2fs $TMPFILE 5M" >> $OUT 20$RESIZE2FS $TMPFILE 5M 2>&1 >> $OUT.new 2>&1 21status=$? 22echo Exit status is $status >> $OUT.new 23sed -e '1d' $OUT.new >> $OUT 24 25# Look at inline extended attribute in resized fs 26echo "debugfs -R ''stat file'' $TMPFILE 2>&1 | grep ''^Inode\|in inode body\|name = ''" >> $OUT 27$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|name = " >> $OUT 28status=$? 29echo Exit status is $status >> $OUT 30 31rm $TMPFILE $OUT.new 32 33# 34# Do the verification 35# 36 37rm -f $test_name.ok $test_name.failed 38cmp -s $OUT $EXP 39status=$? 40 41if [ "$status" = 0 ] ; then 42 echo "ok" 43 touch $test_name.ok 44else 45 echo "failed" 46 diff $DIFF_OPTS $EXP $OUT > $test_name.failed 47fi 48 49unset IMAGE FSCK_OPT OUT EXP 50 51else #if test -x $RESIZE2FS; then 52 rm -f $test_name.ok $test_name.failed 53 echo "skipped" 54fi 55 56