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

Function do_selftest

dpdk/drivers/event/dlb2/dlb2_selftest.c:1385–1473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1383}
1384
1385static int
1386do_selftest(void)
1387{
1388 struct test t;
1389 int ret;
1390
1391 /* Only create mbuf pool once, reuse for each test run */
1392 if (!eventdev_func_mempool) {
1393 eventdev_func_mempool =
1394 rte_pktmbuf_pool_create("EVENTDEV_DLB2_ST_POOL",
1395 (1 << 12), /* 4k buffers */
1396 32 /*MBUF_CACHE_SIZE*/,
1397 0,
1398 512, /* use very small mbufs */
1399 rte_socket_id());
1400 if (!eventdev_func_mempool) {
1401 printf("ERROR creating mempool\n");
1402 goto test_fail;
1403 }
1404 }
1405 t.mbuf_pool = eventdev_func_mempool;
1406
1407 printf("*** Running Stop Flush test...\n");
1408 ret = test_stop_flush(&t);
1409 if (ret != 0) {
1410 printf("ERROR - Stop Flush test FAILED.\n");
1411 return ret;
1412 }
1413
1414 printf("*** Running Single Link test...\n");
1415 ret = test_single_link();
1416 if (ret != 0) {
1417 printf("ERROR - Single Link test FAILED.\n");
1418
1419 goto test_fail;
1420 }
1421
1422 printf("*** Running Info Get test...\n");
1423 ret = test_info_get();
1424 if (ret != 0) {
1425 printf("ERROR - Stop Flush test FAILED.\n");
1426 return ret;
1427 }
1428
1429 printf("*** Running Reconfiguration Link test...\n");
1430 ret = test_reconfiguration_link();
1431 if (ret != 0) {
1432 printf("ERROR - Reconfiguration Link test FAILED.\n");
1433
1434 goto test_fail;
1435 }
1436
1437 printf("*** Running Load-Balanced Traffic test...\n");
1438 ret = test_load_balanced_traffic();
1439 if (ret != 0) {
1440 printf("ERROR - Load-Balanced Traffic test FAILED.\n");
1441
1442 goto test_fail;

Callers 1

test_dlb2_eventdevFunction · 0.85

Calls 11

rte_pktmbuf_pool_createFunction · 0.85
rte_socket_idFunction · 0.85
test_stop_flushFunction · 0.85
test_single_linkFunction · 0.85
test_info_getFunction · 0.85
test_directed_trafficFunction · 0.85
test_deferred_schedFunction · 0.85
test_delayed_popFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected