DPDK patches and discussions
 help / color / mirror / Atom feed
From: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
To: harry.van.haaren@intel.com
Cc: dev@dpdk.org, Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH 2/2] service: fix service lcore start stop unit test
Date: Tue,  5 Sep 2017 19:40:57 +0530	[thread overview]
Message-ID: <20170905141057.8998-2-gprathyusha@caviumnetworks.com> (raw)
In-Reply-To: <20170905141057.8998-1-gprathyusha@caviumnetworks.com>

Unit test case service_lcore_start_stop fails since the service core was
stopped without stopping the service.

This commit fixes the test by adding negative and positive cases of
stopping the service lcore before and after stopping the service
respectively.

Fixes: f038a81e1c56 ("service: add unit tests")

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
---
 test/test/test_service_cores.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/test/test_service_cores.c b/test/test/test_service_cores.c
index 88fac8f44..b043397ef 100644
--- a/test/test/test_service_cores.c
+++ b/test/test/test_service_cores.c
@@ -553,6 +553,10 @@ service_lcore_start_stop(void)
 			"Service core expected to poll service but it didn't");

 	/* core stop */
+	TEST_ASSERT_EQUAL(-EBUSY, rte_service_lcore_stop(slcore_id),
+			"Service core running a service should return -EBUSY");
+	TEST_ASSERT_EQUAL(0, rte_service_stop(s),
+			"Stopping valid service failed");
 	TEST_ASSERT_EQUAL(-EINVAL, rte_service_lcore_stop(100000),
 			"Invalid Service core stop should return -EINVAL");
 	TEST_ASSERT_EQUAL(0, rte_service_lcore_stop(slcore_id),
--
2.14.1

  reply	other threads:[~2017-09-05 14:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05 14:10 [dpdk-dev] [PATCH 1/2] service: fix service lcore stop function Guduri Prathyusha
2017-09-05 14:10 ` Guduri Prathyusha [this message]
2017-09-05 14:34 ` Van Haaren, Harry
2017-09-05 16:02   ` Guduri Prathyusha

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=20170905141057.8998-2-gprathyusha@caviumnetworks.com \
    --to=gprathyusha@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@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).