Project

General

Profile

Bug #9547

Updated by Loic Dachary about 6 years ago

<pre>
diff --git a/src/test/pybind/test_rados.py b/src/test/pybind/test_rados.py
index fcbe421..c41ddef 100644
--- a/src/test/pybind/test_rados.py
+++ b/src/test/pybind/test_rados.py
@@ -288,12 +288,12 @@ class TestIoctx(object):
with lock:
retval[0] = buf
lock.notify()
- self.ioctx.write("foo", "bar")
+ self.ioctx.write("foo", "bar\000frob")
self.ioctx.aio_read("foo", 7, 3, 0, cb)
with lock:
while retval[0] is None:
lock.wait()
- eq(retval[0], "bar")
+ eq(retval[0], "bar\000frob")
[i.remove() for i in self.ioctx.list_objects()]

class TestObject(object):

$ PYTHONPATH=pybind nosetests -v test/pybind/test_rados.py:TestIoctx.test_aio_read
test_rados.TestIoctx.test_aio_read ... FAIL

======================================================================
FAIL: test_rados.TestIoctx.test_aio_read
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/loic/software/ceph/ceph/src/test/pybind/test_rados.py", line 296, in test_aio_read
eq(retval[0], "bar\000frob")
AssertionError: 'bar' != 'bar\x00frob'

----------------------------------------------------------------------
Ran 1 test in 3.080s

FAILED (failures=1)
</pre>

Back