public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] cachestat: remove .min_kver from cachestat tests
@ 2024-07-26  2:44 Li Wang
  2024-07-26  6:04 ` Andrea Cervesato via ltp
  0 siblings, 1 reply; 4+ messages in thread
From: Li Wang @ 2024-07-26  2:44 UTC (permalink / raw)
  To: ltp, andrea.cervesato; +Cc: Stephen Bertram

Removing the kernel version check (.min_kver) from the cachestat
tests to allow the test to run on distributions that backport the
cachestat syscall.

With no support just skip as TCONF:
  ../../../../include/lapi/mman.h:40: TCONF: syscall(451) __NR_cachestat not supported on your arch

Suggested-by: Stephen Bertram <sbertram@redhat.com>
Signed-off-by: Li Wang <liwang@redhat.com>
---
 testcases/kernel/syscalls/cachestat/cachestat01.c | 1 -
 testcases/kernel/syscalls/cachestat/cachestat02.c | 1 -
 testcases/kernel/syscalls/cachestat/cachestat03.c | 1 -
 testcases/kernel/syscalls/cachestat/cachestat04.c | 1 -
 4 files changed, 4 deletions(-)

diff --git a/testcases/kernel/syscalls/cachestat/cachestat01.c b/testcases/kernel/syscalls/cachestat/cachestat01.c
index f3730d773..19ae9655e 100644
--- a/testcases/kernel/syscalls/cachestat/cachestat01.c
+++ b/testcases/kernel/syscalls/cachestat/cachestat01.c
@@ -90,7 +90,6 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.needs_tmpdir = 1,
-	.min_kver = "6.5",
 	.mount_device = 1,
 	.mntpoint = MNTPOINT,
 	.all_filesystems = 1,
diff --git a/testcases/kernel/syscalls/cachestat/cachestat02.c b/testcases/kernel/syscalls/cachestat/cachestat02.c
index 2bb94f133..e168de5a5 100644
--- a/testcases/kernel/syscalls/cachestat/cachestat02.c
+++ b/testcases/kernel/syscalls/cachestat/cachestat02.c
@@ -82,7 +82,6 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.needs_tmpdir = 1,
-	.min_kver = "6.5",
 	.bufs = (struct tst_buffers []) {
 		{&cs, .size = sizeof(struct cachestat)},
 		{&cs_range, .size = sizeof(struct cachestat_range)},
diff --git a/testcases/kernel/syscalls/cachestat/cachestat03.c b/testcases/kernel/syscalls/cachestat/cachestat03.c
index 35f6bdfb3..139745c34 100644
--- a/testcases/kernel/syscalls/cachestat/cachestat03.c
+++ b/testcases/kernel/syscalls/cachestat/cachestat03.c
@@ -70,7 +70,6 @@ static struct tst_test test = {
 	.needs_hugetlbfs = 1,
 	.hugepages = {1, TST_NEEDS},
 	.tcnt = ARRAY_SIZE(tcases),
-	.min_kver = "6.5",
 	.needs_tmpdir = 1,
 	.bufs = (struct tst_buffers []) {
 		{&cs, .size = sizeof(struct cachestat)},
diff --git a/testcases/kernel/syscalls/cachestat/cachestat04.c b/testcases/kernel/syscalls/cachestat/cachestat04.c
index a389c203c..a59494451 100644
--- a/testcases/kernel/syscalls/cachestat/cachestat04.c
+++ b/testcases/kernel/syscalls/cachestat/cachestat04.c
@@ -48,7 +48,6 @@ static void run(void)
 
 static struct tst_test test = {
 	.test_all = run,
-	.min_kver = "6.5",
 	.mount_device = 1,
 	.mntpoint = MNTPOINT,
 	.bufs = (struct tst_buffers []) {
-- 
2.45.2


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] cachestat: remove .min_kver from cachestat tests
  2024-07-26  2:44 [LTP] [PATCH] cachestat: remove .min_kver from cachestat tests Li Wang
@ 2024-07-26  6:04 ` Andrea Cervesato via ltp
  2024-07-26  6:52   ` Petr Vorel
  0 siblings, 1 reply; 4+ messages in thread
From: Andrea Cervesato via ltp @ 2024-07-26  6:04 UTC (permalink / raw)
  To: Li Wang, ltp; +Cc: Stephen Bertram

Hi!

On 7/26/24 04:44, Li Wang wrote:
> Removing the kernel version check (.min_kver) from the cachestat
> tests to allow the test to run on distributions that backport the
> cachestat syscall.
>
> With no support just skip as TCONF:
>    ../../../../include/lapi/mman.h:40: TCONF: syscall(451) __NR_cachestat not supported on your arch

It's ok for me.

Acked-by: Andrea Cervesato <andrea.cervesato@suse.com>

> Suggested-by: Stephen Bertram <sbertram@redhat.com>
> Signed-off-by: Li Wang <liwang@redhat.com>
> ---
>   testcases/kernel/syscalls/cachestat/cachestat01.c | 1 -
>   testcases/kernel/syscalls/cachestat/cachestat02.c | 1 -
>   testcases/kernel/syscalls/cachestat/cachestat03.c | 1 -
>   testcases/kernel/syscalls/cachestat/cachestat04.c | 1 -
>   4 files changed, 4 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/cachestat/cachestat01.c b/testcases/kernel/syscalls/cachestat/cachestat01.c
> index f3730d773..19ae9655e 100644
> --- a/testcases/kernel/syscalls/cachestat/cachestat01.c
> +++ b/testcases/kernel/syscalls/cachestat/cachestat01.c
> @@ -90,7 +90,6 @@ static struct tst_test test = {
>   	.setup = setup,
>   	.cleanup = cleanup,
>   	.needs_tmpdir = 1,
> -	.min_kver = "6.5",
>   	.mount_device = 1,
>   	.mntpoint = MNTPOINT,
>   	.all_filesystems = 1,
> diff --git a/testcases/kernel/syscalls/cachestat/cachestat02.c b/testcases/kernel/syscalls/cachestat/cachestat02.c
> index 2bb94f133..e168de5a5 100644
> --- a/testcases/kernel/syscalls/cachestat/cachestat02.c
> +++ b/testcases/kernel/syscalls/cachestat/cachestat02.c
> @@ -82,7 +82,6 @@ static struct tst_test test = {
>   	.setup = setup,
>   	.cleanup = cleanup,
>   	.needs_tmpdir = 1,
> -	.min_kver = "6.5",
>   	.bufs = (struct tst_buffers []) {
>   		{&cs, .size = sizeof(struct cachestat)},
>   		{&cs_range, .size = sizeof(struct cachestat_range)},
> diff --git a/testcases/kernel/syscalls/cachestat/cachestat03.c b/testcases/kernel/syscalls/cachestat/cachestat03.c
> index 35f6bdfb3..139745c34 100644
> --- a/testcases/kernel/syscalls/cachestat/cachestat03.c
> +++ b/testcases/kernel/syscalls/cachestat/cachestat03.c
> @@ -70,7 +70,6 @@ static struct tst_test test = {
>   	.needs_hugetlbfs = 1,
>   	.hugepages = {1, TST_NEEDS},
>   	.tcnt = ARRAY_SIZE(tcases),
> -	.min_kver = "6.5",
>   	.needs_tmpdir = 1,
>   	.bufs = (struct tst_buffers []) {
>   		{&cs, .size = sizeof(struct cachestat)},
> diff --git a/testcases/kernel/syscalls/cachestat/cachestat04.c b/testcases/kernel/syscalls/cachestat/cachestat04.c
> index a389c203c..a59494451 100644
> --- a/testcases/kernel/syscalls/cachestat/cachestat04.c
> +++ b/testcases/kernel/syscalls/cachestat/cachestat04.c
> @@ -48,7 +48,6 @@ static void run(void)
>   
>   static struct tst_test test = {
>   	.test_all = run,
> -	.min_kver = "6.5",
>   	.mount_device = 1,
>   	.mntpoint = MNTPOINT,
>   	.bufs = (struct tst_buffers []) {

Andrea


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] cachestat: remove .min_kver from cachestat tests
  2024-07-26  6:04 ` Andrea Cervesato via ltp
@ 2024-07-26  6:52   ` Petr Vorel
  2024-07-26  7:52     ` Li Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2024-07-26  6:52 UTC (permalink / raw)
  To: Andrea Cervesato; +Cc: Stephen Bertram, ltp

Hi Li, Andrea,

> Hi!

> On 7/26/24 04:44, Li Wang wrote:
> > Removing the kernel version check (.min_kver) from the cachestat
> > tests to allow the test to run on distributions that backport the
> > cachestat syscall.

> > With no support just skip as TCONF:
> >    ../../../../include/lapi/mman.h:40: TCONF: syscall(451) __NR_cachestat not supported on your arch

+1. Just for sure, tested on 6.4 based SLES 15-SP6 and it works as expected (TCONF)

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

Maybe we should document, that ideally we should try to avoid .min_kver unless
really needed. It's also kind of a documentation, but kernel version can be
specified in metadata documentation.

Kind regards,
Petr

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] cachestat: remove .min_kver from cachestat tests
  2024-07-26  6:52   ` Petr Vorel
@ 2024-07-26  7:52     ` Li Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Li Wang @ 2024-07-26  7:52 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Stephen Bertram, ltp

On Fri, Jul 26, 2024 at 2:52 PM Petr Vorel <pvorel@suse.cz> wrote:

> Hi Li, Andrea,
>
> > Hi!
>
> > On 7/26/24 04:44, Li Wang wrote:
> > > Removing the kernel version check (.min_kver) from the cachestat
> > > tests to allow the test to run on distributions that backport the
> > > cachestat syscall.
>
> > > With no support just skip as TCONF:
> > >    ../../../../include/lapi/mman.h:40: TCONF: syscall(451)
> __NR_cachestat not supported on your arch
>
> +1. Just for sure, tested on 6.4 based SLES 15-SP6 and it works as
> expected (TCONF)
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>

Pushed, thanks!


> Maybe we should document, that ideally we should try to avoid .min_kver
> unless
> really needed. It's also kind of a documentation, but kernel version can be
> specified in metadata documentation.
>

Yeah, especially new feature tests should be avoided .min_kver,
(can completely replace by support_syscallname() function in setup)
as many official distros always backport new things to customers.

But for other purposes, we still need that.


-- 
Regards,
Li Wang

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-26  7:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26  2:44 [LTP] [PATCH] cachestat: remove .min_kver from cachestat tests Li Wang
2024-07-26  6:04 ` Andrea Cervesato via ltp
2024-07-26  6:52   ` Petr Vorel
2024-07-26  7:52     ` Li Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox