Skip to content

Commit

Permalink
Fix test static analysis issues (#76)
Browse files Browse the repository at this point in the history
Signed-off-by: Jemale Lockett <jemale.lockett@intel.com>
  • Loading branch information
Jemale authored Sep 26, 2024
1 parent 858c406 commit e2944ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion conformance_tests/core/test_module/src/test_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ std::vector<ze_module_handle_t> create_module_vector_and_log(
lzt::save_native_binary_file(module.back(), filename_native);
module.push_back(lzt::create_module(
device, filename_native, ZE_MODULE_FORMAT_NATIVE, nullptr, nullptr));
std::remove(filename_native.c_str());
if (std::remove(filename_native.c_str())) {
LOG_WARNING << "FAILED to remove file " << filename_native;
}
}
}
return (module);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ UUID get_ze_device_uuid(ze_device_handle_t ze_device) {
return TO_STD_ARRAY(ze_device_uuid.id);
}

UUID get_ze_root_uuid(ze_device_handle_t ze_device, char *device_hierarchy) {
UUID get_ze_root_uuid(ze_device_handle_t ze_device,
const char *device_hierarchy) {
ze_device_handle_t ze_root_device;
if (strcmp(device_hierarchy, "COMBINED") == 0) {
ze_root_device = lzt::get_root_device(ze_device);
Expand Down Expand Up @@ -78,10 +79,10 @@ bool compare_core_and_sysman_uuid(std::vector<UUID> core_uuids,

int main(int argc, char **argv) {

char *device_hierarchy = getenv("ZE_FLAT_DEVICE_HIERARCHY");
const char *device_hierarchy = getenv("ZE_FLAT_DEVICE_HIERARCHY");
EXPECT_NE(device_hierarchy, nullptr);
LOG_INFO << "Device Hierarchy : " << device_hierarchy ? device_hierarchy
: "NULL";
device_hierarchy = device_hierarchy ? device_hierarchy : "NULL";
LOG_INFO << "Device Hierarchy : " << device_hierarchy;

auto driver = lzt::zeDevice::get_instance()->get_driver();
std::vector<ze_device_handle_t> ze_devices = lzt::get_ze_devices(driver);
Expand Down
2 changes: 1 addition & 1 deletion perf_tests/ze_peer/src/ze_peer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void run_ipc_test(int size_to_run, uint32_t remote_device_id,
test_type, transfer_type, false /* is_server */, sv[1],
number_of_elements, local_device_id, remote_device_id);
} else {
ZePeer peer(local_device_ids, remote_device_ids, pair_device_ids,
ZePeer peer(remote_device_ids, local_device_ids, pair_device_ids,
queues);
if (ZePeer::validate_results) {
peer.warm_up_iterations = 0;
Expand Down

0 comments on commit e2944ad

Please sign in to comment.