Skip to content

Commit 1d210c1

Browse files
mhiramatrostedt
authored andcommitted
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>
1 parent c7af4ec commit 1d210c1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tools/bootconfig/test-bootconfig.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,18 @@ $BOOTCONF $INITRD > $TEMPCONF
137137
cat $TEMPCONF
138138
xpass grep \'\"string\"\' $TEMPCONF
139139

140+
echo "Repeat same-key tree"
141+
cat > $TEMPCONF << EOF
142+
foo
143+
bar
144+
foo { buz }
145+
EOF
146+
echo > $INITRD
147+
148+
xpass $BOOTCONF -a $TEMPCONF $INITRD
149+
$BOOTCONF $INITRD > $OUTFILE
150+
xpass grep -q "bar" $OUTFILE
151+
140152
echo "=== expected failure cases ==="
141153
for i in samples/bad-* ; do
142154
xfail $BOOTCONF -a $i $INITRD

0 commit comments

Comments
 (0)