public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Yang Xu <xuyang2018.jy@fujitsu.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/3] Remove old kernel version check when using tst_kvercmp under 3.10
Date: Mon, 2 Jan 2023 13:01:32 +0100	[thread overview]
Message-ID: <Y7LHnOTNQ4IBikVP@pevik> (raw)
In-Reply-To: <1672132813-26636-2-git-send-email-xuyang2018.jy@fujitsu.com>

Hi Xu,

> We have raised the minimal kernel version from 3.0 to 3.10,
> so remove these useless check.
s/check/checks/

...
> diff --git a/testcases/kernel/syscalls/fallocate/fallocate04.c b/testcases/kernel/syscalls/fallocate/fallocate04.c
> index 0014241da..ff372a9bf 100644
> --- a/testcases/kernel/syscalls/fallocate/fallocate04.c
> +++ b/testcases/kernel/syscalls/fallocate/fallocate04.c
> @@ -121,13 +121,8 @@ static void test02(void)
>  			tst_brk(TFAIL | TERRNO,
>  				 "fallocate() or lseek() failed");
>  		}
> -		if (tst_kvercmp(3, 1, 0) < 0) {
> -			tst_res(TINFO, "lseek() doesn't support SEEK_HOLE, "
> -				 "this is expected for < 3.1 kernels");
> -		} else {
> -			tst_brk(TBROK | TERRNO,
> -				 "lseek() doesn't support SEEK_HOLE");
> -		}
> +		tst_brk(TBROK | TERRNO,
> +			"lseek() doesn't support SEEK_HOLE");
This can be on single line.

...
> diff --git a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv07.c b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv07.c
> index f4bca5ec8..d2d1a882a 100644
> --- a/testcases/kernel/syscalls/ipc/msgrcv/msgrcv07.c
> +++ b/testcases/kernel/syscalls/ipc/msgrcv/msgrcv07.c
> @@ -247,8 +247,7 @@ static void setup(void)
>  {
>  	msgkey = GETIPCKEY();

> -	if (tst_kvercmp(3, 8, 0) >= 0)
> -		msg_copy_sup = 1;
> +	msg_copy_sup = 1;
msg_copy_sup = 1 should be moved out of setup:

-static int queue_id = -1, msg_copy_sup;
+static int queue_id = -1, msg_copy_sup = 1;

The rest LGTM.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

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

  reply	other threads:[~2023-01-02 12:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27  9:20 [LTP] [PATCH 1/3] shell: Remove old kernel version check below 3.10 Yang Xu
2022-12-27  9:20 ` [LTP] [PATCH 2/3] Remove old kernel version check when using tst_kvercmp under 3.10 Yang Xu
2023-01-02 12:01   ` Petr Vorel [this message]
2022-12-27  9:20 ` [LTP] [PATCH 3/3] Remove old kernel version check when using min_kver " Yang Xu
2023-01-02 12:04   ` Petr Vorel
2023-01-02  9:37 ` [LTP] [PATCH 1/3] shell: Remove old kernel version check below 3.10 Petr Vorel
2023-01-03  5:39   ` xuyang2018.jy
2023-01-03 18:13   ` Petr Vorel
2023-01-04  4:59     ` xuyang2018.jy

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=Y7LHnOTNQ4IBikVP@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=xuyang2018.jy@fujitsu.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox