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.
This commit is contained in:
TiejunZhou
2023-04-14 14:55:04 +08:00
committed by GitHub
parent 487ca45752
commit 0d308c7ae6

View File

@@ -179,7 +179,8 @@ UINT status;
tx_thread_sleep(63); tx_thread_sleep(63);
/* Check the run counters. */ /* Check the run counters. */
if ((thread_1_counter != 33) || (thread_2_counter != 13)) if (((thread_1_counter != 32) && (thread_1_counter != 33)) || /* Depending on the starting time, thread 1 can run either 32 or 33 rounds. */
(thread_2_counter != 13))
{ {
/* Event flag error. */ /* Event flag error. */