Skip to content

Commit 0d308c7

Browse files
Fix random failure in test case threadx_event_flag_suspension_timeout_test.c (#246)
Depending on the starting time, thread 1 can run either 32 or 33 rounds.
1 parent 487ca45 commit 0d308c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/tx/regression/threadx_event_flag_suspension_timeout_test.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ UINT status;
179179
tx_thread_sleep(63);
180180

181181
/* Check the run counters. */
182-
if ((thread_1_counter != 33) || (thread_2_counter != 13))
182+
if (((thread_1_counter != 32) && (thread_1_counter != 33)) || /* Depending on the starting time, thread 1 can run either 32 or 33 rounds. */
183+
(thread_2_counter != 13))
183184
{
184185

185186
/* Event flag error. */

0 commit comments

Comments
 (0)