tests: kernel: mslab: move concept cases to new ZTEST API

Move concept test cases to new ZTEST API.

Signed-off-by: NingX Zhao <ningx.zhao@intel.com>
This commit is contained in:
NingX Zhao 2022-08-12 13:16:05 +08:00 committed by Fabio Baltieri
parent b42c04deeb
commit aec0f624ee
3 changed files with 3 additions and 9 deletions

View File

@ -1 +1,2 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y

View File

@ -5,12 +5,5 @@
*/
#include <zephyr/ztest.h>
extern void test_mslab_alloc_wait_prio(void);
/*test case main entry*/
void test_main(void)
{
ztest_test_suite(mslab_concept,
ztest_1cpu_unit_test(test_mslab_alloc_wait_prio));
ztest_run_test_suite(mslab_concept);
}
ZTEST_SUITE(mslab_concept, NULL, NULL, NULL, NULL, NULL);

View File

@ -48,7 +48,7 @@ void tmslab_alloc_wait_ok(void *p1, void *p2, void *p3)
* @see k_mem_slab_alloc()
* @see k_mem_slab_free()
*/
void test_mslab_alloc_wait_prio(void)
ZTEST(mslab_concept, test_mslab_alloc_wait_prio)
{
void *block[BLK_NUM];
k_tid_t tid[THREAD_NUM];