diff options
author | Robbie King <robking@cisco.com> | 2015-02-26 14:52:14 -0500 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-03-03 20:54:45 +0300 |
commit | fce8f9807f64c33f1693cec7f0d478e624f0385a (patch) | |
tree | d485a7fb892953b9d7e6210e9416169764a1376c /test | |
parent | 46103506e57ca4f0c53e8bee5f953ef7ede68a66 (diff) |
validation: crypto: add common test cleanup
Destroy queue and pool before termination.
https://bugs.linaro.org/show_bug.cgi?id=1282
Signed-off-by: Robbie King <robking@cisco.com>
Tested-by: Mike Holmes <mike.holmes@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/validation/odp_crypto.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/validation/odp_crypto.c b/test/validation/odp_crypto.c index 6cb5695e5..4126ac17e 100644 --- a/test/validation/odp_crypto.c +++ b/test/validation/odp_crypto.c @@ -48,3 +48,27 @@ int tests_global_init(void) return 0; } + +int tests_global_term(void) +{ + odp_pool_t pool; + odp_queue_t out_queue; + + out_queue = odp_queue_lookup("crypto-out"); + if (ODP_QUEUE_INVALID != out_queue) { + if (odp_queue_destroy(out_queue)) + fprintf(stderr, "Crypto outq destroy failed.\n"); + } else { + fprintf(stderr, "Crypto outq not found.\n"); + } + + pool = odp_pool_lookup("packet_pool"); + if (ODP_POOL_INVALID != pool) { + if (odp_pool_destroy(pool)) + fprintf(stderr, "Packet pool destroy failed.\n"); + } else { + fprintf(stderr, "Packet pool not found.\n"); + } + + return 0; +} |