From 5dced3d1b3deca80e01415a2e35dc7972dcbfae7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 11:25:10 +0200 Subject: Adding upstream version 1.47.0. Signed-off-by: Daniel Baumann --- tests/i_bitmaps/expect | 8 ++++++++ tests/i_bitmaps/image.bz2 | Bin 0 -> 4026 bytes tests/i_bitmaps/script | 28 ++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 tests/i_bitmaps/expect create mode 100644 tests/i_bitmaps/image.bz2 create mode 100644 tests/i_bitmaps/script (limited to 'tests/i_bitmaps') diff --git a/tests/i_bitmaps/expect b/tests/i_bitmaps/expect new file mode 100644 index 0000000..6199bb7 --- /dev/null +++ b/tests/i_bitmaps/expect @@ -0,0 +1,8 @@ +46,52d45 +< Journal features: (none) +< Total journal size: 1024k +< Total journal blocks: 1024 +< Max transaction length: 1024 +< Fast commit length: 0 +< Journal sequence: 0x00000001 +< Journal start: 0 diff --git a/tests/i_bitmaps/image.bz2 b/tests/i_bitmaps/image.bz2 new file mode 100644 index 0000000..cc33565 Binary files /dev/null and b/tests/i_bitmaps/image.bz2 differ diff --git a/tests/i_bitmaps/script b/tests/i_bitmaps/script new file mode 100644 index 0000000..1a16d55 --- /dev/null +++ b/tests/i_bitmaps/script @@ -0,0 +1,28 @@ +test_description="e2image bitmap read/write test" + +IMAGE=$test_dir/image.bz2 +OUT=$test_name.log +EXP=$test_dir/expect + +bzip2 -d < $IMAGE > $TMPFILE +$E2IMAGE $TMPFILE $TMPFILE.e2i > $OUT 2>&1 +$DUMPE2FS $TMPFILE > $TMPFILE.1 2>&1 +$DUMPE2FS -i $TMPFILE.e2i > $TMPFILE.2 2>&1 +diff $TMPFILE.1 $TMPFILE.2 >> $OUT 2>&1 + +sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test_filesys;" $OUT > $OUT.new +mv $OUT.new $OUT + +cmp -s $OUT $EXP +status=$? +if [ "$status" = 0 ] ; then + echo "$test_name: $test_description: ok" + touch $test_name.ok +else + echo "$test_name: $test_description: failed" + diff $DIFF_OPTS $EXP $OUT > $test_name.failed + rm -f $test_name.tmp +fi + +rm -rf $TMPFILE $TMPFILE.bin $TMPFILE.1 $TMPFILE.2 $TMPFILE.e2i +unset IMAGE FSCK_OPT OUT EXP -- cgit v1.2.3