From 5e0b6e4df04e4e7cbd7fd573bdd0cf38ac48610f Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Fri, 30 Oct 2015 13:28:25 -0400 Subject: [PATCH] librgw: fix 2 dout problems * rgw_file.cc needed to include include/assert.h AFTER all rgw includes, for some reason * use *_dout syntax as target of bl.hexdump in lbrgw_file_gp.cc Signed-off-by: Matt Benjamin --- src/rgw/rgw_file.cc | 8 ++++++++ src/test/librgw_file_gp.cc | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_file.cc b/src/rgw/rgw_file.cc index a3b6dc409af0a..3e06cd7abe760 100644 --- a/src/rgw/rgw_file.cc +++ b/src/rgw/rgw_file.cc @@ -22,6 +22,12 @@ #include "rgw_file.h" +/* XXX + * ASSERT_H somehow not defined after all the above (which bring + * in common/debug.h [e.g., dout]) + */ +#include "include/assert.h" + #define dout_subsys ceph_subsys_rgw extern RGWLib librgw; @@ -410,6 +416,8 @@ int rgw_readv(struct rgw_fs *rgw_fs, if (! rgw_fh->is_object()) return EINVAL; + dout(15) << "test dout" << dendl; + buffer::list bl; RGWGetObjRequest req(cct, fs->get_user(), rgw_fh->bucket_name(), rgw_fh->object_name(), uio->uio_offset, uio->uio_resid, diff --git a/src/test/librgw_file_gp.cc b/src/test/librgw_file_gp.cc index 6de26aaa36e2d..eb98177343811 100644 --- a/src/test/librgw_file_gp.cc +++ b/src/test/librgw_file_gp.cc @@ -215,7 +215,9 @@ TEST(LibRGW, GET_OBJECT) { ASSERT_EQ(ret, 0); buffer::list bl; bl.push_back(buffer::create_static(nread, sbuf)); - bl.hexdump(std::cout); + dout(15) << ""; + bl.hexdump(*_dout); + *_dout << dendl; } } @@ -291,7 +293,11 @@ TEST(LibRGW, READV) buffer::create_static(vio->vio_len, static_cast(vio->vio_base))); } - bl.hexdump(std::cout); + + dout(15) << ""; + bl.hexdump(*_dout); + *_dout << dendl; + // release resources ASSERT_NE(uio->uio_rele, nullptr); if (uio->uio_rele) { -- 2.39.5