]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_objectstore: error via derr too 14333/head
authorSage Weil <sage@redhat.com>
Wed, 5 Apr 2017 02:49:27 +0000 (22:49 -0400)
committerSage Weil <sage@redhat.com>
Wed, 5 Apr 2017 14:23:38 +0000 (10:23 -0400)
This helps establish timing relative to the log.

Signed-off-by: Sage Weil <sage@redhat.com>
src/test/objectstore/store_test.cc

index 2a69c72364cc5b37db4d5d61ba811ba20b5f0a99..627a5337dbdfe33ed1bc7092c40e9649a6edf901 100644 (file)
 #include <iostream>
 #include <time.h>
 #include <sys/mount.h>
+#include <boost/scoped_ptr.hpp>
+#include <boost/random/mersenne_twister.hpp>
+#include <boost/random/uniform_int.hpp>
+#include <boost/random/binomial_distribution.hpp>
+#include <gtest/gtest.h>
+
 #include "os/ObjectStore.h"
 #include "os/filestore/FileStore.h"
 #if defined(HAVE_LIBAIO)
 #include "common/Cond.h"
 #include "common/errno.h"
 #include "include/stringify.h"
-#include <boost/scoped_ptr.hpp>
-#include <boost/random/mersenne_twister.hpp>
-#include <boost/random/uniform_int.hpp>
-#include <boost/random/binomial_distribution.hpp>
-#include <gtest/gtest.h>
 
 #include "include/unordered_map.h"
 #include "store_test_fixture.h"
 
+
 typedef boost::mt11213b gen_type;
 
+#define dout_context g_ceph_context
+
 #if GTEST_HAS_PARAM_TEST
 
 static bool bl_eq(bufferlist& expected, bufferlist& actual)
@@ -53,6 +57,9 @@ static bool bl_eq(bufferlist& expected, bufferlist& actual)
     cout << "--- buffer lengths mismatch " << std::hex
          << "expected 0x" << expected.length() << " != actual 0x"
          << actual.length() << std::dec << std::endl;
+    derr << "--- buffer lengths mismatch " << std::hex
+         << "expected 0x" << expected.length() << " != actual 0x"
+         << actual.length() << std::dec << dendl;
   }
   auto len = MIN(expected.length(), actual.length());
   while ( first<len && expected[first] == actual[first])
@@ -64,6 +71,9 @@ static bool bl_eq(bufferlist& expected, bufferlist& actual)
     cout << "--- buffer mismatch between offset 0x" << std::hex << first
          << " and 0x" << last << ", total 0x" << len << std::dec
          << std::endl;
+    derr << "--- buffer mismatch between offset 0x" << std::hex << first
+         << " and 0x" << last << ", total 0x" << len << std::dec
+         << dendl;
     cout << "--- expected:\n";
     expected.hexdump(cout);
     cout << "--- actual:\n";