diff options
author | mbuhl <mbuhl@cvs.openbsd.org> | 2022-05-28 18:39:40 +0000 |
---|---|---|
committer | mbuhl <mbuhl@cvs.openbsd.org> | 2022-05-28 18:39:40 +0000 |
commit | a2bdaaa3358d6849f6530a00484e41a650b57f0e (patch) | |
tree | a11b1b9d6f7dae8c64694c7033ca1702b021c7b1 /regress/lib/libc | |
parent | c3d49798c12eb434dbc87593f28bb70bbcfcd388 (diff) |
*** empty log message ***
Diffstat (limited to 'regress/lib/libc')
-rw-r--r-- | regress/lib/libc/sys/atf-c.h | 4 | ||||
-rw-r--r-- | regress/lib/libc/sys/t_poll.c | 18 | ||||
-rw-r--r-- | regress/lib/libc/sys/t_recvmmsg.c | 0 | ||||
-rw-r--r-- | regress/lib/libc/sys/t_sendmmsg.c | 0 |
4 files changed, 11 insertions, 11 deletions
diff --git a/regress/lib/libc/sys/atf-c.h b/regress/lib/libc/sys/atf-c.h index c10628be262..1a0f29d673d 100644 --- a/regress/lib/libc/sys/atf-c.h +++ b/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 <openbsd@moritzbuhl.de> * @@ -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/regress/lib/libc/sys/t_poll.c b/regress/lib/libc/sys/t_poll.c index d27fbf159f4..345b6c7ad04 100644 --- a/regress/lib/libc/sys/t_poll.c +++ b/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/regress/lib/libc/sys/t_recvmmsg.c b/regress/lib/libc/sys/t_recvmmsg.c new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/regress/lib/libc/sys/t_recvmmsg.c diff --git a/regress/lib/libc/sys/t_sendmmsg.c b/regress/lib/libc/sys/t_sendmmsg.c new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/regress/lib/libc/sys/t_sendmmsg.c |