]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: use s/init_le*/ceph_le*/
authorKefu Chai <kchai@redhat.com>
Wed, 10 Mar 2021 08:05:32 +0000 (16:05 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 10 Mar 2021 14:35:25 +0000 (22:35 +0800)
for better readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/common/test_time.cc
src/test/librados/aio.cc
src/test/librados/c_read_operations.cc
src/test/librados/io.cc

index 3054aa50ef7acb26c0804116cf2e5cc3d060bfa7..2ce362b63c17f468b7aac2c059b0afe5c30519ca 100644 (file)
@@ -51,7 +51,7 @@ static constexpr uint32_t bns = 123456789;
 static constexpr uint32_t bus = 123456;
 static constexpr time_t btt = bs;
 static constexpr struct timespec bts = { bs, bns };
-static struct ceph_timespec bcts = { init_le32(bs), init_le32(bns) };
+static struct ceph_timespec bcts = { ceph_le32(bs), ceph_le32(bns) };
 static constexpr struct timeval btv = { bs, bus };
 static constexpr double bd = bs + ((double)bns / 1000000000.);
 
index 2ffff1c342db2be48d20f9a244b94d9dd5cc53f5..8e9662bff52e079ff7e987413c547fe35a850a43 100644 (file)
@@ -226,7 +226,7 @@ TEST(LibRadosAio, RoundTrip3) {
   rados_read_op_read(op2, 0, sizeof(buf2), buf2, NULL, NULL);
   rados_read_op_set_flags(op2, LIBRADOS_OP_FLAG_FADVISE_NOCACHE |
                               LIBRADOS_OP_FLAG_FADVISE_RANDOM);
-  ceph_le32 init_value = init_le32(-1);
+  ceph_le32 init_value(-1);
   ceph_le32 checksum[2];
   rados_read_op_checksum(op2, LIBRADOS_CHECKSUM_TYPE_CRC32C,
                         reinterpret_cast<char *>(&init_value),
index a6cb3918bf45dfa3a571596b313189c6ca0ffe2c..4b8336af70accb4eaf755d3f06ffba1b5f1079f6 100644 (file)
@@ -381,7 +381,7 @@ TEST_F(CReadOpsTest, Checksum) {
 
   {
     rados_read_op_t op = rados_create_read_op();
-    ceph_le64 init_value = init_le64(-1);
+    ceph_le64 init_value(-1);
     rados_read_op_checksum(op, LIBRADOS_CHECKSUM_TYPE_XXHASH64,
                           reinterpret_cast<char *>(&init_value),
                           sizeof(init_value), 0, len, 0, NULL, 0, NULL);
@@ -390,7 +390,7 @@ TEST_F(CReadOpsTest, Checksum) {
   }
 
   {
-    ceph_le32 init_value = init_le32(-1);
+    ceph_le32 init_value(-1);
     ceph_le32 crc[2];
     rados_read_op_t op = rados_create_read_op();
     rados_read_op_checksum(op, LIBRADOS_CHECKSUM_TYPE_CRC32C,
@@ -407,7 +407,7 @@ TEST_F(CReadOpsTest, Checksum) {
   }
 
   {
-    ceph_le32 init_value = init_le32(-1);
+    ceph_le32 init_value(-1);
     int rval;
     rados_read_op_t op = rados_create_read_op();
     rados_read_op_checksum(op, LIBRADOS_CHECKSUM_TYPE_XXHASH32,
@@ -419,7 +419,7 @@ TEST_F(CReadOpsTest, Checksum) {
   }
 
   {
-    ceph_le32 init_value = init_le32(-1);
+    ceph_le32 init_value(-1);
     ceph_le32 crc[3];
     int rval;
     rados_read_op_t op = rados_create_read_op();
index 9e801dcd4f4cf16e7a05865e4be6e947f9ab3620..a60a8737d58bb2b36be785731223beb2fbe13a66 100644 (file)
@@ -112,7 +112,7 @@ TEST_F(LibRadosIo, Checksum) {
 
   uint32_t expected_crc = ceph_crc32c(-1, reinterpret_cast<const uint8_t*>(buf),
                                       sizeof(buf));
-  ceph_le32 init_value = init_le32(-1);
+  ceph_le32 init_value(-1);
   ceph_le32 crc[2];
   ASSERT_EQ(0, rados_checksum(ioctx, "foo", LIBRADOS_CHECKSUM_TYPE_CRC32C,
                              reinterpret_cast<char*>(&init_value),