CMOCKA-KPB: fill source buffer with test data

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This commit is contained in:
Marcin Rajwa 2019-04-18 23:18:33 +02:00 committed by Tomasz Lauda
parent fb8a650877
commit 827b240847
1 changed files with 5 additions and 0 deletions

View File

@ -134,6 +134,11 @@ static int buffering_test_setup(void **state)
source = mock_comp_buffer(state, KPB_SOURCE_BUFFER);
sink = mock_comp_buffer(state, KPB_SINK_BUFFER);
/* Fiil source buffer with test data */
r_ptr = (unsigned char *)source->r_ptr;
for (i = 0; i < test_case_data->history_buffer_size; i++)
(*r_ptr++) = pattern;
return 0;
}