File tree Expand file tree Collapse file tree 3 files changed +35
-3
lines changed
conformance_tests/sysman/test_sysman_fabric/src
utils/test_harness/sysman Expand file tree Collapse file tree 3 files changed +35
-3
lines changed Original file line number Diff line number Diff line change 11/*
22 *
3- * Copyright (C) 2020-2023 Intel Corporation
3+ * Copyright (C) 2020-2024 Intel Corporation
44 *
55 * SPDX-License-Identifier: MIT
66 *
@@ -343,4 +343,25 @@ TEST_F(
343343 }
344344}
345345
346+ TEST_F (
347+ FABRICPORT_TEST,
348+ GivenValidFabricPortHandleWhenRetrievingFabricPortErrorCountersThenValidCounterValuesAreReturned) {
349+ for (auto device : devices) {
350+ uint32_t count = 0 ;
351+ auto fabric_port_handles = lzt::get_fabric_port_handles (device, count);
352+ if (count == 0 ) {
353+ FAIL () << " No handles found: "
354+ << _ze_result_t (ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
355+ }
356+ for (auto fabric_port_handle : fabric_port_handles) {
357+ ASSERT_NE (nullptr , fabric_port_handle);
358+ auto fabric_port_error_counters =
359+ lzt::get_fabric_port_error_counters (fabric_port_handle);
360+ EXPECT_LT (fabric_port_error_counters.linkFailureCount , UINT64_MAX);
361+ EXPECT_LT (fabric_port_error_counters.fwCommErrorCount , UINT64_MAX);
362+ EXPECT_LT (fabric_port_error_counters.fwErrorCount , UINT64_MAX);
363+ EXPECT_LT (fabric_port_error_counters.linkDegradeCount , UINT64_MAX);
364+ }
365+ }
366+ }
346367} // namespace
Original file line number Diff line number Diff line change 11/*
22 *
3- * Copyright (C) 2019-2020 Intel Corporation
3+ * Copyright (C) 2019-2024 Intel Corporation
44 *
55 * SPDX-License-Identifier: MIT
66 *
@@ -37,6 +37,9 @@ get_fabric_port_throughput(zes_fabric_port_handle_t fabricPortHandle);
3737zes_fabric_link_type_t
3838get_fabric_port_link (zes_fabric_port_handle_t fabricPortHandle);
3939
40+ zes_fabric_port_error_counters_t
41+ get_fabric_port_error_counters (zes_fabric_port_handle_t fabric_port_handle);
42+
4043} // namespace level_zero_tests
4144
4245#endif
Original file line number Diff line number Diff line change 11/*
22 *
3- * Copyright (C) 2019-2020 Intel Corporation
3+ * Copyright (C) 2019-2024 Intel Corporation
44 *
55 * SPDX-License-Identifier: MIT
66 *
@@ -85,4 +85,12 @@ get_fabric_port_link(zes_fabric_port_handle_t fabric_port_handle) {
8585 return link;
8686}
8787
88+ zes_fabric_port_error_counters_t
89+ get_fabric_port_error_counters (zes_fabric_port_handle_t fabric_port_handle) {
90+ zes_fabric_port_error_counters_t counters = {};
91+ EXPECT_EQ (ZE_RESULT_SUCCESS,
92+ zesFabricPortGetFabricErrorCounters (fabric_port_handle, &counters));
93+ return counters;
94+ }
95+
8896} // namespace level_zero_tests
You can’t perform that action at this time.
0 commit comments