From: Luis Henriques (SUSE) Date: Fri, 5 Apr 2024 14:24:04 +0000 (+0100) Subject: tests: new test to check quota after directory optimization X-Git-Tag: v1.47.1-rc1~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7805308b7a111c3943d92eab412b048d059ce108;p=thirdparty%2Fe2fsprogs.git tests: new test to check quota after directory optimization This new test validates e2fsck by verifying that quota data is updated after a directory optimization is performed. This issue was initially found by fstest ext4/014, and this test was based on it. It includes a filesystem image where the lost+found directory is unlinked after a new link to it is created: # debugfs -w -R "ln lost+found foo" f_testnew/image # debugfs -w -R "unlink lost+found" f_testnew/image Signed-off-by: Luis Henriques (SUSE) Link: https://lore.kernel.org/r/20240405142405.12312-4-luis.henriques@linux.dev Signed-off-by: Theodore Ts'o --- diff --git a/tests/f_quota_shrinkdir/expect.1 b/tests/f_quota_shrinkdir/expect.1 new file mode 100644 index 00000000..e4fc48ea --- /dev/null +++ b/tests/f_quota_shrinkdir/expect.1 @@ -0,0 +1,18 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +/lost+found not found. Create? yes + +Pass 3A: Optimizing directories +Pass 4: Checking reference counts +Pass 5: Checking group summary information +[QUOTA WARNING] Usage inconsistent for ID 0:actual (3072, 3) != expected (13312, 2) +Update quota info for quota type 0? yes + +[QUOTA WARNING] Usage inconsistent for ID 0:actual (3072, 3) != expected (13312, 2) +Update quota info for quota type 1? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 12/256 files (16.7% non-contiguous), 1145/8192 blocks +Exit status is 1 diff --git a/tests/f_quota_shrinkdir/expect.2 b/tests/f_quota_shrinkdir/expect.2 new file mode 100644 index 00000000..fcb2cb81 --- /dev/null +++ b/tests/f_quota_shrinkdir/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/256 files (16.7% non-contiguous), 1145/8192 blocks +Exit status is 0 diff --git a/tests/f_quota_shrinkdir/image.gz b/tests/f_quota_shrinkdir/image.gz new file mode 100644 index 00000000..1fee3ca9 Binary files /dev/null and b/tests/f_quota_shrinkdir/image.gz differ diff --git a/tests/f_quota_shrinkdir/name b/tests/f_quota_shrinkdir/name new file mode 100644 index 00000000..8772ae5c --- /dev/null +++ b/tests/f_quota_shrinkdir/name @@ -0,0 +1 @@ +update quota on directory optimization