]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
seq_buf: Export seq_buf_putmem_hex() and add KUnit tests
authorShuvam Pandey <shuvampandey1@gmail.com>
Wed, 8 Apr 2026 20:23:51 +0000 (02:08 +0545)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 21 May 2026 22:03:06 +0000 (18:03 -0400)
commitae3197ee07cc8ec66261d891b2b5bf3879e7b852
tree05c1f424ad423491b14b19f245cf2fbbd955bfff
parent3839a8eedde57a9f5b869025ce2626a7a37f5ccb
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.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: David Gow <david@davidgow.net>
Link: https://patch.msgid.link/20260408202351.21829-1-shuvampandey1@gmail.com
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
lib/seq_buf.c
lib/tests/seq_buf_kunit.c