]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: check python rados aio_read with buffers containing null 2548/head
authorLoic Dachary <loic-201408@dachary.org>
Sat, 20 Sep 2014 10:41:30 +0000 (12:41 +0200)
committerLoic Dachary <loic-201408@dachary.org>
Sun, 21 Sep 2014 12:33:24 +0000 (14:33 +0200)
http://tracker.ceph.com/issues/9547 Refs: #9547

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 226c0c7ac6ee95ff2c1665d4e7164e2962c0346e)

src/test/pybind/test_rados.py

index 7efed7dfc967c102f2be0cbd96baae88f7f56449..790ab66afc156b00c7da33afa1998c00ba5ce851 100644 (file)
@@ -286,12 +286,13 @@ class TestIoctx(object):
             with lock:
                 retval[0] = buf
                 lock.notify()
-        self.ioctx.write("foo", "bar")
-        self.ioctx.aio_read("foo", 3, 0, cb)
+        payload = "bar\000frob"
+        self.ioctx.write("foo", payload)
+        self.ioctx.aio_read("foo", len(payload), 0, cb)
         with lock:
             while retval[0] is None:
                 lock.wait()
-        eq(retval[0], "bar")
+        eq(retval[0], payload)
         [i.remove() for i in self.ioctx.list_objects()]
 
 class TestObject(object):