]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librados/list: print reason why test fails 41594/head
authorKefu Chai <kchai@redhat.com>
Mon, 31 May 2021 03:13:55 +0000 (11:13 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 31 May 2021 03:13:55 +0000 (11:13 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/librados/list.cc

index 829890c1ad9058c955bea0af3eab8ce882048de5..3307db5ac9c3f4b2e1afca84b7144c9221040aa7 100644 (file)
@@ -480,8 +480,12 @@ TEST_F(LibRadosList, EnumerateObjectsSplit) {
 
   // Ensure a non-power-of-two PG count to avoid only
   // touching the easy path.
-  ASSERT_TRUE(set_pg_num(&s_cluster, pool_name, 11).empty());
-  ASSERT_TRUE(set_pgp_num(&s_cluster, pool_name, 11).empty());
+  if (auto error = set_pg_num(&s_cluster, pool_name, 11); !error.empty()) {
+    GTEST_FAIL() << error;
+  }
+  if (auto error = set_pgp_num(&s_cluster, pool_name, 11); !error.empty()) {
+    GTEST_FAIL() << error;
+  }
 
   rados_object_list_cursor begin = rados_object_list_begin(ioctx);
   rados_object_list_cursor end = rados_object_list_end(ioctx);