From: Christopher Hoffman Date: Fri, 10 Oct 2025 15:10:33 +0000 (+0000) Subject: test: Add statfs test case for mixed quotas X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F66473%2Fhead;p=ceph.git test: Add statfs test case for mixed quotas Signed-off-by: Christopher Hoffman (cherry picked from commit 2b057ec7bb40855e3be3cb0de12b63f8c10b450e) --- diff --git a/src/test/libcephfs/test.cc b/src/test/libcephfs/test.cc index 9a74603c25b..733714a3f8b 100644 --- a/src/test/libcephfs/test.cc +++ b/src/test/libcephfs/test.cc @@ -1029,6 +1029,7 @@ TEST(LibCephFS, StatfsQuota) { ASSERT_EQ(0, ceph_mkdir(cmount, quota_dir, 0777)); EXPECT_EQ(0, ceph_setxattr(cmount, quota_dir, "ceph.quota.max_files", "10000", 05, 0)); + EXPECT_EQ(0, ceph_setxattr(cmount, "/", "ceph.quota.max_bytes", "20G", 03, 0)); const int num_quota_files = 1; char quota_file[256]; @@ -1057,6 +1058,7 @@ TEST(LibCephFS, StatfsQuota) { struct statvfs reg_stvbuf; ASSERT_EQ(0, ceph_statfs(cmount, "test_statfs_regular_1", ®_stvbuf)); ASSERT_GT(reg_stvbuf.f_files, quota_stvbuf.f_files); + ASSERT_EQ(21474836480, quota_stvbuf.f_blocks*quota_stvbuf.f_bsize); for (int i = 0; i < num_reg_files; i++) { sprintf(regular_file, "test_statfs_regular_%d", i);