diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:49:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:49:25 +0000 |
commit | 464df1d5e5ab1322e2dd0a7796939fff1aeefa9a (patch) | |
tree | 6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /tests/f_quota | |
parent | Initial commit. (diff) | |
download | e2fsprogs-upstream.tar.xz e2fsprogs-upstream.zip |
Adding upstream version 1.47.0.upstream/1.47.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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 | 11 | ||||
-rw-r--r-- | tests/f_quota_extent_opt/expect.1 | 15 | ||||
-rw-r--r-- | tests/f_quota_extent_opt/expect.2 | 7 | ||||
-rw-r--r-- | tests/f_quota_extent_opt/image.gz | bin | 0 -> 9018 bytes | |||
-rw-r--r-- | tests/f_quota_extent_opt/name | 1 | ||||
-rw-r--r-- | tests/f_quota_invalid_inum/expect.1 | 15 | ||||
-rw-r--r-- | tests/f_quota_invalid_inum/expect.2 | 7 | ||||
-rw-r--r-- | tests/f_quota_invalid_inum/image.gz | bin | 0 -> 583 bytes | |||
-rw-r--r-- | tests/f_quota_invalid_inum/name | 1 |
15 files changed, 106 insertions, 0 deletions
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..2645485 --- /dev/null +++ b/tests/f_quota/expect.0 @@ -0,0 +1,21 @@ +debugfs: list_quota user + user id space 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 space quota limit inodes quota limit + 0 16384 0 0 5 0 0 +debugfs: get_quota user 0 + user id space quota limit inodes quota limit + 0 13312 0 0 2 0 0 +debugfs: get_quota user 100 + user id space quota limit inodes quota limit + 100 2048 32 50 2 20 30 +debugfs: get_quota user 34 + user id space quota limit inodes quota limit + 34 1024 0 0 1 0 0 +debugfs: get_quota group 0 + group id space 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 Binary files differnew file mode 100644 index 0000000..9cea655 --- /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 0000000..27ea8ba --- /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 0000000..bbe6a9f --- /dev/null +++ b/tests/f_quota/script @@ -0,0 +1,11 @@ +AFTER_CMD='$DEBUGFS -f $test_dir/debugfs-cmds $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $test_name.0.log' +PASS_ZERO=true + +$TUNE2FS -h 2>&1 | grep -q quota_options +if [ $? != 0 ] ; then + rm -f $TMPFILE + echo "$test_name: $test_description: skipped (quota not enabled)" + return 0 +fi + +. $cmd_dir/run_e2fsck diff --git a/tests/f_quota_extent_opt/expect.1 b/tests/f_quota_extent_opt/expect.1 new file mode 100644 index 0000000..002c9b6 --- /dev/null +++ b/tests/f_quota_extent_opt/expect.1 @@ -0,0 +1,15 @@ +Pass 1: Checking inodes, blocks, and sizes +Inode 12 extent tree (at level 1) could be narrower. Optimize? yes + +Pass 1E: Optimizing extent trees +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 (147456, 3) != expected (148480, 3) +Update quota info for quota type 0? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 12/1024 files (25.0% non-contiguous), 1339/4096 blocks +Exit status is 1 diff --git a/tests/f_quota_extent_opt/expect.2 b/tests/f_quota_extent_opt/expect.2 new file mode 100644 index 0000000..0bd4632 --- /dev/null +++ b/tests/f_quota_extent_opt/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/1024 files (25.0% non-contiguous), 1339/4096 blocks +Exit status is 0 diff --git a/tests/f_quota_extent_opt/image.gz b/tests/f_quota_extent_opt/image.gz Binary files differnew file mode 100644 index 0000000..21dcfbd --- /dev/null +++ b/tests/f_quota_extent_opt/image.gz diff --git a/tests/f_quota_extent_opt/name b/tests/f_quota_extent_opt/name new file mode 100644 index 0000000..8c5d7a9 --- /dev/null +++ b/tests/f_quota_extent_opt/name @@ -0,0 +1 @@ +extent optimization with quota diff --git a/tests/f_quota_invalid_inum/expect.1 b/tests/f_quota_invalid_inum/expect.1 new file mode 100644 index 0000000..322ac09 --- /dev/null +++ b/tests/f_quota_invalid_inum/expect.1 @@ -0,0 +1,15 @@ +Invalid user quota inode 808464432. Fix? yes + +Invalid group quota inode 808464432. Fix? yes + +Invalid project quota inode 808464432. Fix? yes + +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: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 11/16 files (0.0% non-contiguous), 21/100 blocks +Exit status is 1 diff --git a/tests/f_quota_invalid_inum/expect.2 b/tests/f_quota_invalid_inum/expect.2 new file mode 100644 index 0000000..41ceefb --- /dev/null +++ b/tests/f_quota_invalid_inum/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: 11/16 files (0.0% non-contiguous), 21/100 blocks +Exit status is 0 diff --git a/tests/f_quota_invalid_inum/image.gz b/tests/f_quota_invalid_inum/image.gz Binary files differnew file mode 100644 index 0000000..28be80e --- /dev/null +++ b/tests/f_quota_invalid_inum/image.gz diff --git a/tests/f_quota_invalid_inum/name b/tests/f_quota_invalid_inum/name new file mode 100644 index 0000000..a742406 --- /dev/null +++ b/tests/f_quota_invalid_inum/name @@ -0,0 +1 @@ +invalid quota inode numbers |