linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH 0/4] bootconfig: Fix a parser bug
Date: Wed, 23 Sep 2020 14:30:14 +0900	[thread overview]
Message-ID: <20200923143014.6c904389a4b20fe904144d3f@kernel.org> (raw)
In-Reply-To: <160068147328.1088739.7282405187565509762.stgit@devnote2>

Hi Steve,

Thank you for merging previous 3 serieses!
Could you also pick this series as urgent-fix branch?

Thank you,

On Mon, 21 Sep 2020 18:44:33 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> Hi,
> 
> Here are patches to fix 2 bugs in the parser. One issue happens
> when a key has a siblings and the key repeated with brace after
> sibling nodes. Another one is that the parser keeps tailing
> spaces when we put a comment on the line.
> 
> For example, the minimum example of the 1st issue is here;
> 
> foo
> bar
> foo { buz }
> 
> This should be parsed as
> 
> foo.buz
> bar
> 
> But the bootconfig parser parses it as foo.buz (no bar node)
> because foo->bar link is unlinked when the brace ("foo {") was
> found.
> 
> The second one is simpler, if we have
> 
> foo = val  # comment
> 
> The value's space after the word was not removed.
> 
> foo="val  "
> 
> But this also should be
> 
> foo="val"
> 
> If user needs tailing spaces, they can use quotes, e.g.
> 
> foo = "val  " # comment
> 
> 
> Thank you,
> 
> ---
> 
> Masami Hiramatsu (4):
>       lib/bootconfig: Fix a bug of breaking existing tree nodes
>       lib/bootconfig: Fix to remove tailing spaces after value
>       tools/bootconfig: Add testcases for repeated key with brace
>       tools/bootconfig: Add testcase for tailing space
> 
> 
>  tools/bootconfig/test-bootconfig.sh |   25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> --
> Masami Hiramatsu (Linaro) <mhiramat@kernel.org>


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  parent reply	other threads:[~2020-09-23  5:30 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 ` [PATCH 3/4] tools/bootconfig: Add testcases for repeated key with brace Masami Hiramatsu
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 ` Masami Hiramatsu [this message]
2020-09-23 14:49   ` [PATCH 0/4] bootconfig: Fix a parser bug 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=20200923143014.6c904389a4b20fe904144d3f@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).