raw/skeleton: reset test statistics

Statistics: passed, failed, unsupported and total are kept
in global static variables. As global variables they are initiated
with zeroes. However running test multiple times cumulates results
from previous calls.

This patch resets statistics with zeroes in testsuite_setup().

To reproduce issue fixed by this patch, run rawdev_autotest command
in dpdk-test app multiple times.

Fixes: 55ca1b0f21 ("raw/skeleton: add test cases")
Cc: stable@dpdk.org

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This commit is contained in:
Lukasz Wojciechowski 2020-09-21 23:44:19 +02:00 committed by Thomas Monjalon
parent 083b0b310b
commit 22b5c63ed1

View File

@ -42,6 +42,12 @@ static int
testsuite_setup(void)
{
uint8_t count;
total = 0;
passed = 0;
failed = 0;
unsupported = 0;
count = rte_rawdev_count();
if (!count) {
SKELDEV_TEST_INFO("\tNo existing rawdev; "