From 26d778c5aa0f9675dee663d1db96c2c9a9ea33ee Mon Sep 17 00:00:00 2001 From: Tomi Fontanilles Date: Tue, 30 Jul 2024 08:51:39 +0300 Subject: [PATCH] tests: modem: cmux: add missing timeout param Add the missing timeout parameter to `modem_pipe_open()` and `modem_pipe_close()` calls. 10 seconds is the default value used in the Zephyr tree. Fixes a regression introduced in https://github.com/zephyrproject-rtos/zephyr/pull/74325. (cherry picked from commit 48d69b4e7e0add3b00320d4568149213ff709867) Original-Signed-off-by: Tomi Fontanilles GitOrigin-RevId: 48d69b4e7e0add3b00320d4568149213ff709867 Change-Id: I3c3938e8f1baa75e13b838b0a5a9b7c18f69ac29 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5748700 Reviewed-by: Fabio Baltieri Commit-Queue: Fabio Baltieri Tested-by: Fabio Baltieri Tested-by: ChromeOS Prod (Robot) --- tests/subsys/modem/modem_cmux/src/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/subsys/modem/modem_cmux/src/main.c b/tests/subsys/modem/modem_cmux/src/main.c index 31efeb10ed1..28d772614b1 100644 --- a/tests/subsys/modem/modem_cmux/src/main.c +++ b/tests/subsys/modem/modem_cmux/src/main.c @@ -793,14 +793,14 @@ ZTEST(modem_cmux, test_modem_cmux_prevent_work_while_released) /* Validate no new requests can be submitted */ modem_cmux_connect(&cmux); modem_cmux_disconnect(&cmux); - modem_pipe_open(dlci1_pipe); - modem_pipe_open(dlci2_pipe); + modem_pipe_open(dlci1_pipe, K_SECONDS(10)); + modem_pipe_open(dlci2_pipe, K_SECONDS(10)); modem_pipe_transmit(dlci1_pipe, transmit, sizeof(transmit)); modem_pipe_transmit(dlci2_pipe, transmit, sizeof(transmit)); modem_pipe_receive(dlci1_pipe, receive, sizeof(receive)); modem_pipe_receive(dlci2_pipe, receive, sizeof(receive)); - modem_pipe_close(dlci1_pipe); - modem_pipe_close(dlci2_pipe); + modem_pipe_close(dlci1_pipe, K_SECONDS(10)); + modem_pipe_close(dlci2_pipe, K_SECONDS(10)); k_msleep(500); zassert_true(modem_backend_mock_get(&bus_mock, buffer1, sizeof(buffer1)) == 0); @@ -809,9 +809,9 @@ ZTEST(modem_cmux, test_modem_cmux_prevent_work_while_released) modem_backend_mock_prime(&bus_mock, &transaction_control_sabm); zassert_ok(modem_cmux_connect(&cmux)); modem_backend_mock_prime(&bus_mock, &transaction_dlci1_sabm); - zassert_ok(modem_pipe_open(dlci1_pipe)); + zassert_ok(modem_pipe_open(dlci1_pipe, K_SECONDS(10))); modem_backend_mock_prime(&bus_mock, &transaction_dlci2_sabm); - zassert_ok(modem_pipe_open(dlci2_pipe)); + zassert_ok(modem_pipe_open(dlci2_pipe, K_SECONDS(10))); } ZTEST_SUITE(modem_cmux, NULL, test_modem_cmux_setup, test_modem_cmux_before, NULL, NULL);