Skip to content

Commit 7e0d3ae

Browse files
PavelVPVkartben
authored andcommitted
tests: bsim: bluetooth: ll: multiple_id: Fix test termination
Calling `bs_trace_silent_exit` after successful test completion of one of devices causes termination of the entires tests suite without letting other devices complete the test. This commit move `bs_trace_silent_exit` call to `test_tick_f` handler, which is triggered when time set by `bst_ticker_set_next_tick_absolute` expires. Signed-off-by: Pavel Vasilyev <[email protected]>
1 parent a188118 commit 7e0d3ae

File tree

1 file changed

+6
-5
lines changed
  • tests/bsim/bluetooth/ll/multiple_id/src

1 file changed

+6
-5
lines changed

tests/bsim/bluetooth/ll/multiple_id/src/main.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ static void test_central_main(void)
5757
k_sleep(K_SECONDS(1));
5858

5959
PASS("Central tests passed\n");
60-
bs_trace_silent_exit(0);
6160

6261
return;
6362

@@ -99,7 +98,6 @@ static void test_central_multiple_main(void)
9998
k_sleep(K_SECONDS(1));
10099

101100
PASS("Central tests passed\n");
102-
bs_trace_silent_exit(0);
103101

104102
return;
105103

@@ -156,7 +154,6 @@ static void test_peripheral_multilink_main(void)
156154
k_sleep(K_SECONDS(3));
157155

158156
PASS("Peripheral tests passed\n");
159-
bs_trace_silent_exit(0);
160157

161158
return;
162159

@@ -173,8 +170,12 @@ static void test_multiple_init(void)
173170

174171
static void test_multiple_tick(bs_time_t HW_device_time)
175172
{
176-
bst_result = Failed;
177-
bs_trace_error_line("Test multiple finished.\n");
173+
if (bst_result != Passed) {
174+
FAIL("Test timeout (not passed after %lu seconds)",
175+
(unsigned long)(HW_device_time / USEC_PER_SEC));
176+
}
177+
178+
bs_trace_silent_exit(0);
178179
}
179180

180181
static const struct bst_test_instance test_def[] = {

0 commit comments

Comments
 (0)