summaryrefslogtreecommitdiff
path: root/tests/f_uninit_restart_fsck
diff options
context:
space:
mode:
authorAndreas Dilger <andreas.dilger@intel.com>2012-04-12 17:52:44 -0600
committerTheodore Ts'o <tytso@mit.edu>2019-08-18 21:58:35 -0400
commitda801dfe03413e37dbbd02d69de986a8b13cd4ad (patch)
treebf7b21bf47cf062db454120fe398ad47ee3aab1e /tests/f_uninit_restart_fsck
parenta366d8d283c86249d9a31b47ea0895e753804c52 (diff)
downloade2fsprogs-da801dfe03413e37dbbd02d69de986a8b13cd4ad.tar.gz
tests: add tests for uninitialized bitmaps
Various tests for handing uninitialized block and inode bitmaps, and inodes beyond the in-use high watermark. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tests/f_uninit_restart_fsck')
-rw-r--r--tests/f_uninit_restart_fsck/expect.136
-rw-r--r--tests/f_uninit_restart_fsck/expect.27
-rw-r--r--tests/f_uninit_restart_fsck/image.gzbin0 -> 91233 bytes
-rw-r--r--tests/f_uninit_restart_fsck/name1
4 files changed, 44 insertions, 0 deletions
diff --git a/tests/f_uninit_restart_fsck/expect.1 b/tests/f_uninit_restart_fsck/expect.1
new file mode 100644
index 00000000..d396beb3
--- /dev/null
+++ b/tests/f_uninit_restart_fsck/expect.1
@@ -0,0 +1,36 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'foo2' in /d1 (1881) references inode 500 found in group 0's unused inodes area.
+Fix? yes
+
+Entry 'foo2' in /d1 (1881) has an incorrect filetype (was 1, should be 0).
+Fix? yes
+
+Entry 'bar2' in /d2 (3761) references inode 2100 found in group 1's unused inodes area.
+Fix? yes
+
+Entry 'bar2' in /d2 (3761) has an incorrect filetype (was 1, should be 0).
+Fix? yes
+
+Restarting e2fsck from the beginning...
+One or more block group descriptor checksums are invalid. Fix? yes
+
+Group descriptor 0 checksum is 0xb92b, should be 0x2b5f. FIXED.
+Group descriptor 1 checksum is 0x2f53, should be 0x8d2f. FIXED.
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'foo2' in /d1 (1881) has deleted/unused inode 500. Clear? yes
+
+Entry 'bar2' in /d2 (3761) has deleted/unused inode 2100. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Unattached zero-length inode 1883. Clear? yes
+
+Unattached zero-length inode 3763. Clear? yes
+
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 21/7520 files (0.0% non-contiguous), 2352/30000 blocks
+Exit status is 1
diff --git a/tests/f_uninit_restart_fsck/expect.2 b/tests/f_uninit_restart_fsck/expect.2
new file mode 100644
index 00000000..156eb07f
--- /dev/null
+++ b/tests/f_uninit_restart_fsck/expect.2
@@ -0,0 +1,7 @@
+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
+test_filesys: 21/7520 files (0.0% non-contiguous), 2352/30000 blocks
+Exit status is 0
diff --git a/tests/f_uninit_restart_fsck/image.gz b/tests/f_uninit_restart_fsck/image.gz
new file mode 100644
index 00000000..f073186e
--- /dev/null
+++ b/tests/f_uninit_restart_fsck/image.gz
Binary files differ
diff --git a/tests/f_uninit_restart_fsck/name b/tests/f_uninit_restart_fsck/name
new file mode 100644
index 00000000..def2234f
--- /dev/null
+++ b/tests/f_uninit_restart_fsck/name
@@ -0,0 +1 @@
+re-start e2fsck only once for inodes in uninit space