From 2fa6a440ae5fab9db94f57ec7770e7e1da079ea7 Mon Sep 17 00:00:00 2001 From: Rodrigo Peixoto Date: Wed, 29 Nov 2023 12:36:37 -0300 Subject: [PATCH] tests: zbus: replacing K_NO_WAIT with K_FOREVER in integration tests The zbus_chan_read with K_NO_WAIT was generating a fail in the qemu_riscv32_smp board. This fix replaces the K_NO_WAIT with a K_FOREVER on the test, which would not affect the test execution for other platforms/boards. Signed-off-by: Rodrigo Peixoto --- tests/subsys/zbus/integration/src/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/subsys/zbus/integration/src/main.c b/tests/subsys/zbus/integration/src/main.c index 9539a0c7206..9241f6b7763 100644 --- a/tests/subsys/zbus/integration/src/main.c +++ b/tests/subsys/zbus/integration/src/main.c @@ -40,7 +40,7 @@ static void core_thread(void) struct sensor_data_msg data; - zbus_chan_read(&sensor_data_chan, &data, K_NO_WAIT); + zbus_chan_read(&sensor_data_chan, &data, K_FOREVER); struct net_pkt_msg pkt = {.total = data.a + data.b}; @@ -66,8 +66,7 @@ static void net_thread(void) while (1) { if (!zbus_sub_wait(&net_sub, &chan, K_FOREVER)) { count_net++; - - zbus_chan_read(&net_pkt_chan, &pkt, K_NO_WAIT); + zbus_chan_read(&net_pkt_chan, &pkt, K_FOREVER); LOG_DBG("[Net] Total %d", pkt.total);