Details
-
Bug
-
Resolution: Duplicate
-
Minor
-
master
-
None
-
Untriaged
-
Unknown
Description
An example from the nightly kv-engine coverage build which gets built at debug:
[ RUN ] FullAndValueEviction/EPStoreEvictionTest.AddEExists/value_only
|
/home/couchbase/jenkins/workspace/memcached-nightly-coverage/ep-engine/tests/module_tests/evp_store_test.cc:181: Failure
|
Value of: msg
|
Actual: 0x886cf8
|
Expected: "Ejected."
|
Which is: 0x87751c
|
void EventuallyPersistentStoreTest::evict_key(uint16_t vbid, |
const std::string& key) { |
const char* msg; |
size_t msg_size{sizeof(msg)}; |
EXPECT_EQ(ENGINE_SUCCESS, store->evictKey(key, vbid, &msg, &msg_size));
|
EXPECT_EQ("Ejected.", msg); |
}
|
I suspect that when ep-engine is built as debug the strings don't get interned which results in them having different pointer values. This simply requires EXPECT_STREQ instead of EXPECT_EQ (Possibly worth checking other code for similar issues).
Attachments
Issue Links
- duplicates
-
MB-19807 `EPStoreEvictionTest.GetKeyStatsEjected` incorrectly compares strings as ptrs
- Closed