From: Richard Palethorpe <rpalethorpe@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] lib: tst_bool_expr: Add support for strings
Date: Thu, 12 Nov 2020 14:02:30 +0000 [thread overview]
Message-ID: <87h7puptah.fsf@suse.de> (raw)
In-Reply-To: <20201112130224.GA17493@yuki.lan>
Hello,
Cyril Hrubis <chrubis@suse.cz> writes:
> Hi!
>> I suppose it depends how much later and how such an error would look. If
>> the error will happen directly after leaving this function then I don't
>> think it matters either, but if it is possible that it manages to
>> complete the whole evaluation process before failing with TCONF because
>> the vars don't match then this has the potential to waste some time.
>
> Well I can easily add this kind of check here, however out of all
> possible mistakes that you can do with misplaced quotes this would only
> catch the cases where the number of quotes is odd. I.e. only a subset of
> all possible errors, everything else would be caught later on when we
> attempt to evaluate the expression.
>
> E.g.
>
> CONFIG_FOO"=val"
> "CONFIG_FOO=val & CONFIG_BAR"
> "CONFIG_FOO"
> etc.
>
> are all valid in this context, but completely wrong when evaluated.
>
> I guess that it would make more sense to check if variable token is sane
> in the upper layer, i.e. in the kconfig parser since we do have the full
> information about how it should look like there. And this check would
> also cover this case as well.
+1
--
Thank you,
Richard.
prev parent reply other threads:[~2020-11-12 14:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 13:11 [LTP] [PATCH] lib: tst_bool_expr: Add support for strings Cyril Hrubis
2020-11-11 14:19 ` Richard Palethorpe
2020-11-11 14:37 ` Cyril Hrubis
2020-11-11 17:38 ` Richard Palethorpe
2020-11-12 13:02 ` Cyril Hrubis
2020-11-12 14:02 ` Richard Palethorpe [this message]
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=87h7puptah.fsf@suse.de \
--to=rpalethorpe@suse.de \
--cc=ltp@lists.linux.it \
/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).