[LTP] [PATCH 3/5] tst_test.sh: Add $TST_FORMAT_DEVICE and related vars

Petr Vorel pvorel@suse.cz
Tue Feb 8 18:36:40 CET 2022


Hi Cyril,

> > +++ b/doc/shell-test-api.txt
...
> > +| 'TST_FS_TYPE'            | Overwrite the default filesystem to be used.
>                                   ^
>                                 Override?

+1, thanks!

> > diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
...
> > +	if [ "$TST_FORMAT_DEVICE" = 1 ]; then
> > +		tst_mkfs "$TST_FS_TYPE" "$TST_DEVICE" "$TST_DEV_FS_OPTS" "$TST_DEV_EXTRA_OPTS"

> This would work with the proposed change to tst_mkfs if we swapped the
> $TST_DEV_FS_OPTS with $TST_DEVICE.

Do you mean to swap here? i.e.:
tst_mkfs "$TST_FS_TYPE" "$TST_DEV_FS_OPTS" "$TST_DEVICE" "$TST_DEV_EXTRA_OPTS"

But in tst_mkfs it has always been the second parameter:
local device=${2:-$TST_DEVICE}

What am I missing?

Kind regards,
Petr


More information about the ltp mailing list