From 4964b98967413717dfd45ee66712a50a506b724f Mon Sep 17 00:00:00 2001 From: Dmitry Osipenko Date: Mon, 24 Oct 2022 19:47:03 +0300 Subject: [PATCH] util/cache_test: Remove dummy cache entry added by cache_exists() The cache_exists() function adds a dummy cache entry that may affect cache eviction testing results. Remove this entry. Reviewed-by: Timothy Arceri Signed-off-by: Dmitry Osipenko Part-of: --- src/util/tests/cache_test.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/tests/cache_test.cpp b/src/util/tests/cache_test.cpp index 2b9f0f9ba3d..d730b462fea 100644 --- a/src/util/tests/cache_test.cpp +++ b/src/util/tests/cache_test.cpp @@ -121,6 +121,7 @@ cache_exists(struct disk_cache *cache) disk_cache_put(cache, key, data, sizeof(data), NULL); disk_cache_wait_for_idle(cache); void *result = disk_cache_get(cache, key, NULL); + disk_cache_remove(cache, key); free(result); return result != NULL;