From: Remy Horton <remy.horton@intel.com>
To: Hari kumar Vemula <hari.kumarx.vemula@intel.com>, dev@dpdk.org
Cc: reshma.pattan@intel.com
Subject: Re: [dpdk-dev] [PATCH v2] test: add unit tests for metrics library
Date: Tue, 24 Jul 2018 15:53:54 +0100 [thread overview]
Message-ID: <cb80b618-ad13-497f-0c0f-14f0b7b06b75@intel.com> (raw)
In-Reply-To: <1532183219-23263-1-git-send-email-hari.kumarx.vemula@intel.com>
Tested using the following patches also applied:
http://patches.dpdk.org/patch/42097/
http://patches.dpdk.org/patch/42098/
http://patches.dpdk.org/patch/42510/
http://patches.dpdk.org/patch/42971/
Two test-cases fail, but these in themselves ought not block this patch.
Details below.
Acked-by: Remy Horton <remy.horton@intel.com>
> + /* Test Case to check failures when memzone init is not done */
> +static int
> +test_metrics_without_init(void)
> +{
> + int err = 0;
> + const uint64_t value[REG_METRIC_COUNT] = {0};
> + const char * const mnames[] = {
> + "mean_bits_in", "mean_bits_out",
> + "peak_bits_in", "peak_bits_out",
> + };
> +
> + /* Failure Test: Checking for memzone initialization */
> + err = rte_metrics_reg_name(NULL);
> + TEST_ASSERT(err == -EIO, "%s, %d", __func__, __LINE__);
Returns -EINVAL instead of -EIO due to NULL check coming before memzone
check. Suggest using non-NULL value.
> +/* Test case to validate update a list of metrics */
> +static int
> +test_metrics_update_values(void)
> +{
[..]
> + /* Failed Test: Invalid count size */
> + err = rte_metrics_update_values(RTE_METRICS_GLOBAL,
> + KEY, &value[0], 0);
> + TEST_ASSERT(err < 0, "%s, %d", __func__, __LINE__);
Test fails, fault with library: Silent handling length of zero. Will
send patch.
next prev parent reply other threads:[~2018-07-24 14:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 7:37 [dpdk-dev] [PATCH] " Hari kumar Vemula
2018-07-05 14:05 ` Remy Horton
2018-07-21 14:26 ` [dpdk-dev] [PATCH v2] " Hari kumar Vemula
2018-07-24 14:53 ` Remy Horton [this message]
2018-08-03 14:33 ` [dpdk-dev] [PATCH v3 0/3] add unit test " Hari Kumar Vemula
2018-08-03 14:33 ` [dpdk-dev] [PATCH v3 1/3] test: add unit tests " Hari Kumar Vemula
2018-08-15 9:29 ` Pattan, Reshma
2018-08-03 14:33 ` [dpdk-dev] [PATCH v3 2/3] autotest: add new unit tests to autotest list Hari Kumar Vemula
2018-08-03 14:33 ` [dpdk-dev] [PATCH v3 3/3] maintainers: add metrics test Hari Kumar Vemula
2018-08-24 12:56 ` [dpdk-dev] [PATCH v4] test: add unit tests for metrics library Hari Kumar Vemula
2018-10-08 13:01 ` [dpdk-dev] [PATCH v5] " Hari Kumar Vemula
2018-10-29 3:01 ` 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=cb80b618-ad13-497f-0c0f-14f0b7b06b75@intel.com \
--to=remy.horton@intel.com \
--cc=dev@dpdk.org \
--cc=hari.kumarx.vemula@intel.com \
--cc=reshma.pattan@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).