1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2020 Intel Corporation
5 #include "test_ring_stress.h"
8 run_test(const struct test *test)
13 for (i = 0, k = 0; i != test->nb_case; i++) {
15 printf("TEST-CASE %s %s START\n",
16 test->name, test->cases[i].name);
18 rc = test->cases[i].func(test->cases[i].wfunc);
22 printf("TEST-CASE %s %s FAILED\n",
23 test->name, test->cases[i].name);
25 printf("TEST-CASE %s %s OK\n",
26 test->name, test->cases[i].name);
33 test_ring_stress(void)
40 n += test_ring_mpmc_stress.nb_case;
41 k += run_test(&test_ring_mpmc_stress);
43 n += test_ring_rts_stress.nb_case;
44 k += run_test(&test_ring_rts_stress);
46 n += test_ring_hts_stress.nb_case;
47 k += run_test(&test_ring_hts_stress);
49 n += test_ring_mt_peek_stress.nb_case;
50 k += run_test(&test_ring_mt_peek_stress);
52 n += test_ring_mt_peek_stress_zc.nb_case;
53 k += run_test(&test_ring_mt_peek_stress_zc);
55 n += test_ring_st_peek_stress.nb_case;
56 k += run_test(&test_ring_st_peek_stress);
58 n += test_ring_st_peek_stress_zc.nb_case;
59 k += run_test(&test_ring_st_peek_stress_zc);
61 printf("Number of tests:\t%u\nSuccess:\t%u\nFailed:\t%u\n",
66 REGISTER_TEST_COMMAND(ring_stress_autotest, test_ring_stress);