mkiiskila commented on a change in pull request #1331: test/runtest: Move
testbench code into runtest
URL: https://github.com/apache/mynewt-core/pull/1331#discussion_r212297393
##########
File path: kernel/os/test/src/mempool_test.c
##########
@@ -57,36 +55,17 @@ mempool_test_get_pool_size(int num_blocks, int block_size)
return mem_pool_size;
}
-void
-os_mempool_ts_pretest(void* arg)
-{
- os_init(NULL);
- sysinit();
-}
-
-void
-os_mempool_ts_posttest(void* arg)
-{
- return;
-}
-
-void
-os_mempool_test_init(void *arg)
-{
- TstMembufSz = (sizeof(os_membuf_t) *
- OS_MEMPOOL_SIZE(NUM_MEM_BLOCKS, MEM_BLOCK_SIZE));
- TstMembuf = malloc(TstMembufSz);
-
- tu_suite_set_pre_test_cb(os_mempool_ts_pretest, NULL);
- tu_suite_set_post_test_cb(os_mempool_ts_posttest, NULL);
-}
-
TEST_CASE_DECL(os_mempool_test_case)
TEST_CASE_DECL(os_mempool_test_ext_basic)
TEST_CASE_DECL(os_mempool_test_ext_nested)
TEST_SUITE(os_mempool_test_suite)
{
+ TstMembufSz = (sizeof(os_membuf_t) *
+ OS_MEMPOOL_SIZE(NUM_MEM_BLOCKS, MEM_BLOCK_SIZE));
+ TstMembuf = malloc(TstMembufSz);
Review comment:
Is this buffer freed somewhere? I have trouble locating such a call.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services