DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] test/eventdev: fix incorrect unit test
Date: Sun, 23 Sep 2018 14:29:07 +0530	[thread overview]
Message-ID: <20180923085905.GA30840@jerin> (raw)
In-Reply-To: <20180905142331.9167-1-pbhagavatula@caviumnetworks.com>

-----Original Message-----
> Date: Wed,  5 Sep 2018 19:53:31 +0530
> From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> To: jerin.jacob@caviumnetworks.com
> Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH] test/eventdev: fix incorrect unit test
> X-Mailer: git-send-email 2.18.0
> 
> Enqueue, dequeue depths are only valid for event devs that have burst
> mode capability. Check event dev capability before testing depth
> boundary.
> 
> Fixes: f8f9d233ea0e ("test/eventdev: add unit tests")

Cc: stable@dpdk.org

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---
>  test/test/test_eventdev.c | 21 ++++++++++++---------
>  1 file changed, 12 insertions(+), 9 deletions(-)
> 
> diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c
> index 04bdc6b6c..00d73275c 100644
> --- a/test/test/test_eventdev.c
> +++ b/test/test/test_eventdev.c
> @@ -190,15 +190,18 @@ test_eventdev_configure(void)
>  		 "Config negative test failed");
>  	TEST_ASSERT_EQUAL(-EINVAL,
>  		test_ethdev_config_run(&dev_conf, &info, max_event_queue_flows),
> -		 "Config negative test failed");
> -	TEST_ASSERT_EQUAL(-EINVAL,
> -		test_ethdev_config_run(&dev_conf, &info,
> -			max_event_port_dequeue_depth),
> -			 "Config negative test failed");
> -	TEST_ASSERT_EQUAL(-EINVAL,
> -		test_ethdev_config_run(&dev_conf, &info,
> -		max_event_port_enqueue_depth),
> -		 "Config negative test failed");
> +		"Config negative test failed");
> +
> +	if (info.event_dev_cap & RTE_EVENT_DEV_CAP_BURST_MODE) {
> +		TEST_ASSERT_EQUAL(-EINVAL,
> +				test_ethdev_config_run(&dev_conf, &info,
> +					max_event_port_dequeue_depth),
> +				"Config negative test failed");
> +		TEST_ASSERT_EQUAL(-EINVAL,
> +				test_ethdev_config_run(&dev_conf, &info,
> +					max_event_port_enqueue_depth),
> +				"Config negative test failed");
> +	}
>  
>  	/* Positive case */
>  	devconf_set_default_sane_values(&dev_conf, &info);
> -- 
> 2.18.0
> 

  reply	other threads:[~2018-09-23  8:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05 14:23 Pavan Nikhilesh
2018-09-23  8:59 ` Jerin Jacob [this message]
2018-09-25  3:35   ` Jerin Jacob

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=20180923085905.GA30840@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=pbhagavatula@caviumnetworks.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).