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

Function test_invalid_devargs

dpdk/app/test/test_devargs.c:181–202  ·  view source on GitHub ↗

Test several invalid cases */

Source from the content-addressed store, hash-verified

179
180/* Test several invalid cases */
181static int
182test_invalid_devargs(void)
183{
184 static const char * const list[] = {
185 "bus=wrong-bus",
186 "class=wrong-class"};
187 struct rte_devargs da;
188 uint32_t i;
189 int ret;
190 int fail = 0;
191
192 for (i = 0; i < RTE_DIM(list); i++) {
193 ret = rte_devargs_parse(&da, list[i]);
194 if (ret >= 0) {
195 printf("rte_devargs_parse(%s) returned %d (but should not)\n",
196 list[i], ret);
197 fail = ret;
198 }
199 rte_devargs_reset(&da);
200 }
201 return fail;
202}
203
204static int
205test_devargs(void)

Callers 1

test_devargsFunction · 0.85

Calls 3

rte_devargs_parseFunction · 0.85
rte_devargs_resetFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected