From: Martin Wilck Date: Thu, 21 Nov 2024 22:56:10 +0000 (+0100) Subject: testsuite: test_strbuf_pushmem: test pushing 0 bytes to an empty strbuf X-Git-Tag: v34~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50ff74e0ba83421a5f39c184abb1a5d3fcc4d8ac;p=thirdparty%2Fkmod.git testsuite: test_strbuf_pushmem: test pushing 0 bytes to an empty strbuf This test fails, and will be fixed by the next commit. Signed-off-by: Martin Wilck Reviewed-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/257 Signed-off-by: Lucas De Marchi --- diff --git a/testsuite/test-strbuf.c b/testsuite/test-strbuf.c index e77fbdb9..9f2dcf8f 100644 --- a/testsuite/test-strbuf.c +++ b/testsuite/test-strbuf.c @@ -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) {