diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/test/librados/list.cc | 3 | ||||
-rw-r--r-- | src/test/librados/tier.cc | 4 | ||||
-rwxr-xr-x | src/test/objectstore/Allocator_bench.cc | 3 | ||||
-rw-r--r-- | src/test/objectstore/Allocator_test.cc | 12 | ||||
-rw-r--r-- | src/test/objectstore/store_test.cc | 4 | ||||
-rw-r--r-- | src/test/objectstore/test_bluestore_types.cc | 2 | ||||
-rw-r--r-- | src/test/osd/TestPGLog.cc | 2 |
7 files changed, 17 insertions, 13 deletions
diff --git a/src/test/librados/list.cc b/src/test/librados/list.cc index 01c5be56d3f..045cd37f35b 100644 --- a/src/test/librados/list.cc +++ b/src/test/librados/list.cc @@ -185,7 +185,8 @@ TEST_F(LibRadosList, ListObjectsNS) { char nspace[4]; ASSERT_EQ(-ERANGE, rados_ioctx_get_namespace(ioctx, nspace, 3)); - ASSERT_EQ(strlen("ns2"), rados_ioctx_get_namespace(ioctx, nspace, sizeof(nspace))); + ASSERT_EQ(static_cast<int>(strlen("ns2")), + rados_ioctx_get_namespace(ioctx, nspace, sizeof(nspace))); ASSERT_EQ(0, strcmp("ns2", nspace)); std::set<std::string> def, ns1, ns2, all; diff --git a/src/test/librados/tier.cc b/src/test/librados/tier.cc index 408df8c9946..9ccbe01ea02 100644 --- a/src/test/librados/tier.cc +++ b/src/test/librados/tier.cc @@ -3239,7 +3239,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestRefRead) { } catch (buffer::error& err) { ASSERT_TRUE(0); } - ASSERT_EQ(1, read_ret.refs.size()); + ASSERT_EQ(1U, read_ret.refs.size()); } // chunk's refcount { @@ -3378,7 +3378,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestUnset) { { bufferlist in, out; cache_ioctx.exec("bar", "refcount", "chunk_read", in, out); - ASSERT_EQ(0, out.length()); + ASSERT_EQ(0U, out.length()); } // chunk's refcount { diff --git a/src/test/objectstore/Allocator_bench.cc b/src/test/objectstore/Allocator_bench.cc index 470fd32fc29..8b6563387d6 100755 --- a/src/test/objectstore/Allocator_bench.cc +++ b/src/test/objectstore/Allocator_bench.cc @@ -150,7 +150,8 @@ TEST_P(AllocTest, test_alloc_bench_seq) for (uint64_t i = 0; i < capacity; i += want_size) { tmp.clear(); - EXPECT_EQ(want_size, alloc->allocate(want_size, alloc_unit, 0, 0, &tmp)); + EXPECT_EQ(static_cast<int64_t>(want_size), + alloc->allocate(want_size, alloc_unit, 0, 0, &tmp)); if (0 == (i % (1 * 1024 * _1m))) { std::cout << "alloc " << i / 1024 / 1024 << " mb of " << capacity / 1024 / 1024 << std::endl; diff --git a/src/test/objectstore/Allocator_test.cc b/src/test/objectstore/Allocator_test.cc index 959932af9e5..8900da7dcbd 100644 --- a/src/test/objectstore/Allocator_test.cc +++ b/src/test/objectstore/Allocator_test.cc @@ -241,7 +241,8 @@ TEST_P(AllocTest, test_alloc_fragmentation) for (size_t i = 0; i < capacity / alloc_unit; ++i) { tmp.clear(); - EXPECT_EQ(want_size, alloc->allocate(want_size, alloc_unit, 0, 0, &tmp)); + EXPECT_EQ(static_cast<int64_t>(want_size), + alloc->allocate(want_size, alloc_unit, 0, 0, &tmp)); allocated.insert(allocated.end(), tmp.begin(), tmp.end()); // bitmap fragmentation calculation doesn't provide such constant @@ -267,7 +268,7 @@ TEST_P(AllocTest, test_alloc_fragmentation) } if (bitmap_alloc) { // fragmentation = one l1 slot is free + one l1 slot is partial - EXPECT_EQ(50, uint64_t(alloc->get_fragmentation(alloc_unit) * 100)); + EXPECT_EQ(50U, uint64_t(alloc->get_fragmentation(alloc_unit) * 100)); } else { // fragmentation approx = 257 intervals / 768 max intervals EXPECT_EQ(33, uint64_t(alloc->get_fragmentation(alloc_unit) * 100)); @@ -310,9 +311,10 @@ TEST_P(AllocTest, test_alloc_bug_24598) alloc->init_add_free(0x4900000, 0x100000); alloc->init_add_free(0x4b00000, 0x200000); - EXPECT_EQ(want_size, alloc->allocate(want_size, 0x100000, 0, 0, &tmp)); - EXPECT_EQ(tmp[0].offset, 0x4b00000); - EXPECT_EQ(tmp[0].length, 0x200000); + EXPECT_EQ(static_cast<int64_t>(want_size), + alloc->allocate(want_size, 0x100000, 0, 0, &tmp)); + EXPECT_EQ(tmp[0].offset, 0x4b00000U); + EXPECT_EQ(tmp[0].length, 0x200000U); EXPECT_EQ(tmp.size(), 1); } diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc index 67de69f1048..57b98969653 100644 --- a/src/test/objectstore/store_test.cc +++ b/src/test/objectstore/store_test.cc @@ -6467,7 +6467,7 @@ TEST_P(StoreTestSpecificAUSize, ExcessiveFragmentation) { stringify((uint64_t)2048 * 1024 * 1024).c_str()); ASSERT_EQ(g_conf().get_val<Option::size_t>("bluefs_alloc_size"), - 1024 * 1024); + 1024 * 1024U); size_t block_size = 0x10000; StartDeferred(block_size); @@ -7025,7 +7025,7 @@ TEST_P(StoreTest, BluestoreStatistics) { { bufferlist readback; r = store->read(ch, hoid, 0, bl.length(), readback); - ASSERT_EQ(r, bl.length()); + ASSERT_EQ(static_cast<int>(bl.length()), r); ASSERT_TRUE(bl_eq(bl, readback)); } Formatter *f = Formatter::create("store_test", "json-pretty", "json-pretty"); diff --git a/src/test/objectstore/test_bluestore_types.cc b/src/test/objectstore/test_bluestore_types.cc index 09fd4d3a6c6..1f64d770f41 100644 --- a/src/test/objectstore/test_bluestore_types.cc +++ b/src/test/objectstore/test_bluestore_types.cc @@ -1447,7 +1447,7 @@ TEST(BlueStoreRepairer, StoreSpaceTracker) { BlueStoreRepairer::StoreSpaceTracker bmap0; bmap0.init((uint64_t)4096 * 1024 * 1024 * 1024, 0x1000); - ASSERT_EQ(bmap0.granularity, 2 * 1024 * 1024); + ASSERT_EQ(bmap0.granularity, 2 * 1024 * 1024U); ASSERT_EQ(bmap0.collections_bfs.size(), 2048 * 1024); ASSERT_EQ(bmap0.objects_bfs.size(), 2048 * 1024); diff --git a/src/test/osd/TestPGLog.cc b/src/test/osd/TestPGLog.cc index b923dda8f78..c5340eb1e20 100644 --- a/src/test/osd/TestPGLog.cc +++ b/src/test/osd/TestPGLog.cc @@ -2311,7 +2311,7 @@ public: ObjectStore::Transaction t2; t2.touch(test_coll, ghobject_t(existing_oid)); t2.setattr(test_coll, ghobject_t(existing_oid), OI_ATTR, enc_oi); - ASSERT_EQ(0u, store->queue_transaction(ch, std::move(t2))); + ASSERT_EQ(0, store->queue_transaction(ch, std::move(t2))); info.last_backfill = hobject_t::get_max(); info.last_complete = eversion_t(); } |