From ac059b127094f6120d1c68995bfe01375dfcfa44 Mon Sep 17 00:00:00 2001 From: Christopher Hoffman Date: Fri, 10 Oct 2025 15:10:33 +0000 Subject: [PATCH] test: Add statfs test case for mixed quotas Signed-off-by: Christopher Hoffman (cherry picked from commit 2b057ec7bb40855e3be3cb0de12b63f8c10b450e) --- src/test/libcephfs/test.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/libcephfs/test.cc b/src/test/libcephfs/test.cc index 9a74603c25b1..733714a3f8ba 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); -- 2.47.3