From 19c5d41d5cb393d293bcd67647883a2f86a253c5 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Sun, 10 Aug 2014 18:51:32 -0400 Subject: [PATCH] tests: add regression tests for inlinedata fixes Add a regression test to ensure that previous patches' fixes to e2fsck do not revert. Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o --- tests/f_inlinedata_repair/expect.1 | 75 +++++++++++++++++++++++++++++ tests/f_inlinedata_repair/expect.2 | 7 +++ tests/f_inlinedata_repair/image.gz | Bin 0 -> 3201 bytes tests/f_inlinedata_repair/name | 1 + 4 files changed, 83 insertions(+) create mode 100644 tests/f_inlinedata_repair/expect.1 create mode 100644 tests/f_inlinedata_repair/expect.2 create mode 100644 tests/f_inlinedata_repair/image.gz create mode 100644 tests/f_inlinedata_repair/name diff --git a/tests/f_inlinedata_repair/expect.1 b/tests/f_inlinedata_repair/expect.1 new file mode 100644 index 000000000..faba192e0 --- /dev/null +++ b/tests/f_inlinedata_repair/expect.1 @@ -0,0 +1,75 @@ +Pass 1: Checking inodes, blocks, and sizes +Inode 12 has INLINE_DATA_FL flag but extended attribute not found. Truncate? yes + +Inode 16, i_size is 56, should be 60. Fix? yes + +Inode 24, i_size is 59, should be 60. Fix? yes + +Inode 28 is a unknown file type with mode 00 but it looks like it is really a directory. +Fix? yes + +Inode 36 is a unknown file type with mode 00 but it looks like it is really a directory. +Fix? yes + +Inode 36, i_size is 5, should be 60. Fix? yes + +Pass 2: Checking directory structure +Directory inode 20, block #0, offset 4: directory corrupted +Salvage? yes + +Directory inode 28, block #0, offset 4: directory corrupted +Salvage? yes + +Directory inode 32, block #0, offset 4: directory corrupted +Salvage? yes + +Directory inode 32, block #0, offset 4: directory corrupted +Salvage? yes + +Entry '..' in ??? (36) has invalid inode #: 1633774699. +Clear? yes + +Directory inode 36, block #0, offset 4: directory corrupted +Salvage? yes + +Symlink /3 (inode #14) is invalid. +Clear? yes + +Inode 38 (/B) has invalid mode (00). +Clear? yes + +Entry 'A' in / (2) has an incorrect filetype (was 1, should be 2). +Fix? yes + +Pass 3: Checking directory connectivity +'..' in /A (36) is ??? (1633774699), should be / (2). +Fix? yes + +Error while adjusting inode count on inode 0 +Pass 4: Checking reference counts +Unattached zero-length inode 22. Clear? yes + +Unattached zero-length inode 23. Clear? yes + +Unattached zero-length inode 29. Clear? yes + +Unattached zero-length inode 30. Clear? yes + +Unattached zero-length inode 31. Clear? yes + +Unattached zero-length inode 33. Clear? yes + +Unattached zero-length inode 34. Clear? yes + +Unattached zero-length inode 35. Clear? yes + +Inode 36 ref count is 1, should be 2. Fix? yes + +Pass 5: Checking group summary information +Directories count wrong for group #0 (7, counted=8). +Fix? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 28/128 files (0.0% non-contiguous), 18/512 blocks +Exit status is 1 diff --git a/tests/f_inlinedata_repair/expect.2 b/tests/f_inlinedata_repair/expect.2 new file mode 100644 index 000000000..519f21d70 --- /dev/null +++ b/tests/f_inlinedata_repair/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: 28/128 files (0.0% non-contiguous), 18/512 blocks +Exit status is 0 diff --git a/tests/f_inlinedata_repair/image.gz b/tests/f_inlinedata_repair/image.gz new file mode 100644 index 0000000000000000000000000000000000000000..c33d81dc60f828c89c9b743e64e0b9cf4224da1f GIT binary patch literal 3201 zc-rmOZB){C6bEq3%4X9nJ14UY(`F9m)3ne`>A~d+%bKBxn$s*(N_3h!r~Z4g(`@EB zb3K{Lv2sR;4=6r__+K@n&|*78s2#;&!c-Uv3jO8J|2KQH*E>6V$>+`e-gE9f_wB`B zU4eU1GZekVS~EgEeU##4GZP?jxXHg0j;b^ zUo#o0GCQS=d3_|A%o4PuwdAt%)34usyAn==4;+?`Pp z^!xeaZ2L3bnZ2M_poe`gQR+CCU zrLD)l*syTyFU_IO6ULgtVzop+Yu74%F6>WXh=s&wVF8f(4p&GhXIv}J4D0>meoiWR zJhy4)LQ#*KfleNO;zHirwFBRL&0Ixw(L~#h_!{SWlrwgVS6`sF|2TdSTWBl;AVu=dmOF&eX=yaPMmme#*vHU&IfeGIHbrsaPg+>j^8DwDx~X!my5 zM*d(<2WgXEnxH;Eq8xnWt_Jsunab>85Im3iZbD%FDve#8yCEshKCfwjKFF311Ufri zv{~h2GPRqaHXG<=hCY$_^F%{7Vo5K6-X0gRFhbDFYh%3;acb$#quzk6 zDz2ssFmEuQO=w7~5$!8|vxwf)37$%IFrSeY;}6kFoTE}Pogt}4)?x(yDrk$6S@;Nr zIcNa;7Rj4bzLfwipq)EM4bcgi-J)h_LL;wE;=9JgpCaUj&gb5`Ucr|!RiIyxY}^Jl zeu#5ul57m&dt_sQfWgVelD?Y7p!7ZzZWN)=LmJk5)`t5iO(KiK2B*_8QX(Creu$HZ zd}IufMJdqz94)vhtg00QFM<-F1U^4hgfv%e*6od8fIFMrkU7sWql1=6|?r#;t%eM`x}Ieu)6>N literal 0 Hc-jL100001 diff --git a/tests/f_inlinedata_repair/name b/tests/f_inlinedata_repair/name new file mode 100644 index 000000000..7e7e898d0 --- /dev/null +++ b/tests/f_inlinedata_repair/name @@ -0,0 +1 @@ +repair corrupt inline data files -- 2.47.3