Skip to content

Commit

Permalink
test: fix _zalloc ut
Browse files Browse the repository at this point in the history
Signed-off-by: Janusz Jankowski <[email protected]>
  • Loading branch information
jajanusz authored and lgirdwood committed Dec 19, 2018
1 parent bea92df commit da9ab07
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions test/cmocka/src/audio/pipeline/pipeline_mocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,8 @@ struct ipc_comp_dev *ipc_get_comp(struct ipc *ipc, uint32_t id)

return NULL;
}

void heap_trace_all(int force)
{
(void)force;
}
6 changes: 3 additions & 3 deletions test/cmocka/src/audio/pipeline/pipeline_new_allocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ static void test_audio_pipeline_pipeline_new_memory_allocation(
*in future so expect errors here if any change to pipeline memory
*capabilities or memmory space was made
*/
expect_value(rzalloc, zone, RZONE_RUNTIME);
expect_value(rzalloc, caps, SOF_MEM_CAPS_RAM);
expect_value(rzalloc, bytes, sizeof(struct pipeline));
expect_value(_zalloc, zone, RZONE_RUNTIME);
expect_value(_zalloc, caps, SOF_MEM_CAPS_RAM);
expect_value(_zalloc, bytes, sizeof(struct pipeline));

/*Testing component*/
result = pipeline_new(&pipe_desc, cd);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <stdint.h>
#include <cmocka.h>

void *rzalloc(int zone, uint32_t caps, size_t bytes)
void *_zalloc(int zone, uint32_t caps, size_t bytes)
{
check_expected(zone);
check_expected(caps);
Expand Down

0 comments on commit da9ab07

Please sign in to comment.