mirror of
https://github.com/ceph/ceph
synced 2025-03-07 16:58:39 +00:00
test/librbd: print uint64_t in a platform neutral way
Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
c8ca98ed02
commit
5126f55319
@ -1030,7 +1030,7 @@ TEST_F(TestInternal, TestCoR)
|
||||
ASSERT_EQ(0, image.stat(info, sizeof(info)));
|
||||
|
||||
const int object_num = info.size / info.obj_size;
|
||||
printf("made parent image \"%s\": %ldK (%d * %ldK)\n", m_image_name.c_str(),
|
||||
printf("made parent image \"%s\": %ldK (%d * %" PRIu64 "K)\n", m_image_name.c_str(),
|
||||
(unsigned long)m_image_size, object_num, info.obj_size/1024);
|
||||
|
||||
// write something into parent
|
||||
@ -1167,8 +1167,8 @@ TEST_F(TestInternal, FlattenNoEmptyObjects)
|
||||
ASSERT_EQ(0, image.stat(info, sizeof(info)));
|
||||
|
||||
const int object_num = info.size / info.obj_size;
|
||||
printf("made parent image \"%s\": %ldK (%d * %ldK)\n", m_image_name.c_str(),
|
||||
(unsigned long)m_image_size, object_num, info.obj_size/1024);
|
||||
printf("made parent image \"%s\": %" PRIu64 "K (%d * %" PRIu64 "K)\n",
|
||||
m_image_name.c_str(), m_image_size, object_num, info.obj_size/1024);
|
||||
|
||||
// write something into parent
|
||||
char test_data[TEST_IO_SIZE + 1];
|
||||
|
@ -109,7 +109,8 @@ static int create_image_full(rados_ioctx_t ioctx, const char *name,
|
||||
stripe_unit = (1ull << (*order-1));
|
||||
}
|
||||
|
||||
printf("creating image with stripe unit: %ld, stripe count: %ld\n",
|
||||
printf("creating image with stripe unit: %" PRIu64 ", "
|
||||
"stripe count: %" PRIu64 "\n",
|
||||
stripe_unit, IMAGE_STRIPE_COUNT);
|
||||
return rbd_create3(ioctx, name, size, features, order,
|
||||
stripe_unit, IMAGE_STRIPE_COUNT);
|
||||
|
@ -40,7 +40,7 @@ int create_image_full_pp(librbd::RBD &rbd, librados::IoCtx &ioctx,
|
||||
stripe_unit = (1ull << (*order-1));
|
||||
}
|
||||
|
||||
printf("creating image with stripe unit: %ld, stripe count: %ld\n",
|
||||
printf("creating image with stripe unit: %" PRIu64 ", stripe count: %" PRIu64 "\n",
|
||||
stripe_unit, IMAGE_STRIPE_COUNT);
|
||||
return rbd.create3(ioctx, name.c_str(), size, features, order, stripe_unit,
|
||||
IMAGE_STRIPE_COUNT);
|
||||
|
Loading…
Reference in New Issue
Block a user