fix ipc/user:ipc_test intermittent failure
diff --git a/MODULE.bazel b/MODULE.bazel index 896d71e..677e127 100644 --- a/MODULE.bazel +++ b/MODULE.bazel
@@ -29,6 +29,8 @@ # Allow integration_tests to build for armv7-m / armv7e-m so the # AST10x0 unittest_runner can use it. "//third_party/pigweed:integration_tests_armv7m.patch", + # Fix lost-wakeup race in ipc/user test USER signal round-trip. + "//third_party/pigweed:ipc_user_signal_race.patch", ], remote = "https://pigweed.googlesource.com/pigweed/pigweed", )
diff --git a/third_party/pigweed/ipc_user_signal_race.patch b/third_party/pigweed/ipc_user_signal_race.patch new file mode 100644 index 0000000..57b8859 --- /dev/null +++ b/third_party/pigweed/ipc_user_signal_race.patch
@@ -0,0 +1,14 @@ +--- a/pw_kernel/tests/ipc/user/handler.rs ++++ b/pw_kernel/tests/ipc/user/handler.rs +@@ -31,8 +31,9 @@ + // USER signal means the initiator is pinging us; echo it back and lower it + // (level-triggered: the sender owns both raise and lower). + if wait_return.pending_signals.contains(Signals::USER) { + syscall::object_set_peer_user_signal(handle::IPC, true).map_err(|_| Error::Internal)?; +- syscall::object_set_peer_user_signal(handle::IPC, false) +- .map_err(|_| Error::Internal)?; ++ // Do not lower: initiator may not have reached object_wait yet. ++ // syscall::object_set_peer_user_signal(handle::IPC, false) ++ // .map_err(|_| Error::Internal)?; + return Ok(()); + }