]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
tests: clean up sed filtering of test output
authorAndreas Dilger <adilger@dilger.ca>
Sat, 15 Jun 2013 22:44:09 +0000 (18:44 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 15 Jun 2013 22:44:09 +0000 (18:44 -0400)
The sed filters for test outputs that are used to remove build and
test specific information (such as version strings, dates, times,
UUIDs) were unconditionally deleting the first line of output.  This
would normally contain the tool version string, but in some cases
contained other information that was being lost.  This can lead to
difficulty debugging test failures.

The sed filtering has been changed to only remove the actual version
strings.  As well, similar filter strings were duplicated throughout
many scripts, and "sed" and "tr" were often called multiple times in
a pipeline.  These have been consolidated into a single filter.sed
file to avoid having to maintain these filters in multiple places.

In a few cases, accidentally deleted messages have been restored to
the expect output for the tests.  In other cases, trivial whitespace
has been changed in the expect files.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
30 files changed:
tests/d_loaddump/script
tests/d_special_files/script
tests/f_jnl_32bit/expect.0
tests/f_jnl_32bit/script
tests/f_jnl_64bit/expect.0
tests/f_jnl_64bit/script
tests/f_jnl_errno/expect.0
tests/f_jnl_errno/script
tests/f_orphan_indirect_inode/expect.1
tests/f_preen/expect.1
tests/f_resize_inode/script
tests/filter.sed [moved from tests/filter_dumpe2fs with 63% similarity]
tests/m_bigjournal/expect.1
tests/m_dasd_bs/expect.1
tests/m_extent_journal/expect.1
tests/m_large_file/expect.1
tests/m_meta_bg/expect.1
tests/m_mkfs_overhead/script
tests/m_mmp/expect.1
tests/m_no_opt/expect.1
tests/m_raid_opt/expect.1
tests/m_std/expect.1
tests/m_uninit/expect.1
tests/r_inline_xattr/script
tests/r_move_itable/expect
tests/r_move_itable/script
tests/r_resize_inode/expect
tests/r_resize_inode/script
tests/run_e2fsck
tests/run_mke2fs

index 9b687eb497d8a5d56ad51538c4b08db8d8ab1953..39727ba6f73e5ee83bf0203718b5610c1339619f 100644 (file)
@@ -24,19 +24,19 @@ echo "debugfs -R ''write $TEST_DATA test_data'' -w test.img" > $OUT.new
 $DEBUGFS -R "write $TEST_DATA test_data" -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
 
 echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
 $FSCK $VERIFY_FSCK_OPT -N test_filesys $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
 
 echo "debugfs -R ''dump test_data $VERIFY_DATA'' test.img" > $OUT.new
 $DEBUGFS -R "dump test_data $VERIFY_DATA" $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
 
 echo "cmp $TEST_DATA $VERIFY_DATA" >> $OUT
 cmp $TEST_DATA $VERIFY_DATA >>$OUT
index 85cbb4d8291a304a197331779f0bdf3a509510fd..1a1999a003e4697954b4d16aae02def5f89f804c 100644 (file)
@@ -33,43 +33,43 @@ echo "debugfs -R ''stat foo'' -w test.img" > $OUT.new
 $DEBUGFS -R "stat foo" -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
 
 echo "debugfs -R ''stat foo2'' -w test.img" > $OUT.new
 $DEBUGFS -R "stat foo2" -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
 
 echo "debugfs -R ''block_dump 28'' -w test.img" > $OUT.new
 $DEBUGFS -R "block_dump 28" -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
 
 echo "debugfs -R ''stat pipe'' -w test.img" > $OUT.new
 $DEBUGFS -R "stat pipe" -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
 
 echo "debugfs -R ''stat sda'' -w test.img" > $OUT.new
 $DEBUGFS -R "stat sda" -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
 
 echo "debugfs -R ''stat null'' -w test.img" > $OUT.new
 $DEBUGFS -R "stat null" -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
 
 echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
 $FSCK $VERIFY_FSCK_OPT -N test_filesys $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
 
 #
 # Do the verification
index 29b180fdf9e492fd29f73f819113d5e305869872..b7de48eab88222819cba729181148d5800f3b27c 100644 (file)
@@ -1,4 +1,3 @@
-
 Journal starts at block 1, transaction 2
 Found expected sequence 2, type 1 (descriptor block) at block 1
 Dumping descriptor block, sequence 2, at block 1:
index 4056f0de31ae03b2c18e67741853ae8ceeca6a51..9fb4366de1c99ab29211c9044f0da1529fadde3d 100644 (file)
@@ -1,4 +1,4 @@
-PREP_CMD='$DEBUGFS -R "logdump -a" $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs > $test_name.0.log'
+PREP_CMD='$DEBUGFS -R "logdump -a" $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $test_name.0.log'
 PASS_ZERO=true
 
 . $cmd_dir/run_e2fsck
index 1b21057155e5a8a546acebcedf754fddfc4d184c..2007f0391d47203479e0f11a67d74eee57a3bdb1 100644 (file)
@@ -1,4 +1,3 @@
-
 Journal starts at block 67, transaction 32
 Found expected sequence 32, type 5 (revoke table) at block 67
 Dumping revoke block, sequence 32, at block 67:
index 4056f0de31ae03b2c18e67741853ae8ceeca6a51..9fb4366de1c99ab29211c9044f0da1529fadde3d 100644 (file)
@@ -1,4 +1,4 @@
-PREP_CMD='$DEBUGFS -R "logdump -a" $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs > $test_name.0.log'
+PREP_CMD='$DEBUGFS -R "logdump -a" $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $test_name.0.log'
 PASS_ZERO=true
 
 . $cmd_dir/run_e2fsck
index 7dae17d00f88511807b7f3b8b0e4fb63cf4ebeb5..6dad72a1773002e8e45d747a17da1c47e51ab3de 100644 (file)
@@ -1,4 +1,3 @@
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index dd1ffd6c9c11fe3e8afec90ee264998675881318..ef5006a8ef1e2b6cffa2d9d95c57372e172ea0cf 100644 (file)
@@ -1,4 +1,4 @@
-AFTER_CMD='$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs > $test_name.0.log'
+AFTER_CMD='$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $test_name.0.log'
 PASS_ZERO=true
 
 . $cmd_dir/run_e2fsck
index 33cdd65efd91375418b7bcee8ecb7bc143ea24ac..814a68888780ed8f5973103d90e029c03a986fa5 100644 (file)
@@ -1,2 +1,3 @@
+test_filesys: Truncating orphaned inode 12 (uid=0, gid=0, mode=0100644, size=0)
 test_filesys: clean, 12/16 files, 21/100 blocks
 Exit status is 0
index c65209ddfd775e80eca7c1d99a3c4cdfa4fbc14e..dd20572acd5676d9e50d48c40fcdb561702afb46 100644 (file)
@@ -1,3 +1,4 @@
+test_filesys: Note: if several inode or block bitmap blocks or part
 of the inode table require relocation, you may wish to try
 running e2fsck with the '-b 8193' option first.  The problem
 may lie only with the primary block group descriptors, and
index 840432da5c938ad8074b1f1cb1ac423f8372e28e..190871b47a46c2825de99eeb95cd4bae94cfa144 100644 (file)
@@ -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,18 +109,18 @@ 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
 
 
similarity index 63%
rename from tests/filter_dumpe2fs
rename to tests/filter.sed
index 75442178171e46d800f8dce1289a6f5de7019808..91b956b7b48dbecf2c46446ec48420f1bcc86d17 100644 (file)
@@ -1,14 +1,19 @@
-1s/^.*$//
-/^Filesystem UUID:/d
+/^[dbgumpe2fsckrsiz]* [1-9]\.[0-9]*[.-][^ ]* ([0-9]*-[A-Za-z]*-[0-9]*)/d
+s/\\015//g
+/automatically checked/d
+/^Directory Hash Seed:/d
+/Discarding device blocks/d
 /^Filesystem created:/d
 /^Filesystem flags:/d
+/^Filesystem UUID:/d
+/^JFS DEBUG:/d
 /^Last write time:/d
 /^Last mount time:/d
 /^Last checked:/d
-/^Directory Hash Seed:/d
-/^Next check after:/d
-/^Maximum mount count:/d
 /^Lifetime writes:/d
+/^Maximum mount count:/d
+/^Next check after:/d
 /Reserved blocks uid:/s/ (user .*)//
 /Reserved blocks gid:/s/ (group .*)//
+/whichever comes first/d
 /^  Checksum /d
index ad4a035163bdda631de931d387933c11b92737cd..312c276887b25039fe27f604c3871bac98d92f94 100644 (file)
@@ -1,5 +1,4 @@
 Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
@@ -7,7 +6,6 @@ Pass 4: Checking reference counts
 Pass 5: Checking group summary information
 test_filesys: 11/1344 files (0.0% non-contiguous), 1286989/2750000 blocks
 Exit status is 0
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index 61f6894b6b44d752f0ebfb488d49704e79cc76c5..0cbe339438bd43f74521cdef34593074e2b1490a 100644 (file)
@@ -18,7 +18,6 @@ Writing inode tables:    \b\b\bdone
 Writing superblocks and filesystem accounting information:    \b\b\bdone
 
 Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
@@ -26,7 +25,6 @@ Pass 4: Checking reference counts
 Pass 5: Checking group summary information
 test_filesys: 11/16384 files (0.0% non-contiguous), 1104/32768 blocks
 Exit status is 0
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index aaedf7291c3c5dc5643c7009455d60b7a429dcfb..d5d7a2443d082f9f27c55a6bf65fcb3542e9dd16 100644 (file)
@@ -19,7 +19,6 @@ Creating journal (4096 blocks): done
 Writing superblocks and filesystem accounting information:    \b\b\bdone
 
 Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent sparse_super
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
@@ -27,7 +26,6 @@ Pass 4: Checking reference counts
 Pass 5: Checking group summary information
 test_filesys: 11/16384 files (0.0% non-contiguous), 7460/65536 blocks
 Exit status is 0
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index 59a9b7f98f150af318c7becfa5bf5b67ff97d368..ced943171bdffd05d434d8ae8e0b3073a6d35ecf 100644 (file)
@@ -16,7 +16,6 @@ Writing inode tables:    \b\b\bdone
 Writing superblocks and filesystem accounting information:    \b\b\bdone
 
 Filesystem features: ext_attr resize_inode dir_index filetype sparse_super large_file
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
@@ -24,7 +23,6 @@ Pass 4: Checking reference counts
 Pass 5: Checking group summary information
 test_filesys: 11/64 files (0.0% non-contiguous), 17/16384 blocks
 Exit status is 0
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index e7c2b2cc8915bee79fc09231fda315d9d4ccacae..ec10d6e02f8d14473fd2a1554f91ee9cf10559af 100644 (file)
@@ -17,7 +17,6 @@ Writing inode tables:        \b\b\b\b\b\b\bdone
 Writing superblocks and filesystem accounting information:        \b\b\b\b\b\b\bdone
 
 Filesystem features: ext_attr dir_index filetype meta_bg sparse_super
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
@@ -25,7 +24,6 @@ Pass 4: Checking reference counts
 Pass 5: Checking group summary information
 test_filesys: 11/32768 files (0.0% non-contiguous), 4389/131072 blocks
 Exit status is 0
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index 63612a899ffae4325933e025fa88f37a8e6d8fc4..c21da0c3e024202b8f8f59a80e0e871e25613ec2 100644 (file)
@@ -12,8 +12,8 @@ export MKE2FS_SKIP_PROGRESS MKE2FS_SKIP_CHECK_MSG
 
 cp /dev/null $OUT
 
-$MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 | sed -e 1d | \
-       sed -e "s;$TMPFILE;test.img;" | tr -d \\015 > $OUT
+$MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 |
+       sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" > $OUT
 
 rm -f $TMPFILE
 
index 1f7737d851c7cfaae125e6beff45bb9309e0b7a6..e18aa771c2915ccdbb20d4ee679892001b25a9b7 100644 (file)
@@ -19,7 +19,6 @@ Multiple mount protection is enabled with update interval 5 seconds.
 Writing superblocks and filesystem accounting information:    \b\b\bdone
 
 Filesystem features: ext_attr resize_inode dir_index filetype mmp sparse_super large_file
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
@@ -27,7 +26,6 @@ Pass 4: Checking reference counts
 Pass 5: Checking group summary information
 test_filesys: 11/65536 files (0.0% non-contiguous), 2093/65536 blocks
 Exit status is 0
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index 8fa605bb74eca14996504d651b175ed3037b0c75..e7bf2dbfb6575925cc216ecaf9009ac4227c3948 100644 (file)
@@ -17,7 +17,6 @@ Writing inode tables:    \b\b\bdone
 Writing superblocks and filesystem accounting information:    \b\b\bdone
 
 Filesystem features:(none)
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
@@ -25,7 +24,6 @@ Pass 4: Checking reference counts
 Pass 5: Checking group summary information
 test_filesys: 11/16384 files (0.0% non-contiguous), 2094/65536 blocks
 Exit status is 0
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index 0c357008dc3f08eec0b273fb531aa54878758ec3..9548665ee5e44cb076c551f01c12312a5b437f82 100644 (file)
@@ -18,7 +18,6 @@ Writing inode tables:        \b\b\b\b\b\b\bdone
 Writing superblocks and filesystem accounting information:        \b\b\b\b\b\b\bdone
 
 Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
@@ -26,7 +25,6 @@ Pass 4: Checking reference counts
 Pass 5: Checking group summary information
 test_filesys: 11/32768 files (0.0% non-contiguous), 7238/131072 blocks
 Exit status is 0
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index 23876ececacfd81a5cca06859057df27d8505440..f35653199d74bd91ed44492937f82ca23261284b 100644 (file)
@@ -18,7 +18,6 @@ Writing inode tables:    \b\b\bdone
 Writing superblocks and filesystem accounting information:    \b\b\bdone
 
 Filesystem features: ext_attr resize_inode dir_index filetype sparse_super
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
@@ -26,7 +25,6 @@ Pass 4: Checking reference counts
 Pass 5: Checking group summary information
 test_filesys: 11/16384 files (0.0% non-contiguous), 3364/65536 blocks
 Exit status is 0
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index f28521498a21c38460f45f95b0378c3836fd9077..3212e1033b1ba4afeb35116652f3ad718414f065 100644 (file)
@@ -18,7 +18,6 @@ Writing inode tables:      \b\b\b\b\bdone
 Writing superblocks and filesystem accounting information:      \b\b\b\b\bdone
 
 Filesystem features: ext_attr resize_inode dir_index filetype sparse_super uninit_bg
 Pass 1: Checking inodes, blocks, and sizes
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
@@ -26,7 +25,6 @@ Pass 4: Checking reference counts
 Pass 5: Checking group summary information
 test_filesys: 11/32768 files (0.0% non-contiguous), 5691/131072 blocks
 Exit status is 0
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index 021088e0e5aed1e25aa06a6919ec66a35977c6fb..d88258728a83c57eea9e4fdd666dfeffbe241d78 100644 (file)
@@ -20,7 +20,7 @@ echo "resize2fs test.img 5M" >> $OUT
 $RESIZE2FS $TMPFILE 5M 2>&1 >> $OUT.new 2>&1
 status=$?
 echo Exit status is $status >> $OUT.new
-sed -e '1d' $OUT.new | sed -e "s;$TMPFILE;test.img;" >> $OUT
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
 
 # Look at inline extended attribute in resized fs
 echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''" >> $OUT
index 195bb11483d71b14a17f3e15833f24b705822966..b4b089bfbdb039dba2c7e2d9e0ec3bd98c84807a 100644 (file)
@@ -13,7 +13,6 @@ Pass 5: Checking group summary information
 test_filesys: 11/1248 files (0.0% non-contiguous), 1281/9985 blocks
 Exit status is 0
 dumpe2fs test.img
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
@@ -312,7 +311,6 @@ Pass 5: Checking group summary information
 test_filesys: 11/2496 files (0.0% non-contiguous), 1644/19969 blocks
 Exit status is 0
 dumpe2fs test.img
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
@@ -847,7 +845,6 @@ Pass 5: Checking group summary information
 test_filesys: 11/3744 files (0.0% non-contiguous), 2007/29953 blocks
 Exit status is 0
 dumpe2fs test.img
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
@@ -1618,7 +1615,6 @@ Pass 5: Checking group summary information
 test_filesys: 11/5024 files (0.0% non-contiguous), 2376/40000 blocks
 Exit status is 0
 dumpe2fs test.img
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index fc8286f65a6aa1775e203dfc8a3182e171042b78..e56788822293a86e9e6a5b1d951f5d38abe7a188 100644 (file)
@@ -14,18 +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 Linux -b 1024 -g 256 test.img 1024 > $OUT
-$MKE2FS -q -F -o Linux -b 1024 -g 256 $TMPFILE 1024 2>&1 \
-       | sed -e '1d' | grep -v "automatically checked" | 
-       grep -v "whichever comes first" >> $OUT 
+$MKE2FS -q -F -o Linux -b 1024 -g 256 $TMPFILE 1024 2>&1 |
+       sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT
 
 echo resize2fs -p test.img 10000 >> $OUT
-$RESIZE2FS -p $TMPFILE 10000 2>&1 | sed -e '1d' | \
-          sed -e "s;$TMPFILE;test.img;" >> $OUT
+$RESIZE2FS -p $TMPFILE 10000 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
@@ -34,18 +33,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 -p test.img 20000 >> $OUT
-$RESIZE2FS -p $TMPFILE 20000 2>&1 | sed -e '1d' | \
-          sed -e "s;$TMPFILE;test.img;" >> $OUT
+$RESIZE2FS -p $TMPFILE 20000 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
@@ -54,18 +53,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 -p test.img 30000 >> $OUT
-$RESIZE2FS -p $TMPFILE 30000 2>&1 | sed -e '1d' | \
-          sed -e "s;$TMPFILE;test.img;" >> $OUT
+$RESIZE2FS -p $TMPFILE 30000 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
@@ -74,18 +73,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 -p test.img 40000 >> $OUT
-$RESIZE2FS -p $TMPFILE 40000 2>&1 | sed -e '1d' | \
-          sed -e "s;$TMPFILE;test.img;" >> $OUT
+$RESIZE2FS -p $TMPFILE 40000 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
@@ -94,7 +93,7 @@ $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 $TMPFILE
 
index f9f79c464cb08da3094583ebec8fa5f047cc1a50..786fe133c3347c67bbeaf7cf205bab48aba3a1e7 100644 (file)
@@ -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
@@ -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
@@ -614,7 +612,6 @@ Pass 5: Checking group summary information
 test_filesys: 11/41472 files (0.0% non-contiguous), 8361/165536 blocks
 Exit status is 0
 dumpe2fs test.img
-
 Filesystem volume name:   <none>
 Last mounted on:          <not available>
 Filesystem magic number:  0xEF53
index da3c2ede07a6f1feab5a326d97ba84dc1ce021de..0f121383ac2f258b2b38b254517609ed7a6c1c4b 100644 (file)
@@ -14,18 +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' | \
-          sed -e "s;$TMPFILE;test.img;" >> $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
@@ -34,25 +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' | \
-          sed -e "s;$TMPFILE;test.img;" >> $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
@@ -61,18 +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' | \
-          sed -e "s;$TMPFILE;test.img;" >> $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
@@ -81,7 +79,7 @@ $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 $TMPFILE
 cmp -s $OUT $EXP
index ab623e875157a5e7b8af9d290bb3655b2fc131c1..5f28d9213bfde896822fb3de252c761dcfaaaf5b 100644 (file)
@@ -50,16 +50,14 @@ eval $PREP_CMD
 $FSCK $FSCK_OPT  -N test_filesys $TMPFILE > $OUT1.new 2>&1
 status=$?
 echo Exit status is $status >> $OUT1.new
-sed -e '1d' $OUT1.new | sed -e '/^JFS DEBUG:/d' | \
-           sed -e "s;$TMPFILE;test.img;" | tr -d \\015 >> $OUT1
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT1.new >> $OUT1
 rm -f $OUT1.new
 
 if [ "$ONE_PASS_ONLY" != "true" ]; then
        $FSCK $SECOND_FSCK_OPT -N test_filesys $TMPFILE > $OUT2.new 2>&1 
        status=$?
        echo Exit status is $status >> $OUT2.new
-       sed -e '1d' $OUT2.new | sed -e '/^JFS DEBUG:/d' | \
-           sed -e "s;$TMPFILE;test.img;" > $OUT2
+       sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT2.new > $OUT2
        rm -f $OUT2.new
 fi
 
index f5249968bfc7ad77569573440b89570c8962c6fb..82eca41aee0bfd9acfec027eb98abd5d42905a9a 100644 (file)
@@ -11,8 +11,11 @@ MKE2FS_SKIP_PROGRESS=true
 MKE2FS_SKIP_CHECK_MSG=true
 export MKE2FS_SKIP_PROGRESS MKE2FS_SKIP_CHECK_MSG
 > $TMPFILE
-PREP_CMD='$MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 | sed -e 1d | grep -v "Discarding device blocks" | tr -d \\015 > $OUT1 ; $DEBUGFS -R features $TMPFILE 2>&1 | sed -e 1d | tr -d \\015 >> $OUT1 ; echo " " >> $OUT1'
-AFTER_CMD='$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs | tr -d \\015 >> $OUT1'
+PREP_CMD='$MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 |
+       sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" > $OUT1;
+       $DEBUGFS -R features $TMPFILE 2>&1 |
+       sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" >> $OUT1'
+AFTER_CMD='$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT1'
 . $cmd_dir/run_e2fsck
 
 else #if test -x $DEBUGFS_EXE; then