aboutsummaryrefslogtreecommitdiffstats
path: root/tests/r_resize_inode
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2014-03-19 19:08:39 -0700
committerJP Abgrall <jpa@google.com>2014-03-19 19:08:39 -0700
commite0ed7404719a9ddd2ba427a80db5365c8bad18c0 (patch)
tree115ce4b0113994aa23ea22ae0c3ba7587b2eaeb3 /tests/r_resize_inode
parent893d0a0f84a0a9dc7cc37507f974f6a695af465f (diff)
downloadandroid_external_e2fsprogs-e0ed7404719a9ddd2ba427a80db5365c8bad18c0.tar.gz
android_external_e2fsprogs-e0ed7404719a9ddd2ba427a80db5365c8bad18c0.tar.bz2
android_external_e2fsprogs-e0ed7404719a9ddd2ba427a80db5365c8bad18c0.zip
Switch back to 1.42.9 now that there is a fix
Revert "Revert changes that moved from 1.41.14 to 1.42.9" This reverts commit 65f0aab98b20b5994a726ab90d355248bcddfffd.
Diffstat (limited to 'tests/r_resize_inode')
-rw-r--r--tests/r_resize_inode/expect19
-rw-r--r--tests/r_resize_inode/script44
2 files changed, 29 insertions, 34 deletions
diff --git a/tests/r_resize_inode/expect b/tests/r_resize_inode/expect
index f4bee0fb..786fe133 100644
--- a/tests/r_resize_inode/expect
+++ b/tests/r_resize_inode/expect
@@ -1,7 +1,7 @@
mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384
resize2fs test.img 65536
-Resizing the filesystem on ./test.img to 65536 (1k) blocks.
-The filesystem on ./test.img is now 65536 blocks long.
+Resizing the filesystem on test.img to 65536 (1k) blocks.
+The filesystem on test.img is now 65536 blocks long.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
@@ -11,7 +11,6 @@ Pass 5: Checking group summary information
test_filesys: 11/16384 files (0.0% non-contiguous), 4513/65536 blocks
Exit status is 0
dumpe2fs test.img
-
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
@@ -448,8 +447,8 @@ Group 63: (Blocks 64513-65535)
--------------------------------
mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 65536
resize2fs test.img 16384
-Resizing the filesystem on ./test.img to 16384 (1k) blocks.
-The filesystem on ./test.img is now 16384 blocks long.
+Resizing the filesystem on test.img to 16384 (1k) blocks.
+The filesystem on test.img is now 16384 blocks long.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
@@ -459,7 +458,6 @@ Pass 5: Checking group summary information
test_filesys: 11/4096 files (0.0% non-contiguous), 2107/16384 blocks
Exit status is 0
dumpe2fs test.img
-
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
@@ -601,8 +599,8 @@ Group 15: (Blocks 15361-16383)
Free inodes: 3841-4096
--------------------------------
resize2fs test.img 165536
-Resizing the filesystem on ./test.img to 165536 (1k) blocks.
-The filesystem on ./test.img is now 165536 blocks long.
+Resizing the filesystem on test.img to 165536 (1k) blocks.
+The filesystem on test.img is now 165536 blocks long.
Filesystem did not have a UUID; generating one.
@@ -611,12 +609,9 @@ Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
-
-test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/41472 files (0.0% non-contiguous), 8361/165536 blocks
-Exit status is 1
+Exit status is 0
dumpe2fs test.img
-
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem magic number: 0xEF53
diff --git a/tests/r_resize_inode/script b/tests/r_resize_inode/script
index aced9c4f..0f121383 100644
--- a/tests/r_resize_inode/script
+++ b/tests/r_resize_inode/script
@@ -3,7 +3,7 @@ if test -x $RESIZE2FS_EXE; then
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
@@ -14,17 +14,17 @@ cp /dev/null $OUT
dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
echo mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 16384 > $OUT
-$MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 16384 2>&1 \
- | sed -e '1d' | grep -v "automatically checked" |
- grep -v "whichever comes first" >> $OUT
+$MKE2FS -q -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
echo resize2fs test.img 65536 >> $OUT
-$RESIZE2FS $TMPFILE 65536 2>&1 | sed -e '1d' >> $OUT
+$RESIZE2FS $TMPFILE 65536 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
$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
@@ -33,24 +33,24 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
echo dumpe2fs test.img >> $OUT
-$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
echo "--------------------------------" >> $OUT
dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
echo mke2fs -q -F -O resize_inode -o Linux -b 1024 -g 1024 test.img 65536 >> $OUT
-$MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 65536 2>&1 \
- | sed -e '1d' | grep -v "automatically checked" |
- grep -v "whichever comes first" >> $OUT
+$MKE2FS -q -F -O resize_inode -o Linux -b 1024 -g 1024 $TMPFILE 65536 2>&1 |
+ sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
echo resize2fs test.img 16384 >> $OUT
-$RESIZE2FS $TMPFILE 16384 2>&1 | sed -e '1d' >> $OUT
+$RESIZE2FS $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
$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
@@ -59,17 +59,18 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
echo dumpe2fs test.img >> $OUT
-$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
echo "--------------------------------" >> $OUT
echo resize2fs test.img 165536 >> $OUT
-$RESIZE2FS $TMPFILE 165536 2>&1 | sed -e '1d' >> $OUT
+$RESIZE2FS $TMPFILE 165536 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
$DEBUGFS -R "set_super_value lastcheck 0" -w $TMPFILE >/dev/null 2>&1
@@ -78,24 +79,23 @@ $DEBUGFS -R "set_super_value mkfs_time 0" -w $TMPFILE >/dev/null 2>&1
$TUNE2FS -c 20 -U clear $TMPFILE >/dev/null 2>&1
echo dumpe2fs test.img >> $OUT
-$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs >> $OUT
+$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
-rm -f $test_name.ok $test_name.failed $TMPFILE
+rm -f $TMPFILE
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
+ rm -f $test_name.tmp
fi
unset IMAGE FSCK_OPT OUT EXP
else #if test -x $RESIZE2FS; then
- rm -f $test_name.ok $test_name.failed
- echo "skipped"
+ echo "$test_name: $test_description: skipped"
fi