summaryrefslogtreecommitdiff
path: root/tools/bootconfig/test-bootconfig.sh
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2020-09-21 12:45:02 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2020-09-22 04:56:55 +0300
commit1d210c166b693c3a659abbac4b58385c2d4cf887 (patch)
treea467c6ccd5a10b33a19a669d817a59d5569a66ff /tools/bootconfig/test-bootconfig.sh
parentc7af4ecdffe1537ba8aeed0ac12c3326f908df43 (diff)
downloadlinux-1d210c166b693c3a659abbac4b58385c2d4cf887.tar.xz
tools/bootconfig: Add testcases for repeated key with brace
Add a testcase for repeated key with brace parsing issue. Link: https://lkml.kernel.org/r/160068150176.1088739.409481347784771987.stgit@devnote2 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools/bootconfig/test-bootconfig.sh')
-rwxr-xr-xtools/bootconfig/test-bootconfig.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/bootconfig/test-bootconfig.sh b/tools/bootconfig/test-bootconfig.sh
index 56284b98d8f0..95eec768b503 100755
--- a/tools/bootconfig/test-bootconfig.sh
+++ b/tools/bootconfig/test-bootconfig.sh
@@ -137,6 +137,18 @@ $BOOTCONF $INITRD > $TEMPCONF
cat $TEMPCONF
xpass grep \'\"string\"\' $TEMPCONF
+echo "Repeat same-key tree"
+cat > $TEMPCONF << EOF
+foo
+bar
+foo { buz }
+EOF
+echo > $INITRD
+
+xpass $BOOTCONF -a $TEMPCONF $INITRD
+$BOOTCONF $INITRD > $OUTFILE
+xpass grep -q "bar" $OUTFILE
+
echo "=== expected failure cases ==="
for i in samples/bad-* ; do
xfail $BOOTCONF -a $i $INITRD