Actions
Bug #7822
closedexamples/librados/hello_world.cc broken on master
% Done:
0%
Source:
Development
Tags:
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
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
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.
Updated by Greg Farnum almost 7 years ago
- Status changed from New to Resolved
"Associated Revision" 26bcb362
Actions