]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
src/test: prevent truncate from using write_full
authormyoungwon oh <ohmyoungwon@gmail.com>
Mon, 3 Aug 2020 05:35:21 +0000 (14:35 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Tue, 18 Aug 2020 13:09:22 +0000 (22:09 +0900)
Use write instead of write_full to avoid truncate
even if set-chunk is set

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
src/test/librados/tier_cxx.cc

index df584a922b04380ead5d16fe9a6b5ae01f44955f..987820291a5d22737131693f5de3de1e1aabd080 100644 (file)
@@ -4073,8 +4073,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestSnapRefcount2) {
     bufferlist bl;
     bl.append("Thabe cd");
     ObjectWriteOperation op;
-    op.write_full(bl);
-    ASSERT_EQ(0, ioctx.operate("foo", &op));
+    ASSERT_EQ(0, ioctx.write("foo", bl, bl.length(), 0));
   }
   // flush
   {
@@ -4299,8 +4298,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestFlushSnap) {
     bufferlist bl;
     bl.append("There");
     ObjectWriteOperation op;
-    op.write_full(bl);
-    ASSERT_EQ(0, ioctx.operate("foo", &op));
+    ASSERT_EQ(0, ioctx.write("foo", bl, bl.length(), 0));
   }
 
   // create a snapshot, clone