From 133d9fbff35ca1e68df5e77c6c68cfa2c7158e88 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 11 May 2014 00:01:33 -0400 Subject: [PATCH] tests: add basic e2fsck regression test for fixing the quota inode Signed-off-by: "Theodore Ts'o" Reviewed-by: Aditya Kali --- tests/f_quota/debugfs-cmds | 7 +++++++ tests/f_quota/expect.0 | 21 +++++++++++++++++++++ tests/f_quota/expect.1 | 13 +++++++++++++ tests/f_quota/expect.2 | 7 +++++++ tests/f_quota/image.gz | Bin 0 -> 1046 bytes tests/f_quota/name | 1 + tests/f_quota/script | 4 ++++ 7 files changed, 53 insertions(+) create mode 100644 tests/f_quota/debugfs-cmds create mode 100644 tests/f_quota/expect.0 create mode 100644 tests/f_quota/expect.1 create mode 100644 tests/f_quota/expect.2 create mode 100644 tests/f_quota/image.gz create mode 100644 tests/f_quota/name create mode 100644 tests/f_quota/script diff --git a/tests/f_quota/debugfs-cmds b/tests/f_quota/debugfs-cmds new file mode 100644 index 0000000..112a3ff --- /dev/null +++ b/tests/f_quota/debugfs-cmds @@ -0,0 +1,7 @@ +list_quota user +list_quota group +get_quota user 0 +get_quota user 100 +get_quota user 34 +get_quota group 0 + diff --git a/tests/f_quota/expect.0 b/tests/f_quota/expect.0 new file mode 100644 index 0000000..c0ad63d --- /dev/null +++ b/tests/f_quota/expect.0 @@ -0,0 +1,21 @@ +debugfs: list_quota user + user id blocks quota limit inodes quota limit + 0 13312 0 0 2 0 0 + 34 1024 0 0 1 0 0 + 100 2048 32 50 2 20 30 +debugfs: list_quota group +group id blocks quota limit inodes quota limit + 0 16384 0 0 5 0 0 +debugfs: get_quota user 0 + user id blocks quota limit inodes quota limit + 0 13312 0 0 2 0 0 +debugfs: get_quota user 100 + user id blocks quota limit inodes quota limit + 100 2048 32 50 2 20 30 +debugfs: get_quota user 34 + user id blocks quota limit inodes quota limit + 34 1024 0 0 1 0 0 +debugfs: get_quota group 0 +group id blocks quota limit inodes quota limit + 0 16384 0 0 5 0 0 +debugfs: diff --git a/tests/f_quota/expect.1 b/tests/f_quota/expect.1 new file mode 100644 index 0000000..0b3b4cf --- /dev/null +++ b/tests/f_quota/expect.1 @@ -0,0 +1,13 @@ +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 +[QUOTA WARNING] Usage inconsistent for ID 0:actual (13312, 2) != expected (14336, 3) +[QUOTA WARNING] Usage inconsistent for ID 100:actual (2048, 2) != expected (1024, 1) +Update quota info for quota type 0? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 14/16 files (14.3% non-contiguous), 36/100 blocks +Exit status is 1 diff --git a/tests/f_quota/expect.2 b/tests/f_quota/expect.2 new file mode 100644 index 0000000..bfc558d --- /dev/null +++ b/tests/f_quota/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: 14/16 files (14.3% non-contiguous), 36/100 blocks +Exit status is 0 diff --git a/tests/f_quota/image.gz b/tests/f_quota/image.gz new file mode 100644 index 0000000000000000000000000000000000000000..9cea6556e941fb0e3fb2bf09a29895ca246cad50 GIT binary patch literal 1046 zcmbV}`!m}I0Kn7bR_=`0t)|q3RXw^xhtO&ws@Lq=5szqQLbK5sMKU#0im;uK8LFA< zBMWVfNK-OrBoR``Sk;@vW7J8k#KK8b?WGJ zLY@m`+ar5a)RNV1#fpKS3Z2IUqN)q#LmeLdWIJc)w0Yl?tDOn*8LuLIS)p?q+xCt` z-I;E>6LuZP(7r9O*0K4#GAEU7C{G(v|q24 zE|VrqJ!C%0FY_kow1I-Vs^-X_R_d4s(sHhro94H3IES&GZO3!Ez%2bLnjmx=&#Nix z>@h5KfFqH9Az=$BDqOshTc3DZjlgB%U#e3z)sGf8lYD*AssjDF`%%u-X)Yxt9z)Gf z^VCY|!_O8k{kBLw=nsC?M)@NAd>M2D9s`yhSiM3&IXbonYo&z0{x3m<#o0Ub2b3%d zX1J#qmiH_>nXIl{EJL()0YLcR6X$@pzsFI8LZ>Mh*9uCOTS|F}ZG?8>Eix!jHv0Tx zqjb`$U3I>WXxP4dA>a>j*;qGY*GpS^d@Dg>FBB>|WO`7TgFctun@s&va}u6V7=}`= z7FnWJY0wcn*LVpCg+L%e1A<7BHGw$&CDE1q~*B5SaS3)Suc5RPgyJ zAOT?OOLhPpM`Rf1>5snQ94ZHm1G0^klo!F^3`f+j-IV$RNU$4wWa@?cGC*=8W%TTh z{%~`EW!gP5;yQDJh+O7#$5rRpIN$4!HGCH)c3SRj%ehg>qNgAV*T)P4i@z$6?;+lI z&OkakXmf&awacxsjH}TV1gSh!Bwh6Cn)hJCNp!I>W0cOaWz