summaryrefslogtreecommitdiff
path: root/tests/run_mke2fs
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@dilger.ca>2013-06-15 18:44:09 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-06-15 18:44:09 -0400
commitf9fd342e568dbadaadbb0b242f14271cb384c38b (patch)
tree5496324d1de0858250481a5ce81946e2052487a1 /tests/run_mke2fs
parent4718395120454ad7c193c76258ef5359f2ab3f2f (diff)
downloade2fsprogs-f9fd342e568dbadaadbb0b242f14271cb384c38b.tar.gz
tests: clean up sed filtering of test output
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>
Diffstat (limited to 'tests/run_mke2fs')
-rw-r--r--tests/run_mke2fs7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/run_mke2fs b/tests/run_mke2fs
index f5249968..82eca41a 100644
--- a/tests/run_mke2fs
+++ b/tests/run_mke2fs
@@ -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