From: Luis Henriques (SUSE) Date: Fri, 5 Apr 2024 14:24:05 +0000 (+0100) Subject: tests: new test to check quota after a bad inode deallocation X-Git-Tag: v1.47.1-rc1~53 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c6070404a2bed3ff675fc6500828ab6acee985f1;p=tools%2Fe2fsprogs.git tests: new test to check quota after a bad inode deallocation This new test validates e2fsck by verifying that quota is updated after a bad inode is deallocated. It mimics fstest ext4/019 by including a filesystem image where a symbolic link was created to an existing file, using a long symlink name. This symbolic link was then wiped with: # debugfs -w -R 'zap -f /testlink 0' f_testnew/image Signed-off-by: Luis Henriques (SUSE) Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20240405142405.12312-5-luis.henriques@linux.dev Signed-off-by: Theodore Ts'o --- diff --git a/tests/f_quota_deallocate_inode/expect.1 b/tests/f_quota_deallocate_inode/expect.1 new file mode 100644 index 0000000..2b2f128 --- /dev/null +++ b/tests/f_quota_deallocate_inode/expect.1 @@ -0,0 +1,18 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Symlink /testlink (inode #14) is invalid. +Clear? yes + +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +[QUOTA WARNING] Usage inconsistent for ID 0:actual (15360, 4) != expected (16384, 5) +Update quota info for quota type 0? yes + +[QUOTA WARNING] Usage inconsistent for ID 0:actual (15360, 4) != expected (16384, 5) +Update quota info for quota type 1? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 13/256 files (15.4% non-contiguous), 1157/8192 blocks +Exit status is 1 diff --git a/tests/f_quota_deallocate_inode/expect.2 b/tests/f_quota_deallocate_inode/expect.2 new file mode 100644 index 0000000..8023179 --- /dev/null +++ b/tests/f_quota_deallocate_inode/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: 13/256 files (15.4% non-contiguous), 1157/8192 blocks +Exit status is 0 diff --git a/tests/f_quota_deallocate_inode/image.gz b/tests/f_quota_deallocate_inode/image.gz new file mode 100644 index 0000000..798a72c Binary files /dev/null and b/tests/f_quota_deallocate_inode/image.gz differ diff --git a/tests/f_quota_deallocate_inode/name b/tests/f_quota_deallocate_inode/name new file mode 100644 index 0000000..396887c --- /dev/null +++ b/tests/f_quota_deallocate_inode/name @@ -0,0 +1 @@ +update quota when deallocating bad inode