]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librgw: fix 2 dout problems
authorMatt Benjamin <mbenjamin@redhat.com>
Fri, 30 Oct 2015 17:28:25 +0000 (13:28 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 12 Feb 2016 17:05:28 +0000 (12:05 -0500)
* 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 <mbenjamin@redhat.com>
src/rgw/rgw_file.cc
src/test/librgw_file_gp.cc

index a3b6dc409af0a57f67abf77b839a2ab68d30aecd..3e06cd7abe760f6fa2ccbbc67ec66c8d8f1044f4 100644 (file)
 
 #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,
index 6de26aaa36e2d89e4b8b7cd93ebf433fccf902ae..eb98177343811a0d86634df8e2d25cc0ce428db3 100644 (file)
@@ -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<char*>(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) {