test: allow using regular dlopen within aub tests

Related-To: NEO-11080
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-10-24 07:23:31 +00:00
committed by Compute-Runtime-Automation
parent a59ca3d5e8
commit 8fed1dc443

View File

@@ -1,10 +1,12 @@
/*
* Copyright (C) 2021-2024 Intel Corporation
* Copyright (C) 2021-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/tests_configuration.h"
#include <cstdio>
#include <cstring>
#include <dlfcn.h>
@@ -22,6 +24,9 @@ void *dlopen(const char *filename, int flags) {
if (dlopenFunc == nullptr) {
dlopenFunc = reinterpret_cast<decltype(dlopenFunc)>(dlsym(RTLD_NEXT, "dlopen"));
}
if (NEO::isAubTestMode(NEO::testMode)) {
return dlopenFunc(filename, flags);
}
dlopenError = -1;
if (filename == nullptr ||