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

Function test_ring

dpdk/app/test/test_ring.c:1193–1242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1191}
1192
1193static int
1194test_ring(void)
1195{
1196 int32_t rc;
1197 unsigned int i;
1198
1199 /* Negative test cases */
1200 if (test_ring_negative_tests() < 0)
1201 goto test_fail;
1202
1203 /* Some basic operations */
1204 if (test_ring_basic_ex() < 0)
1205 goto test_fail;
1206
1207 if (test_ring_with_exact_size() < 0)
1208 goto test_fail;
1209
1210 /* Burst and bulk operations with sp/sc, mp/mc and default.
1211 * The test cases are split into smaller test cases to
1212 * help clang compile faster.
1213 */
1214 for (i = 0; i != RTE_DIM(test_enqdeq_impl); i++) {
1215
1216
1217 rc = test_ring_burst_bulk_tests1(i);
1218 if (rc < 0)
1219 goto test_fail;
1220
1221 rc = test_ring_burst_bulk_tests2(i);
1222 if (rc < 0)
1223 goto test_fail;
1224
1225 rc = test_ring_burst_bulk_tests3(i);
1226 if (rc < 0)
1227 goto test_fail;
1228
1229 rc = test_ring_burst_bulk_tests4(i);
1230 if (rc < 0)
1231 goto test_fail;
1232 }
1233
1234 /* dump the ring status */
1235 rte_ring_list_dump(stdout);
1236
1237 return 0;
1238
1239test_fail:
1240
1241 return -1;
1242}
1243
1244REGISTER_FAST_TEST(ring_autotest, true, true, test_ring);

Callers

nothing calls this directly

Calls 8

test_ring_negative_testsFunction · 0.85
test_ring_basic_exFunction · 0.85
rte_ring_list_dumpFunction · 0.85

Tested by

no test coverage detected