Re: [PATCH v3 4/4] selftests/nolibc: Add tests for strlcat() and strlcpy()

From: Rodrigo Campos
Date: Sun Feb 18 2024 - 15:39:20 EST


On 2/18/24 16:51, Rodrigo Campos wrote:
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index 6ba4f8275ac4..d373fc14706c 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -600,6 +600,25 @@ int expect_strne(const char *expr, int llen, const char *cmp)
/* declare tests based on line numbers. There must be exactly one test per line. */
#define CASE_TEST(name) \
@@ -991,6 +1010,14 @@ int run_stdlib(int min, int max)
for (test = min; test >= 0 && test <= max; test++) {
int llen = 0; /* line length */
+ /* For functions that take a long buffer, like strlcat()

Ouch, I didn't leave a "/*\n" for this comment :(