[LTP] [RFC PATCH 7/9] testcases: df: Add "--printf" option as needed commands

Mylène Josserand mylene.josserand@bootlin.com
Fri Apr 27 11:38:30 CEST 2018


Hi,

On Mon, 23 Apr 2018 15:27:27 +0200
Petr Vorel <pvorel@suse.cz> wrote:

> Hi,
> 
> > > diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh
> > > index fbf1e2f2a..147620020 100755
> > > --- a/testcases/commands/df/df01.sh
> > > +++ b/testcases/commands/df/df01.sh
> > > @@ -26,6 +26,8 @@ TST_PARSE_ARGS=parse_args
> > >  TST_NEEDS_ROOT=1
> > >  TST_NEEDS_TMPDIR=1
> > >  TST_NEEDS_DEVICE=1
> > > +TST_NEEDS_CMDS="stat --printf=%f"  
> 
> > Does this work? Because when I do something as:  
> 
> > $ command -v stat --nonexistent-option
> > /usr/bin/stat
> > $ echo $?
> > 0  
> 
> Checking whole output (not just binary file / script) presence in $PATH is what
> tst_verify_cmd in my patch [1] does.
> 
> [1] https://patchwork.ozlabs.org/patch/892779/
> 
> 
> Kind regards,
> Petr

Indeed, I saw your patch just after I sent my series :)

I will test your "tst_verify_cmd" but it seems to fit my needs. I will
keep you updated.

Best regards,

-- 
Mylène Josserand, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com


More information about the ltp mailing list