From: Petr Vorel <pvorel@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] ns_ifmove.c: Rewrite to new API
Date: Wed, 15 Mar 2023 03:01:40 +0100 [thread overview]
Message-ID: <20230315020140.GA138022@pevik> (raw)
In-Reply-To: <20230315005637.GB18639@localhost>
> On Thu, Mar 09, 2023 at 03:59:17PM +0100, Petr Vorel wrote:
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > testcases/kernel/containers/share/ns_ifmove.c | 98 ++++++-------------
> > 1 file changed, 28 insertions(+), 70 deletions(-)
> > int intf_index, pid, rtnetlink_socket;
> > if (argc != 3) {
> > - tst_resm(TINFO, "%s <INTERFACE_NAME> <NAMESPACE_PID>",
> > - argv[0]);
> > + printf("ns_ifmove <INTERFACE_NAME> <NAMESPACE_PID>\n");
> > return 1;
> > }
> should we use tst_res(TINFO) instead of printf?
NO. If you look into testcases/lib/, none of *.c tools use tst_res().
The only separation between API for tests and API for tools / library
than TST_NO_DEFAULT_MAIN.
Actually, unless SAFE_*() are useful to use (here SAFE_SOCKET() and
SAFE_IOCTL()), we prefer to not use tst_test.h at all (see tst_cgctl.c,
tst_device.c, ...)
I also think that tst_get_free_pids.c does not need TST_NO_DEFAULT_MAIN and
tst_test workarounds.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-03-15 2:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 14:59 [LTP] [PATCH 1/1] ns_ifmove.c: Rewrite to new API Petr Vorel
2023-03-09 14:59 ` Andrea Cervesato via ltp
2023-03-10 2:54 ` Bird, Tim
2023-03-10 7:34 ` Petr Vorel
2023-03-10 11:47 ` Petr Vorel
2023-03-10 18:11 ` Bird, Tim
2023-03-13 20:53 ` Petr Vorel
2023-03-23 15:59 ` Petr Vorel
2023-03-15 0:56 ` Wei Gao via ltp
2023-03-15 2:01 ` Petr Vorel [this message]
2023-03-15 4:38 ` Wei Gao via ltp
2023-03-15 10:35 ` 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=20230315020140.GA138022@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=wegao@suse.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.