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

Petr Vorel pvorel@suse.cz
Mon Apr 23 15:27:27 CEST 2018


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


More information about the ltp mailing list