patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
To: Nipun Gupta <nipun.gupta@nxp.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Shreyansh Jain <shreyansh.jain@nxp.com>
Cc: dev@dpdk.org, l.wojciechow@partner.samsung.com, stable@dpdk.org
Subject: [dpdk-stable] [PATCH v1 1/2] raw/skeleton: reset rawdev test statistics
Date: Mon, 21 Sep 2020 23:44:19 +0200	[thread overview]
Message-ID: <20200921214420.29171-1-l.wojciechow@partner.samsung.com> (raw)
In-Reply-To: <CGME20200921214426eucas1p1780728815bcc17e96102cb1f43df0195@eucas1p1.samsung.com>

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: shreyansh.jain@nxp.com

Cc: stable@dpdk.org

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
---
 drivers/raw/skeleton/skeleton_rawdev_test.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
index bb4b6efe4..1405df080 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; "
-- 
2.17.1


       reply	other threads:[~2020-09-21 21:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200921214426eucas1p1780728815bcc17e96102cb1f43df0195@eucas1p1.samsung.com>
2020-09-21 21:44 ` Lukasz Wojciechowski [this message]
     [not found]   ` <CGME20200921214427eucas1p1f55e4da85bf76c8f73a840b47e01b04d@eucas1p1.samsung.com>
2020-09-21 21:44     ` [dpdk-stable] [PATCH v1 2/2] raw/skeleton: allow closing already closed rawdev Lukasz Wojciechowski
2020-09-22  4:15   ` [dpdk-stable] [PATCH v1 1/2] raw/skeleton: reset rawdev test statistics Hemant Agrawal
2020-10-06 21:31   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200921214420.29171-1-l.wojciechow@partner.samsung.com \
    --to=l.wojciechow@partner.samsung.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=nipun.gupta@nxp.com \
    --cc=shreyansh.jain@nxp.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).