DPDK patches and discussions
 help / color / mirror / Atom feed
From: Harman Kalra <hkalra@marvell.com>
To: "remy.horton@intel.com" <remy.horton@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"jerin.jacobkollanukkaran@cavium.com"
	<jerin.jacobkollanukkaran@cavium.com>,
	Harman Kalra <hkalra@marvell.com>
Subject: [dpdk-dev] [PATCH v2] test/metrics: Fixed a negative case to pass
Date: Mon, 10 Dec 2018 08:39:15 +0000	[thread overview]
Message-ID: <20181210083857.3158-1-hkalra@marvell.com> (raw)
In-Reply-To: <20181206150106.154090-1-hkalra@marvell.com>

Negative test case for passing invalid count size to
rte_metrics_update_values() will pass if count value
is any value greater than 1 because set size wrt to
key id 1 is 1 and passing 0 as no of values to be
updated will not hit the ERANGE check.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
Fixed the patch creation issue, now git apply works fine.

 test/test/test_metrics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test/test_metrics.c b/test/test/test_metrics.c
index 94d54d71c..3c2f36b8a 100644
--- a/test/test/test_metrics.c
+++ b/test/test/test_metrics.c
@@ -154,7 +154,7 @@ test_metrics_update_values(void)
 
 	/* Failed Test: Invalid count size */
 	err = rte_metrics_update_values(RTE_METRICS_GLOBAL,
-			 KEY, &value[0], 0);
+			 KEY, &value[0], ARRAY_SIZE(value));
 	TEST_ASSERT(err < 0, "%s, %d", __func__, __LINE__);
 
 	/* Failed Test: Invalid port_id(lower value) and valid data */
-- 
2.18.0

  parent reply	other threads:[~2018-12-10  8:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06 15:01 [dpdk-dev] [PATCH] " Harman Kalra
2018-12-07 11:45 ` Remy Horton
2018-12-10  8:44   ` [dpdk-dev] [PATCH v2] " Harman Kalra
2018-12-10  8:39 ` Harman Kalra [this message]
2019-01-20 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=20181210083857.3158-1-hkalra@marvell.com \
    --to=hkalra@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacobkollanukkaran@cavium.com \
    --cc=remy.horton@intel.com \
    /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).