From 541ce8f2bb6f91834b5d5b7c98bd4de8998dccc5 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 14 Jun 2023 15:15:48 -0400 Subject: [PATCH] tests: add test for handling an invalid symlink in an inline directory Add a test for the commit "e2fsck: fix handling of a invalid symlink in an inline_data directory" Signed-off-by: Theodore Ts'o --- tests/f_inlinedir_bad_symlink/expect.1 | 12 ++++++++++++ tests/f_inlinedir_bad_symlink/expect.2 | 7 +++++++ tests/f_inlinedir_bad_symlink/image.gz | Bin 0 -> 1797 bytes tests/f_inlinedir_bad_symlink/name | 1 + 4 files changed, 20 insertions(+) create mode 100644 tests/f_inlinedir_bad_symlink/expect.1 create mode 100644 tests/f_inlinedir_bad_symlink/expect.2 create mode 100644 tests/f_inlinedir_bad_symlink/image.gz create mode 100644 tests/f_inlinedir_bad_symlink/name diff --git a/tests/f_inlinedir_bad_symlink/expect.1 b/tests/f_inlinedir_bad_symlink/expect.1 new file mode 100644 index 0000000..e1d0e87 --- /dev/null +++ b/tests/f_inlinedir_bad_symlink/expect.1 @@ -0,0 +1,12 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Symlink /a/7 (inode #19) is invalid. +Clear? yes + +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 19/112 files (0.0% non-contiguous), 16/200 blocks +Exit status is 1 diff --git a/tests/f_inlinedir_bad_symlink/expect.2 b/tests/f_inlinedir_bad_symlink/expect.2 new file mode 100644 index 0000000..b881d65 --- /dev/null +++ b/tests/f_inlinedir_bad_symlink/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: 19/112 files (0.0% non-contiguous), 16/200 blocks +Exit status is 0 diff --git a/tests/f_inlinedir_bad_symlink/image.gz b/tests/f_inlinedir_bad_symlink/image.gz new file mode 100644 index 0000000000000000000000000000000000000000..c5bd71a3b5d3e685ce1ca34650e9325aabf2f498 GIT binary patch literal 1797 zcmeHFZ!p^j7>>HF^p-;%>Xe*+jV3K){xsaU$rPp24pl16*2p3>RYJ_4h^f{o>QB#A zS(9aDRvS4idKUJps<@VkrCUOXUoEFwB){L-=YHt7ed+t{dG3AQ=e_5BQ8iXp zBHNo8`z)!nFDYb%Mn=m_CLczuDKFQk(zgdq8bx@6`dL2Dw8{_BUfOO~Di1%}w*1TKdDmNHxO?s;$?EyVo0DxPd z5+{-yB48bZL)RiLe3Jb-a((K$0u3GhAufIs9)XNcO~WO=fl5ioS-bV^@z2oivE#S+ zLCOO#_NnZX*+{0Wv=>u(xpMEy-1_XA{)JG_0sD zHHapQ#%ejtjYoy{w?D)sQA7nj_XV}5SWO-Z2i1$lGR9$K9!8HNQGouDbBJ=Wy>e?* zd`KP+b6lR`qjt7#oaQ6xkGG9+W;vVBlgtz&5QyoJB`oGKXDqz^ndL4tN104Os290l zw$P#rpPEV_jBnzyBa>&F$h>0!ZL!ZGj?Og;`l{YXlXb(ieY+B7WU(LoTw=ywMCDiS zz{|^D%vtZ!Mx&WEv1o1c1ajWo-ZRS4!s8(*Y94H}=L175sDeTl9WRBhN7d{wL~ifx z(r;PI;QDr(Z`z)_5v47EOVyj&uHyc?#vh5ePKmxuj_z!?!AG_fadCxx-JYTB2UeD{ zIScn#)K6)*^OtgRe>P$0@K9*w*~QTyboiB`03li-nbbVhfO9g(W&KL*YG7Z^%gw@u(CXH6CoPcZT zBUAd6B*v@i{r!#erk6TWSl~pMKdp*v7CdKs9SsD?hZcplbgx*m_X^nPdaawf5Sd=e zcbmRglB{mlYF+uB5kA4cJ@oFGD+tSG%M4`qOVEtr&)1;6p2at7RAWN0yH1}2E`Vy@ zJfM|aQq;3+^`aRGsOAizHH)NEbl;~q>@D`Dk9x