git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Stephen Boyd <sboyd@kernel.org>
Cc: git@vger.kernel.org, Adrian Johnson <ajohnson@redneon.com>,
	William Duclot <william.duclot@ensimag.grenoble-inp.fr>,
	Matthieu Moy <matthieu.moy@grenoble-inp.fr>,
	Junio C Hamano <gitster@pobox.com>,
	devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>
Subject: Re: [PATCH] userdiff: Fix some corner cases in dts regex
Date: Sat, 12 Oct 2019 14:54:00 +0200
Message-ID: <ab9b0dba-5c5b-5a97-07c5-ce8344cd74cd@kdbg.org> (raw)
In-Reply-To: <20191008144306.B2B0820659@mail.kernel.org>

Am 08.10.19 um 16:43 schrieb Stephen Boyd:
> Quoting Johannes Sixt (2019-10-05 07:09:11)
>> Am 04.10.19 um 23:30 schrieb Stephen Boyd:
>>> --- /dev/null
>>> +++ b/t/t4018/dts-nodes-multiline-prop
>>> @@ -0,0 +1,12 @@
>>> +/ {
>>> +     label_1: node1@ff00 {
>>> +             RIGHT@deadf00,4000 {
>>> +                     multilineprop = <3>,
>>> +                                     <4>;
>>
>> You could insert more lines to demonstrate that "<x>," on a line by
>> itself is not picked up.
> 
> Maybe I should add another test?

This is is the _multi_line test case, right? ;) Just add one or two
lines between the <3> and the <4> that look like common real-world cases
to show that those lines won't be picked up. I don't think that another
test file is required.

>>> +/ { RIGHT /* Technically just supposed to be a slash and brace */
>>
>> Devil's advocate here: insert ';' or '=' in the comment, and the line
>> would not be picked up. Does that hurt in practice?
> 
> I don't think it hurts in practice so I'd like to ignore it.

Sure, no problem.

>>>  PATTERNS("dts",
>>>        "!;\n"
>>> +      "!.*=.*\n"
>>
>> This behaves the same way as just
>>
>>         "!=\n"
>>
>> no?
>>
> 
> Not exactly. Properties don't always get assigned.

I was just refering to the added line, not the combination of the two lines.

But while you are speaking of it:

> There are boolean
> properties that can be tested for by the presence of some string with an
> ending semi-colon, like 'this-is-true;'. If we just check for not equal
> to a line with a semicolon and newline then we'll see boolean
> properties. Should I add that as another test?

I agree that a test case with a Boolean property would be great.

-- Hannes

      reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 21:30 Stephen Boyd
2019-10-05 14:09 ` Johannes Sixt
2019-10-08 14:43   ` Stephen Boyd
2019-10-12 12:54     ` Johannes Sixt [this message]

Reply instructions:

You may reply publically 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=ab9b0dba-5c5b-5a97-07c5-ce8344cd74cd@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=ajohnson@redneon.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=matthieu.moy@grenoble-inp.fr \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=william.duclot@ensimag.grenoble-inp.fr \
    /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

git@vger.kernel.org list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror http://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox