Skip to content

Commit 73f5ffc

Browse files
asbjornsabocarlescufi
authored andcommitted
Bluetooth: Audio: Fix timeout message in BabbleSim tests
Update the WAIT_TIME definition and timeout-message so that the time out message actually prints the elapsed time instead of "0". Signed-off-by: Asbjørn Sæbø <[email protected]>
1 parent f7cd6af commit 73f5ffc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/bluetooth/bsim_bt/bsim_test_audio/src/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void disconnected(struct bt_conn *conn, uint8_t reason)
7070
void test_tick(bs_time_t HW_device_time)
7171
{
7272
if (bst_result != Passed) {
73-
FAIL("test failed (not passed after %i seconds)\n", WAIT_TIME);
73+
FAIL("test failed (not passed after %i seconds)\n", WAIT_SECONDS);
7474
}
7575
}
7676

tests/bluetooth/bsim_bt/bsim_test_audio/src/common.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@
2121
#include <stddef.h>
2222
#include <errno.h>
2323
#include <zephyr.h>
24+
#include <sys_clock.h>
2425

2526
#include <bluetooth/bluetooth.h>
2627
#include <bluetooth/hci.h>
2728
#include <bluetooth/conn.h>
2829
#include <bluetooth/uuid.h>
2930
#include <bluetooth/gatt.h>
3031

31-
#define WAIT_TIME (30 * 1e6) /*seconds*/
32+
#define WAIT_SECONDS 30 /* seconds */
33+
#define WAIT_TIME (WAIT_SECONDS * USEC_PER_SEC) /* microseconds*/
3234

3335
#define WAIT_FOR(cond) while (!(cond)) { k_sleep(K_MSEC(1)); }
3436

0 commit comments

Comments
 (0)