]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
tests: add test for handling an invalid symlink in an inline directory
authorTheodore Ts'o <tytso@mit.edu>
Wed, 14 Jun 2023 19:15:48 +0000 (15:15 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 14 Jun 2023 19:15:48 +0000 (15:15 -0400)
Add a test for the commit "e2fsck: fix handling of a invalid symlink
in an inline_data directory"

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
tests/f_inlinedir_bad_symlink/expect.1 [new file with mode: 0644]
tests/f_inlinedir_bad_symlink/expect.2 [new file with mode: 0644]
tests/f_inlinedir_bad_symlink/image.gz [new file with mode: 0644]
tests/f_inlinedir_bad_symlink/name [new file with mode: 0644]

diff --git a/tests/f_inlinedir_bad_symlink/expect.1 b/tests/f_inlinedir_bad_symlink/expect.1
new file mode 100644 (file)
index 0000000..e1d0e87
--- /dev/null
@@ -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 (file)
index 0000000..b881d65
--- /dev/null
@@ -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 (file)
index 0000000..c5bd71a
Binary files /dev/null and b/tests/f_inlinedir_bad_symlink/image.gz differ
diff --git a/tests/f_inlinedir_bad_symlink/name b/tests/f_inlinedir_bad_symlink/name
new file mode 100644 (file)
index 0000000..f7f7f0d
--- /dev/null
@@ -0,0 +1 @@
+bad symlink in an inline directory