]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib/tests: extend cmdline KUnit with next_arg() tests
authorShuvam Pandey <shuvampandey1@gmail.com>
Mon, 16 Mar 2026 10:12:27 +0000 (15:57 +0545)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 May 2026 04:24:49 +0000 (21:24 -0700)
commitdcc8a57815534e3844f342b28ecfb6e626a816a0
treec13882faafe6aee0e1965c375b88d9d89aa33251
parent2f5026b8d4fe34601d692ae7f7cd27367e002266
lib/tests: extend cmdline KUnit with next_arg() tests

The cmdline KUnit suite covers get_option() and get_options(), but it
does not exercise next_arg().

Extend the suite with one test for a quoted value containing spaces and
one regression test for a bare quote token after a normal parameter.

The regression test covers the bare quote token path fixed by commit
9847f21225c4 ("lib/cmdline: avoid page fault in next_arg").

[shuvampandey1@gmail.com: extend cmdline next_arg() coverage with mixed tokens]
Link: https://lore.kernel.org/20260316211249.88601-1-shuvampandey1@gmail.com
Link: https://lore.kernel.org/20260316101227.15807-1-shuvampandey1@gmail.com
Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Neel Natu <neelnatu@google.com>
Cc: Dmitry Antipov <dmantipov@yandex.ru>
Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: Kees Cook <kees@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/tests/cmdline_kunit.c