All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Masami Hiramatsu <mhiramat@kernel.org>
Subject: [PATCH 3/4] tools/bootconfig: Add testcases for repeated key with brace
Date: Mon, 21 Sep 2020 18:45:02 +0900	[thread overview]
Message-ID: <160068150176.1088739.409481347784771987.stgit@devnote2> (raw)
In-Reply-To: <160068147328.1088739.7282405187565509762.stgit@devnote2>

Add a testcase for repeated key with brace parsing issue.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
 tools/bootconfig/test-bootconfig.sh |   12 ++++++++++++
 1 file changed, 12 insertions(+)

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


  parent reply	other threads:[~2020-09-21  9:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21  9:44 [PATCH 0/4] bootconfig: Fix a parser bug Masami Hiramatsu
2020-09-21  9:44 ` [PATCH 1/4] lib/bootconfig: Fix a bug of breaking existing tree nodes Masami Hiramatsu
2020-09-21  9:44 ` [PATCH 2/4] lib/bootconfig: Fix to remove tailing spaces after value Masami Hiramatsu
2020-09-21  9:45 ` Masami Hiramatsu [this message]
2020-09-21  9:45 ` [PATCH 4/4] tools/bootconfig: Add testcase for tailing space Masami Hiramatsu
2020-09-21  9:56 ` bootconfig: Fix parser bugs (Re: [PATCH 0/4] bootconfig: Fix a parser bug) Masami Hiramatsu
2020-09-23  5:30 ` [PATCH 0/4] bootconfig: Fix a parser bug Masami Hiramatsu
2020-09-23 14:49   ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=160068150176.1088739.409481347784771987.stgit@devnote2 \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.