]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd: make TestLibRBD.QuiesceWatchError pass 35329/head
authorMykola Golub <mgolub@suse.com>
Tue, 16 Jun 2020 13:43:23 +0000 (14:43 +0100)
committerMykola Golub <mgolub@suse.com>
Tue, 16 Jun 2020 13:45:02 +0000 (14:45 +0100)
when a duplicate quiesce notification is received

Signed-off-by: Mykola Golub <mgolub@suse.com>
src/test/librbd/test_librbd.cc

index cbd9f12927bb6d77a61932e787c43e418ac264a1..f046efe91bd7107d6062580dc5a417a17dc624a3 100644 (file)
@@ -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);