[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240405142405.12312-4-luis.henriques@linux.dev>
Date: Fri, 5 Apr 2024 15:24:04 +0100
From: "Luis Henriques (SUSE)" <luis.henriques@...ux.dev>
To: Theodore Ts'o <tytso@....edu>,
Andreas Dilger <adilger@...ger.ca>
Cc: linux-ext4@...r.kernel.org,
"Luis Henriques (SUSE)" <luis.henriques@...ux.dev>
Subject: [PATCH v3 3/4] 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) <luis.henriques@...ux.dev>
---
tests/f_quota_shrinkdir/expect.1 | 18 ++++++++++++++++++
tests/f_quota_shrinkdir/expect.2 | 7 +++++++
tests/f_quota_shrinkdir/image.gz | Bin 0 -> 10761 bytes
tests/f_quota_shrinkdir/name | 1 +
4 files changed, 26 insertions(+)
create mode 100644 tests/f_quota_shrinkdir/expect.1
create mode 100644 tests/f_quota_shrinkdir/expect.2
create mode 100644 tests/f_quota_shrinkdir/image.gz
create mode 100644 tests/f_quota_shrinkdir/name
diff --git a/tests/f_quota_shrinkdir/expect.1 b/tests/f_quota_shrinkdir/expect.1
new file mode 100644
index 000000000000..e4fc48ea6f90
--- /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 000000000000..fcb2cb81441e
--- /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 0000000000000000000000000000000000000000..1fee3ca9c9b4cb61974be54b063c8f9e1ba49da1
GIT binary patch
literal 10761
zcmeI!Yg7|g9sqEB)W`8bx1RdO)ZK2~wg+(623l%hEf%aaN`M4N2*Cm(86mYeJfb01
zT3v00cI|?jHXu?VugNHJz)nbjBDhu&lzG_D5M3(P84)QRz#$>qp4|_gvpwDYxM!XF
z;huZ${c``m|Gocvc^}N1m;c`4oik_U=IzMI4!GC<#3y;#wQZvXIU#QM+qr*va(3?Q
z&GR>X5`X<QG{n8=se><V+48#`C!d;QeCCB`!cNaSI`inkc`wY{>hOQp`5Gxx32L^V
zZ}sT>M;tx6zxui#I=`kZ$lO^OEqqhg!Z|s6wQal0+LsK5`My4}=UD&wzFUd;{N)?{
zUbdo~9jp(Up7e%#lozrFt1Z3m_(c=NN9xK?6qV6L$-Oi4!*5I;$|KN8|4_z|`dZ}?
zKQ(GAS{?2|8lYG1tN`@...V8X<VKSR_<qk+OnD}GzsT$cDqOa4lLM%6HIJKp^nr*o
zi`h@...OJr(cwd?i{EGOIv+zWtrMQEI#r?^(5b!^2>O?3KZ65)xvh7WOh;Wg6E)v!
zU+wj74uzN*lVr(`>XEl6Kan|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EF``ac?U{>VKKdk>5@...6K<s
zCqiO?{1niu;~WS9F-o87<bXs4F9PaZ=fjLbz^0CM*apNS)(LEg8E~CyvOr4ORo?^+
zE2mtwg%<sfKj$<%W<_Mf>HDziIw<F{JFRV6XYLR>Z56qBE#Ew=-F@...Es?m@...K
z8&9?s1LxKr7_BVWpMhy@+V5(HQ?B1=kHbIuagsP_oAmO!k|X_xN2_}LJG{47^Bz2m
z`cS)nI`FYW<O1ddH~~(86W|0m0ZxDu-~>1UPJk2O1ULasfD_;ZH~~(86W|0m0Zzb=
iuUY-kPYm-|Kgz3}$%$|R|4E=Ny8h{7>VSX)0sjDYwfvs|
literal 0
HcmV?d00001
diff --git a/tests/f_quota_shrinkdir/name b/tests/f_quota_shrinkdir/name
new file mode 100644
index 000000000000..8772ae5c814b
--- /dev/null
+++ b/tests/f_quota_shrinkdir/name
@@ -0,0 +1 @@
+update quota on directory optimization
Powered by blists - more mailing lists