From ec98d2f6df3f871e19afd3d40f3765c3e8e7a4ef Mon Sep 17 00:00:00 2001 From: Armando Montanez Date: Thu, 28 Dec 2023 02:42:29 +0000 Subject: [PATCH] pw_thread_stl: Disable tests failing on Windows Some pw_thread tests have a tendency to hang indefinitely on Windows, likely due to MinGW-w64's pthread port not being thread-safe on Windows. This change disables those tests until we can try them again using the native Windows threading implementation. Bug: b/317922402 Change-Id: I987b3e07c0758190f4c2b6a997f8c4dc069cc490 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/186253 Commit-Queue: Auto-Submit Pigweed-Auto-Submit: Armando Montanez Reviewed-by: Erik Gilling --- pw_thread/BUILD.gn | 5 ++++- pw_thread_stl/BUILD.gn | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pw_thread/BUILD.gn b/pw_thread/BUILD.gn index 5eb5425055..d12b605056 100644 --- a/pw_thread/BUILD.gn +++ b/pw_thread/BUILD.gn @@ -163,7 +163,10 @@ pw_test_group("tests") { } pw_test("test_thread_context_facade_test") { - enable_if = pw_thread_TEST_THREAD_CONTEXT_BACKEND != "" + # TODO: b/317922402 - On Windows, this test can easily hang indefinitely. + # Disable on Windows until we can test with the native Windows SDK libraries + # for threading. + enable_if = pw_thread_TEST_THREAD_CONTEXT_BACKEND != "" && current_os != "win" sources = [ "test_thread_context_facade_test.cc" ] deps = [ ":test_thread_context", diff --git a/pw_thread_stl/BUILD.gn b/pw_thread_stl/BUILD.gn index 0f23bf268a..bf5a28ebe7 100644 --- a/pw_thread_stl/BUILD.gn +++ b/pw_thread_stl/BUILD.gn @@ -160,8 +160,11 @@ pw_source_set("non_portable_test_thread_options") { } pw_test("thread_backend_test") { + # TODO: b/317922402 - On Windows, this test can hang indefinitely. Disable on + # Windows until we can test with the native Windows SDK libraries for + # threading. enable_if = pw_thread_THREAD_BACKEND == "$dir_pw_thread_stl:thread" && - pw_thread_SLEEP_BACKEND != "" + pw_thread_SLEEP_BACKEND != "" && current_os != "win" deps = [ ":non_portable_test_thread_options", "$dir_pw_thread:thread_facade_test",