Revert "fix: correct loading L0 loader functions"

This reverts commit 9c7b3c5e19.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2024-10-17 02:39:48 +02:00
committed by Compute-Runtime-Automation
parent e11ceb4a20
commit f117b5fb68
37 changed files with 84 additions and 165 deletions

View File

@@ -20,7 +20,7 @@ namespace ult {
class MockOsLibrary : public NEO::OsLibrary {
public:
MockOsLibrary() {
MockOsLibrary(const std::string &name, std::string *errorValue) {
}
void *getProcAddress(const std::string &procName) override {
@@ -35,8 +35,8 @@ class MockOsLibrary : public NEO::OsLibrary {
return std::string();
}
static OsLibrary *load(const OsLibraryCreateProperties &properties) {
auto ptr = new (std::nothrow) MockOsLibrary();
static OsLibrary *load(const std::string &name) {
auto ptr = new (std::nothrow) MockOsLibrary(name, nullptr);
if (ptr == nullptr) {
return nullptr;
}

View File

@@ -34,6 +34,8 @@ TEST(FwUtilTest, GivenLibraryWasSetWhenCreatingFirmwareUtilInterfaceThenLibraryI
VariableBackup<bool> dlOpenCalledBackup{&dlOpenCalled, false};
VariableBackup<int> dlOpenFlagsBackup{&dlOpenFlags, 0};
auto flags = RTLD_LAZY;
NEO::OsLibrary::loadFlagsOverwrite = &flags;
L0::Sysman::FirmwareUtil *pFwUtil = L0::Sysman::FirmwareUtil::create(0, 0, 0, 0);
EXPECT_EQ(dlOpenCalled, true);
EXPECT_EQ(dlOpenFlags, RTLD_LAZY);

View File

@@ -61,7 +61,7 @@ struct MockFwUtilOsLibrary : public OsLibrary {
std::string getFullPath() override {
return std::string();
}
static OsLibrary *load(const OsLibraryCreateProperties &properties) {
static OsLibrary *load(const std::string &name) {
if (mockLoad == true) {
auto ptr = new (std::nothrow) MockFwUtilOsLibrary();
return ptr;