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-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F12667%2Fhead;p=ceph.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 fcca3b345678..ba7d845fb8ab 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;