]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
tests: add test for e2image -b option
authorArtem Blagodarenko <artem.blagodarenko@gmail.com>
Wed, 6 Mar 2019 16:57:00 +0000 (11:57 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 6 Mar 2019 16:57:00 +0000 (11:57 -0500)
The test makes raw image from partition with broken super block
and executes e2fsck.

Signed-off-by: Artem Blagodarenko <c17828@cray.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
tests/i_zero_super/expect.1 [new file with mode: 0644]
tests/i_zero_super/image.gz [new file with mode: 0644]
tests/i_zero_super/script [new file with mode: 0644]

diff --git a/tests/i_zero_super/expect.1 b/tests/i_zero_super/expect.1
new file mode 100644 (file)
index 0000000..fda32b9
--- /dev/null
@@ -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 (file)
index 0000000..eea9140
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 (file)
index 0000000..6b02d86
--- /dev/null
@@ -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