testsuite: add test for kernel cmdline with quotes

Add some tests in which we quotes in kernel cmdline and also spaces
inside quotes.  This doesn't yet cover the case in which quotes are used
for module name, wihch should be forbidden.
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline5/correct.txt b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline5/correct.txt
new file mode 100644
index 0000000..6996ba2
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline5/correct.txt
@@ -0,0 +1,6 @@
+options psmouse foo
+options psmouse bar=1
+options psmouse foobar="test 1"
+
+# End of configuration files. Dumping indexes now:
+
diff --git a/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline5/proc/cmdline b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline5/proc/cmdline
new file mode 100644
index 0000000..0c796b3
--- /dev/null
+++ b/testsuite/rootfs-pristine/test-modprobe/module-param-kcmdline5/proc/cmdline
@@ -0,0 +1 @@
+psmouse.foo psmouse.bar=1 psmouse.foobar="test 1" " notamodule" "noteamodule2 " notamodule3 " quiet rw
diff --git a/testsuite/test-modprobe.c b/testsuite/test-modprobe.c
index 1430c25..e0dd199 100644
--- a/testsuite/test-modprobe.c
+++ b/testsuite/test-modprobe.c
@@ -280,6 +280,31 @@
 	.modules_loaded = "",
 	);
 
+static noreturn int modprobe_param_kcmdline5(const struct test *t)
+{
+	const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe";
+	const char *const args[] = {
+		progname,
+		"-c",
+		NULL,
+	};
+
+	test_spawn_prog(progname, args);
+	exit(EXIT_FAILURE);
+}
+DEFINE_TEST(modprobe_param_kcmdline5,
+	.description = "check if params with spaces are parsed correctly from kcmdline",
+	.config = {
+		[TC_UNAME_R] = "4.4.4",
+		[TC_ROOTFS] = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline5",
+	},
+	.output = {
+		.out = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline5/correct.txt",
+	},
+	.modules_loaded = "",
+	);
+
+
 static noreturn int modprobe_force(const struct test *t)
 {
 	const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe";