service: fix lcore stop
authorGuduri Prathyusha <gprathyusha@caviumnetworks.com>
Wed, 6 Sep 2017 07:15:41 +0000 (12:45 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 15 Sep 2017 13:32:48 +0000 (15:32 +0200)
commitaee62e906f5e59a8fac65c78cac811958aa11657
tree0b8125bcd6767e1a05c5349d5723a6e9731fa433
parentc4c6f682292b8c8987cd0f9d247794d50f875dee
service: fix lcore stop

lcore_states store the state of the lcore. Fixing the invalid
dereference of lcore_states with service number

Unit test case service_lcore_start_stop fails with the above fix.
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: 21698354c832 ("service: introduce service cores concept")
Fixes: f038a81e1c56 ("service: add unit tests")

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
lib/librte_eal/common/rte_service.c
test/test/test_service_cores.c