From: Artem Blagodarenko Date: Wed, 6 Mar 2019 16:57:00 +0000 (-0500) Subject: tests: add test for e2image -b option X-Git-Tag: v1.45.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d562d94c619f72668c312a2014709ed6c876028;p=thirdparty%2Fe2fsprogs.git tests: add test for e2image -b option The test makes raw image from partition with broken super block and executes e2fsck. Signed-off-by: Artem Blagodarenko Signed-off-by: Theodore Ts'o --- diff --git a/tests/i_zero_super/expect.1 b/tests/i_zero_super/expect.1 new file mode 100644 index 000000000..fda32b96b --- /dev/null +++ b/tests/i_zero_super/expect.1 @@ -0,0 +1,22 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +Free blocks count wrong for group #0 (7987, counted=7982). +Fix? no + +Free blocks count wrong (11602, counted=11597). +Fix? no + +Free inodes count wrong for group #0 (1493, counted=1488). +Fix? no + +Free inodes count wrong (2997, counted=2992). +Fix? no + + +test_filesys: ********** WARNING: Filesystem still has errors ********** + +test_filesys: 11/3008 files (0.0% non-contiguous), 398/12000 blocks +Exit status is 4 diff --git a/tests/i_zero_super/image.gz b/tests/i_zero_super/image.gz new file mode 100644 index 000000000..eea914019 Binary files /dev/null and b/tests/i_zero_super/image.gz differ diff --git a/tests/i_zero_super/script b/tests/i_zero_super/script new file mode 100644 index 000000000..6b02d86db --- /dev/null +++ b/tests/i_zero_super/script @@ -0,0 +1,11 @@ +if test -x $E2IMAGE_EXE; then + +ONE_PASS_ONLY=true +FSCK_OPT="-n -b 8193 -f" +PREP_CMD="$E2IMAGE_EXE -r -b 8193 -B 1024 $TMPFILE $TMPFILE.raw; \ + mv $TMPFILE.raw $TMPFILE" +. $cmd_dir/run_e2fsck + +else + echo "$test_name: $test_description: skipped" +fi