public inbox for ltp@lists.linux.it
 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 5/5] setsockopt0[38]: Use tst_is_compat_mode()
Date: Tue, 21 May 2024 17:12:30 +0200	[thread overview]
Message-ID: <Zky53rMVsqvgTCxG@yuki> (raw)
In-Reply-To: <20240521105348.126316-6-pvorel@suse.cz>

Hi!
>  testcases/kernel/syscalls/setsockopt/setsockopt03.c | 5 ++---
>  testcases/kernel/syscalls/setsockopt/setsockopt08.c | 6 ++----
>  2 files changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt03.c b/testcases/kernel/syscalls/setsockopt/setsockopt03.c
> index 7a1458277..d910280c8 100644
> --- a/testcases/kernel/syscalls/setsockopt/setsockopt03.c
> +++ b/testcases/kernel/syscalls/setsockopt/setsockopt03.c
> @@ -48,9 +48,8 @@ struct payload {
>  
>  static void setup(void)
>  {
> -	if (tst_kernel_bits() == 32 || sizeof(long) > 4)
> -		tst_res(TCONF,
> -			"The vulnerability was only present in 32-bit compat mode");
> +	if (!tst_is_compat_mode())
> +		tst_res(TCONF, "The vulnerability was only present in 32-bit compat mode");
>  }
>  
>  static void run(void)
> diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt08.c b/testcases/kernel/syscalls/setsockopt/setsockopt08.c
> index 7f8243de1..3b7bd8482 100644
> --- a/testcases/kernel/syscalls/setsockopt/setsockopt08.c
> +++ b/testcases/kernel/syscalls/setsockopt/setsockopt08.c
> @@ -95,10 +95,8 @@ static void *buffer;
>  
>  void setup(void)
>  {
> -	if (tst_kernel_bits() == 32 || sizeof(long) > 4) {
> -		tst_res(TINFO,
> -			"The vulnerability was only present in 32-bit compat mode");
> -	}
> +	if (!tst_is_compat_mode())
> +		tst_res(TINFO, "The vulnerability was only present in 32-bit compat mode");
>  
>  	tst_setup_netns();
>  }

I guess this is something that should be looked into after the release,
either we will need .needs_compat flag or relax the condtions...

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2024-05-21 15:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21 10:53 [LTP] [PATCH v2 0/5] .needs_abi_bits + rewrite fork14 to new API Petr Vorel
2024-05-21 10:53 ` [LTP] [PATCH v2 1/5] tst_kernel.h: Convert docs to sphinx Petr Vorel
2024-05-21 12:06   ` Andrea Cervesato via ltp
2024-05-21 10:53 ` [LTP] [PATCH v2 2/5] lib: Add .needs_abi_bits Petr Vorel
2024-05-21 15:11   ` Cyril Hrubis
2024-05-21 10:53 ` [LTP] [PATCH v2 3/5] Refactor fork14 using new LTP API Petr Vorel
2024-05-21 12:03   ` Andrea Cervesato via ltp
2024-05-21 10:53 ` [LTP] [PATCH v2 4/5] sbrk03: Convert to detect support with flags Petr Vorel
2024-05-21 15:12   ` Cyril Hrubis
2024-05-21 10:53 ` [LTP] [PATCH v2 5/5] setsockopt0[38]: Use tst_is_compat_mode() Petr Vorel
2024-05-21 15:12   ` Cyril Hrubis [this message]
2024-05-21 18:34     ` Petr Vorel
2024-11-26 14:35     ` Petr Vorel
2024-11-26 15:02       ` Cyril Hrubis
2024-11-26 17:47         ` 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=Zky53rMVsqvgTCxG@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox