diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-06-19 17:22:47 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-06-19 17:22:47 +0000 |
commit | d3e84aa19da424e2e03024292a158d218566e515 (patch) | |
tree | fb87bed92e84fd46f2c7c88750121996cff5992e | |
parent | a62c4e9ca5939fd013fc090c9673074cb4547863 (diff) |
Drop test for msgbuf_drain() since that function is no longer part of the
public API.
-rw-r--r-- | regress/lib/libutil/imsg/ibuf_test.c | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/regress/lib/libutil/imsg/ibuf_test.c b/regress/lib/libutil/imsg/ibuf_test.c index 819bacb5c89..c8c481d5b46 100644 --- a/regress/lib/libutil/imsg/ibuf_test.c +++ b/regress/lib/libutil/imsg/ibuf_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ibuf_test.c,v 1.3 2023/06/13 10:39:46 tb Exp $ */ +/* $OpenBSD: ibuf_test.c,v 1.4 2023/06/19 17:22:46 claudio Exp $ */ /* * Copyright (c) Tobias Stoeckmann <tobias@openbsd.org> * @@ -93,44 +93,6 @@ test_ibuf_seek(void) } int -test_msgbuf_drain(void) -{ - struct msgbuf msgbuf; - struct ibuf *buf; - - msgbuf_init(&msgbuf); - - if ((buf = ibuf_open(4)) == NULL) - return 1; - if (ibuf_add(buf, "test", 4) != 0) { - ibuf_free(buf); - return 1; - } - ibuf_close(&msgbuf, buf); - - if (msgbuf.queued != 1) { - ibuf_free(buf); - return 1; - } - - msgbuf_drain(&msgbuf, 1); - - if (msgbuf.queued != 1) { - ibuf_free(buf); - return 1; - } - - msgbuf_drain(&msgbuf, SIZE_MAX); - - if (msgbuf.queued != 0) { - ibuf_free(buf); - return 1; - } - - return 0; -} - -int main(void) { extern char *__progname; @@ -161,12 +123,6 @@ main(void) } else printf("SUCCESS: test_ibuf_seek\n"); - if (test_msgbuf_drain() != 0) { - printf("FAILED: test_msgbuf_drain\n"); - ret = 1; - } else - printf("SUCCESS: test_msgbuf_drain\n"); - if (ret != 0) { printf("FAILED: %s\n", __progname); return 1; |