Skip to content

Commit

Permalink
Make tests respect VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING
Browse files Browse the repository at this point in the history
Change-Id: I1f498c6cbeb2dd6dbfd5fe870d768d3569379ecd
  • Loading branch information
charles-lunarg committed Nov 6, 2024
1 parent 7101eb5 commit 11f2281
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/framework/test_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,13 @@ inline loader_platform_dl_handle loader_platform_open_library(const char* libPat
inline void loader_platform_open_library_print_error(std::filesystem::path const& libPath) {
std::wcerr << "Unable to open library: " << libPath << " due to: " << dlerror() << "\n";
}
inline void loader_platform_close_library(loader_platform_dl_handle library) { dlclose(library); }
inline void loader_platform_close_library(loader_platform_dl_handle library) {
char* loader_disable_dynamic_library_unloading_env_var = getenv("VK_LOADER_DISABLE_DYNAMIC_LIBRARY_UNLOADING");
if (NULL == loader_disable_dynamic_library_unloading_env_var ||
0 != strncmp(loader_disable_dynamic_library_unloading_env_var, "1", 2)) {
}
dlclose(library);
}
inline void* loader_platform_get_proc_address(loader_platform_dl_handle library, const char* name) {
assert(library);
assert(name);
Expand Down

0 comments on commit 11f2281

Please sign in to comment.