diff --git a/test/cmocka/src/audio/component/comp_set_state.c b/test/cmocka/src/audio/component/comp_set_state.c index 0d46a14f84a3..a83867744d28 100644 --- a/test/cmocka/src/audio/component/comp_set_state.c +++ b/test/cmocka/src/audio/component/comp_set_state.c @@ -54,7 +54,8 @@ struct test_case { #define TEST_CASE(type, in_state, cmd, out_state) \ {(type), (in_state), (cmd), (out_state), \ - ("comp_set_state__" #type "__" #in_state "__" #cmd "__" #out_state)} + ("test_audio_component_comp_set_state__" \ + #type "__" #in_state "__" #cmd "__" #out_state)} /* @@ -213,7 +214,7 @@ static void test_audio_component_comp_set_state_fail(struct test_case *tc) assert_int_equal(comp_set_state(&test_drv, tc->cmd), -EINVAL); } -static void test_comp_set_state(void **state) +static void test_audio_component_comp_set_state(void **state) { struct test_case *tc = *((struct test_case **) state); @@ -240,7 +241,7 @@ int main(void) struct CMUnitTest *t = &tests[i]; t->name = test_cases[i].name; - t->test_func = test_comp_set_state; + t->test_func = test_audio_component_comp_set_state; t->initial_state = &test_cases[i]; t->setup_func = NULL; t->teardown_func = NULL; diff --git a/test/cmocka/src/audio/mixer/mixer_test.c b/test/cmocka/src/audio/mixer/mixer_test.c index dac7e443236b..d5ece9adc459 100644 --- a/test/cmocka/src/audio/mixer/mixer_test.c +++ b/test/cmocka/src/audio/mixer/mixer_test.c @@ -88,7 +88,7 @@ struct mix_test_case { { \ .num_sources = (_num_sources), \ .num_chans = (_num_chans), \ - .name = ("mixer_copy_" \ + .name = ("test_audio_mixer_copy_" \ #_num_sources "_srcs_" \ #_num_chans "ch"), \ .sources = NULL \ diff --git a/test/cmocka/src/audio/volume/volume_process.c b/test/cmocka/src/audio/volume/volume_process.c index c6f3d5d9b762..e5b7ac365322 100644 --- a/test/cmocka/src/audio/volume/volume_process.c +++ b/test/cmocka/src/audio/volume/volume_process.c @@ -280,7 +280,7 @@ static void verify_s32_to_s24_s32(struct comp_dev *dev, } } -static void test_vol(void **state) +static void test_audio_vol(void **state) { struct vol_test_state *vol_state = *state; struct comp_data *cd = comp_get_drvdata(vol_state->dev); @@ -340,8 +340,8 @@ int main(void) struct CMUnitTest tests[ARRAY_SIZE(parameters)]; for (i = 0; i < ARRAY_SIZE(parameters); i++) { - tests[i].name = "test_vol"; - tests[i].test_func = test_vol; + tests[i].name = "test_audio_vol"; + tests[i].test_func = test_audio_vol; tests[i].setup_func = setup; tests[i].teardown_func = teardown; tests[i].initial_state = ¶meters[i]; diff --git a/test/cmocka/src/lib/alloc/alloc.c b/test/cmocka/src/lib/alloc/alloc.c index e620848fb28d..4f004d833220 100644 --- a/test/cmocka/src/lib/alloc/alloc.c +++ b/test/cmocka/src/lib/alloc/alloc.c @@ -56,7 +56,7 @@ struct test_case { #define TEST_CASE(bytes, zone, caps, num, type, name_base) \ {(bytes), (zone), (caps), (num), (type), \ - (name_base "__" #zone "__" #bytes "x" #num)} + ("test_lib_alloc_" name_base "__" #zone "__" #bytes "x" #num)} static struct test_case test_cases[] = { /* @@ -236,7 +236,7 @@ static void *alloc(struct test_case *tc) return mem; } -static void test_alloc_bulk_free(struct test_case *tc) +static void test_lib_alloc_bulk_free(struct test_case *tc) { void **all_mem = malloc(sizeof(void *) * tc->alloc_num); int i; @@ -254,7 +254,7 @@ static void test_alloc_bulk_free(struct test_case *tc) rfree(all_mem); } -static void test_alloc_immediate_free(struct test_case *tc) +static void test_lib_alloc_immediate_free(struct test_case *tc) { int i; @@ -266,7 +266,7 @@ static void test_alloc_immediate_free(struct test_case *tc) } } -static void test_alloc_zero(struct test_case *tc) +static void test_lib_alloc_zero(struct test_case *tc) { void **all_mem = malloc(sizeof(void *) * tc->alloc_num); int i; @@ -289,21 +289,21 @@ static void test_alloc_zero(struct test_case *tc) rfree(all_mem); } -static void test_alloc(void **state) +static void test_lib_alloc(void **state) { struct test_case *tc = *((struct test_case **)state); switch (tc->type) { case TEST_BULK: - test_alloc_bulk_free(tc); + test_lib_alloc_bulk_free(tc); break; case TEST_ZERO: - test_alloc_zero(tc); + test_lib_alloc_zero(tc); break; case TEST_IMMEDIATE_FREE: - test_alloc_immediate_free(tc); + test_lib_alloc_immediate_free(tc); break; } } @@ -318,7 +318,7 @@ int main(void) struct CMUnitTest *t = &tests[i]; t->name = test_cases[i].name; - t->test_func = test_alloc; + t->test_func = test_lib_alloc; t->initial_state = &test_cases[i]; t->setup_func = NULL; t->teardown_func = NULL;