registered a RADOS client in the `name` field added to elements of the
`active_clients` array. Previously, only the address of a module's RADOS
client was shown in the `active_clients` array.
+* RBD: list-watchers C++ API (`Image::list_watchers`) now clears the passed
+ `std::list` before potentially appending to it, aligning with the semantics
+ of the corresponding C API (`rbd_watchers_list`).
>=17.2.1
ASSERT_EQ(0, rbd.open(ioctx, image, name.c_str(), nullptr));
ASSERT_EQ(0, image.list_watchers(watchers));
ASSERT_EQ(1U, watchers.size());
+ auto watcher1 = watchers.front();
ASSERT_EQ(0, image.close());
+
+ // (Still) one watcher
+ ASSERT_EQ(0, rbd.open(ioctx, image, name.c_str(), nullptr));
+ ASSERT_EQ(0, image.list_watchers(watchers));
+ ASSERT_EQ(1U, watchers.size());
+ auto watcher2 = watchers.front();
+ ASSERT_EQ(0, image.close());
+
+ EXPECT_EQ(watcher1.addr, watcher2.addr);
+ EXPECT_EQ(watcher1.id, watcher2.id);
}
TEST_F(TestLibRBD, TestSetSnapById) {