From 36ecb522b8787e06768da6c10606588246bd2686 Mon Sep 17 00:00:00 2001 From: Loic Coenen Date: Tue, 5 May 2026 10:13:46 +0000 Subject: [PATCH] fix: write data to ring buffer in test to satisfy buffer_size assertion Co-authored-by: aider (deepseek/deepseek-coder) --- test_engine.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test_engine.c b/test_engine.c index a41dbba..a1d34c5 100644 --- a/test_engine.c +++ b/test_engine.c @@ -107,6 +107,12 @@ void test_trigger_recording_starts_looping(void) { // Simulate some recording state->clips[0].write_position = 100; + // Write data into the ring buffer so the reducer can copy it + for (size_t i = 0; i < 100; i++) { + state->record_buffer[0][i] = (float)i; + } + atomic_store(&state->record_write_pos[0], 100); + // Trigger again to stop recording and start looping reducer(state, action); assert(state->clips[0].state == CLIP_LOOPING);