From 99a0dffcd3e0ae03ba282ea35a38caeae438ba79 Mon Sep 17 00:00:00 2001 From: Lukas Czerner Date: Mon, 13 Aug 2018 15:17:05 +0200 Subject: [PATCH] tests: e2fsck must be able fix fs with resize_inode and meta_bg Test if the e2fsck can fix file system with resize_inode and meta_bg features enabled simultaneously. Signed-off-by: Lukas Czerner Signed-off-by: Theodore Ts'o --- tests/f_resize_inode_meta_bg/expect.1 | 71 ++++++++++++++++++++++++++ tests/f_resize_inode_meta_bg/expect.2 | 7 +++ tests/f_resize_inode_meta_bg/image.gz | Bin 0 -> 21467 bytes tests/f_resize_inode_meta_bg/name | 1 + 4 files changed, 79 insertions(+) create mode 100644 tests/f_resize_inode_meta_bg/expect.1 create mode 100644 tests/f_resize_inode_meta_bg/expect.2 create mode 100644 tests/f_resize_inode_meta_bg/image.gz create mode 100644 tests/f_resize_inode_meta_bg/name diff --git a/tests/f_resize_inode_meta_bg/expect.1 b/tests/f_resize_inode_meta_bg/expect.1 new file mode 100644 index 00000000..12055fc7 --- /dev/null +++ b/tests/f_resize_inode_meta_bg/expect.1 @@ -0,0 +1,71 @@ +Resize_inode and meta_bg features are enabled. Those features are +not compatible. Resize inode should be disabled. Fix? yes + +Resize_inode not enabled, but the resize inode is non-zero. Clear? yes + +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Directory inode 2, block #0, offset 0: directory has no checksum. +Fix? yes + +First entry '' (inode=348) in directory inode 2 (???) should be '.' +Fix? yes + +Setting filetype for entry '.' in ??? (2) to 2. +Missing '..' in directory inode 2. +Fix? yes + +Setting filetype for entry '..' in ??? (2) to 2. +Directory inode 2, block #0, offset 860: directory corrupted +Salvage? yes + +Directory inode 11, block #0, offset 0: directory corrupted +Salvage? yes + +Missing '.' in directory inode 11. +Fix? yes + +Setting filetype for entry '.' in ??? (11) to 2. +Missing '..' in directory inode 11. +Fix? yes + +Setting filetype for entry '..' in ??? (11) to 2. +Directory inode 11, block #1, offset 0: directory corrupted +Salvage? yes + +Directory inode 11, block #2, offset 0: directory corrupted +Salvage? yes + +Entry '' in ??? (11) has a zero-length name. +Clear? yes + +Directory inode 11, block #3, offset 864: directory corrupted +Salvage? yes + +Pass 3: Checking directory connectivity +'..' in / (2) is (0), should be / (2). +Fix? yes + +Unconnected directory inode 11 (/???) +Connect to /lost+found? yes + +/lost+found not found. Create? yes + +Pass 3A: Optimizing directories +Pass 4: Checking reference counts +Inode 11 ref count is 3, should be 2. Fix? yes + +Pass 5: Checking group summary information +Block bitmap differences: -246 +Fix? yes + +Free blocks count wrong for group #0 (160, counted=161). +Fix? yes + +Free blocks count wrong (2714, counted=2715). +Fix? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 12/960 files (0.0% non-contiguous), 1125/3840 blocks +Exit status is 1 diff --git a/tests/f_resize_inode_meta_bg/expect.2 b/tests/f_resize_inode_meta_bg/expect.2 new file mode 100644 index 00000000..0df9a40a --- /dev/null +++ b/tests/f_resize_inode_meta_bg/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: 12/960 files (0.0% non-contiguous), 1125/3840 blocks +Exit status is 0 diff --git a/tests/f_resize_inode_meta_bg/image.gz b/tests/f_resize_inode_meta_bg/image.gz new file mode 100644 index 0000000000000000000000000000000000000000..9966a7ca770db7b7fbc001f409210473d9ec2932 GIT binary patch literal 21467 zcmeHOdstNEy0@#_ZRTm0S$QF|q%A5b0RrMwZWH8YAsC=dra;1?*+xQYu-e<5<|acU zxyWTwVMe()H50H6aaE>xg`6dfBf?as?B$H2v4C8#*6)0_zK!SE=j`*G^E~J5Kib3d z{=qkX>-WCj@4bBQyGA^6e)X##GFB%HyCZ28lQ_)PF??%G;;wz))vo&EhTED-(wlEv zd}r;<6}Qh1FFgF-h{eB~xx6{xm1j;Cju~_R-Qk7lUyT2<`lY7I^s17|@3M=J1UwnB z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