From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/4] lib: Check also flags for tst_res()
Date: Fri, 28 Feb 2020 14:17:17 +0100 [thread overview]
Message-ID: <20200228131717.GA15552@dell5510> (raw)
In-Reply-To: <20200228121347.GB8324@rei>
Hi,
> > > #define TST_BRK_SUPPORTS_ONLY_TCONF_TBROK(condition) \
> > > do { ((void)sizeof(char[1 - 2 * !!(condition)])); } while (0)
> > > +#define TST_RES_SUPPORTS_TCONF_TFAIL_TINFO_TPASS_TWARN(condition) \
> > > + TST_BRK_SUPPORTS_ONLY_TCONF_TBROK(condition)
> > To be honest, this looks verbose and confusing a little. I'm thinking can
> > we just add a prefix TST_ to the kernel macro and use it directly?
> > e.g
> > #define TST_BUILD_BUG_ON(condition) \
> > do { ((void)sizeof(char[1 - 2 * !!(condition)])); } while (0)
> I guess that the confusing part is that TST_RES_SUPPORTS_... uses
> TST_BRK_SUPPORTS_...
> I guess that it would be nicer if we had TST_BUILD_BUG_ON() and then
> both TST_RES_SUPPORTS_... and TST_BRK_SUPPORTS_... would use it.
> I personally think that TST_BUILD_BUG_ON() itself is not verbose enough
> though.
+1. I'll implement it like this and merge (unless somebody objects).
Kind regards,
Petr
next prev parent reply other threads:[~2020-02-28 13:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 16:39 [LTP] [PATCH 1/4] Avoid using tst_res(TBROK) Petr Vorel
2020-02-27 16:39 ` [LTP] [PATCH 2/4] lib: Check also flags for tst_res() Petr Vorel
2020-02-28 7:00 ` Li Wang
2020-02-28 7:05 ` Petr Vorel
2020-02-28 12:13 ` Cyril Hrubis
2020-02-28 13:17 ` Petr Vorel [this message]
2020-02-28 14:17 ` Petr Vorel
2020-02-27 16:39 ` [LTP] [PATCH 3/4] doc: Improve flags info Petr Vorel
2020-02-27 16:39 ` [LTP] [PATCH 4/4] doc: Update style guide to new API Petr Vorel
2020-02-28 7:24 ` Li Wang
2020-02-28 8:42 ` Petr Vorel
2020-02-28 9:22 ` Jan Stancek
2020-02-28 9:55 ` Petr Vorel
2020-03-04 11:38 ` Petr Vorel
2020-02-28 7:47 ` [LTP] [PATCH 1/4] Avoid using tst_res(TBROK) Li Wang
2020-02-28 8:46 ` Petr Vorel
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=20200228131717.GA15552@dell5510 \
--to=pvorel@suse.cz \
--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