Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
Expand Down Expand Up @@ -343,4 +343,25 @@ TEST_F(
}
}

TEST_F(
FABRICPORT_TEST,
GivenValidFabricPortHandleWhenRetrievingFabricPortErrorCountersThenValidCounterValuesAreReturned) {
for (auto device : devices) {
uint32_t count = 0;
auto fabric_port_handles = lzt::get_fabric_port_handles(device, count);
if (count == 0) {
FAIL() << "No handles found: "
<< _ze_result_t(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
}
for (auto fabric_port_handle : fabric_port_handles) {
ASSERT_NE(nullptr, fabric_port_handle);
auto fabric_port_error_counters =
lzt::get_fabric_port_error_counters(fabric_port_handle);
EXPECT_LT(fabric_port_error_counters.linkFailureCount, UINT64_MAX);
EXPECT_LT(fabric_port_error_counters.fwCommErrorCount, UINT64_MAX);
EXPECT_LT(fabric_port_error_counters.fwErrorCount, UINT64_MAX);
EXPECT_LT(fabric_port_error_counters.linkDegradeCount, UINT64_MAX);
}
}
}
} // namespace
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
Expand Down Expand Up @@ -37,6 +37,9 @@ get_fabric_port_throughput(zes_fabric_port_handle_t fabricPortHandle);
zes_fabric_link_type_t
get_fabric_port_link(zes_fabric_port_handle_t fabricPortHandle);

zes_fabric_port_error_counters_t
get_fabric_port_error_counters(zes_fabric_port_handle_t fabric_port_handle);

} // namespace level_zero_tests

#endif
10 changes: 9 additions & 1 deletion utils/test_harness/sysman/src/test_harness_sysman_fabric.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
Expand Down Expand Up @@ -85,4 +85,12 @@ get_fabric_port_link(zes_fabric_port_handle_t fabric_port_handle) {
return link;
}

zes_fabric_port_error_counters_t
get_fabric_port_error_counters(zes_fabric_port_handle_t fabric_port_handle) {
zes_fabric_port_error_counters_t counters = {};
EXPECT_EQ(ZE_RESULT_SUCCESS,
zesFabricPortGetFabricErrorCounters(fabric_port_handle, &counters));
return counters;
}

} // namespace level_zero_tests
Loading