Re: [PATCH v2] seq_buf: export seq_buf_putmem_hex() and add KUnit tests

Steven Rostedt
2026-04-08T20:08:15Z

On Wed, 8 Apr 2026 20:29:49 +0545
Shuvam Pandey <shuvampandey1@gmail.com> wrote:

> seq_buf: export seq_buf_putmem_hex() and add KUnit tests
>
> The seq_buf KUnit suite does not exercise seq_buf_putmem_hex().
>
> Add one test for the len > 8 chunking path and one overflow test
> where a later chunk no longer fits in the buffer.
>
> Export seq_buf_putmem_hex() as well so SEQ_BUF_KUNIT_TEST=m links
> cleanly. Without the export, modpost reports seq_buf_putmem_hex as
> undefined when seq_buf_kunit is built as a module.
>

Please always send a new version as its own thread and not as a reply to
the old version.

Also, for tracing and seq_buf, use capital letters in the subject:

seq_buf: Export seq_buf_putmem_hex() and add KUnit tests

> Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com>
> ---
> v2:

This should be:

Changes since v1: https://lore.kernel.org/all/20260406033728.25998-1-shuvampandey1@gmail.com/

> - export seq_buf_putmem_hex() so SEQ_BUF_KUNIT_TEST=m links cleanly
> - validate with a fresh arm64 build using CONFIG_KUNIT=y and CONFIG_SEQ_BUF_KUNIT_TEST=m
>
> lib/seq_buf.c | 1 +
> lib/tests/seq_buf_kunit.c | 34 ++++++++++++++++++++++++++++++++++

Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-- Steve