All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] bootconfig: Fix a parser bug
@ 2020-09-21  9:44 Masami Hiramatsu
  2020-09-21  9:44 ` [PATCH 1/4] lib/bootconfig: Fix a bug of breaking existing tree nodes Masami Hiramatsu
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Masami Hiramatsu @ 2020-09-21  9:44 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Ingo Molnar, Masami Hiramatsu

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>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-09-23 14:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 0/4] bootconfig: Fix a parser bug Masami Hiramatsu
2020-09-23 14:49   ` Steven Rostedt

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.