summaryrefslogtreecommitdiff
path: root/src/regress/lib
diff options
context:
space:
mode:
authormbuhl <>2022-05-28 18:39:39 +0000
committermbuhl <>2022-05-28 18:39:39 +0000
commit896be5903d96e243d859abf5dd57f10e1d2623ac (patch)
tree1925d9ba9e9792d00f3732cf5f195c23b844fbe9 /src/regress/lib
parent5b26a40b3eca765568e5053658c769a404fb127a (diff)
downloadopenbsd-896be5903d96e243d859abf5dd57f10e1d2623ac.tar.gz
openbsd-896be5903d96e243d859abf5dd57f10e1d2623ac.tar.bz2
openbsd-896be5903d96e243d859abf5dd57f10e1d2623ac.zip
*** empty log message ***
Diffstat (limited to 'src/regress/lib')
-rw-r--r--src/regress/lib/libc/sys/atf-c.h4
-rw-r--r--src/regress/lib/libc/sys/t_poll.c18
-rw-r--r--src/regress/lib/libc/sys/t_recvmmsg.c0
-rw-r--r--src/regress/lib/libc/sys/t_sendmmsg.c0
4 files changed, 11 insertions, 11 deletions
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 @@
1/* $OpenBSD: atf-c.h,v 1.3 2021/09/02 12:40:44 mbuhl Exp $ */ 1/* $OpenBSD: atf-c.h,v 1.4 2022/05/28 18:39:39 mbuhl Exp $ */
2/* 2/*
3 * Copyright (c) 2019 Moritz Buhl <openbsd@moritzbuhl.de> 3 * Copyright (c) 2019 Moritz Buhl <openbsd@moritzbuhl.de>
4 * 4 *
@@ -80,7 +80,7 @@ ATF_TC_FUNCTIONS(fn)
80#define ATF_CHECK_STREQ ATF_REQUIRE_STREQ 80#define ATF_CHECK_STREQ ATF_REQUIRE_STREQ
81 81
82#define atf_req(exp, err, msg, ...) \ 82#define atf_req(exp, err, msg, ...) \
83 atf_require(exp, err, #exp, __FILE__, __LINE__, NULL) 83 atf_require(exp, err, #exp, __FILE__, __LINE__, msg, ##__VA_ARGS__)
84#define ATF_REQUIRE(exp) atf_req(exp, -1, NULL) 84#define ATF_REQUIRE(exp) atf_req(exp, -1, NULL)
85#define ATF_REQUIRE_ERRNO(no, exp) atf_req(exp, no, NULL) 85#define ATF_REQUIRE_ERRNO(no, exp) atf_req(exp, no, NULL)
86#define ATF_REQUIRE_MSG(exp, fmt, ...) atf_req(exp, -1, fmt, ##__VA_ARGS__) 86#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 @@
1/* $OpenBSD: t_poll.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */ 1/* $OpenBSD: t_poll.c,v 1.3 2022/05/28 18:39:39 mbuhl Exp $ */
2/* $NetBSD: t_poll.c,v 1.4 2020/07/17 15:34:16 kamil Exp $ */ 2/* $NetBSD: t_poll.c,v 1.4 2020/07/17 15:34:16 kamil Exp $ */
3 3
4/*- 4/*-
@@ -175,16 +175,16 @@ ATF_TC_BODY(basic, tc)
175 */ 175 */
176 pfds[0].revents = -1; 176 pfds[0].revents = -1;
177 pfds[1].revents = -1; 177 pfds[1].revents = -1;
178 ATF_REQUIRE_EQ_MSG(ret = poll(&pfds[0], 1, 1), 0, 178 ret = poll(&pfds[0], 1, 1);
179 "got: %d", ret); 179 ATF_REQUIRE_EQ_MSG(ret, 0, "got: %d", ret);
180 ATF_REQUIRE_EQ_MSG(pfds[0].revents, 0, "got: %d", pfds[0].revents); 180 ATF_REQUIRE_EQ_MSG(pfds[0].revents, 0, "got: %d", pfds[0].revents);
181 ATF_REQUIRE_EQ_MSG(pfds[1].revents, -1, "got: %d", pfds[1].revents); 181 ATF_REQUIRE_EQ_MSG(pfds[1].revents, -1, "got: %d", pfds[1].revents);
182 182
183 /* Check that the write end of the pipe as reported as ready. */ 183 /* Check that the write end of the pipe as reported as ready. */
184 pfds[0].revents = -1; 184 pfds[0].revents = -1;
185 pfds[1].revents = -1; 185 pfds[1].revents = -1;
186 ATF_REQUIRE_EQ_MSG(ret = poll(&pfds[1], 1, 1), 1, 186 ret = poll(&pfds[1], 1, 1);
187 "got: %d", ret); 187 ATF_REQUIRE_EQ_MSG(ret, 1, "got: %d", ret);
188 ATF_REQUIRE_EQ_MSG(pfds[0].revents, -1, "got: %d", pfds[0].revents); 188 ATF_REQUIRE_EQ_MSG(pfds[0].revents, -1, "got: %d", pfds[0].revents);
189 ATF_REQUIRE_EQ_MSG(pfds[1].revents, POLLOUT, "got: %d",\ 189 ATF_REQUIRE_EQ_MSG(pfds[1].revents, POLLOUT, "got: %d",\
190 pfds[1].revents); 190 pfds[1].revents);
@@ -192,8 +192,8 @@ ATF_TC_BODY(basic, tc)
192 /* Check that only the write end of the pipe as reported as ready. */ 192 /* Check that only the write end of the pipe as reported as ready. */
193 pfds[0].revents = -1; 193 pfds[0].revents = -1;
194 pfds[1].revents = -1; 194 pfds[1].revents = -1;
195 ATF_REQUIRE_EQ_MSG(ret = poll(pfds, 2, 1), 1, 195 ret = poll(pfds, 2, 1);
196 "got: %d", ret); 196 ATF_REQUIRE_EQ_MSG(ret, 1, "got: %d", ret);
197 ATF_REQUIRE_EQ_MSG(pfds[0].revents, 0, "got: %d", pfds[0].revents); 197 ATF_REQUIRE_EQ_MSG(pfds[0].revents, 0, "got: %d", pfds[0].revents);
198 ATF_REQUIRE_EQ_MSG(pfds[1].revents, POLLOUT, "got: %d", 198 ATF_REQUIRE_EQ_MSG(pfds[1].revents, POLLOUT, "got: %d",
199 pfds[1].revents); 199 pfds[1].revents);
@@ -204,8 +204,8 @@ ATF_TC_BODY(basic, tc)
204 /* Check that both ends of our pipe are reported as ready. */ 204 /* Check that both ends of our pipe are reported as ready. */
205 pfds[0].revents = -1; 205 pfds[0].revents = -1;
206 pfds[1].revents = -1; 206 pfds[1].revents = -1;
207 ATF_REQUIRE_EQ_MSG(ret = poll(pfds, 2, 1), 2, 207 ret = poll(pfds, 2, 1);
208 "got: %d", ret); 208 ATF_REQUIRE_EQ_MSG(ret, 2, "got: %d", ret);
209 ATF_REQUIRE_EQ_MSG(pfds[0].revents, POLLIN, "got: %d", 209 ATF_REQUIRE_EQ_MSG(pfds[0].revents, POLLIN, "got: %d",
210 pfds[0].revents); 210 pfds[0].revents);
211 ATF_REQUIRE_EQ_MSG(pfds[1].revents, POLLOUT, "got: %d", 211 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
--- /dev/null
+++ b/src/regress/lib/libc/sys/t_recvmmsg.c
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
--- /dev/null
+++ b/src/regress/lib/libc/sys/t_sendmmsg.c