From 896be5903d96e243d859abf5dd57f10e1d2623ac Mon Sep 17 00:00:00 2001 From: mbuhl <> Date: Sat, 28 May 2022 18:39:39 +0000 Subject: *** empty log message *** --- src/regress/lib/libc/sys/atf-c.h | 4 ++-- src/regress/lib/libc/sys/t_poll.c | 18 +++++++++--------- src/regress/lib/libc/sys/t_recvmmsg.c | 0 src/regress/lib/libc/sys/t_sendmmsg.c | 0 4 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 src/regress/lib/libc/sys/t_recvmmsg.c create mode 100644 src/regress/lib/libc/sys/t_sendmmsg.c (limited to 'src') diff --git a/src/regress/lib/libc/sys/atf-c.h b/src/regress/lib/libc/sys/atf-c.h index c10628be26..1a0f29d673 100644 --- a/src/regress/lib/libc/sys/atf-c.h +++ b/src/regress/lib/libc/sys/atf-c.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atf-c.h,v 1.3 2021/09/02 12:40:44 mbuhl Exp $ */ +/* $OpenBSD: atf-c.h,v 1.4 2022/05/28 18:39:39 mbuhl Exp $ */ /* * Copyright (c) 2019 Moritz Buhl * @@ -80,7 +80,7 @@ ATF_TC_FUNCTIONS(fn) #define ATF_CHECK_STREQ ATF_REQUIRE_STREQ #define atf_req(exp, err, msg, ...) \ - atf_require(exp, err, #exp, __FILE__, __LINE__, NULL) + atf_require(exp, err, #exp, __FILE__, __LINE__, msg, ##__VA_ARGS__) #define ATF_REQUIRE(exp) atf_req(exp, -1, NULL) #define ATF_REQUIRE_ERRNO(no, exp) atf_req(exp, no, NULL) #define ATF_REQUIRE_MSG(exp, fmt, ...) atf_req(exp, -1, fmt, ##__VA_ARGS__) diff --git a/src/regress/lib/libc/sys/t_poll.c b/src/regress/lib/libc/sys/t_poll.c index d27fbf159f..345b6c7ad0 100644 --- a/src/regress/lib/libc/sys/t_poll.c +++ b/src/regress/lib/libc/sys/t_poll.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_poll.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */ +/* $OpenBSD: t_poll.c,v 1.3 2022/05/28 18:39:39 mbuhl Exp $ */ /* $NetBSD: t_poll.c,v 1.4 2020/07/17 15:34:16 kamil Exp $ */ /*- @@ -175,16 +175,16 @@ ATF_TC_BODY(basic, tc) */ pfds[0].revents = -1; pfds[1].revents = -1; - ATF_REQUIRE_EQ_MSG(ret = poll(&pfds[0], 1, 1), 0, - "got: %d", ret); + ret = poll(&pfds[0], 1, 1); + ATF_REQUIRE_EQ_MSG(ret, 0, "got: %d", ret); ATF_REQUIRE_EQ_MSG(pfds[0].revents, 0, "got: %d", pfds[0].revents); ATF_REQUIRE_EQ_MSG(pfds[1].revents, -1, "got: %d", pfds[1].revents); /* Check that the write end of the pipe as reported as ready. */ pfds[0].revents = -1; pfds[1].revents = -1; - ATF_REQUIRE_EQ_MSG(ret = poll(&pfds[1], 1, 1), 1, - "got: %d", ret); + ret = poll(&pfds[1], 1, 1); + ATF_REQUIRE_EQ_MSG(ret, 1, "got: %d", ret); ATF_REQUIRE_EQ_MSG(pfds[0].revents, -1, "got: %d", pfds[0].revents); ATF_REQUIRE_EQ_MSG(pfds[1].revents, POLLOUT, "got: %d",\ pfds[1].revents); @@ -192,8 +192,8 @@ ATF_TC_BODY(basic, tc) /* Check that only the write end of the pipe as reported as ready. */ pfds[0].revents = -1; pfds[1].revents = -1; - ATF_REQUIRE_EQ_MSG(ret = poll(pfds, 2, 1), 1, - "got: %d", ret); + ret = poll(pfds, 2, 1); + ATF_REQUIRE_EQ_MSG(ret, 1, "got: %d", ret); ATF_REQUIRE_EQ_MSG(pfds[0].revents, 0, "got: %d", pfds[0].revents); ATF_REQUIRE_EQ_MSG(pfds[1].revents, POLLOUT, "got: %d", pfds[1].revents); @@ -204,8 +204,8 @@ ATF_TC_BODY(basic, tc) /* Check that both ends of our pipe are reported as ready. */ pfds[0].revents = -1; pfds[1].revents = -1; - ATF_REQUIRE_EQ_MSG(ret = poll(pfds, 2, 1), 2, - "got: %d", ret); + ret = poll(pfds, 2, 1); + ATF_REQUIRE_EQ_MSG(ret, 2, "got: %d", ret); ATF_REQUIRE_EQ_MSG(pfds[0].revents, POLLIN, "got: %d", pfds[0].revents); ATF_REQUIRE_EQ_MSG(pfds[1].revents, POLLOUT, "got: %d", diff --git a/src/regress/lib/libc/sys/t_recvmmsg.c b/src/regress/lib/libc/sys/t_recvmmsg.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/regress/lib/libc/sys/t_sendmmsg.c b/src/regress/lib/libc/sys/t_sendmmsg.c new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3-55-g6feb