Merge pull request #12667 from trociny/wip-librados_test_stub-tmap_udate

test: librados_test_stub: tmap_update: return -ENOENT when removing nonexisent key

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2017-01-03 09:14:46 -05:00 committed by GitHub
commit 01cc5e8dfb

View File

@ -260,7 +260,10 @@ int TestIoCtxImpl::tmap_update(const std::string& oid, bufferlist& cmdbl) {
tmap[key] = value;
break;
case CEPH_OSD_TMAP_RM:
tmap.erase(key);
r = tmap.erase(key);
if (r == 0) {
return -ENOENT;
}
break;
default:
return -EINVAL;