From 633586a7162ea508b472ab5e82a512b38eff370f Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 5 Jul 2024 17:04:24 +1000 Subject: [PATCH] tests/thread/stress_aes.py: Fix logic waiting for finished threads. Because the main thread executes `thread_entry()` it means there's an additional one added to `count`, so the test must wait for the count to reach `n_thread + 1`. Signed-off-by: Damien George --- tests/thread/stress_aes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/thread/stress_aes.py b/tests/thread/stress_aes.py index b25da855a..9f4a4e6ae 100644 --- a/tests/thread/stress_aes.py +++ b/tests/thread/stress_aes.py @@ -282,6 +282,6 @@ if __name__ == "__main__": for i in range(n_thread): _thread.start_new_thread(thread_entry, (n_loop,)) thread_entry(n_loop) - while count.value < n_thread: + while count.value < n_thread + 1: time.sleep(1) print("done")