test/service: fix wait for service core
authorHarry van Haaren <harry.van.haaren@intel.com>
Wed, 27 Nov 2019 13:20:27 +0000 (13:20 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 27 Nov 2019 20:23:17 +0000 (21:23 +0100)
commit505a2b0c64a7f1e087f5a8aaa6940da78c11c81b
tree44c03ec859a238de49c378af9f2d7806261dc216
parent4a2121667445280e9966b4dbe673d4eca18d50a2
test/service: fix wait for service core

This commit fixes a sporadic failure of the service_autotest
unit test, as seen in the DPDK CI. The failure occurs as the main test
thread did not wait on the service-thread to return, and allowing it
to read a flag before the service was able to write to it.

The fix changes the wait API call to specific the service-core ID,
and this waits for cores with both ROLE_RTE and ROLE_SERVICE.

The rte_eal_mp_wait_lcore() call does not (and should not) wait
for service cores, so must not be used to wait on service-cores.

Fixes: f038a81e1c56 ("service: add unit tests")
Cc: stable@dpdk.org
Reported-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
app/test/test_service_cores.c