Eliminate unreachable code and have dummy service function perform a
short delay again, mimicking previous service core test behavior.

Fixes: a37e053b2364 ("service: extend service function call statistics")

Signed-off-by: Mattias Rönnblom <mattias.ronnb...@ericsson.com>
---
 app/test/test_service_cores.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c
index 7ae6bbb179..46ed9a1868 100644
--- a/app/test/test_service_cores.c
+++ b/app/test/test_service_cores.c
@@ -49,21 +49,27 @@ testsuite_teardown(void)
 static int32_t dummy_cb(void *args)
 {
        RTE_SET_USED(args);
+       int32_t rc;
 
        service_calls++;
 
        switch (rte_rand_max(3)) {
        case 0:
-               return 0;
+               rc = 0;
+               break;
        case 1:
                service_idle_calls++;
-               return -EAGAIN;
+               rc = -EAGAIN;
+               break;
        default:
                service_error_calls++;
-               return -ENOENT;
+               rc = -ENOENT;
+               break;
        }
 
        rte_delay_ms(SERVICE_DELAY);
+
+       return rc;
 }
 
 static int32_t dummy_mt_unsafe_cb(void *args)
-- 
2.43.0

Reply via email to