]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
bootconfig: Check the parsed output of the good examples
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Thu, 5 Feb 2026 00:46:35 +0000 (09:46 +0900)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Thu, 5 Feb 2026 13:21:23 +0000 (22:21 +0900)
Check whether the parsed output of the good example configs are
the same as expected.

Link: https://lore.kernel.org/all/177025239529.14982.12913754615993262263.stgit@devnote2/
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Tested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
14 files changed:
tools/bootconfig/samples/exp-good-array-space-comment.bconf [new file with mode: 0644]
tools/bootconfig/samples/exp-good-comment-after-value.bconf [new file with mode: 0644]
tools/bootconfig/samples/exp-good-mixed-append.bconf [new file with mode: 0644]
tools/bootconfig/samples/exp-good-mixed-kv1.bconf [new file with mode: 0644]
tools/bootconfig/samples/exp-good-mixed-kv2.bconf [new file with mode: 0644]
tools/bootconfig/samples/exp-good-mixed-kv3.bconf [new file with mode: 0644]
tools/bootconfig/samples/exp-good-mixed-override.bconf [new file with mode: 0644]
tools/bootconfig/samples/exp-good-override.bconf [new file with mode: 0644]
tools/bootconfig/samples/exp-good-printables.bconf [new file with mode: 0644]
tools/bootconfig/samples/exp-good-simple.bconf [new file with mode: 0644]
tools/bootconfig/samples/exp-good-single.bconf [new file with mode: 0644]
tools/bootconfig/samples/exp-good-space-after-value.bconf [new file with mode: 0644]
tools/bootconfig/samples/exp-good-tree.bconf [new file with mode: 0644]
tools/bootconfig/test-bootconfig.sh

diff --git a/tools/bootconfig/samples/exp-good-array-space-comment.bconf b/tools/bootconfig/samples/exp-good-array-space-comment.bconf
new file mode 100644 (file)
index 0000000..8d3278f
--- /dev/null
@@ -0,0 +1 @@
+key = "value1", "value2", "value3";
diff --git a/tools/bootconfig/samples/exp-good-comment-after-value.bconf b/tools/bootconfig/samples/exp-good-comment-after-value.bconf
new file mode 100644 (file)
index 0000000..a8e8450
--- /dev/null
@@ -0,0 +1 @@
+key = "value";
diff --git a/tools/bootconfig/samples/exp-good-mixed-append.bconf b/tools/bootconfig/samples/exp-good-mixed-append.bconf
new file mode 100644 (file)
index 0000000..c2b4079
--- /dev/null
@@ -0,0 +1,2 @@
+key = "foo", "bar";
+keyx.subkey = "value";
diff --git a/tools/bootconfig/samples/exp-good-mixed-kv1.bconf b/tools/bootconfig/samples/exp-good-mixed-kv1.bconf
new file mode 100644 (file)
index 0000000..8346287
--- /dev/null
@@ -0,0 +1,2 @@
+key = "value";
+key.subkey = "another-value";
diff --git a/tools/bootconfig/samples/exp-good-mixed-kv2.bconf b/tools/bootconfig/samples/exp-good-mixed-kv2.bconf
new file mode 100644 (file)
index 0000000..40c6232
--- /dev/null
@@ -0,0 +1,2 @@
+key = "another-value";
+key.subkey = "value";
diff --git a/tools/bootconfig/samples/exp-good-mixed-kv3.bconf b/tools/bootconfig/samples/exp-good-mixed-kv3.bconf
new file mode 100644 (file)
index 0000000..8368a7b
--- /dev/null
@@ -0,0 +1,5 @@
+key = "value";
+key {
+       subkey1;
+       subkey2 = "foo";
+}
diff --git a/tools/bootconfig/samples/exp-good-mixed-override.bconf b/tools/bootconfig/samples/exp-good-mixed-override.bconf
new file mode 100644 (file)
index 0000000..5875771
--- /dev/null
@@ -0,0 +1,2 @@
+key = "value2";
+key.foo = "bar";
diff --git a/tools/bootconfig/samples/exp-good-override.bconf b/tools/bootconfig/samples/exp-good-override.bconf
new file mode 100644 (file)
index 0000000..00bbd30
--- /dev/null
@@ -0,0 +1,4 @@
+key {
+       word = "2", "3";
+       new.word = "new";
+}
diff --git a/tools/bootconfig/samples/exp-good-printables.bconf b/tools/bootconfig/samples/exp-good-printables.bconf
new file mode 100644 (file)
index 0000000..5981d30
--- /dev/null
@@ -0,0 +1,2 @@
+key = "        
+\v\f !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
diff --git a/tools/bootconfig/samples/exp-good-simple.bconf b/tools/bootconfig/samples/exp-good-simple.bconf
new file mode 100644 (file)
index 0000000..d17f394
--- /dev/null
@@ -0,0 +1,8 @@
+key {
+       word1 = "1";
+       word2 = "2";
+       word3 = "3";
+       word4 = "4";
+       word5 = "5";
+       word6 = "6";
+}
diff --git a/tools/bootconfig/samples/exp-good-single.bconf b/tools/bootconfig/samples/exp-good-single.bconf
new file mode 100644 (file)
index 0000000..0119691
--- /dev/null
@@ -0,0 +1,3 @@
+key = "1";
+key2 = "2";
+key3 = "alpha", "beta";
diff --git a/tools/bootconfig/samples/exp-good-space-after-value.bconf b/tools/bootconfig/samples/exp-good-space-after-value.bconf
new file mode 100644 (file)
index 0000000..a8e8450
--- /dev/null
@@ -0,0 +1 @@
+key = "value";
diff --git a/tools/bootconfig/samples/exp-good-tree.bconf b/tools/bootconfig/samples/exp-good-tree.bconf
new file mode 100644 (file)
index 0000000..b711d38
--- /dev/null
@@ -0,0 +1,8 @@
+key {
+       word.tree.value = "0";
+       word2.tree.value = "1", "2";
+}
+other.tree {
+       value = "2";
+       value2 = "3";
+}
index 7594659af1e155fed59001bdace68b9ba7fd5182..be9bd18b1d56211a19c31fedce116edd7f41b043 100755 (executable)
@@ -179,6 +179,9 @@ done
 echo "=== expected success cases ==="
 for i in samples/good-* ; do
   xpass $BOOTCONF -a $i $INITRD
+  x="samples/exp-"`basename $i`
+  $BOOTCONF $i > $TEMPCONF
+  xpass diff $x $TEMPCONF
 done