From: Mykola Golub Date: Mon, 26 Dec 2016 10:49:42 +0000 (+0200) Subject: librados_test_stub: tmap_update: return -ENOENT when removing nonexistent key X-Git-Tag: v12.0.0~314^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2a48c028bda6567869094a7aaf3bf2771721403d;p=ceph-ci.git librados_test_stub: tmap_update: return -ENOENT when removing nonexistent key Signed-off-by: Mykola Golub --- diff --git a/src/test/librados_test_stub/TestIoCtxImpl.cc b/src/test/librados_test_stub/TestIoCtxImpl.cc index fcca3b34567..ba7d845fb8a 100644 --- a/src/test/librados_test_stub/TestIoCtxImpl.cc +++ b/src/test/librados_test_stub/TestIoCtxImpl.cc @@ -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;