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 <tarceri@itsqueeze.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20256>
This commit is contained in:
Dmitry Osipenko
2022-10-24 19:47:03 +03:00
committed by Marge Bot
parent c92c99481f
commit 4964b98967

View File

@@ -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;