SWDEV-505930 - Avoid static initialization of ModuleGuard (#604)

This is to prevent calling catch2 macros from outside catch2 TEST_CASE
that can lead to undefined bahavior. This change also disables
hipGetProcAddress tests that are not supported on static build.

Co-authored-by: Ioannis Assiouras <Ioannis.Assiouras@amd.com>
This commit is contained in:
systems-assistant[bot]
2025-09-16 21:06:24 +01:00
committed by GitHub
parent ec5e9673ad
commit 605be4bebc
7 changed files with 26 additions and 10 deletions
@@ -253,7 +253,7 @@ TEST_CASE("Unit_hipExtModuleLaunchKernel_UniformWorkGroup") {
TEST_CASE("Unit_hipExtModuleLaunchKernel_Positive_Parameters") {
ModuleLaunchKernelPositiveParameters<hipExtModuleLaunchKernel>();
auto mg = ModuleGuard::InitModule("launch_kernel_module.code");
SECTION("Pass only start event") {
hipEvent_t start_event = nullptr;
HIP_CHECK(hipEventCreate(&start_event));