All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 3/6] tst_test.sh: Add $TST_FORMAT_DEVICE and related vars
Date: Fri, 11 Mar 2022 15:28:25 +0100	[thread overview]
Message-ID: <Yitcifh+HxHMce/T@yuki> (raw)
In-Reply-To: <20220210162739.30159-4-pvorel@suse.cz>

Hi!
> ---
>  doc/shell-test-api.txt    | 31 +++++++++++++++++++++++++++++--
>  testcases/lib/tst_test.sh |  6 ++++++
>  2 files changed, 35 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/shell-test-api.txt b/doc/shell-test-api.txt
> index a5974b4fad..5caa889c9e 100644
> --- a/doc/shell-test-api.txt
> +++ b/doc/shell-test-api.txt
> @@ -189,11 +189,20 @@ space as default value is used. Of course, it's possible to use separate functio
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  
>  Similarily to the C library various checks and preparations can be requested
> -simply by setting right '$TST_NEEDS_FOO'.
> +simply by setting right '$TST_FOO'.
>  
>  [options="header"]
>  |=============================================================================
>  | Variable name            | Action done
> +| 'TST_DEV_EXTRA_OPTS'     | Pass extra 'mkfs' options _after_ device name,
> +|                          | to 'tst_mkfs', use with 'TST_FORMAT_DEVICE=1'.
> +| 'TST_DEV_FS_OPTS'        | Pass 'mkfs' options _before_ the device name,
> +|                          | to 'tst_mkfs', use with 'TST_FORMAT_DEVICE=1'.
> +| 'TST_FORMAT_DEVICE'      | Format a block device with a filesystem, see
> +|                          | https://github.com/linux-test-project/ltp/wiki/Shell-Test-API#formatting-device-with-a-filesystem[Formatting device with a filesystem]

Hm, I guess that we already have a few absolute links in the docs to a
github.com wiki, but I do not like it that much. I guess that realtive
links does not work, right?

> +|                          | See also 'TST_DEV_EXTRA_OPTS', 'TST_DEV_FS_OPTS', 'TST_FS_TYPE'.
> +|                          | Implies 'TST_NEEDS_DEVICE=1' (no need to set it).
> +| 'TST_FS_TYPE'            | Override the default filesystem to be used.
>  | '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.
> @@ -495,7 +504,25 @@ tst_random 0 1000
>  Formatting device with a filesystem
>  +++++++++++++++++++++++++++++++++++
>  
> -The 'tst_mkfs' helper will format device with the filesystem.
> +'TST_FORMAT_DEVICE=1' can be used to format device before running the test.
> +Uses '$TST_FS_TYPE' (used filesystem, by default ext2), '$TST_DEVICE' (used
                              ^
			      I would removed this part and keep only
			      the (by default ext2)
> +block device, usually prepared by 'TST_NEEDS_DEVICE=1'), '$TST_DEV_FS_OPTS'

and rewrote this part no to be in the parentheses as:

'$TST_DEVICE' a block device to be formatted, usually prepared by the
library (TST_NEEDS_DEVICE=1 must be set).

> +('mkfs' options _before_ the device name) and '$TST_DEV_EXTRA_OPTS'
> +(extra 'mkfs' options _after_ the device name).

And remove the parentheses here as:

'$TST_DEV_FS_OPTS' a 'mkfs' options _before_ the device path and
'$TST_DEV_EXTRA_OPTS' extra 'mkfs'' options _after_ the device path.


Other than that and the test1() pointed out by Yang Xu:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2022-03-11 14:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 16:27 [LTP] [PATCH v2 0/6] Add TST_FORMAT_DEVICE support Petr Vorel
2022-02-10 16:27 ` [LTP] [PATCH v2 1/6] tst_test.sh: Properly init $TST_FS_TYPE Petr Vorel
2022-03-11 13:55   ` Cyril Hrubis
2022-02-10 16:27 ` [LTP] [PATCH v2 2/6] tst_test.sh: Redesing tst_mkfs() API Petr Vorel
2022-03-11 14:08   ` Cyril Hrubis
2022-02-10 16:27 ` [LTP] [PATCH v2 3/6] tst_test.sh: Add $TST_FORMAT_DEVICE and related vars Petr Vorel
2022-02-11  6:58   ` xuyang2018.jy
2022-02-11  7:15     ` Petr Vorel
2022-03-11 14:28   ` Cyril Hrubis [this message]
2022-03-13 21:48     ` Petr Vorel
2022-02-10 16:27 ` [LTP] [PATCH v2 4/6] df01.sh: Use TST_FORMAT_DEVICE=1 Petr Vorel
2022-03-11 14:34   ` Cyril Hrubis
2022-02-10 16:27 ` [LTP] [PATCH v2 5/6] shell: Add test for TST_FORMAT_DEVICE=1 Petr Vorel
2022-02-11  5:17   ` xuyang2018.jy
2022-02-11  6:44     ` Petr Vorel
2022-03-11 14:36       ` Cyril Hrubis
2022-02-10 16:27 ` [LTP] [PATCH v2 6/6] doc: Add missing shell variables Petr Vorel
2022-02-11  6:28   ` xuyang2018.jy
2022-02-11  7:48     ` Petr Vorel
2022-03-11 14:43   ` Cyril Hrubis
2022-03-13 21:59     ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yitcifh+HxHMce/T@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.