diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-05-11 00:01:33 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-05-13 10:13:26 -0400 |
commit | 133d9fbff35ca1e68df5e77c6c68cfa2c7158e88 (patch) | |
tree | aedb1dee09586ed8de200d3d3915f4c1b00236f1 | |
parent | 75fc42f1a1fa98a722540e6a2761be17126dd080 (diff) | |
download | e2fsprogs-133d9fbff35ca1e68df5e77c6c68cfa2c7158e88.tar.gz |
tests: add basic e2fsck regression test for fixing the quota inode
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Aditya Kali <adityakali@google.com>
-rw-r--r-- | tests/f_quota/debugfs-cmds | 7 | ||||
-rw-r--r-- | tests/f_quota/expect.0 | 21 | ||||
-rw-r--r-- | tests/f_quota/expect.1 | 13 | ||||
-rw-r--r-- | tests/f_quota/expect.2 | 7 | ||||
-rw-r--r-- | tests/f_quota/image.gz | bin | 0 -> 1046 bytes | |||
-rw-r--r-- | tests/f_quota/name | 1 | ||||
-rw-r--r-- | tests/f_quota/script | 4 |
7 files changed, 53 insertions, 0 deletions
diff --git a/tests/f_quota/debugfs-cmds b/tests/f_quota/debugfs-cmds new file mode 100644 index 00000000..112a3ff1 --- /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 00000000..c0ad63dd --- /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 00000000..0b3b4cf6 --- /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 00000000..bfc558d9 --- /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 Binary files differnew file mode 100644 index 00000000..9cea6556 --- /dev/null +++ b/tests/f_quota/image.gz diff --git a/tests/f_quota/name b/tests/f_quota/name new file mode 100644 index 00000000..27ea8baa --- /dev/null +++ b/tests/f_quota/name @@ -0,0 +1 @@ +fix incorrect usage stats in quota diff --git a/tests/f_quota/script b/tests/f_quota/script new file mode 100644 index 00000000..bf25e071 --- /dev/null +++ b/tests/f_quota/script @@ -0,0 +1,4 @@ +AFTER_CMD='$DEBUGFS -f $test_dir/debugfs-cmds $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $test_name.0.log' +PASS_ZERO=true + +. $cmd_dir/run_e2fsck |