mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
mock dlopen in tests to block unwanted interactions
- explicitly specify files allowed to dlopen() - use underscore to prefix fake library name that we want dlopen to return nullptr Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2e68f0abbd
commit
7eb5b6aa42
@@ -633,7 +633,7 @@ TEST(LoadCompilerTest, whenCouldNotLoadLibraryThenReturnFalseAndNullOutputs) {
|
||||
MockCompilerEnableGuard mock;
|
||||
std::unique_ptr<NEO::OsLibrary> retLib;
|
||||
CIF::RAII::UPtr_t<CIF::CIFMain> retMain;
|
||||
bool retVal = loadCompiler<IGC::IgcOclDeviceCtx>("falseName.notRealLib", retLib, retMain);
|
||||
bool retVal = loadCompiler<IGC::IgcOclDeviceCtx>("_falseName.notRealLib", retLib, retMain);
|
||||
EXPECT_FALSE(retVal);
|
||||
EXPECT_EQ(nullptr, retLib.get());
|
||||
EXPECT_EQ(nullptr, retMain.get());
|
||||
|
||||
Reference in New Issue
Block a user