public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] Use SAFE_RUNCMD()
Date: Wed, 25 Mar 2020 18:07:40 +0100	[thread overview]
Message-ID: <20200325170739.GA2461@yuki.lan> (raw)
In-Reply-To: <CAEemH2doL4m4-TLBBWTHygTRPSTa68dkoAFjZJrDmzrkmgUrSQ@mail.gmail.com>

Hi!
> > > > Also if we are going to add this functionality it should be added as an
> > > > .needs_cmds array in the tst_test structure.
> > > .needs_cmds sounds as a good idea. But let's do it as a separate effort.
> >
> +1, thanks Petr!
> 
> 
> > > I'll leave already sent v2 for review. Once .needs_cmds is implemented,
> > we can
> > > use it as well for copy_file_range02.c.
> >
> > Actually I would like to avoid exposing the function to the tests and
> > force people to use the .needs_cmds instead in order to have a proper
> > metadata.
> >
> 
> Sounds good.
> 
> And this makes me think more of the '.request_hugepages' story. The
> needs_foo flags require the foo to be present on the system as hard
> requirements. In some situations(i.e copy_file_range02.c), we probably need
> to handle the soft situation, which means, the commands are only part of
> the test requirement. So if it writing with .needs_cmds="xxx", it might
> skip the whole test in setup() phase.

Indeed, there are couple of solutions for that, one of them would have
all the arrays doubled and one of them would list hard requirement while
the other soft requirements. Then we will end up with something as
"need_cmds" and "wants_cmds". The second one would be more or less
informative, the test may print a message "Missing foo command test
coverage will be limited".

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2020-03-25 17:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20 13:49 [LTP] [PATCH 1/2] lib: Implement SAFE_RUN() macro (new API only) Petr Vorel
2020-03-20 13:49 ` [LTP] [PATCH 2/2] Use SAFE_RUNCMD() Petr Vorel
2020-03-23  3:13   ` Yang Xu
2020-03-23  9:04     ` Petr Vorel
2020-03-23  9:10   ` Li Wang
2020-03-23  9:52     ` Yang Xu
2020-03-23 11:37       ` Petr Vorel
2020-03-23 13:42         ` Li Wang
2020-03-23 14:32           ` Li Wang
2020-03-23 16:04             ` Petr Vorel
2020-03-24 23:51               ` Cyril Hrubis
2020-03-24 17:21                 ` Petr Vorel
2020-03-25  1:53                   ` Cyril Hrubis
2020-03-24 18:55                     ` Petr Vorel
2020-03-25  5:56                       ` Li Wang
2020-03-25  5:30                     ` Li Wang
2020-03-25 17:07                       ` Cyril Hrubis [this message]
2020-03-25  9:34                         ` Petr Vorel
2020-03-25 10:03                           ` Cyril Hrubis
2020-03-25 15:40                             ` Petr Vorel
2020-03-25 10:42                           ` Yang Xu
2020-03-25 15:56                             ` Petr Vorel
2020-03-26  5:27                               ` Li Wang
2020-03-26  8:03                               ` Yang Xu
2020-03-23 15:49           ` Petr Vorel
2020-03-24  6:27             ` Li Wang
2020-03-23  2:43 ` [LTP] [PATCH 1/2] lib: Implement SAFE_RUN() macro (new API only) Yang Xu
2020-03-23  9:20   ` 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=20200325170739.GA2461@yuki.lan \
    --to=chrubis@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