Message ID | 20220210162739.30159-7-pvorel@suse.cz |
---|---|
State | Accepted |
Headers | show |
Series | Add TST_FORMAT_DEVICE support | expand |
Hi Petr This patchset looks good to me, so Acked-by: Yang Xu <xuyang2018.jy@fujitsu.com> ps: I think we can add two basic tests for this, 1)test TST_FS_TYPE whether format the specified filesystem ie using ext4 2)test tst_mkfs whether format failed if not specifying TST_NEEDS_DEVICE and call tst_mkfs directly Best Regards Yang Xu > Signed-off-by: Petr Vorel<pvorel@suse.cz> > --- > doc/shell-test-api.txt | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/doc/shell-test-api.txt b/doc/shell-test-api.txt > index 5caa889c9e..7172917e05 100644 > --- a/doc/shell-test-api.txt > +++ b/doc/shell-test-api.txt > @@ -202,7 +202,13 @@ simply by setting right '$TST_FOO'. > | | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem] > | | See also 'TST_DEV_EXTRA_OPTS', 'TST_DEV_FS_OPTS', 'TST_FS_TYPE'. > | | Implies 'TST_NEEDS_DEVICE=1' (no need to set it). > +| 'TST_DEVICE' | Block device name for 'tst_mount' and 'tst_mkfs', see > +| | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem] > | 'TST_FS_TYPE' | Override the default filesystem to be used. > +| 'TST_MNTPOINT' | Holds path to mountpoint when use 'tst_mount', see > +| | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem] > +| 'TST_MNT_PARAMS' | Extra mount params for 'tst_mount', see > +| | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem] > | 'TST_NEEDS_ROOT' | Exit the test with 'TCONF' unless executed under root. > | | Alternatively the 'tst_require_root' command can be used. > | 'TST_NEEDS_TMPDIR' | Create test temporary directory and cd into it.
Hi Xu, > Hi Petr > This patchset looks good to me, so > Acked-by: Yang Xu <xuyang2018.jy@fujitsu.com> > ps: I think we can add two basic tests for this, > 1)test TST_FS_TYPE whether format the specified filesystem ie using ext4 BTW the default is ext2. Also not sure how to do it when formatting loop device. Verifying filesystem I'll add when I add TST_NEEDS_MOUNT flag. losetup prints: /dev/loop0: [65025]:176189 (/tmp/LTP_tst_format_device.9bya3blyQD/test_dev.img) > 2)test tst_mkfs whether format failed if not specifying TST_NEEDS_DEVICE > and call tst_mkfs directly +1. I'll also document here what is the purpose (we have many tests which are expected to TFAIL/TBROK, but it's not documented in the tests thus it's hard to run them locally. Kind regards, Petr
Hi! > diff --git a/doc/shell-test-api.txt b/doc/shell-test-api.txt > index 5caa889c9e..7172917e05 100644 > --- a/doc/shell-test-api.txt > +++ b/doc/shell-test-api.txt > @@ -202,7 +202,13 @@ simply by setting right '$TST_FOO'. > | | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem] > | | See also 'TST_DEV_EXTRA_OPTS', 'TST_DEV_FS_OPTS', 'TST_FS_TYPE'. > | | Implies 'TST_NEEDS_DEVICE=1' (no need to set it). > +| 'TST_DEVICE' | Block device name for 'tst_mount' and 'tst_mkfs', see > +| | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem] > | 'TST_FS_TYPE' | Override the default filesystem to be used. > +| 'TST_MNTPOINT' | Holds path to mountpoint when use 'tst_mount', see ^ used in 'tst_mount' > +| | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem] > +| 'TST_MNT_PARAMS' | Extra mount params for 'tst_mount', see > +| | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem] > | 'TST_NEEDS_ROOT' | Exit the test with 'TCONF' unless executed under root. > | | Alternatively the 'tst_require_root' command can be used. > | 'TST_NEEDS_TMPDIR' | Create test temporary directory and cd into it. Other than the minor correction: Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Hi Xu, Cyril, whole patchset merged with fixes you pointed out and your tags. Hope we find some better solution for relative path links. Thanks for your review. Kind regards, Petr
diff --git a/doc/shell-test-api.txt b/doc/shell-test-api.txt index 5caa889c9e..7172917e05 100644 --- a/doc/shell-test-api.txt +++ b/doc/shell-test-api.txt @@ -202,7 +202,13 @@ simply by setting right '$TST_FOO'. | | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem] | | See also 'TST_DEV_EXTRA_OPTS', 'TST_DEV_FS_OPTS', 'TST_FS_TYPE'. | | Implies 'TST_NEEDS_DEVICE=1' (no need to set it). +| 'TST_DEVICE' | Block device name for 'tst_mount' and 'tst_mkfs', see +| | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem] | 'TST_FS_TYPE' | Override the default filesystem to be used. +| 'TST_MNTPOINT' | Holds path to mountpoint when use 'tst_mount', see +| | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem] +| 'TST_MNT_PARAMS' | Extra mount params for 'tst_mount', see +| | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem] | 'TST_NEEDS_ROOT' | Exit the test with 'TCONF' unless executed under root. | | Alternatively the 'tst_require_root' command can be used. | 'TST_NEEDS_TMPDIR' | Create test temporary directory and cd into it.
Signed-off-by: Petr Vorel <pvorel@suse.cz> --- doc/shell-test-api.txt | 6 ++++++ 1 file changed, 6 insertions(+)