* [dpdk-dev] [PATCH] test/metrics: Fixed a negative case to pass
@ 2018-12-06 15:01 Harman Kalra
2018-12-07 11:45 ` Remy Horton
2018-12-10 8:39 ` Harman Kalra
0 siblings, 2 replies; 5+ messages in thread
From: Harman Kalra @ 2018-12-06 15:01 UTC (permalink / raw)
To: remy.horton; +Cc: dev, jerin.jacobkollanukkaran, Harman Kalra
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>
---
test/test/test_metrics.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git test/test/test_metrics.c test/test/test_metrics.c
index 94d54d71c..3c2f36b8a 100644
--- test/test/test_metrics.c
+++ 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] test/metrics: Fixed a negative case to pass
2018-12-06 15:01 [dpdk-dev] [PATCH] test/metrics: Fixed a negative case to pass 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
1 sibling, 1 reply; 5+ messages in thread
From: Remy Horton @ 2018-12-07 11:45 UTC (permalink / raw)
To: Harman Kalra; +Cc: dev, jerin.jacobkollanukkaran
Git apply choked on the patch but it applied using patch -p0 - I'm
guessing this is a problem with patches made using diff rather than git
format-patch. The change itself is fine though. :)
On 06/12/2018 15:01, Harman Kalra wrote:
> 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>
Missing fixline:
Fixes: cd3804242901 ("test/metrics: add unit tests for metrics library")
Acked-by: Remy Horton <remy.horton@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] test/metrics: Fixed a negative case to pass
2018-12-07 11:45 ` Remy Horton
@ 2018-12-10 8:44 ` Harman Kalra
0 siblings, 0 replies; 5+ messages in thread
From: Harman Kalra @ 2018-12-10 8:44 UTC (permalink / raw)
To: remy.horton; +Cc: dev, jerin.jacobkollanukkaran, Harman Kalra
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v2] test/metrics: Fixed a negative case to pass
2018-12-06 15:01 [dpdk-dev] [PATCH] test/metrics: Fixed a negative case to pass Harman Kalra
2018-12-07 11:45 ` Remy Horton
@ 2018-12-10 8:39 ` Harman Kalra
2019-01-20 21:31 ` Thomas Monjalon
1 sibling, 1 reply; 5+ messages in thread
From: Harman Kalra @ 2018-12-10 8:39 UTC (permalink / raw)
To: remy.horton; +Cc: dev, jerin.jacobkollanukkaran, Harman Kalra
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH v2] test/metrics: Fixed a negative case to pass
2018-12-10 8:39 ` Harman Kalra
@ 2019-01-20 21:31 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2019-01-20 21:31 UTC (permalink / raw)
To: Harman Kalra; +Cc: dev, remy.horton, jerin.jacobkollanukkaran
10/12/2018 09:39, Harman Kalra:
> 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>
Adding comment from Remy:
Fixes: cd3804242901 ("test/metrics: add unit tests for metrics library")
Acked-by: Remy Horton <remy.horton@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-01-20 21:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-06 15:01 [dpdk-dev] [PATCH] test/metrics: Fixed a negative case to pass 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
2019-01-20 21:31 ` Thomas Monjalon
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).