summaryrefslogtreecommitdiffstats
path: root/src/test/test_librbd.cc
diff options
context:
space:
mode:
authorJosh Durgin <josh.durgin@dreamhost.com>2011-09-21 19:47:47 +0200
committerJosh Durgin <josh.durgin@dreamhost.com>2011-09-27 03:10:39 +0200
commitbc16878cc5de5ef82e2f65a2f34485a87dfee8db (patch)
treea2a6c3ffcb9fcad06ceab4cd5439bbe00f2d422d /src/test/test_librbd.cc
parentrbd.py: add partial bindings for librbd (diff)
downloadceph-bc16878cc5de5ef82e2f65a2f34485a87dfee8db.tar.xz
ceph-bc16878cc5de5ef82e2f65a2f34485a87dfee8db.zip
Use cpp_strerror or strerror_r when appropriate.
The only remaining uses of strerror are in single-threaded programs that don't depend on libcommon. Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Diffstat (limited to 'src/test/test_librbd.cc')
-rw-r--r--src/test/test_librbd.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/test_librbd.cc b/src/test/test_librbd.cc
index 42b300197b6..b43bf3837be 100644
--- a/src/test/test_librbd.cc
+++ b/src/test/test_librbd.cc
@@ -30,6 +30,7 @@
#include <algorithm>
#include "rados-api/test.cc"
+#include "common/errno.h"
using namespace std;
@@ -806,7 +807,7 @@ TEST(LibRBD, TestIOToSnapshot)
r = rbd_write(image, 0, TEST_IO_TO_SNAP_SIZE, test_data);
printf("write to snapshot returned %d\n", r);
ASSERT_LT(r, 0);
- printf("%s\n", strerror(-r));
+ cout << cpp_strerror(-r) << std::endl;
read_test_data(image, orig_data, 0, TEST_IO_TO_SNAP_SIZE);
rbd_snap_set(image, "written");
@@ -826,7 +827,7 @@ TEST(LibRBD, TestIOToSnapshot)
r = rbd_write(image_at_snap, 0, TEST_IO_TO_SNAP_SIZE, test_data);
printf("write to snapshot returned %d\n", r);
ASSERT_LT(r, 0);
- printf("%s\n", strerror(-r));
+ cout << cpp_strerror(-r) << std::endl;
ASSERT_EQ(0, rbd_close(image_at_snap));
ASSERT_EQ(2, test_ls_snaps(image, 2, "orig", isize, "written", isize));