From d7c8139c370a601e9637c21eeedb95d98fe17703 Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Wed, 25 Aug 2021 16:43:58 -0600 Subject: [PATCH] test: Update 32/64 tests to check the log Use the DebugUtilsLogger to verify that the loader is downgrading the error level of dll/so's from ERROR to INFO --- tests/loader_regression_tests.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/loader_regression_tests.cpp b/tests/loader_regression_tests.cpp index ccdb2751..2d8f2e17 100644 --- a/tests/loader_regression_tests.cpp +++ b/tests/loader_regression_tests.cpp @@ -487,10 +487,23 @@ TEST(TryLoadWrongBinaries, WrongICD) { FakeBinaryICDShim env(TestICDDetails(TEST_ICD_PATH_VERSION_2), TestICDDetails(CURRENT_PLATFORM_DUMMY_BINARY)); env.get_test_icd().physical_devices.emplace_back("physical_device_0"); + DebugUtilsLogger log{VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT}; InstWrapper inst{env.vulkan_functions}; InstanceCreateInfo inst_create_info; + FillDebugUtilsCreateDetails(inst_create_info, log); ASSERT_EQ(CreateInst(inst, inst_create_info), VK_SUCCESS); +#if _WIN32 || _WIN64 + ASSERT_TRUE(log.find("Failed to open dynamic library")); +#endif +#if defined(__linux__) +#if defined(__x86_64__) + ASSERT_TRUE(log.find("wrong ELF class: ELFCLASS32")); +#elif + ASSERT_TRUE(log.find("wrong ELF class: ELFCLASS64")); +#endif +#endif + uint32_t driver_count = 0; ASSERT_EQ(VK_SUCCESS, inst->vkEnumeratePhysicalDevices(inst, &driver_count, nullptr)); ASSERT_EQ(driver_count, 1); -- 2.34.1