summaryrefslogtreecommitdiff
path: root/tests/f_resize_inode/script
diff options
context:
space:
mode:
Diffstat (limited to 'tests/f_resize_inode/script')
-rw-r--r--tests/f_resize_inode/script48
1 files changed, 22 insertions, 26 deletions
diff --git a/tests/f_resize_inode/script b/tests/f_resize_inode/script
index ca934e9e..190871b4 100644
--- a/tests/f_resize_inode/script
+++ b/tests/f_resize_inode/script
@@ -1,10 +1,10 @@
if test -x $DEBUGFS_EXE; then
-printf "e2fsck with resize_inode: "
+test_description="e2fsck with resize_inode"
FSCK_OPT=-yf
OUT=$test_name.log
if [ -f $test_dir/expect.gz ]; then
- EXP=tmp_expect
+ EXP=$test_name.tmp
gunzip < $test_dir/expect.gz > $EXP1
else
EXP=$test_dir/expect
@@ -15,15 +15,13 @@ cp /dev/null $OUT
dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
echo mke2fs -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384 > $OUT
-$MKE2FS -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 2>&1 \
- | sed -e '1d' | grep -v "automatically checked" |
- grep -v 'Discarding device blocks' |
- grep -v "whichever comes first" >> $OUT
+$MKE2FS -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 2>&1 |
+ sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
rm -f $OUT.new
echo ----------------------------------------------- >> $OUT
@@ -33,18 +31,18 @@ echo "debugfs -R ''set_inode_field <7> block[2] 42'' -w test.img" > $OUT.new
$DEBUGFS -R "set_inode_field <7> block[2] 42" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '2d' $OUT.new >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
echo ----------------------------------------------- >> $OUT
@@ -54,18 +52,18 @@ echo "debugfs -R ''clri <7>'' -w test.img" > $OUT.new
$DEBUGFS -R "clri <7>" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '2d' $OUT.new >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
echo ----------------------------------------------- >> $OUT
@@ -75,18 +73,18 @@ echo "debugfs -R ''set_inode_field <7> bmap[524] 57'' -w test.img" > $OUT.new
$DEBUGFS -R "set_inode_field <7> bmap[524] 57" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '2d' $OUT.new >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
echo ----------------------------------------------- >> $OUT
@@ -96,12 +94,12 @@ echo "debugfs -R ''set_super_value reserved_gdt_blocks 15679'' -w test.img" > $O
$DEBUGFS -R "set_super_value reserved_gdt_blocks 15679" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '2d' $OUT.new >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
echo ----------------------------------------------- >> $OUT
@@ -111,30 +109,29 @@ echo "debugfs -R ''set_super_value reserved_gdt_blocks 32'' -w test.img" > $OUT.
$DEBUGFS -R "set_super_value reserved_gdt_blocks 32" -w $TMPFILE >> $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '2d' $OUT.new >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT.new 2>&1
status=$?
echo Exit status is $status >> $OUT.new
-sed -e '1d' $OUT.new | sed -e '/^JFS DEBUG:/d' | tr -d \\015 >> $OUT
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
rm -f $OUT.new
-rm -f $test_name.ok $test_name.failed
cmp -s $OUT $EXP
status=$?
if [ "$status" = 0 ] ; then
- echo "ok"
+ echo "$test_name: $test_description: ok"
touch $test_name.ok
else
- echo "failed"
+ echo "$test_name: $test_description: failed"
diff $DIFF_OPTS $EXP $OUT > $test_name.failed
rm -f tmp_expect
fi
@@ -142,6 +139,5 @@ fi
unset IMAGE FSCK_OPT OUT EXP
else #if test -x $DEBUGFS_EXE; then
- rm -f $test_name.ok $test_name.failed
- echo "skipped"
+ echo "$test_name: $test_description: skipped"
fi