Re: [PATCH 2/5] lib/string_kunit: add test case for strnlen

From: Andy Shevchenko

Date: Wed Jan 07 2026 - 06:56:55 EST


On Wed, Jan 7, 2026 at 4:35 AM Feng Jiang <jiangfeng@xxxxxxxxxx> wrote:
>
> Add a KUnit test for strnlen() to verify correctness across
> different string lengths and memory alignments.

Same comment as per patch 1 (it would probably require to call for
arch_strnlen() or something like this).

...

> + for (offset = 0; offset < 16; offset++) {
> + for (len = 0; len <= 128; len++) {

You want to define these two limits to avoid the possible issues in
the future if the code gets changed.

> + }

--
With Best Regards,
Andy Shevchenko