public inbox for mm-commits@vger.kernel.org
 help / color / mirror / Atom feed
* [folded-merged] lib-tests-extend-cmdline-kunit-with-next_arg-tests-fix.patch removed from -mm tree
@ 2026-03-29  1:12 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-03-29  1:12 UTC (permalink / raw)
  To: mm-commits, andriy.shevchenko, shuvampandey1, akpm


The quilt patch titled
     Subject: lib/tests: extend cmdline next_arg() coverage with mixed tokens
has been removed from the -mm tree.  Its filename was
     lib-tests-extend-cmdline-kunit-with-next_arg-tests-fix.patch

This patch was dropped because it was folded into lib-tests-extend-cmdline-kunit-with-next_arg-tests.patch

------------------------------------------------------
From: Shuvam Pandey <shuvampandey1@gmail.com>
Subject: lib/tests: extend cmdline next_arg() coverage with mixed tokens
Date: Tue, 17 Mar 2026 02:57:49 +0545

The cmdline KUnit suite now covers quoted values and the bare quote
regression path in next_arg(), but it still does not exercise a mixed
sequence containing an empty value, a bare token, and a quoted value with
'='.

Andy Shevchenko suggested covering a sequence such as "bbb= jjj
kkk=\"a=b\"".  Add that case so the suite checks all three forms in one
parse stream.

Validated with the arm64 cmdline KUnit suite and a W=1 rebuild of
lib/tests/cmdline_kunit.o.

Link: https://lkml.kernel.org/r/20260316211249.88601-1-shuvampandey1@gmail.com
Signed-off-by: Shuvam Pandey <shuvampandey1@gmail.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/tests/cmdline_kunit.c |   24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

--- a/lib/tests/cmdline_kunit.c~lib-tests-extend-cmdline-kunit-with-next_arg-tests-fix
+++ a/lib/tests/cmdline_kunit.c
@@ -230,6 +230,29 @@ static void cmdline_test_next_arg_bare_q
 	KUNIT_EXPECT_STREQ(test, next, "");
 }
 
+static void cmdline_test_next_arg_mixed_tokens(struct kunit *test)
+{
+	char in[] = "bbb= jjj kkk=\"a=b\"";
+	char *next, *param, *val;
+
+	next = next_arg(in, &param, &val);
+	KUNIT_EXPECT_STREQ(test, param, "bbb");
+	KUNIT_ASSERT_NOT_NULL(test, val);
+	KUNIT_EXPECT_STREQ(test, val, "");
+	KUNIT_EXPECT_STREQ(test, next, "jjj kkk=\"a=b\"");
+
+	next = next_arg(next, &param, &val);
+	KUNIT_EXPECT_STREQ(test, param, "jjj");
+	KUNIT_EXPECT_NULL(test, val);
+	KUNIT_EXPECT_STREQ(test, next, "kkk=\"a=b\"");
+
+	next = next_arg(next, &param, &val);
+	KUNIT_EXPECT_STREQ(test, param, "kkk");
+	KUNIT_ASSERT_NOT_NULL(test, val);
+	KUNIT_EXPECT_STREQ(test, val, "a=b");
+	KUNIT_EXPECT_STREQ(test, next, "");
+}
+
 static struct kunit_case cmdline_test_cases[] = {
 	KUNIT_CASE(cmdline_test_noint),
 	KUNIT_CASE(cmdline_test_lead_int),
@@ -238,6 +261,7 @@ static struct kunit_case cmdline_test_ca
 	KUNIT_CASE(cmdline_test_memparse),
 	KUNIT_CASE(cmdline_test_next_arg_quoted_value),
 	KUNIT_CASE(cmdline_test_next_arg_bare_quote_regression),
+	KUNIT_CASE(cmdline_test_next_arg_mixed_tokens),
 	{}
 };
 
_

Patches currently in -mm which might be from shuvampandey1@gmail.com are

lib-tests-extend-cmdline-kunit-with-next_arg-tests.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-03-29  1:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-29  1:12 [folded-merged] lib-tests-extend-cmdline-kunit-with-next_arg-tests-fix.patch removed from -mm tree Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox