cachestat: remove .min_kver from cachestat tests
PATCH 1/1 cachestat: remove .min_kver from cachestat tests
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
--- 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(-)
testcases/kernel/syscalls/cachestat/cachestat01.c +0 -1
@@ -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,
testcases/kernel/syscalls/cachestat/cachestat02.c +0 -1
@@ -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 )},
testcases/kernel/syscalls/cachestat/cachestat03.c +0 -1
@@ -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)},
testcases/kernel/syscalls/cachestat/cachestat04.c +0 -1
@@ -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 []) {
Signature · 5 lines
2.45.2 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Quoted 6 lines · Li Wang
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_cachestatnot supported on your arch
It's ok for me.
Quoted 50 lines
Suggested-by Stephen Bertram <[email protected]>Signed-off-by Li Wang <[email protected]>--- 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(-)testcases/kernel/syscalls/cachestat/cachestat01.c +0
-1@@ -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,testcases/kernel/syscalls/cachestat/cachestat02.c +0
-1@@ -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 )},testcases/kernel/syscalls/cachestat/cachestat03.c +0
-1@@ -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)},testcases/kernel/syscalls/cachestat/cachestat04.c +0
-0
testcases/kernel/syscalls/cachestat/cachestat04.c static void run(void) · line 53
Quoted 7 lines
testcases/kernel/syscalls/cachestat/cachestat04.c +0
-1@@ -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
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Petr Vorel
Reviewed-byHi Li, Andrea,
Quoted 9 lines
Hi!
Quoted 6 lines · Li Wang
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_cachestatnot supported on your arch
+1. Just for sure, tested on 6.4 based SLES 15-SP6 and it works as expected (TCONF)
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
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 9 lines · Petr Vorel
Hi Li, Andrea,
Quoted 6 lines
Hi!
Quoted 3 lines · Li Wang
Removing the kernel version check (.min_kver) from the cachestat tests to allow the test to run on distributions that backport the cachestat syscall.
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines
With no support just skip as TCONF:
../../../../include/lapi/mman.h:40: TCONF: syscall(451)
__NR_cachestatnot 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 <[email protected]>
Pushed, thanks!
Quoted 5 lines
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.
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp