Drop test for msgbuf_drain() since that function is no longer part of the
authorclaudio <claudio@openbsd.org>
Mon, 19 Jun 2023 17:22:46 +0000 (17:22 +0000)
committerclaudio <claudio@openbsd.org>
Mon, 19 Jun 2023 17:22:46 +0000 (17:22 +0000)
public API.

regress/lib/libutil/imsg/ibuf_test.c

index 819bacb..c8c481d 100644 (file)
@@ -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>
  *
@@ -92,44 +92,6 @@ test_ibuf_seek(void)
        return ret;
 }
 
-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)
 {
@@ -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;