diff mbox series

[1/2] test/eventdev: fix unintended vdev creation

Message ID 20200106074243.2336-1-pbhagavatula@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers show
Series [1/2] test/eventdev: fix unintended vdev creation | expand

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Pavan Nikhilesh Bhagavatula Jan. 6, 2020, 7:42 a.m. UTC
From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Virtual eventdevice should only be created when there is no existing
device with the same name.

Fixes: e0f4a0ed4237 ("test: skip tests when missing requirements")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 app/test/test_eventdev.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Jerin Jacob Jan. 15, 2020, 11:06 a.m. UTC | #1
On Mon, Jan 6, 2020 at 1:12 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Virtual eventdevice should only be created when there is no existing
> device with the same name.
>
> Fixes: e0f4a0ed4237 ("test: skip tests when missing requirements")
> Cc: stable@dpdk.org
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>
Series applied to dpdk-next-eventdev/master. Thanks.


> ---
>  app/test/test_eventdev.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c
> index 427dbbf77..56155838d 100644
> --- a/app/test/test_eventdev.c
> +++ b/app/test/test_eventdev.c
> @@ -996,9 +996,13 @@ test_eventdev_common(void)
>  static int
>  test_eventdev_selftest_impl(const char *pmd, const char *opts)
>  {
> -       rte_vdev_init(pmd, opts);
> +       int ret = 0;
> +
>         if (rte_event_dev_get_dev_id(pmd) == -ENODEV)
> +               ret = rte_vdev_init(pmd, opts);
> +       if (ret)
>                 return TEST_SKIPPED;
> +
>         return rte_event_dev_selftest(rte_event_dev_get_dev_id(pmd));
>  }
>
> --
> 2.17.1
>
diff mbox series

Patch

diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c
index 427dbbf77..56155838d 100644
--- a/app/test/test_eventdev.c
+++ b/app/test/test_eventdev.c
@@ -996,9 +996,13 @@  test_eventdev_common(void)
 static int
 test_eventdev_selftest_impl(const char *pmd, const char *opts)
 {
-	rte_vdev_init(pmd, opts);
+	int ret = 0;
+
 	if (rte_event_dev_get_dev_id(pmd) == -ENODEV)
+		ret = rte_vdev_init(pmd, opts);
+	if (ret)
 		return TEST_SKIPPED;
+
 	return rte_event_dev_selftest(rte_event_dev_get_dev_id(pmd));
 }