2 * Check silent decoding of sendmmsg and recvmmsg syscalls.
4 * Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
7 * SPDX-License-Identifier: GPL-2.0-or-later
19 if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds))
20 perror_msg_and_skip("socketpair");
23 struct iovec iov = { .iov_base = &buf, .iov_len = sizeof(buf) };
31 int rc = send_mmsg(fds[1], &mh, 1, MSG_DONTWAIT);
33 perror_msg_and_skip("sendmmsg");
34 printf("sendmmsg(%d, %p, 1, MSG_DONTWAIT) = %d\n", fds[1], &mh, rc);
36 struct timespec t = { .tv_sec = 0, .tv_nsec = 12345678 };
37 rc = recv_mmsg(fds[0], &mh, 1, MSG_DONTWAIT, &t);
38 printf("recvmmsg(%d, %p, 1, MSG_DONTWAIT, %p) = %d\n",
41 puts("+++ exited with 0 +++");