]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
testsuite: test_strbuf_pushmem: test pushing 0 bytes to an empty strbuf
authorMartin Wilck <mwilck@suse.com>
Thu, 21 Nov 2024 22:56:10 +0000 (23:56 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 29 Nov 2024 15:15:21 +0000 (09:15 -0600)
This test fails, and will be fixed by the next commit.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/257
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
testsuite/test-strbuf.c

index e77fbdb9af2a91baa4916bd051d48bf2b167f005..9f2dcf8f5c776361330955fc0c4d8a9e4a9d7f7e 100644 (file)
@@ -191,6 +191,7 @@ static int test_strbuf_pushmem(const struct test *t)
        size_t size;
 
        strbuf_init(&buf);
+       strbuf_pushmem(&buf, "", 0);
        strbuf_reserve_extra(&buf, strlen(TEXT) + 1);
        size = buf.size;
        strbuf_pushmem(&buf, TEXT, strlen(TEXT) + 1);
@@ -201,7 +202,8 @@ static int test_strbuf_pushmem(const struct test *t)
 
        return 0;
 }
-DEFINE_TEST(test_strbuf_pushmem, .description = "test strbuf_reserve");
+DEFINE_TEST(test_strbuf_pushmem, .description = "test strbuf_reserve",
+           .expected_fail = true);
 
 static int test_strbuf_used(const struct test *t)
 {