[LTP] [PATCH v2 5/6] shell: Add test for TST_FORMAT_DEVICE=1

Petr Vorel pvorel@suse.cz
Fri Feb 11 07:44:56 CET 2022


Hi Xu,

> >   lib/newlib_tests/shell/tst_format_device.sh | 24 +++++++++++++++++++++
...
> > +TST_FORMAT_DEVICE=1
> > +TST_TESTFUNC=test
> > +TST_CNT=2
> > +TST_DEV_FS_OPTS="-b 1024 -O quota"
> > +TST_DEV_EXTRA_OPTS="5m"
> > +TST_NEEDS_CMDS="df lsblk"
This is left over from previous versions => should be deleted.
> > +. tst_test.sh
> > +
> > +test1()
> > +{
> > +	tst_res TPASS "device formatted"
> > +}
> > +
> > +test2()
> > +{
> > +	tst_check_cmds df || return
> We have checked df command in TST_NEEDS_CMDS, why still check it again
> in here?
Correct, TST_NEEDS_CMDS should be removed so that at least creating the device
(test1) is supported even SUT is missing df.

Kind regards,
Petr

> Best Regards
> Yang Xu


More information about the ltp mailing list