From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: xuyang2018.jy@cn.fujitsu.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4] syscalls/statx09: Add new test
Date: Mon, 7 Feb 2022 12:55:42 +0100 [thread overview]
Message-ID: <YgEIviW5/HrW4yja@pevik> (raw)
In-Reply-To: <YgEDBRSBEUMK3dEF@yuki>
Hi all,
> Hi!
> > > +static void run(unsigned int i)
> > > +{
> > > + tcases[i].tfunc();
> > > +}
> > OT: we may lack something in the API, when function like this need to be
> > defined.
> See:
> https://lists.linux.it/pipermail/ltp/2017-October/005829.html
> https://lists.linux.it/pipermail/ltp/2017-July/005132.html
https://lore.kernel.org/ltp/860483630.25581747.1507017497043.JavaMail.zimbra@redhat.com/
https://lore.kernel.org/ltp/20170727081437.27995-1-chrubis@suse.cz/
Very nice that you remember your old work :) (we didn't have patchwork back then).
Now I remember it - you already implemented it in 5 years old RFC, Jan didn't
see a value and that's why it haven't been merged.
Yes, Jan is right that it complicates code a bit, but even if you replace this
code:
statx09.c
static struct test_cases {
void (*tfunc)(void);
} tcases[] = {
{&test_flagged},
{&test_unflagged},
};
static void run(unsigned int i)
{
tcases[i].tfunc();
}
with .test_all where you have the switch it still kind of boilerplate. Thus I
agree with cyrils argument:
https://lore.kernel.org/ltp/20171003125958.GB11692@rei/
"aiming to avoid the need to have a switch () in each testcase that
implements a similar tests but cannot be easily data driven (as we do
for most of tests that loop over an array of structures describing the
test data)"
Thus, not sure if we want to rething the implementation, but I'd be for adding
the support (sure doc and docparse adoption would need to be added but that's
obvious).
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-02-07 11:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 5:19 [LTP] [RESEND] syscalls/statx09: Add new test Dai Shili
2022-01-24 13:40 ` Cyril Hrubis
2022-01-26 2:37 ` daisl.fnst
2022-01-26 3:00 ` [LTP] [PATCH v2] " Dai Shili
2022-01-27 13:57 ` Cyril Hrubis
2022-01-28 3:02 ` [LTP] [PATCH v3] " Dai Shili
2022-01-28 4:07 ` xuyang2018.jy
2022-01-28 10:29 ` [LTP] [PATCH v4] " Dai Shili
2022-01-30 2:33 ` xuyang2018.jy
2022-02-04 13:42 ` Cyril Hrubis
2022-02-07 11:26 ` Petr Vorel
2022-02-07 11:31 ` Cyril Hrubis
2022-02-07 11:55 ` Petr Vorel [this message]
2022-02-07 13:45 ` Andrea Cervesato via ltp
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=YgEIviW5/HrW4yja@pevik \
--to=pvorel@suse.cz \
--cc=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=xuyang2018.jy@cn.fujitsu.com \
/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 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.