diff options
author | Taras Kondratiuk <taras.kondratiuk@linaro.org> | 2015-02-25 12:30:52 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-02-25 20:48:33 +0300 |
commit | 3a0a84edc8f54ac296843b7de2d770936cc69322 (patch) | |
tree | 5f42cb5c4bd3e6cbf6f75bd6d22d3e897811a385 /test | |
parent | 73337df8018f1a81a9b7a732eb996dadc8a1e819 (diff) |
validation: queue: destroy created ODP resources
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/validation/odp_queue.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/validation/odp_queue.c b/test/validation/odp_queue.c index 91a32dcca..5d473995d 100644 --- a/test/validation/odp_queue.c +++ b/test/validation/odp_queue.c @@ -12,10 +12,10 @@ #define CONFIG_MAX_ITERATION (100) static int queue_contest = 0xff; +static odp_pool_t pool; static int init_queue_suite(void) { - odp_pool_t pool; odp_pool_param_t params; params.buf.size = 0; @@ -32,6 +32,11 @@ static int init_queue_suite(void) return 0; } +static int init_queue_finalize(void) +{ + return odp_pool_destroy(pool); +} + static void test_odp_queue_sunnyday(void) { odp_queue_t queue_creat_id, queue_id; @@ -103,6 +108,7 @@ static void test_odp_queue_sunnyday(void) odp_buffer_free(enbuf); } + CU_ASSERT(odp_queue_destroy(queue_id) == 0); return; } @@ -112,6 +118,7 @@ CU_TestInfo test_odp_queue[] = { }; CU_SuiteInfo odp_testsuites[] = { - {"Queue", init_queue_suite, NULL, NULL, NULL, test_odp_queue}, + {"Queue", init_queue_suite, init_queue_finalize, + NULL, NULL, test_odp_queue}, CU_SUITE_INFO_NULL, }; |