summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiejunZhou <[email protected]>2023-04-14 14:55:04 +0800
committerGitHub <[email protected]>2023-04-14 14:55:04 +0800
commit0d308c7ae62085e68c7aa0a516f664c39e9a8407 (patch)
tree5d5750c410c72773ea3f91aa023a013711203b8b
parent487ca45752ba350733f09ebce512c89544e190ec (diff)
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.
-rw-r--r--test/tx/regression/threadx_event_flag_suspension_timeout_test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/tx/regression/threadx_event_flag_suspension_timeout_test.c b/test/tx/regression/threadx_event_flag_suspension_timeout_test.c
index 2fed61c0..5bdc6c78 100644
--- a/test/tx/regression/threadx_event_flag_suspension_timeout_test.c
+++ b/test/tx/regression/threadx_event_flag_suspension_timeout_test.c
@@ -179,7 +179,8 @@ UINT status;
tx_thread_sleep(63);
/* 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. */