Skip to content

Commit c6a1564

Browse files
m-ronnblomdavid-marchand
authored andcommitted
app/test: reintroduce delay in service test
Eliminate unreachable code and have dummy service function perform a short delay again, mimicking previous service core test behavior. Coverity issue: 445158 Fixes: a37e053 ("service: extend service function call statistics") Signed-off-by: Mattias Rönnblom <[email protected]> Reviewed-by: David Marchand <[email protected]>
1 parent b384624 commit c6a1564

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/test/test_service_cores.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,27 @@ testsuite_teardown(void)
4949
static int32_t dummy_cb(void *args)
5050
{
5151
RTE_SET_USED(args);
52+
int32_t rc;
5253

5354
service_calls++;
5455

5556
switch (rte_rand_max(3)) {
5657
case 0:
57-
return 0;
58+
rc = 0;
59+
break;
5860
case 1:
5961
service_idle_calls++;
60-
return -EAGAIN;
62+
rc = -EAGAIN;
63+
break;
6164
default:
6265
service_error_calls++;
63-
return -ENOENT;
66+
rc = -ENOENT;
67+
break;
6468
}
6569

6670
rte_delay_ms(SERVICE_DELAY);
71+
72+
return rc;
6773
}
6874

6975
static int32_t dummy_mt_unsafe_cb(void *args)

0 commit comments

Comments
 (0)