MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_link_status_invalid

Function test_link_status_invalid

dpdk/app/test/test_ethdev_link.c:87–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87static int32_t
88test_link_status_invalid(void)
89{
90 int ret = 0;
91 struct rte_eth_link link_status = {
92 .link_speed = 55555,
93 .link_status = RTE_ETH_LINK_UP,
94 .link_autoneg = RTE_ETH_LINK_AUTONEG,
95 .link_duplex = RTE_ETH_LINK_FULL_DUPLEX
96 };
97 char text[RTE_ETH_LINK_MAX_STR_LEN];
98
99 ret = rte_eth_link_to_str(text, sizeof(text), &link_status);
100 RTE_TEST_ASSERT(ret < RTE_ETH_LINK_MAX_STR_LEN,
101 "Failed to format invalid string\n");
102 printf("invalid link up #1: len=%d %s\n", ret, text);
103 TEST_ASSERT_BUFFERS_ARE_EQUAL("Link up at Invalid FDX Autoneg",
104 text, strlen(text), "Incorrect invalid link status string");
105
106 return TEST_SUCCESS;
107}
108
109
110static int32_t

Callers

nothing calls this directly

Calls 2

rte_eth_link_to_strFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected