From 25738406e32ae0dc4e329db7ba62271dc4147879 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Tue, 2 Feb 2016 15:30:51 +0800 Subject: [PATCH] test/librados: fix hash position overflow issue Signed-off-by: xie xingguo --- src/test/librados/tier.cc | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) mode change 100644 => 100755 src/test/librados/tier.cc diff --git a/src/test/librados/tier.cc b/src/test/librados/tier.cc old mode 100644 new mode 100755 index 6517f82b839f5..3c57c7ffc4c46 --- a/src/test/librados/tier.cc +++ b/src/test/librados/tier.cc @@ -2158,7 +2158,8 @@ TEST_F(LibRadosTwoPoolsPP, HitSetRead) { ASSERT_TRUE(now < hard_stop); string name = "foo"; - uint32_t hash = cache_ioctx.get_object_hash_position(name); + uint32_t hash; + ASSERT_EQ(0, cache_ioctx.get_object_hash_position2(name, &hash)); hobject_t oid(sobject_t(name, CEPH_NOSNAP), "", hash, cluster.pool_lookup(cache_pool_name.c_str()), ""); @@ -2284,7 +2285,8 @@ TEST_F(LibRadosTwoPoolsPP, HitSetWrite) { for (int i=0; i