]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: fix exec test
authorSage Weil <sage.weil@dreamhost.com>
Tue, 3 Apr 2012 17:12:01 +0000 (10:12 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Tue, 3 Apr 2012 17:12:01 +0000 (10:12 -0700)
Return for read operations is now returned correctly.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/test/rados-api/misc.cc

index 0e6ab339a94c3002768be688a9bb9375c8d2ae23..53694761e458abeea0ef3ebd65c9ec2b8d9cb0c6 100644 (file)
@@ -157,7 +157,8 @@ TEST(LibRadosMisc, ExecPP) {
   bufferlist bl;
   ASSERT_EQ(0, ioctx.write("foo", bl, 0, 0));
   bufferlist bl2, out;
-  ASSERT_EQ(0, ioctx.exec("foo", "rbd", "test_exec", bl2, out));
+  int r = ioctx.exec("foo", "rbd", "test_exec", bl2, out);
+  ASSERT_EQ((int)out.length(), r);
   bufferlist::iterator iter = out.begin();
   std::string outstring;
   ::decode(outstring, iter);