From: Matan Breizman Date: Wed, 23 Nov 2022 17:18:10 +0000 (+0000) Subject: test/librados/aio_cxx: use fmt formatting X-Git-Tag: v18.1.0~829^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=76e4c5d83c20ae3c7191dbc8127e44f6750e40a3;p=ceph-ci.git test/librados/aio_cxx: use fmt formatting Signed-off-by: Matan Breizman --- diff --git a/src/test/librados/aio_cxx.cc b/src/test/librados/aio_cxx.cc index b98d369a1d3..fb657ff18ec 100644 --- a/src/test/librados/aio_cxx.cc +++ b/src/test/librados/aio_cxx.cc @@ -14,6 +14,7 @@ #include "include/stringify.h" #include "include/scope_guard.h" #include "common/ceph_mutex.h" +#include #include "test_cxx.h" #include "crimson_utils.h" @@ -2295,9 +2296,14 @@ TEST(LibRadosAio, SimplePoolEIOFlag) { ASSERT_TRUE(my_completion); bufferlist empty; - ASSERT_EQ(0, test_data.m_cluster.mon_command( - "{\"prefix\": \"osd pool set\", \"pool\": \"" + test_data.m_pool_name + - "\", \"var\": \"eio\", \"val\": \"true\"}", empty, nullptr, nullptr)); + ASSERT_EQ(0, test_data.m_cluster.mon_command( + fmt::format(R"({{ + "prefix": "osd pool set", + "pool": "{}", + "var": "eio", + "val": "true" + }})", test_data.m_pool_name), + empty, nullptr, nullptr)); bufferlist bl; bl.append("some data"); @@ -2338,8 +2344,13 @@ TEST(LibRadosAio, PoolEIOFlag) { [&] { bufferlist empty; ASSERT_EQ(0, test_data.m_cluster.mon_command( - "{\"prefix\": \"osd pool set\", \"pool\": \"" + test_data.m_pool_name + - "\", \"var\": \"eio\", \"val\": \"true\"}", empty, nullptr, nullptr)); + fmt::format(R"({{ + "prefix": "osd pool set", + "pool": "{}", + "var": "eio", + "val": "true" + }})", test_data.m_pool_name), + empty, nullptr, nullptr)); }); }