]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: remove unnecessary write in cmp&write test 48303/head
authorJonas Pfefferle <pepperjo@japf.ch>
Thu, 29 Sep 2022 20:02:56 +0000 (22:02 +0200)
committerJonas Pfefferle <pepperjo@japf.ch>
Thu, 29 Sep 2022 20:02:56 +0000 (22:02 +0200)
Remove write in compare and write test that tests
successful completion when bufferlist is greater then len.
The write was redundant and overwritten directly after.

Signed-off-by: Jonas Pfefferle <pepperjo@japf.ch>
src/test/librbd/test_librbd.cc

index 3dd71977042d3b36f38d48c158c3294e1a62fefe..a7aad4153828d41bc80e5a4a510f917949c2acdc 100644 (file)
@@ -4233,14 +4233,11 @@ TEST_F(TestLibRBD, TestAioCompareAndWriteSuccessBufferlistGreaterLenPP)
     mismatch_bl.append(&mismatch_buffer[5], 5);
     mismatch_bl.append(&mismatch_buffer[10], 4);
 
-    ssize_t written = image.write(off, cmp_bl.length(), cmp_bl);
-    ASSERT_EQ(cmp_bl.length(), written);
-
     /*
      * Test len < cmp_bl & write_bl => should succeed but only compare
      * len bytes resp. only write len bytes
      */
-    written = image.write(off, mismatch_bl.length(), mismatch_bl);
+    ssize_t written = image.write(off, mismatch_bl.length(), mismatch_bl);
     ASSERT_EQ(mismatch_bl.length(), written);
 
     size_t len_m1 = cmp_bl.length() - 1;