Bug #7822
examples/librados/hello_world.cc broken on master
0%
Description
Using the example program to test librados ports, I notice that it's currently failing (slightly) on master:
we just set up a rados cluster object we just parsed our config options we just connected to the rados cluster we just created a new pool named hello_world_pool we just created an ioctx for our pool we just wrote new object hello_object, with contents hello world! we read our object hello_object, and got back 0 bytes with contents hello world!~ we set the xattr 'version' on our object! we overwrote our object hello_object with contents hello world!v2 we just failed a write because the xattr wasn't as specified we overwrote our object hello_object following an xattr test with contents hello world!v3
1) the return value ought to be 12
2) the first read appears to return a buffer that's not properly NUL-terminated, or is too long for some other reason
Note, this is the only read in the example, and it's using aio_read
Related issues
Associated revisions
Examples: hello_world.cc, content displayed after read is not null terminated.
Copy contents of bufferlist to a string before sending to stdout since a
bufferlist is not null terminated.
Fixes: #7822
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
History
#1 Updated by Dan Mick about 10 years ago
- Assignee set to Josh Durgin
#2 Updated by Greg Farnum about 10 years ago
The read isn't supposed to be null terminated; it's a bufferlist. I was sloppy in giving that to an ostream, but doing something better was more of a hassle than I or the reviewer deemed worth handling at the time.
The return value does appear to be wrong, though.
#3 Updated by Greg Farnum almost 7 years ago
- Status changed from New to Resolved
"Associated Revision" 26bcb362