diff options
author | Luis Henriques (SUSE) <luis.henriques@linux.dev> | 2024-04-05 15:24:05 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2024-04-15 23:59:35 -0400 |
commit | c6070404a2bed3ff675fc6500828ab6acee985f1 (patch) | |
tree | 2d103c8ccb9bf181852e77b8073e0a18faaa55a2 | |
parent | 7805308b7a111c3943d92eab412b048d059ce108 (diff) | |
download | e2fsprogs-c6070404a2bed3ff675fc6500828ab6acee985f1.tar.gz |
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) <luis.henriques@linux.dev>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Link: https://lore.kernel.org/r/20240405142405.12312-5-luis.henriques@linux.dev
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | tests/f_quota_deallocate_inode/expect.1 | 18 | ||||
-rw-r--r-- | tests/f_quota_deallocate_inode/expect.2 | 7 | ||||
-rw-r--r-- | tests/f_quota_deallocate_inode/image.gz | bin | 0 -> 11594 bytes | |||
-rw-r--r-- | tests/f_quota_deallocate_inode/name | 1 |
4 files changed, 26 insertions, 0 deletions
diff --git a/tests/f_quota_deallocate_inode/expect.1 b/tests/f_quota_deallocate_inode/expect.1 new file mode 100644 index 000000000..2b2f128db --- /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 000000000..802317949 --- /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 Binary files differnew file mode 100644 index 000000000..798a72c3a --- /dev/null +++ b/tests/f_quota_deallocate_inode/image.gz diff --git a/tests/f_quota_deallocate_inode/name b/tests/f_quota_deallocate_inode/name new file mode 100644 index 000000000..396887c16 --- /dev/null +++ b/tests/f_quota_deallocate_inode/name @@ -0,0 +1 @@ +update quota when deallocating bad inode |