Skip to content

Commit 2b057ec

Browse files
committed
test: Add statfs test case for mixed quotas
Signed-off-by: Christopher Hoffman <[email protected]>
1 parent dd02ea9 commit 2b057ec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/libcephfs/test.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,7 @@ TEST(LibCephFS, StatfsQuota) {
10311031

10321032
ASSERT_EQ(0, ceph_mkdir(cmount, quota_dir, 0777));
10331033
EXPECT_EQ(0, ceph_setxattr(cmount, quota_dir, "ceph.quota.max_files", "10000", 05, 0));
1034+
EXPECT_EQ(0, ceph_setxattr(cmount, "/", "ceph.quota.max_bytes", "20G", 03, 0));
10341035

10351036
const int num_quota_files = 1;
10361037
char quota_file[256];
@@ -1059,6 +1060,7 @@ TEST(LibCephFS, StatfsQuota) {
10591060
struct statvfs reg_stvbuf;
10601061
ASSERT_EQ(0, ceph_statfs(cmount, "test_statfs_regular_1", &reg_stvbuf));
10611062
ASSERT_GT(reg_stvbuf.f_files, quota_stvbuf.f_files);
1063+
ASSERT_EQ(21474836480, quota_stvbuf.f_blocks*quota_stvbuf.f_bsize);
10621064

10631065
for (int i = 0; i < num_reg_files; i++) {
10641066
sprintf(regular_file, "test_statfs_regular_%d", i);

0 commit comments

Comments
 (0)