tests/d_inline_dump: remove version dependency in the expected output

Also add the convenience macro $CLEAN_OUTPUT in test_config which can
be used to run the "sed -e $cmd_dir/filter.sed" command to clean up
e2fsprogs command output before comparing with the expected golden
output.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
crypto
Theodore Ts'o 2014-08-25 18:04:42 -04:00
parent 4348709c5c
commit d9eab8e2f0
3 changed files with 7 additions and 12 deletions

View File

@ -1,5 +1,4 @@
*** long file
debugfs 1.43-WIP (09-Jul-2014)
Inode: 13 Type: regular Mode: 0644 Flags: 0x10000000
Generation: 3289262644 Version: 0x00000000:00000001
User: 0 Group: 0 Size: 80
@ -16,7 +15,6 @@ Extended attributes:
user.a = "b" (1)
Size of inline data: 80
*** short file
debugfs 1.43-WIP (09-Jul-2014)
Inode: 18 Type: regular Mode: 0644 Flags: 0x10000000
Generation: 3842229473 Version: 0x00000000:00000001
User: 0 Group: 0 Size: 20
@ -34,7 +32,6 @@ Extended attributes:
Size of inline data: 60
*** long dir
debugfs 1.43-WIP (09-Jul-2014)
Inode: 16 Type: directory Mode: 0755 Flags: 0x10000000
Generation: 3842229469 Version: 0x00000000:00000004
User: 0 Group: 0 Size: 132
@ -51,7 +48,6 @@ Extended attributes:
user.a = "b" (1)
Size of inline data: 132
*** short dir
debugfs 1.43-WIP (09-Jul-2014)
Inode: 20 Type: directory Mode: 0755 Flags: 0x10000000
Generation: 3710818931 Version: 0x00000000:00000001
User: 0 Group: 0 Size: 60
@ -69,7 +65,6 @@ Extended attributes:
Size of inline data: 60
*** long link
debugfs 1.43-WIP (09-Jul-2014)
Inode: 12 Type: symlink Mode: 0777 Flags: 0x10000000
Generation: 3289262643 Version: 0x00000000:00000001
User: 0 Group: 0 Size: 80
@ -85,7 +80,6 @@ Extended attributes:
system.data (20)
Fast link dest: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
*** short link
debugfs 1.43-WIP (09-Jul-2014)
Inode: 19 Type: symlink Mode: 0777 Flags: 0x0
Generation: 3842229474 Version: 0x00000000:00000001
User: 0 Group: 0 Size: 20

View File

@ -11,21 +11,21 @@ ZIMAGE=$test_dir/image.gz
gzip -d < $ZIMAGE > $TMPFILE
echo "*** long file" > $OUT
$DEBUGFS -R 'stat /file' $TMPFILE >> $OUT 2>&1
$DEBUGFS -R 'stat /file' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
echo "*** short file" >> $OUT
$DEBUGFS -R 'stat /shortfile' $TMPFILE >> $OUT 2>&1
$DEBUGFS -R 'stat /shortfile' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
echo >> $OUT
echo "*** long dir" >> $OUT
$DEBUGFS -R 'stat /dir' $TMPFILE >> $OUT 2>&1
$DEBUGFS -R 'stat /dir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
echo "*** short dir" >> $OUT
$DEBUGFS -R 'stat /shortdir' $TMPFILE >> $OUT 2>&1
$DEBUGFS -R 'stat /shortdir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
echo >> $OUT
echo "*** long link" >> $OUT
$DEBUGFS -R 'stat /link' $TMPFILE >> $OUT 2>&1
$DEBUGFS -R 'stat /link' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
echo "*** short link" >> $OUT
$DEBUGFS -R 'stat /shortlink' $TMPFILE >> $OUT 2>&1
$DEBUGFS -R 'stat /shortlink' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1
echo "*** end test" >> $OUT

View File

@ -20,6 +20,7 @@ E2UNDO_EXE="../misc/e2undo"
TEST_REL=../tests/progs/test_rel
TEST_ICOUNT=../tests/progs/test_icount
CRCSUM=../tests/progs/crcsum
CLEAN_OUTPUT="sed -f $cmd_dir/filter.sed"
LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
export LD_LIBRARY_PATH