test/mempool: fix false positive result
authorOlivier Matz <olivier.matz@6wind.com>
Mon, 4 Nov 2019 10:06:23 +0000 (11:06 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 6 Nov 2019 10:55:23 +0000 (11:55 +0100)
commitb2ca1e1caed22ff23613d3e038d0a82e9755282f
tree9e35f1e3822061e2dcd0003c94c1d75fd8fcc9f6
parentb32037f7ef384e664200baedbb4aebe9a216f73d
test/mempool: fix false positive result

The ret variable, initialized to -1, is changed to 0 during the test,
making the test successful in some cases where it should return a
failure.

Fix this by always using the GOTO_ERR() macro that sets the ret
variable before doing the goto.

Fixes: 923ceaeac140 ("test/mempool: add unit test cases")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
app/test/test_mempool.c