[LTP] [PATCH v3 4/7] doc/shell-test-api.txt

Petr Vorel pvorel@suse.cz
Fri Dec 16 10:49:15 CET 2022


Hi Xu,

> Update tst_kvcmp usage.

> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
>  doc/shell-test-api.txt | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)

> diff --git a/doc/shell-test-api.txt b/doc/shell-test-api.txt
> index 73c9eff91..f35561e54 100644
> --- a/doc/shell-test-api.txt
> +++ b/doc/shell-test-api.txt
> @@ -652,13 +652,15 @@ tst_kvcmp
>  +++++++++

>  This command compares the currently running kernel version given conditions
> -with syntax similar to the shell test command.
> +with syntax similar to the shell test command. Now, the oldest supported kernel
> +version for ltp is 3.0, so we don't need this if comparing with very old version
               ^ upper case please (LTP)
> +ie 2.6.8 .
           ^ please remove this space.

I'm not a native speaker, but

with syntax similar to the shell test command. The oldest supported kernel
version for LTP is 3.0, therefore we don't need this if comparing with very old version
e.g. 2.6.8.

But is it really needed? Nobody will add these check nowadays.
Instead this I sent a patch to add this to doc/supported-kernel-libc-versions.txt
https://patchwork.ozlabs.org/project/ltp/patch/20221216094611.2924-2-pvorel@suse.cz/
(I also pinged few people + automated-testing@lists.yoctoproject.org in the
patchset to get some audience for minimal version - maybe we could raise higher.)

>  [source,sh]
>  -------------------------------------------------------------------------------
> -# Exit the test if kernel version is older or equal to 2.6.8
> -if tst_kvcmp -le 2.6.8; then
> -	tst_brk TCONF "Kernel newer than 2.6.8 is needed"
> +# Exit the test if kernel version is older or equal to 4.0.0
> +if tst_kvcmp -le 4.0.0; then
> +	tst_brk TCONF "Kernel newer than 4.0.0 is needed"
>  fi

Updating example is obviously correct.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
for this part only.

Kind regards,
Petr


More information about the ltp mailing list