From: Lukasz Wojciechowski Date: Mon, 21 Sep 2020 21:44:19 +0000 (+0200) Subject: raw/skeleton: reset test statistics X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=22b5c63ed13fbae5934a312cba657ec1901f7539;p=dpdk.git 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: 55ca1b0f2151 ("raw/skeleton: add test cases") Cc: stable@dpdk.org Signed-off-by: Lukasz Wojciechowski Acked-by: Hemant Agrawal --- diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c index bb4b6efe40..1405df080d 100644 --- a/drivers/raw/skeleton/skeleton_rawdev_test.c +++ b/drivers/raw/skeleton/skeleton_rawdev_test.c @@ -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; "