[libc-commits] [libc] [libc] fix EXPECT_EXIT suspend/timeout for darwin (PR #166065)
via libc-commits
libc-commits at lists.llvm.org
Sun Nov 2 04:43:40 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- libc/test/UnitTest/ExecuteFunctionUnix.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/test/UnitTest/ExecuteFunctionUnix.cpp b/libc/test/UnitTest/ExecuteFunctionUnix.cpp
index 0b450578a..13a7a5096 100644
--- a/libc/test/UnitTest/ExecuteFunctionUnix.cpp
+++ b/libc/test/UnitTest/ExecuteFunctionUnix.cpp
@@ -10,10 +10,10 @@
#include "src/__support/macros/config.h"
#include "test/UnitTest/ExecuteFunction.h" // FunctionCaller
#include <assert.h>
+#include <errno.h>
#include <poll.h>
#include <signal.h>
#include <stdio.h>
-#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
@@ -58,9 +58,7 @@ ProcessStatus invoke_in_subprocess(FunctionCaller *func, int timeout_ms) {
}
::close(pipe_fds[1]);
- struct pollfd poll_fd {
- pipe_fds[0], POLLIN, 0
- };
+ struct pollfd poll_fd{pipe_fds[0], POLLIN, 0};
// No events requested so this call will only return after the timeout or if
// the pipes peer was closed, signaling the process exited.
if (::poll(&poll_fd, 1, timeout_ms) == -1) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/166065
More information about the libc-commits
mailing list