From dc2be77f63984110f24ac5832257ea0704d5a1ca Mon Sep 17 00:00:00 2001 From: Weijia Wang Date: Thu, 28 Jul 2022 01:38:31 +0200 Subject: [PATCH] os: disable tests on HAVE_BROKEN_MSG_CMSG_CLOEXEC Signed-off-by: Weijia Wang --- tests/os-wrappers-test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/os-wrappers-test.c b/tests/os-wrappers-test.c index 06025bcd..754408da 100644 --- a/tests/os-wrappers-test.c +++ b/tests/os-wrappers-test.c @@ -143,10 +143,12 @@ recvmsg(int sockfd, struct msghdr *msg, int flags) { wrapped_calls_recvmsg++; +#if !(HAVE_BROKEN_MSG_CMSG_CLOEXEC) if (fall_back && (flags & MSG_CMSG_CLOEXEC)) { errno = EINVAL; return -1; } +#endif return real_recvmsg(sockfd, msg, flags); } @@ -225,7 +227,9 @@ do_os_wrappers_dupfd_cloexec(int n) * Must have 4 calls if falling back, but must also allow * falling back without a forced fallback. */ +#if !(HAVE_BROKEN_MSG_CMSG_CLOEXEC) assert(wrapped_calls_fcntl > n); +#endif exec_fd_leak_check(nr_fds); }