summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArtem Blagodarenko <artem.blagodarenko@gmail.com>2019-03-06 11:57:00 -0500
committerTheodore Ts'o <tytso@mit.edu>2019-03-06 11:57:00 -0500
commit4d562d94c619f72668c312a2014709ed6c876028 (patch)
tree54dfd9a7e484f5a1e98d423cce3f1a85900e6db7 /tests
parent3f3e455f02ba2bd64d70b13fa2c9f6c2215a6fc4 (diff)
downloade2fsprogs-4d562d94c619f72668c312a2014709ed6c876028.tar.gz
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 <c17828@cray.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tests')
-rw-r--r--tests/i_zero_super/expect.122
-rw-r--r--tests/i_zero_super/image.gzbin0 -> 13262 bytes
-rw-r--r--tests/i_zero_super/script11
3 files changed, 33 insertions, 0 deletions
diff --git a/tests/i_zero_super/expect.1 b/tests/i_zero_super/expect.1
new file mode 100644
index 00000000..fda32b96
--- /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 00000000..eea91401
--- /dev/null
+++ b/tests/i_zero_super/image.gz
Binary files differ
diff --git a/tests/i_zero_super/script b/tests/i_zero_super/script
new file mode 100644
index 00000000..6b02d86d
--- /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