Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions examples/ctl/ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ static bool report_pool_stat_failure(const char *label,
reason = "slab statistics";
} else if (hint_level == 2) {
reason = "allocation counters";
} else if (hint_level < 3) {
hint_level = 2;
reason = "allocation counters";
} else {
hint_level = 3;
}
Expand Down
3 changes: 3 additions & 0 deletions test/common/level_zero_mocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ TestCreateMemoryAllocationProperties(uint32_t modifier) {
void MockedLevelZeroTestEnvironment::SetUp() {
const char *lib_name = getenv("UMF_ZE_LOADER_LIB_NAME");
ASSERT_NE(lib_name, nullptr);
if (lib_name == nullptr) {
return; // to avoid nullptr deref coverity issue
}
ASSERT_NE(lib_name[0], '\0');

lib_handle = utils_open_library(lib_name, 0);
Expand Down
11 changes: 8 additions & 3 deletions test/pools/pool_residency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ TEST_F(PoolResidencyTestFixture,
}

int main(int argc, char **argv) {
InitGoogleTest(&argc, argv);
AddGlobalTestEnvironment(new MockedLevelZeroTestEnvironment);
return RUN_ALL_TESTS();
try {
InitGoogleTest(&argc, argv);
AddGlobalTestEnvironment(new MockedLevelZeroTestEnvironment);
return RUN_ALL_TESTS();
} catch (...) {
std::cerr << "Exception occurred." << std::endl;
return 1;
}
}
11 changes: 8 additions & 3 deletions test/providers/provider_level_zero_residency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ TEST_F(LevelZeroResidencyTestFixture, removeDeviceTwiceShouldFail) {
}

int main(int argc, char **argv) {
InitGoogleTest(&argc, argv);
AddGlobalTestEnvironment(new MockedLevelZeroTestEnvironment);
return RUN_ALL_TESTS();
try {
InitGoogleTest(&argc, argv);
AddGlobalTestEnvironment(new MockedLevelZeroTestEnvironment);
return RUN_ALL_TESTS();
} catch (...) {
std::cerr << "Exception occurred." << std::endl;
return 1;
}
}