EGL: Add flag for bugfixes found via advanced blobcache usage
Test: libEGL_test, EGL_test
Bug: b/351867582, b/380483358
Flag: com.android.graphics.egl.flags.multifile_blobcache_advanced_usage
Change-Id: I08c8b2e1e255caead4333b69e0a94148a3b4f0b1
diff --git a/opengl/libs/EGL/MultifileBlobCache_test.cpp b/opengl/libs/EGL/MultifileBlobCache_test.cpp
index 90a0f1e..8222498 100644
--- a/opengl/libs/EGL/MultifileBlobCache_test.cpp
+++ b/opengl/libs/EGL/MultifileBlobCache_test.cpp
@@ -25,6 +25,10 @@
#include <fstream>
#include <memory>
+#include <com_android_graphics_egl_flags.h>
+
+using namespace com::android::graphics::egl;
+
using namespace std::literals;
namespace android {
@@ -458,6 +462,8 @@
// Set one entry
mMBC->set("abcd", 4, "efgh", 4);
+ uint32_t initialCacheVersion = mMBC->getCurrentCacheVersion();
+
// Close the cache so everything writes out
mMBC->finish();
mMBC.reset();
@@ -466,7 +472,7 @@
ASSERT_EQ(getCacheEntries().size(), 1);
// Set a debug cacheVersion
- std::string newCacheVersion = std::to_string(kMultifileBlobCacheVersion + 1);
+ std::string newCacheVersion = std::to_string(initialCacheVersion + 1);
ASSERT_TRUE(base::SetProperty("debug.egl.blobcache.cache_version", newCacheVersion.c_str()));
ASSERT_TRUE(
base::WaitForProperty("debug.egl.blobcache.cache_version", newCacheVersion.c_str()));