mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
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:
committed by
Compute-Runtime-Automation
parent
e11ceb4a20
commit
f117b5fb68
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user