diff options
author | Mykola Golub <mgolub@suse.com> | 2020-06-16 15:43:23 +0200 |
---|---|---|
committer | Mykola Golub <mgolub@suse.com> | 2020-06-16 15:45:02 +0200 |
commit | 45b6945c04ba621b90567422075119ad00a9afda (patch) | |
tree | 596c0fd08fb44b648bf67b304f95216dcc0bd514 /src/test/librbd | |
parent | librbd: fix memory leak when quiesce fails (diff) | |
download | ceph-45b6945c04ba621b90567422075119ad00a9afda.tar.xz ceph-45b6945c04ba621b90567422075119ad00a9afda.zip |
test/librbd: make TestLibRBD.QuiesceWatchError pass
when a duplicate quiesce notification is received
Signed-off-by: Mykola Golub <mgolub@suse.com>
Diffstat (limited to 'src/test/librbd')
-rw-r--r-- | src/test/librbd/test_librbd.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/librbd/test_librbd.cc b/src/test/librbd/test_librbd.cc index cbd9f12927b..f046efe91bd 100644 --- a/src/test/librbd/test_librbd.cc +++ b/src/test/librbd/test_librbd.cc @@ -8362,16 +8362,17 @@ TEST_F(TestLibRBD, QuiesceWatchError) ASSERT_EQ(0, image2.quiesce_watch(&watcher2, &handle2)); ASSERT_EQ(-EINVAL, image1.snap_create("snap1")); - ASSERT_EQ(1U, watcher1.quiesce_count); + ASSERT_LT(0U, watcher1.quiesce_count); ASSERT_EQ(0U, watcher1.unquiesce_count); ASSERT_EQ(1U, watcher2.quiesce_count); ASSERT_EQ(1U, watcher2.unquiesce_count); PrintProgress prog_ctx; + watcher1.quiesce_count = 0; ASSERT_EQ(0, image2.snap_create2("snap2", RBD_SNAP_CREATE_IGNORE_QUIESCE_ERROR, prog_ctx)); - ASSERT_EQ(2U, watcher1.quiesce_count); + ASSERT_LT(0U, watcher1.quiesce_count); ASSERT_EQ(0U, watcher1.unquiesce_count); ASSERT_EQ(2U, watcher2.quiesce_count); ASSERT_EQ(2U, watcher2.unquiesce_count); |