lib/tst_kvercmp: Remove old distnames
PATCH v3 1/7 lib/tst_kvercmp: Remove old distnames
The oldest supported test distributions kernel version is 3.10[1], so these old version check is useless.
[1]https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions
--- lib/tst_kvercmp.c | 12 ------------ testcases/kernel/syscalls/inotify/inotify04.c | 13 +++---------- .../kernel/tracing/dynamic_debug/dynamic_debug01.sh | 3 +-- 3 files changed, 4 insertions(+), 24 deletions(-)
lib/tst_kvercmp.c +0 -12
@@ -134,18 +134,6 @@ const char *tst_kvcmp_distname(const char *kver)char *ret = distname;char *p = distname; -if (strstr (kver,".el5uek" )) -return "OL5UEK" ; - -if (strstr (kver,".el5" )) -return "RHEL5" ; - -if (strstr (kver,".el6uek" )) -return "OL6UEK" ; - -if (strstr (kver,".el6" )) -return "RHEL6" ; -if (strstr (kver,".el7" ))return "RHEL7" ;
testcases/kernel/syscalls/inotify/inotify04.c +3 -10
@@ -50,11 +50,6 @@ char event_buf[EVENT_BUF_LEN];int fd_notify, reap_wd_file, reap_wd_dir, wd_dir, wd_file; -static struct tst_kern_exv kvers[] = { - {"RHEL5" ,"2.6.18-132" }, - {NULL ,NULL }, -}; -static void cleanup (void ) {if (reap_wd_dir &&myinotify_rm_watch (fd_notify, wd_dir) ==-1 )
@@ -110,11 +105,9 @@ void verify_inotify(void)* This isn't well documented in inotify(7), but it's intuitive if you * understand how Unix works. */ -if (tst_kvercmp2 (2 ,6 ,25 , kvers) >=0 ) { - event_set[test_cnt].mask =IN_ATTRIB ; -strcpy (event_set[test_cnt].name,"" ); - test_cnt++; - } + event_set[test_cnt].mask =IN_ATTRIB ; +strcpy (event_set[test_cnt].name,"" ); + test_cnt++; event_set[test_cnt].mask =IN_DELETE_SELF ;strcpy (event_set[test_cnt].name,TEST_FILE );
testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh +1 -2
@@ -59,8 +59,7 @@ setup() tst_brk TBROK "Unable to find $DEBUGFS_CONTROL" fi - # Both patches with changes were backported to RHEL6 kernel 2.6.32-547 - if tst_kvcmp -ge '3.4 RHEL6:2.6.32-547' ; then + if tst_kvcmp -ge 3.4 ; then NEW_INTERFACE=1 EMPTY_FLAG="=_" fi
Signature · 5 lines
2.27.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v3 2/7 shell: Remove old kernel version check
The oldest supported test distribution kernel version is 3.0[1], we don't need these checks. If users want to run these cases on old kernel, they can use old release tag.
Also, cgroup_regression_test.sh needs to remove obsolete test6 because it only run under old kernel. But it is a bit complex, so do it in a separate patch.
[1]https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions
--- testcases/commands/mkswap/mkswap01.sh | 7 +---- .../kernel/containers/netns/netns_sysfs.sh | 4 --- .../cgroup/cgroup_regression_test.sh | 4 --- .../kernel/controllers/cpuset/cpuset_funcs.sh | 9 ------ .../memcg/functional/memcg_limit_in_bytes.sh | 4 --- .../memcg_memsw_limit_in_bytes_test.sh | 6 +--- .../memcg/regression/memcg_regression_test.sh | 4 --- .../kernel/power_management/pm_include.sh | 24 ++++++---------- .../kernel/power_management/runpwtests01.sh | 2 +- .../kernel/power_management/runpwtests02.sh | 2 +- .../kernel/power_management/runpwtests03.sh | 2 +- .../kernel/power_management/runpwtests04.sh | 2 +- .../kernel/power_management/runpwtests05.sh | 11 ++------ .../kernel/power_management/runpwtests06.sh | 8 ++---- .../runpwtests_exclusive01.sh | 11 ++------ .../runpwtests_exclusive02.sh | 8 ++---- .../runpwtests_exclusive03.sh | 11 ++------ .../runpwtests_exclusive04.sh | 2 +- .../runpwtests_exclusive05.sh | 11 ++------ .../security/cap_bound/run_capbounds.sh | 6 ---- .../tracing/dynamic_debug/dynamic_debug01.sh | 4 --- .../ftrace_stress/ftrace_trace_clock.sh | 28 ++++--------------- .../ftrace_stress/ftrace_trace_stat.sh | 6 ---- .../multicast/grp-operation/mcast-lib.sh | 1 - 24 files changed, 37 insertions(+), 140 deletions(-)
testcases/commands/mkswap/mkswap01.sh +1 -6
@@ -51,12 +51,7 @@ mkswap_verify() local pagesize=$PAGE_SIZE fi - if tst_kvcmp -lt "2.6.35" && [ -n "$dev_file" ]; then - tst_res TINFO "Waiting for $dev_file to appear" - tst_sleep 100ms - else - TST_RETRY_FUNC "check_for_file $dev_file" 0 - fi + TST_RETRY_FUNC "check_for_file $dev_file" 0 swapon $swapfile 2>/dev/null
testcases/kernel/containers/netns/netns_sysfs.sh +0 -4
@@ -18,10 +18,6 @@ do_setup() DUMMYDEV_HOST="dummy_test0" DUMMYDEV="dummy_test1" - if tst_kvcmp -lt "2.6.35"; then - tst_brk TCONF "sysfs is not mount namespace aware for kernels older than 2.6.35" - fi - setns_check if [ $? -eq 32 ]; then tst_brk TCONF "setns not supported"
testcases/kernel/controllers/cgroup/cgroup_regression_test.sh +0 -4
@@ -16,10 +16,6 @@ do_setup() { mkdir cgroup/ - if tst_kvcmp -lt "2.6.29"; then - tst_brk TCONF ignored "test must be run with kernel 2.6.29 or newer" - fi - if [ ! -f /proc/cgroups ]; then tst_brk TCONF ignored "Kernel does not support for control groups; skipping testcases"; fi
testcases/kernel/controllers/cpuset/cpuset_funcs.sh +0 -9
@@ -79,13 +79,6 @@ cpuset_log_error() done < "$1" } -version_check() -{ - if tst_kvcmp -lt "2.6.28"; then - tst_brkm TCONF "kernel is below 2.6.28" - fi -} - ncpus_check() { if [ $NR_CPUS -lt $1 ]; then
@@ -150,8 +143,6 @@ check() cpuset_check - version_check - ncpus_check ${1:-2} nnodes_check ${2:-2}
testcases/kernel/controllers/memcg/functional/memcg_limit_in_bytes.sh +0 -4
@@ -88,11 +88,7 @@ test11() test12() { tst_res TINFO "Test invalid memory.limit_in_bytes" - if tst_kvcmp -lt "2.6.31"; then - EXPECT_FAIL echo -1 \> memory.limit_in_bytes - else EXPECT_PASS echo -1 \> memory.limit_in_bytes - fi } test13()
testcases/kernel/controllers/memcg/functional/memcg_memsw_limit_in_bytes_test.sh +1 -5
@@ -56,11 +56,7 @@ test9() ROD echo 10M \> memory.limit_in_bytes - if tst_kvcmp -lt "2.6.31"; then - EXPECT_FAIL echo -1 \> memory.memsw.limit_in_bytes - else - EXPECT_PASS echo -1 \> memory.memsw.limit_in_bytes - fi + EXPECT_PASS echo -1 \> memory.memsw.limit_in_bytes } test10()
testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh +0 -4
@@ -60,10 +60,6 @@ check_kernel_bug() setup() { - if tst_kvcmp -lt "2.6.30"; then - tst_brk TBROK "Test should be run with kernel 2.6.30 or newer" - fi - cgroup_require "memory" cgroup_version=$(cgroup_get_version "memory") mount_point=$(cgroup_get_mountpoint "memory")
testcases/kernel/power_management/pm_include.sh +9 -15
@@ -15,21 +15,15 @@ cleanup() { fi } -check_kervel_arch() { - # Checking required kernel version and architecture - if tst_kvcmp -lt "2.6.21"; then - tst_brkm TCONF "Kernel version not supported; not " \ - "running testcases" - else - case "$(uname -m)" in - i[4-6]86|x86_64) - ;; - *) - tst_brkm TCONF "Arch not supported; not running " \ - "testcases" - ;; - esac - fi +check_arch() { + case "$(uname -m)" in + i[4-6]86|x86_64) + ;; + *) + tst_brkm TCONF "Arch not supported; not running " \ + "testcases" + ;; + esac } check_config_options() {
testcases/kernel/power_management/runpwtests01.sh +1 -1
@@ -47,7 +47,7 @@ test_sched_mc() { } # Checking test environment -check_kervel_arch +check_arch # Checking sched_mc sysfs interface multi_socket=$(is_multi_socket)
testcases/kernel/power_management/runpwtests02.sh +1 -1
@@ -46,7 +46,7 @@ test_sched_smt() { } # Checking test environment -check_kervel_arch +check_arch # Check sched_smt_power_savings interface on HT machines hyper_threaded=$(is_hyper_threaded)
testcases/kernel/power_management/runpwtests03.sh +1 -1
@@ -145,7 +145,7 @@ pwkm_load_unload() { } # Checking test environment -check_kervel_arch +check_arch # Checking cpufreq sysfs interface files if [ ! -d /sys/devices/system/cpu/cpu0/cpufreq ] ; then
testcases/kernel/power_management/runpwtests04.sh +1 -1
@@ -46,7 +46,7 @@ check_cpuidle_sysfs_files() { } # Checking test environment -check_kervel_arch +check_arch # Checking cpuidle sysfs interface files if check_cpuidle_sysfs_files ; then
testcases/kernel/power_management/runpwtests05.sh +3 -8
@@ -25,15 +25,10 @@ export TST_TOTAL=2 . pm_include.sh # Checking test environment -check_kervel_arch +check_arch -if tst_kvcmp -gt "2.6.29"; then - max_sched_mc=2 - max_sched_smt=2 -else - max_sched_mc=1 - max_sched_smt=1 -fi +max_sched_mc=2 +max_sched_smt=2 tst_require_cmds python3
testcases/kernel/power_management/runpwtests06.sh +2 -6
@@ -45,13 +45,9 @@ test_timer_migration() { } # Checking test environment -check_kervel_arch +check_arch -if tst_kvcmp -ge "2.6.31"; then - timer_migr_support_compatible=0 -else - timer_migr_support_compatible=1 -fi +timer_migr_support_compatible=0 if [ $timer_migr_support_compatible -eq 1 ]; then tst_brkm TCONF "Kernel version does not support Timer migration"
testcases/kernel/power_management/runpwtests_exclusive01.sh +3 -8
@@ -25,15 +25,10 @@ export TST_TOTAL=2 . pm_include.sh # Checking test environment -check_kervel_arch +check_arch -if tst_kvcmp -gt "2.6.29"; then - max_sched_mc=2 - max_sched_smt=2 -else - max_sched_mc=1 - max_sched_smt=1 -fi +max_sched_mc=2 +max_sched_smt=2 tst_require_cmds python3
testcases/kernel/power_management/runpwtests_exclusive02.sh +2 -6
@@ -25,13 +25,9 @@ export TST_TOTAL=1 . pm_include.sh # Checking test environment -check_kervel_arch +check_arch -if tst_kvcmp -gt "2.6.29"; then - max_sched_smt=2 -else - max_sched_smt=1 -fi +max_sched_smt=2 tst_require_cmds python3
testcases/kernel/power_management/runpwtests_exclusive03.sh +3 -8
@@ -25,15 +25,10 @@ export TST_TOTAL=2 . pm_include.sh # Checking test environment -check_kervel_arch +check_arch -if tst_kvcmp -gt "2.6.29"; then - max_sched_mc=2 - max_sched_smt=2 -else - max_sched_mc=1 - max_sched_smt=1 -fi +max_sched_mc=2 +max_sched_smt=2 tst_require_cmds python3
testcases/kernel/power_management/runpwtests_exclusive04.sh +1 -1
@@ -25,7 +25,7 @@ export TST_TOTAL=2 . pm_include.sh # Checking test environment -check_kervel_arch +check_arch tst_require_cmds python3
testcases/kernel/power_management/runpwtests_exclusive05.sh +3 -8
@@ -25,15 +25,10 @@ export TST_TOTAL=2 . pm_include.sh # Checking test environment -check_kervel_arch +check_arch -if tst_kvcmp -gt "2.6.29"; then - max_sched_mc=2 - max_sched_smt=2 -else - max_sched_mc=1 - max_sched_smt=1 -fi +max_sched_mc=2 +max_sched_smt=2 tst_require_cmds python3
testcases/kernel/security/cap_bound/run_capbounds.sh +0 -6
@@ -19,12 +19,6 @@ ## ## ################################################################################ -if tst_kvcmp -lt "2.6.25"; then - tst_resm TCONF "System kernel version is less than 2.6.25" - tst_resm TCONF "Cannot execute test" - exit 32 -fi - echo "testing bounding set reading" exit_code=0
testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh +0 -4
@@ -46,10 +46,6 @@ mount_debugfs() setup() { - if tst_kvcmp -lt 2.6.30 ; then - tst_brk TCONF "Dynamic debug is available since version 2.6.30" - fi - mount_debugfs if [ ! -d "$DEBUGFS_PATH/dynamic_debug" ] ; then tst_brk TBROK "Unable to find $DEBUGFS_PATH/dynamic_debug"
testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_clock.sh +5 -23
@@ -15,31 +15,13 @@ LOOP=400 -# In kernel which is older than 2.6.32, we set global clock -# via trace_options. -if tst_kvcmp -lt "2.6.32"; then - old_kernel=1 -else - old_kernel=0 -fi - while true; do i=0 - if [ $old_kernel -eq 1 ]; then - while [ $i -lt $LOOP ]; do - echo 1 > "$TRACING_PATH"/options/global-clock - echo 0 > "$TRACING_PATH"/options/global-clock - i=$((i + 1)) - done - else - while [ $i -lt $LOOP ]; do - echo local > "$TRACING_PATH"/trace_clock - echo global > "$TRACING_PATH"/trace_clock - i=$((i + 1)) - done - - fi - + while [ $i -lt $LOOP ]; do + echo local > "$TRACING_PATH"/trace_clock + echo global > "$TRACING_PATH"/trace_clock + i=$((i + 1)) + done sleep 1 done
testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_stat.sh +0 -6
@@ -22,12 +22,6 @@ if [ ! -e "$TRACING_PATH"/function_profile_enabled ]; then should_skip=1 fi -# For kernels older than 2.6.36, this testcase can result in -# divide-by-zero kernel bug -if tst_kvcmp -lt "2.6.36"; then - should_skip=1 -fi - while true; do if [ $should_skip -eq 1 ]; then sleep 2
testcases/network/stress/multicast/grp-operation/mcast-lib.sh +0 -1
@@ -27,7 +27,6 @@ mcast_setup4() mcast_setup6() { local default_mld_max_msf=64 - tst_kvcmp -lt '2.6.15' && default_mld_max_msf=10 SYSCTL_ALL_FORCE_MLD_VERSION=$(sysctl -b net.ipv6.conf.all.force_mld_version) SYSCTL_FORCE_MLD_VERSION=$(sysctl -b net.ipv6.conf.$(tst_iface).force_mld_version)
Signature · 5 lines
2.27.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v3 2/7] shell: Remove old kernel version check
Hi Xu,
...
Quoted 17 lines
+++
b/testcases/kernel/power_management/pm_include.shtestcases/kernel/power_management/pm_include.sh +0
-12@@ -15,21 +15,15 @@ cleanup() { fi } -check_kervel_arch() { - # Checking required kernel version and architecture - if tst_kvcmp -lt "2.6.21"; then - tst_brkm TCONF "Kernel version not supported; not " \ - "running testcases" - else - case "$(uname -m)" in - i[4-6]86|x86_64) - ;; - *) - tst_brkm TCONF "Arch not supported; not running " \ - "testcases"
testcases/kernel/power_management/pm_include.sh cleanup() { · line 24
Quoted 10 lines
testcases/kernel/power_management/pm_include.sh +7
-3- ;; - esac - fi +check_arch() { + case "$(uname -m)" in + i[4-6]86|x86_64) + ;; + *) + tst_brkm TCONF "Arch not supported; not running " \ + "testcases"
Could you please put this on single line?
tst_brkm TCONF "Arch not supported; not running testcases"
Can be done before merge.
Otherwise LGTM.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v3 3/7 cgroup_regression_test.sh: Remove obselte test_6
In reply to Yang Xutest_6 is a test case when kernel version is less than 3.0. Since the oldest supported kernel version is 3.0, so the case is useless. Remove it.
Also rename test9 to test6. modify TST_CNT.
---
.../kernel/controllers/cgroup/.gitignore | 1 -
.../cgroup/cgroup_regression_6_1.sh | 4 +-
.../cgroup/cgroup_regression_6_2.c | 36 ------------
...ession_9_2.sh => cgroup_regression_6_2.sh} | 0
.../cgroup/cgroup_regression_9_1.sh | 12 ----
.../cgroup/cgroup_regression_test.sh | 56 ++++---------------
6 files changed, 12 insertions(+), 97 deletions(-)
delete mode 100644 testcases/kernel/controllers/cgroup/cgroup_regression_6_2.c
rename testcases/kernel/controllers/cgroup/{cgroup_regression_9_2.sh => cgroup_regression_6_2.sh} (100%)
delete mode 100755 testcases/kernel/controllers/cgroup/cgroup_regression_9_1.shtestcases/kernel/controllers/cgroup/.gitignore +0 -1
@@ -1,5 +1,4 @@ /cgroup_regression_fork_processes /cgroup_regression_getdelays -/cgroup_regression_6_2 /cgroup_core01 /cgroup_core02
testcases/kernel/controllers/cgroup/cgroup_regression_6_1.sh +2 -2
@@ -6,7 +6,7 @@ trap exit USR1 while true; do - mount -t cgroup -o ns xxx cgroup/ > /dev/null 2>&1 - rmdir cgroup/[1-9]* > /dev/null 2>&1 + mount -t cgroup xxx cgroup/ > /dev/null 2>&1 + cat cgroup/release_agent > /dev/null 2>&1 umount cgroup/ > /dev/null 2>&1 done
testcases/kernel/controllers/cgroup/cgroup_regression_6_2.c deleted +0 -36
@@ -1,36 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* -* Copyright (c) 2009 FUJITSU LIMITED -* Author: Li Zefan <[email protected]> -*/ - -#define _GNU_SOURCE - -#include <sched.h> -#include <stdlib.h> -#include <unistd.h> -#include "test.h" - -#define DEFAULT_USEC 30000 - -int foo (void __attribute__ ((unused)) * arg) -{ -return 0 ; -} - -int main (int argc,char **argv) -{ -int usec; - -if (argc ==2 ) - usec =atoi (argv[1 ]); -else - usec =DEFAULT_USEC ; - -while (1 ) { -usleep (usec); -ltp_clone_quick (CLONE_NEWNS , foo,NULL ); - } - -tst_exit (); -}
testcases/kernel/controllers/cgroup/cgroup_regression_6_2.sh renamed from testcases/kernel/controllers/cgroup/cgroup_regression_9_2.sh +0 -0
testcases/kernel/controllers/cgroup/cgroup_regression_9_1.sh deleted +0 -12
@@ -1,12 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (c) 2009 FUJITSU LIMITED -# Author: Li Zefan <[email protected]> - -trap exit USR1 - -while true; do - mount -t cgroup xxx cgroup/ > /dev/null 2>&1 - cat cgroup/release_agent > /dev/null 2>&1 - umount cgroup/ > /dev/null 2>&1 -done
testcases/kernel/controllers/cgroup/cgroup_regression_test.sh +10 -46
84 lines not on this page · raw message
Signature · 5 lines
2.27.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v3 3/7] cgroup_regression_test.sh: Remove obselte test_6
Quoted 3 lines
test_6is a test case when kernel version is less than 3.0. Since the oldest supported kernel version is 3.0, so the case is useless. Remove it.
Quoted 1 line
Also rename test9 to test6. modify
TST_CNT.
I wonder if rename is a good thing to do, because it complicates git history. I'd keep old names.
Also in the past we didn't rename, e.g. in 1c44244849 ("getuid, getgid, setuid,
setgid: fixed 16-bit versions") testcases/kernel/syscalls/getuid/getuid02.c was renamed to testcases/kernel/syscalls/geteuid/geteuid02.c to match the new test coverage, but testcases/kernel/syscalls/getuid/getuid03.c stayed the same (not renamed to testcases/kernel/syscalls/getuid/getuid02.c, which was then free).
Or maybe better example: testcases/kernel/syscalls/kill/kill01.c got deleted in eafdc5dd83 ("syscalls/kill01: Remove it"), but test names did not shift.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v3 3/7] cgroup_regression_test.sh: Remove obselte test_6
Hi Petr
Quoted 16 lines
Quoted 3 lines
test_6is a test case when kernel version is less than 3.0. Since the oldest supported kernel version is 3.0, so the case is useless. Remove it.Acked-by Petr Vorel <[email protected]>Quoted 1 line
Also rename test9 to test6. modify
TST_CNT.I wonder if rename is a good thing to do, because it complicates git history. I'd keep old names.
Also in the past we didn't rename, e.g. in1c44244849("getuid, getgid, setuid,
setgid: fixed 16-bit versions")testcases/kernel/syscalls/getuid/getuid02.cwas renamed totestcases/kernel/syscalls/geteuid/geteuid02.cto match the new test coverage, buttestcases/kernel/syscalls/getuid/getuid03.cstayed the same (not renamed totestcases/kernel/syscalls/getuid/getuid02.c, which was then free).
Quoted 2 lines
Or maybe better example:
testcases/kernel/syscalls/kill/kill01.cgot deleted ineafdc5dd83("syscalls/kill01: Remove it"), but test names did not shift.
I can understand, but I used the same renamed way because we did this case for test_5 in 2019[1].
[1]https://github.com/linux-test-project/ltp/commit/9b8f841ced26cd0d19dc9a007d0efd941929abde
Best Regards
Yang Xu
Quoted 3 lines
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Petr Vorel
Reviewed-byRe: [LTP] [PATCH v3 3/7] cgroup_regression_test.sh: Remove obselte test_6
Hi Xu,
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
test_6is a test case when kernel version is less than 3.0. Since the oldest supported kernel version is 3.0, so the case is useless. Remove it.
It would be worth to note here:CONFIG_CGROUP_NS is not supported in kernel >= 3.0
Because tests have comments with kernel versions which are a bit misleading (all comments have 2.6.x).
Also note typo on the subject: obselte => obsolete.
Quoted 10 lines
Quoted 9 lines
Quoted 1 line
Also rename test9 to test6. modify
TST_CNT.I wonder if rename is a good thing to do, because it complicates git history. I'd keep old names.
Also in the past we didn't rename, e.g. in1c44244849("getuid, getgid, setuid,
setgid: fixed 16-bit versions")testcases/kernel/syscalls/getuid/getuid02.cwas renamed totestcases/kernel/syscalls/geteuid/geteuid02.cto match the new test coverage, buttestcases/kernel/syscalls/getuid/getuid03.cstayed the same (not renamed totestcases/kernel/syscalls/getuid/getuid02.c, which was then free).
Quoted 7 lines
Quoted 2 lines
Or maybe better example:
testcases/kernel/syscalls/kill/kill01.cgot deleted ineafdc5dd83("syscalls/kill01: Remove it"), but test names did not shift.I can understand, but I used the same renamed way because we did this case for
test_5in 2019[1].[1]https://github.com/linux-test-project/ltp/commit/9b8f841ced26cd0d19dc9a007d0efd941929abde
OK, due TST_CNT it must be shifted, I'm sorry.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v3 4/7 doc/shell-test-api.txt
In reply to Yang XuUpdate tst_kvcmp usage.
--- doc/shell-test-api.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
doc/shell-test-api.txt +6 -4
@@ -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 +ie 2.6.8 . [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 # Exit the test if kernel is newer than 3.8 and older than 4.0.1
Signature · 5 lines
2.27.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v3 4/7] doc/shell-test-api.txt
Hi Xu,
Quoted 12 lines
Update
tst_kvcmpusage.Signed-off-by Yang Xu <[email protected]>--- doc/shell-test-api.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)doc/shell-test-api.txt +0
-0
doc/shell-test-api.txt tst_kvcmp · line 656
Quoted 6 lines
doc/shell-test-api.txt +2
-1@@ -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)
doc/shell-test-api.txt tst_kvcmp · line 657
Quoted 1 line
doc/shell-test-api.txt +1
-0+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/[email protected]/
(I also pinged few people + [email protected] in the patchset to get some audience for minimal version - maybe we could raise higher.)
doc/shell-test-api.txt tst_kvcmp · line 664
Quoted 9 lines
doc/shell-test-api.txt +3
-3[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.
for this part only.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v3 5/7 Remove old kernel version check in C case when using tst_kvercmp
In reply to Yang XuThe oldest supported kernel version is 3.0, so remove them.
--- include/lapi/common_timers.h | 5 --- .../kernel/containers/mqns/mqns_helper.h | 3 -- .../kernel/containers/pidns/pidns_helper.h | 3 -- testcases/kernel/containers/utsname/utstest.c | 3 -- .../kernel/device-drivers/acpi/ltp_acpi.c | 5 --- .../block/block_dev_user/block_dev.c | 5 --- .../device-drivers/pci/tpci_user/tpci.c | 5 --- .../device-drivers/tbio/tbio_user/tbio.c | 5 --- .../kernel/device-drivers/uaccess/uaccess.c | 5 --- testcases/kernel/mem/vma/vma01.c | 8 +--- .../power_management/pm_get_sched_values.c | 20 +-------- .../kernel/syscalls/adjtimex/adjtimex02.c | 2 +- testcases/kernel/syscalls/clone/clone08.c | 43 ------------------- testcases/kernel/syscalls/eventfd/eventfd01.c | 3 -- .../kernel/syscalls/eventfd2/eventfd2_01.c | 4 -- .../kernel/syscalls/eventfd2/eventfd2_02.c | 4 -- .../kernel/syscalls/eventfd2/eventfd2_03.c | 5 --- .../kernel/syscalls/faccessat/faccessat01.c | 4 -- .../kernel/syscalls/fallocate/fallocate04.c | 5 --- .../kernel/syscalls/fchownat/fchownat01.c | 3 -- .../kernel/syscalls/fchownat/fchownat02.c | 3 -- testcases/kernel/syscalls/fcntl/fcntl29.c | 4 -- testcases/kernel/syscalls/fcntl/fcntl30.c | 4 -- testcases/kernel/syscalls/fcntl/fcntl31.c | 32 +++----------- .../kernel/syscalls/fgetxattr/fgetxattr02.c | 8 ---- testcases/kernel/syscalls/fstatat/fstatat01.c | 3 -- .../kernel/syscalls/futimesat/futimesat01.c | 3 -- testcases/kernel/syscalls/getcpu/getcpu01.c | 7 --- .../kernel/syscalls/getxattr/getxattr02.c | 11 +---- testcases/kernel/syscalls/inotify/inotify02.c | 15 ------- testcases/kernel/syscalls/inotify/inotify04.c | 14 ------ testcases/kernel/syscalls/ioperm/ioperm01.c | 11 +---- testcases/kernel/syscalls/ioperm/ioperm02.c | 15 +------ testcases/kernel/syscalls/linkat/linkat01.c | 6 --- testcases/kernel/syscalls/linkat/linkat02.c | 3 -- testcases/kernel/syscalls/madvise/madvise02.c | 7 --- .../syscalls/migrate_pages/migrate_pages02.c | 3 -- testcases/kernel/syscalls/mincore/mincore01.c | 6 --- testcases/kernel/syscalls/mknodat/mknodat01.c | 3 -- testcases/kernel/syscalls/mknodat/mknodat02.c | 5 --- testcases/kernel/syscalls/mlock/mlock02.c | 31 ------------- .../kernel/syscalls/mlockall/mlockall02.c | 32 ++++++-------- .../kernel/syscalls/move_pages/move_pages09.c | 23 ++-------- .../syscalls/move_pages/move_pages_support.c | 7 ++- testcases/kernel/syscalls/munmap/munmap03.c | 7 --- testcases/kernel/syscalls/open/open12.c | 22 ---------- testcases/kernel/syscalls/open/open13.c | 5 --- testcases/kernel/syscalls/openat/openat02.c | 12 ------ .../remap_file_pages/remap_file_pages01.c | 9 ---- .../remap_file_pages/remap_file_pages02.c | 6 --- .../kernel/syscalls/renameat/renameat01.c | 6 --- .../kernel/syscalls/signalfd/signalfd01.c | 6 --- .../kernel/syscalls/signalfd4/signalfd4_01.c | 5 --- .../kernel/syscalls/signalfd4/signalfd4_02.c | 5 --- testcases/kernel/syscalls/socket/socket01.c | 20 --------- .../kernel/syscalls/socketpair/socketpair01.c | 20 --------- .../kernel/syscalls/sockioctl/sockioctl01.c | 6 +-- testcases/kernel/syscalls/splice/splice01.c | 6 --- .../kernel/syscalls/symlinkat/symlinkat01.c | 7 --- testcases/kernel/syscalls/sysctl/sysctl03.c | 12 ++---- testcases/kernel/syscalls/tee/tee01.c | 6 --- .../syscalls/timer_create/timer_create01.c | 10 ----- .../syscalls/timer_delete/timer_delete01.c | 6 --- .../syscalls/timer_settime/timer_settime01.c | 6 --- .../syscalls/timer_settime/timer_settime02.c | 6 --- testcases/kernel/syscalls/timerfd/timerfd02.c | 5 --- testcases/kernel/syscalls/timerfd/timerfd03.c | 5 --- .../syscalls/timerfd/timerfd_create01.c | 3 -- testcases/open_posix_testsuite/Makefile | 4 -- testcases/open_posix_testsuite/Makefile.linux | 20 --------- 70 files changed, 40 insertions(+), 581 deletions(-) delete mode 100644 testcases/open_posix_testsuite/Makefile.linux
include/lapi/common_timers.h +0 -5
@@ -63,11 +63,6 @@ static inline int possibly_unsupported(clock_t clock) } } -static inline int have_cputime_timers (void ) -{ -return tst_kvercmp (2 ,6 ,12 ) >=0 ; -} -#include "lapi/syscalls.h" #include <time.h>
testcases/kernel/containers/mqns/mqns_helper.h +0 -3
@@ -36,9 +36,6 @@ static void check_mqns(void)int pid, status;mqd_t mqd; -if (tst_kvercmp (2 ,6 ,30 ) <0 ) -tst_brkm (TCONF ,NULL ,"Kernel version is lower than expected" ); -mq_unlink ("/checkmqnsenabled" ); mqd =mq_open ("/checkmqnsenabled" ,O_RDWR |O_CREAT |O_EXCL ,0777 ,NULL );
testcases/kernel/containers/pidns/pidns_helper.h +0 -3
@@ -25,9 +25,6 @@ static int check_newpid(void) {int pid, status; -if (tst_kvercmp (2 ,6 ,24 ) <0 ) -tst_brkm (TCONF ,NULL ,"CLONE_NEWPID not supported" ); - pid =do_clone_unshare_test (T_CLONE ,CLONE_NEWPID , dummy_child,NULL );if (pid ==-1 )tst_brkm (TCONF |TERRNO ,NULL ,"CLONE_NEWPID not supported" );
testcases/kernel/containers/utsname/utstest.c +0 -3
@@ -69,9 +69,6 @@ static void check_newuts(void) {int pid, status; -if (tst_kvercmp (2 ,6 ,19 ) <0 ) -tst_brkm (TCONF ,NULL ,"CLONE_NEWUTS not supported" ); - pid =do_clone_unshare_test (T_CLONE ,CLONE_NEWUTS , dummy_child,NULL );if (pid ==-1 )tst_brkm (TCONF |TERRNO ,NULL ,"CLONE_NEWUTS not supported" );
testcases/kernel/device-drivers/acpi/ltp_acpi.c +0 -5
@@ -148,11 +148,6 @@ int main(int argc, char *argv[])tst_require_root (); -if (tst_kvercmp (2 ,6 ,0 ) <0 ) { -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 2.6 or newer" ); - } -tst_sig (FORK ,DEF_HANDLER , cleanup);tst_module_load (NULL , module_name,NULL );
testcases/kernel/device-drivers/block/block_dev_user/block_dev.c +0 -5
@@ -61,11 +61,6 @@ void setup(int argc, char *argv[])tst_require_root (); -if (tst_kvercmp (2 ,6 ,0 ) <0 ) { -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 2.6 or newer" ); - } -tst_sig (FORK ,DEF_HANDLER , cleanup); }
testcases/kernel/device-drivers/pci/tpci_user/tpci.c +0 -5
@@ -51,11 +51,6 @@ void setup(void) {tst_require_root (); -if (tst_kvercmp (2 ,6 ,0 ) <0 ) { -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 2.6 or newer" ); - } -tst_sig (FORK ,DEF_HANDLER , cleanup); }
testcases/kernel/device-drivers/tbio/tbio_user/tbio.c +0 -5
@@ -88,11 +88,6 @@ void setup(void)tst_require_root (); -if (tst_kvercmp (2 ,6 ,0 ) <0 ) { -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 2.6 or newer" ); - } -tst_module_load (cleanup, module_name,NULL ); module_loaded =1 ;
testcases/kernel/device-drivers/uaccess/uaccess.c +0 -5
@@ -96,11 +96,6 @@ int main(int argc, char *argv[])tst_require_root (); -if (tst_kvercmp (2 ,6 ,0 ) <0 ) { -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 2.6 or newer" ); - } -tst_sig (FORK ,DEF_HANDLER , cleanup);tst_module_load (NULL , module_name,NULL );
testcases/kernel/mem/vma/vma01.c +1 -7
@@ -187,13 +187,7 @@ static void check_status(int status)tst_resm (TPASS ,"two 3*ps VMAs found." );break ;case 1 : -if (tst_kvercmp (3 ,0 ,0 ) <0 ) { -tst_resm (TCONF ,"A single 6*ps VMA found. You may need" -" to back port kernel commit 965f55d " -"to fix this scalability issue." ); - }else { -tst_resm (TFAIL ,"A single 6*ps VMA found." ); - } +tst_resm (TFAIL ,"A single 6*ps VMA found." );break ;default :tst_brkm (TBROK , cleanup,"unexpected VMA found." );
testcases/kernel/power_management/pm_get_sched_values.c +2 -18
@@ -19,22 +19,6 @@const char *TCID ="pm_get_sched_values" ; -int get_supp_sched_mc (void ) -{ -if (tst_kvercmp (2 ,6 ,29 ) <0 ) -return 1 ; -else -return 2 ; -} - -int get_supp_sched_smt (void ) -{ -if (tst_kvercmp (2 ,6 ,29 ) <0 ) -return 1 ; -else -return 2 ; -} -int main (int argc,char **argv) {char *param;
@@ -43,9 +27,9 @@ int main(int argc, char **argv)else { param = argv[1 ];if (strcmp (param,"sched_mc" ) ==0 ) -return get_supp_sched_mc (); +return 2 ;if (strcmp (param,"sched_smt" ) ==0 ) -return get_supp_sched_smt (); +return 2 ; }return 1 ;
testcases/kernel/syscalls/adjtimex/adjtimex02.c +1 -1
@@ -93,7 +93,7 @@ static void verify_adjtimex(unsigned int i)if (tc[i].highlimit) buf->tick = tc[i].highlimit + tc[i].delta; } -if (tc[i].modes ==ADJ_OFFSET && (tst_kvercmp (2 ,6 ,25 ) >0 )) { +if (tc[i].modes ==ADJ_OFFSET ) {if (tc[i].lowlimit || tc[i].highlimit) {tst_res (TCONF ,"Newer kernels normalize offset value outside range" );return ;
testcases/kernel/syscalls/clone/clone08.c +0 -43
61 lines not on this page · raw message
testcases/kernel/syscalls/eventfd/eventfd01.c +0 -3
@@ -720,9 +720,6 @@ static void setup(void)tst_sig (FORK ,DEF_HANDLER , cleanup); -if (tst_kvercmp (2 ,6 ,22 ) <0 ) -tst_brkm (TCONF ,NULL ,"2.6.22 or greater kernel required" ); -tst_tmpdir ();TEST_PAUSE ;
testcases/kernel/syscalls/eventfd2/eventfd2_01.c +0 -4
@@ -85,10 +85,6 @@ int main(int argc, char *argv[])tst_parse_opts (argc, argv,NULL ,NULL ); -if ((tst_kvercmp (2 ,6 ,27 )) <0 ) { -tst_brkm (TCONF ,NULL , -"This test can only run on kernels that are 2.6.27 and higher" ); - }setup (); fd =tst_syscall (__NR_eventfd2,1 ,0 );
testcases/kernel/syscalls/eventfd2/eventfd2_02.c +0 -4
@@ -82,10 +82,6 @@ int main(int argc, char *argv[])tst_parse_opts (argc, argv,NULL ,NULL ); -if ((tst_kvercmp (2 ,6 ,27 )) <0 ) { -tst_brkm (TCONF ,NULL , -"This test can only run on kernels that are 2.6.27 and higher" ); - }setup (); tst_count =0 ;
testcases/kernel/syscalls/eventfd2/eventfd2_03.c +0 -5
@@ -119,11 +119,6 @@ int main(int argc, char **argv)return 1 ; } } -if ((tst_kvercmp (2 ,6 ,27 )) <0 ) { -tst_brkm (TCONF , -NULL , -"This test can only run on kernels that are 2.6.27 and higher" ); - }if ((fd1 =eventfd2 (0 ,EFD_SEMLIKE )) ==-1 || (fd2 =eventfd2 (0 ,EFD_SEMLIKE )) ==-1 ) {perror ("eventfd2" );
testcases/kernel/syscalls/faccessat/faccessat01.c +0 -4
@@ -72,10 +72,6 @@ int main(int ac, char **av)int lc;int i; -/* Disable test if the version of the kernel is less than 2.6.16 */ -if ((tst_kvercmp (2 ,6 ,16 )) <0 ) -tst_brkm (TCONF ,NULL ,"Test must be run with kernel 2.6.16+" ); -tst_parse_opts (ac, av,NULL ,NULL );setup ();
testcases/kernel/syscalls/fallocate/fallocate04.c +0 -5
@@ -103,11 +103,6 @@ static void test02(void)tst_res (TINFO ,"read allocated file size '%zu'" , alloc_size0);tst_res (TINFO ,"make a hole with FALLOC_FL_PUNCH_HOLE" ); -if (tst_kvercmp (2 ,6 ,38 ) <0 ) { -tst_brk (TCONF , -"FALLOC_FL_PUNCH_HOLE needs Linux 2.6.38 or newer" ); - } -if (fallocate (fd,FALLOC_FL_PUNCH_HOLE |FALLOC_FL_KEEP_SIZE , block_size, block_size) ==-1 ) {if (errno ==EOPNOTSUPP ) {
testcases/kernel/syscalls/fchownat/fchownat01.c +0 -3
@@ -86,9 +86,6 @@ int main(int ac, char **av)static void setup (void ) { -if ((tst_kvercmp (2 ,6 ,16 )) <0 ) -tst_brkm (TCONF ,NULL ,"This test needs kernel 2.6.16 or newer" ); -tst_sig (NOFORK ,DEF_HANDLER , cleanup);TEST_PAUSE ;
testcases/kernel/syscalls/fchownat/fchownat02.c +0 -3
@@ -71,9 +71,6 @@ static void setup(void) {struct stat c_buf, l_buf; -if ((tst_kvercmp (2 ,6 ,16 )) <0 ) -tst_brkm (TCONF ,NULL ,"This test needs kernel 2.6.16 or newer" ); -tst_require_root ();tst_sig (NOFORK ,DEF_HANDLER , cleanup);
testcases/kernel/syscalls/fcntl/fcntl29.c +0 -4
@@ -84,10 +84,6 @@ int main(int ac, char **av)static void setup (void ) { -if ((tst_kvercmp (2 ,6 ,24 )) <0 ) { -tst_brkm (TCONF ,NULL ,"Kernels >= 2.6.24 required" ); - } -tst_sig (NOFORK ,DEF_HANDLER , cleanup);tst_tmpdir ();
testcases/kernel/syscalls/fcntl/fcntl30.c +0 -4
@@ -93,10 +93,6 @@ int main(int ac, char **av)static void setup (void ) { -if ((tst_kvercmp (2 ,6 ,35 )) <0 ) { -tst_brkm (TCONF ,NULL ,"kernel >= 2.6.35 required" ); - } -tst_sig (NOFORK ,DEF_HANDLER , cleanup);TEST_PAUSE ;
testcases/kernel/syscalls/fcntl/fcntl31.c +5 -27
@@ -45,9 +45,6 @@ static void setown_pid_test(void);static void setown_pgrp_test (void );#if defined(HAVE_STRUCT_F_OWNER_EX ) -static int ownex_enabled; -static char *ownex_tconf_msg ="F_GETOWN_EX and F_SETOWN_EX only run on " -"kernels that are 2.6.32 and higher" ;static void setownex_tid_test (void );static void setownex_pid_test (void );static void setownex_pgrp_test (void );
@@ -126,15 +123,11 @@ static void setup(void)tst_brkm (TBROK |TERRNO , cleanup,"getpgid() failed" );#if defined(HAVE_STRUCT_F_OWNER_EX ) -if ((tst_kvercmp (2 ,6 ,32 )) >=0 ) { - ownex_enabled =1 ; - -/* get original f_owner_ex info */ -TEST (fcntl (test_fd,F_GETOWN_EX , &orig_own_ex)); -if (TEST_RETURN <0 ) { -tst_brkm (TFAIL |TTERRNO , cleanup, -"fcntl get original f_owner_ex info failed" ); - } +/* get original f_owner_ex info */ +TEST (fcntl (test_fd,F_GETOWN_EX , &orig_own_ex)); +if (TEST_RETURN <0 ) { +tst_brkm (TFAIL |TTERRNO , cleanup, +"fcntl get original f_owner_ex info failed" ); }#endif
@@ -204,11 +197,6 @@ static void setownex_tid_test(void) {static struct f_owner_ex tst_own_ex; -if (ownex_enabled ==0 ) { -tst_resm (TCONF ,"%s" , ownex_tconf_msg); -return ; - } - tst_own_ex.type =F_OWNER_TID ; tst_own_ex.pid =tst_syscall (__NR_gettid);
@@ -226,11 +214,6 @@ static void setownex_pid_test(void) {static struct f_owner_ex tst_own_ex; -if (ownex_enabled ==0 ) { -tst_resm (TCONF ,"%s" , ownex_tconf_msg); -return ; - } - tst_own_ex.type =F_OWNER_PID ; tst_own_ex.pid = pid;
@@ -249,11 +232,6 @@ static void setownex_pgrp_test(void) {static struct f_owner_ex tst_own_ex; -if (ownex_enabled ==0 ) { -tst_resm (TCONF ,"%s" , ownex_tconf_msg); -return ; - } - tst_own_ex.type =F_OWNER_PGRP ; tst_own_ex.pid = pgrp_pid;
testcases/kernel/syscalls/fgetxattr/fgetxattr02.c +0 -8
@@ -188,14 +188,6 @@ static void verify_fgetxattr(unsigned int i) fname); } -/* -* Before kernel 3.0.0, fgetxattr(2) will set errno with 'EPERM' -* when the file is not a regular file and directory, refer to -* commitid 55b23bd -*/ -if (tc[i].exp_err ==ENODATA &&tst_kvercmp (3 ,0 ,0 ) <0 ) - tc[i].exp_err =EPERM ; -if (tc[i].exp_err ==TST_ERR ) {tst_res (TPASS |TTERRNO ,"fgetxattr(2) on %s passed" , fname);
testcases/kernel/syscalls/fstatat/fstatat01.c +0 -3
@@ -86,9 +86,6 @@ int main(int ac, char **av)static struct stat statbuf;#endif -if (tst_kvercmp (2 ,6 ,16 ) <0 ) -tst_brkm (TCONF ,NULL ,"Test must be run with kernel 2.6.16+" ); -tst_parse_opts (ac, av,NULL ,NULL );setup ();
testcases/kernel/syscalls/futimesat/futimesat01.c +0 -3
@@ -66,9 +66,6 @@ int main(int ac, char **av)int lc, i;struct timeval times[2 ]; -if (tst_kvercmp (2 ,6 ,16 ) <0 ) -tst_brkm (TCONF ,NULL ,"Test must be run with kernel 2.6.16+" ); -tst_parse_opts (ac, av,NULL ,NULL );setup ();
testcases/kernel/syscalls/getcpu/getcpu01.c +0 -7
@@ -134,13 +134,6 @@ static void run(void) } } -static void setup (void ) -{ -if (tst_kvercmp (2 ,6 ,20 ) <0 ) -tst_brk (TCONF ,"kernel >= 2.6.20 required" ); -} -static struct tst_test test = { .test_all = run, - .setup = setup, };
testcases/kernel/syscalls/getxattr/getxattr02.c +1 -10
@@ -91,16 +91,7 @@ int main(int argc, char *argv[])for (lc =0 ;TEST_LOOPING (lc); lc++) { tst_count =0 ; - -/* -* Before kernel 3.0.0, getxattr(2) will set errno with 'EPERM' -* when the file is not a regular file and directory, refer to -* commitid 55b23bd -*/ -if (tst_kvercmp (3 ,0 ,0 ) >=0 ) - exp_eno =ENODATA ; -else - exp_eno =EPERM ; + exp_eno =ENODATA ;for (i =0 ; i <TST_TOTAL ; i++) {TEST (getxattr (tc[0 ],XATTR_TEST_KEY , buf,BUFSIZ ));
testcases/kernel/syscalls/inotify/inotify02.c +0 -15
@@ -133,21 +133,6 @@ void verify_inotify(void)struct inotify_event *event; event = (struct inotify_event *)&event_buf[i];if (test_num >= test_cnt) { -if (tst_kvercmp (2 ,6 ,25 ) <0 - && event_set[test_cnt -1 ].mask == - event->mask) -tst_res (TWARN , -"This may be kernel bug. " -"Before kernel 2.6.25, a kernel bug " -"meant that the kernel code that was " -"intended to coalesce successive identical " -"events (i.e., the two most recent " -"events could potentially be coalesced " -"if the older had not yet been read) " -"instead checked if the most recent event " -"could be coalesced with the oldest " -"unread event. This has been fixed by commit" -"1c17d18e3775485bf1e0ce79575eb637a94494a2." );tst_res (TFAIL ,"get unnecessary event: " "wd=%d mask=%08x cookie=%-5u len=%-2u "
testcases/kernel/syscalls/inotify/inotify04.c +0 -14
@@ -124,20 +124,6 @@ void verify_inotify(void)struct inotify_event *event; event = (struct inotify_event *)&event_buf[i];if (test_num >= test_cnt) { -if (tst_kvercmp (2 ,6 ,25 ) <0 - && event_set[test_cnt -1 ].mask == event->mask) -tst_res (TWARN , -"This may be kernel bug. " -"Before kernel 2.6.25, a kernel bug " -"meant that the kernel code that was " -"intended to coalesce successive identical " -"events (i.e., the two most recent " -"events could potentially be coalesced " -"if the older had not yet been read) " -"instead checked if the most recent event " -"could be coalesced with the oldest " -"unread event. This has been fixed by commit" -"1c17d18e3775485bf1e0ce79575eb637a94494a2." );tst_res (TFAIL ,"got unnecessary event: " "wd=%d mask=%04x cookie=%u len=%u "
testcases/kernel/syscalls/ioperm/ioperm01.c +1 -10
@@ -42,16 +42,7 @@ static void verify_ioperm(void)static void setup (void ) { -/* -* The value of IO_BITMAP_BITS (include/asm-i386/processor.h) changed -* from kernel 2.6.8 to permit 16-bits ioperm -* -* Ricky Ng-Adam, [email protected] -* */ -if (tst_kvercmp (2 ,6 ,8 ) <0 ) - io_addr =IO_BITMAP_BITS -NUM_BYTES ; -else - io_addr =IO_BITMAP_BITS -NUM_BYTES ; + io_addr =IO_BITMAP_BITS -NUM_BYTES ; }static void cleanup (void )
testcases/kernel/syscalls/ioperm/ioperm02.c +2 -13
@@ -45,19 +45,8 @@ static struct tcase_t {static void setup (void ) { -/* -* The value of IO_BITMAP_BITS (include/asm-i386/processor.h) changed -* from kernel 2.6.8 to permit 16-bits (65536) ioperm -* -* Ricky Ng-Adam, [email protected] -*/ -if ((tst_kvercmp (2 ,6 ,8 ) <0 ) || (tst_kvercmp (2 ,6 ,9 ) ==0 )) { - tcases[0 ].from = (IO_BITMAP_BITS -NUM_BYTES ) +1 ; - tcases[1 ].from =IO_BITMAP_BITS -NUM_BYTES ; - }else { - tcases[0 ].from = (IO_BITMAP_BITS_16 -NUM_BYTES ) +1 ; - tcases[1 ].from =IO_BITMAP_BITS_16 -NUM_BYTES ; - } + tcases[0 ].from = (IO_BITMAP_BITS_16 -NUM_BYTES ) +1 ; + tcases[1 ].from =IO_BITMAP_BITS_16 -NUM_BYTES ;struct passwd *pw; pw =SAFE_GETPWNAM ("nobody" );
testcases/kernel/syscalls/linkat/linkat01.c +0 -6
@@ -201,12 +201,6 @@ int main(int ac, char **av)int lc;int i; -if ((tst_kvercmp (2 ,6 ,16 )) <0 ) { -tst_resm (TWARN ,"This test can only run on kernels that are " ); -tst_resm (TWARN ,"2.6.16 and higher" ); -exit (0 ); - } -tst_parse_opts (ac, av,NULL ,NULL );setup ();
testcases/kernel/syscalls/linkat/linkat02.c +0 -3
@@ -138,9 +138,6 @@ static void linkat_verify(const struct test_struct *desc)static void setup (void ) { -if ((tst_kvercmp (2 ,6 ,16 )) <0 ) -tst_brkm (TCONF ,NULL ,"This test needs kernel 2.6.16 or newer" ); -tst_require_root ();tst_sig (NOFORK ,DEF_HANDLER , cleanup);
testcases/kernel/syscalls/madvise/madvise02.c +0 -7
@@ -96,15 +96,8 @@ static void tcases_filter(void) tc->skip =0 ;#endif /* if !defined(UCLINUX) */ break ; -case MADV_REMOVE : -if ((tst_kvercmp (2 ,6 ,16 )) <0 ) - tc->skip =1 ; -break ;case MADV_MERGEABLE :case MADV_UNMERGEABLE : -if ((tst_kvercmp (2 ,6 ,32 )) <0 ) - tc->skip =1 ; -/* kernel configured with CONFIG_KSM, * skip EINVAL test for MADV_MERGEABLE. */ if (access (KSM_SYS_DIR ,F_OK ) ==0 )
testcases/kernel/syscalls/migrate_pages/migrate_pages02.c +0 -3
@@ -273,9 +273,6 @@ static void setup(void)if (num_nodes <2 )tst_brk (TCONF ,"at least 2 allowed NUMA nodes" " are required" ); -else if (tst_kvercmp (2 ,6 ,18 ) <0 ) -tst_brk (TCONF ,"2.6.18 or greater kernel required" ); -/* * find 2 nodes, which can hold NODE_MIN_FREEMEM bytes * The reason is that:
testcases/kernel/syscalls/mincore/mincore01.c +0 -6
@@ -145,12 +145,6 @@ static void setup4(struct test_case_t *tc) tc->addr = global_pointer; tc->len = as_lim.rlim_cur - (rlim_t )global_pointer + pagesize; tc->vector = global_vec; - -/* -* In linux 2.6.11 and earlier, EINVAL was returned for this condition. -*/ -if (tst_kvercmp (2 ,6 ,11 ) <=0 ) - tc->exp_errno =EINVAL ; }static void setup (void )
testcases/kernel/syscalls/mknodat/mknodat01.c +0 -3
@@ -118,9 +118,6 @@ static void setup(void) {char *tmpdir; -if (tst_kvercmp (2 ,6 ,16 ) <0 ) -tst_brkm (TCONF ,NULL ,"This test needs kernel 2.6.16 or newer" ); -tst_sig (NOFORK ,DEF_HANDLER , cleanup);TEST_PAUSE ;
testcases/kernel/syscalls/mknodat/mknodat02.c +0 -5
@@ -105,11 +105,6 @@ static void setup(void)int i;const char *fs_type; -if (tst_kvercmp (2 ,6 ,16 ) <0 ) { -tst_brkm (TCONF ,NULL ,"This test can only run on kernels " -"that are 2.6.16 and higher" ); - } -tst_require_root ();tst_sig (NOFORK ,DEF_HANDLER , cleanup);
testcases/kernel/syscalls/mlock/mlock02.c +0 -31
@@ -98,24 +98,6 @@ static void test_enomem1(void)void *addr;struct rlimit rl; -/* -* RLIMIT_MEMLOCK resource limit. -* In Linux kernels before 2.6.9, this limit controlled the amount -* of memory that could be locked by a privileged process. Since -* Linux 2.6.9, no limits are placed on the amount of memory that a -* privileged process may lock, and this limit instead governs the -* amount of memory that an unprivileged process may lock. So here -* we set RLIMIT_MEMLOCK resource limit to RLIM_INFINITY when kernel -* is under 2.6.9, to make sure this ENOMEM error is indeed caused by -* that some of the specified address range does not correspond to -* mapped pages in the address space of the process. -*/ -if ((tst_kvercmp (2 ,6 ,9 )) <0 ) { - rl.rlim_cur =RLIM_INFINITY ; - rl.rlim_max =RLIM_INFINITY ; -SAFE_SETRLIMIT (cleanup,RLIMIT_MEMLOCK , &rl); - } - addr =SAFE_MMAP (cleanup,NULL , len,PROT_READ ,MAP_PRIVATE |MAP_ANONYMOUS ,0 ,0 );
@@ -129,13 +111,6 @@ static void test_enomem2(void)void *addr;struct rlimit rl; -if ((tst_kvercmp (2 ,6 ,9 )) <0 ) { -tst_resm (TCONF , -"ENOMEM error value test for this condition needs " -"kernel 2.6.9 or higher" ); -return ; - } - rl.rlim_max = len -1 ; rl.rlim_cur = len -1 ;SAFE_SETRLIMIT (cleanup,RLIMIT_MEMLOCK , &rl);
@@ -159,12 +134,6 @@ static void test_eperm(void)void *addr;struct rlimit rl; -if ((tst_kvercmp (2 ,6 ,9 )) <0 ) { -tst_resm (TCONF , -"EPERM error value test needs kernel 2.6.9 or higher" ); -return ; - } - rl.rlim_max =0 ; rl.rlim_cur =0 ;SAFE_SETRLIMIT (cleanup,RLIMIT_MEMLOCK , &rl);
testcases/kernel/syscalls/mlockall/mlockall02.c +14 -18
@@ -191,29 +191,25 @@ int setup_test(int i) "for mlockall error %s\n", TC[i].edesc);return 1 ; } -if (tst_kvercmp (2 ,6 ,9 ) >=0 ) { - ltpuser =getpwnam (nobody_uid); -if (seteuid (ltpuser->pw_uid) ==-1 ) { -tst_brkm (TBROK , cleanup,"seteuid() " -"failed to change euid to %d " -"errno = %d : %s" , - ltpuser->pw_uid,TEST_ERRNO , -strerror (TEST_ERRNO )); + ltpuser =getpwnam (nobody_uid); +if (seteuid (ltpuser->pw_uid) ==-1 ) { +tst_brkm (TBROK , cleanup,"seteuid() " +"failed to change euid to %d " +"errno = %d : %s" , + ltpuser->pw_uid,TEST_ERRNO , +strerror (TEST_ERRNO ));return 1 ; - } }return 0 ;case 1 : -if (tst_kvercmp (2 ,6 ,9 ) >=0 ) { - rl.rlim_max =0 ; - rl.rlim_cur =0 ; -if (setrlimit (RLIMIT_MEMLOCK , &rl) !=0 ) { -tst_resm (TWARN ,"setrlimit failed to " -"set the resource for " -"RLIMIT_MEMLOCK to check for " -"mlockall error %s\n" ,TC [i].edesc); + rl.rlim_max =0 ; + rl.rlim_cur =0 ; +if (setrlimit (RLIMIT_MEMLOCK , &rl) !=0 ) { +tst_resm (TWARN ,"setrlimit failed to " +"set the resource for " +"RLIMIT_MEMLOCK to check for " +"mlockall error %s\n" ,TC [i].edesc);return 1 ; - } } ltpuser =getpwnam (nobody_uid);if (seteuid (ltpuser->pw_uid) ==-1 ) {
testcases/kernel/syscalls/move_pages/move_pages09.c +4 -19
@@ -102,25 +102,10 @@ int main(int argc, char **argv) ret =numa_move_pages (0 ,TEST_PAGES , pages, nodes, status,MPOL_MF_MOVE ); -/* -* commit e78bbfa8262424417a29349a8064a535053912b9 -* Author: Brice Goglin <[email protected]> -* Date: Sat Oct 18 20:27:15 2008 -0700 -* mm: stop returning -ENOENT from sys_move_pages() if nothing got migrated -*/ -if ((tst_kvercmp (2 ,6 ,28 )) >=0 ) { -if (ret >=0 ) -tst_resm (TPASS ,"move_pages succeeded" ); -else -tst_resm (TFAIL |TERRNO ,"move_pages" ); - }else { -if (ret ==-1 && errno ==ENOENT ) -tst_resm (TPASS ,"move_pages failed with " -"ENOENT as expected" ); -else -tst_resm (TFAIL |TERRNO ,"move_pages did not " -"fail with ENOENT ret: %d" , ret); - } +if (ret >=0 ) +tst_resm (TPASS ,"move_pages succeeded" ); +else +tst_resm (TFAIL |TERRNO ,"move_pages" );free_pages (pages,TEST_PAGES ); }
testcases/kernel/syscalls/move_pages/move_pages_support.c +3 -4
@@ -400,13 +400,12 @@ void check_config(unsigned int min_nodes)if (ret <0 )tst_brkm (TBROK |TERRNO ,NULL ,"get_allowed_nodes(): %d" , ret); -if (numa_available () <0 ) { +if (numa_available () <0 )tst_brkm (TCONF ,NULL ,"NUMA support is not available" ); - }else if (num_allowed_nodes < min_nodes) { + +if (num_allowed_nodes < min_nodes) {tst_brkm (TCONF ,NULL ,"at least %d allowed NUMA nodes" " are required" , min_nodes); - }else if (tst_kvercmp (2 ,6 ,18 ) <0 ) { -tst_brkm (TCONF ,NULL ,"2.6.18 or greater kernel required" ); }#else tst_brkm (TCONF ,NULL ,NUMA_ERROR_MSG );
testcases/kernel/syscalls/munmap/munmap03.c +0 -7
@@ -127,13 +127,6 @@ static void test_einval2(void)char *addr = global_addr;size_t map_len =0 ; -if (tst_kvercmp (2 ,6 ,12 ) <0 ) { -tst_resm (TCONF , -"EINVAL error value test for this condition needs " -"kernel 2.6.12 or higher" ); -return ; - } -TEST (munmap (addr, map_len));check_and_print (EINVAL );
testcases/kernel/syscalls/open/open12.c +0 -22
@@ -89,14 +89,6 @@ static void setup(void)if (tst_path_has_mnt_flags (cleanup,NULL , mount_flags)) {const char *fs_type; -if ((tst_kvercmp (2 ,6 ,30 )) <0 ) { -tst_resm (TCONF , -"MS_STRICTATIME flags for mount(2) needs kernel 2.6.30 " -"or higher" ); - skip_noatime =1 ; -return ; - } - fs_type =tst_dev_fs_type (); device =tst_acquire_device (cleanup);
@@ -144,13 +136,6 @@ static void test_noatime(void)char read_buf;struct stat old_stat, new_stat; -if ((tst_kvercmp (2 ,6 ,8 )) <0 ) { -tst_resm (TCONF , -"O_NOATIME flags test for open(2) needs kernel 2.6.8 " -"or higher" ); -return ; - } -if (skip_noatime) {tst_resm (TCONF , "test O_NOATIME flag for open needs filesystems which "
@@ -184,13 +169,6 @@ static void test_cloexec(void)int status;char buf[20 ]; -if ((tst_kvercmp (2 ,6 ,23 )) <0 ) { -tst_resm (TCONF , -"O_CLOEXEC flags test for open(2) needs kernel 2.6.23 " -"or higher" ); -return ; - } -TEST (open (TEST_FILE ,O_RDWR |O_APPEND |O_CLOEXEC ,0777 ));if (TEST_RETURN ==-1 ) {
testcases/kernel/syscalls/open/open13.c +0 -5
@@ -95,11 +95,6 @@ int main(int ac, char **av)static void setup (void ) { -if ((tst_kvercmp (2 ,6 ,39 )) <0 ) { -tst_brkm (TCONF ,NULL ,"This test can only run on kernels " -"that are 2.6.39 or higher" ); - } -tst_sig (NOFORK ,DEF_HANDLER , cleanup);tst_tmpdir ();
testcases/kernel/syscalls/openat/openat02.c +0 -12
@@ -144,12 +144,6 @@ void testfunc_cloexec(void)int status;char buf[20 ]; -if ((tst_kvercmp (2 ,6 ,23 )) <0 ) { -tst_resm (TCONF ,"test O_CLOEXEC flags for openat " -"needs kernel 2.6.23 or higher" ); -return ; - } -TEST (openat (AT_FDCWD ,TEST_FILE ,O_CLOEXEC |O_RDWR ,0777 ));if (TEST_RETURN ==-1 ) {
@@ -223,12 +217,6 @@ void testfunc_noatime(void)const char *flags[] = {"noatime" ,"relatime" ,NULL };int ret; -if ((tst_kvercmp (2 ,6 ,8 )) <0 ) { -tst_resm (TCONF ,"test O_NOATIME flags for openat " -"needs kernel 2.6.8 or higher" ); -return ; - } - ret =tst_path_has_mnt_flags (cleanup,NULL , flags);if (ret >0 ) { tst_resm(TCONF, "test O_NOATIME flag for openat needs "
testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c +0 -9
@@ -113,15 +113,6 @@ int main(int ac, char **av) {int lc; -#if defined (__s390__) || (__s390x__) || (__ia64__) -/* Disables the test in case the kernel version is lower than 2.6.12 and arch is s390 */ -if ((tst_kvercmp (2 ,6 ,12 )) <0 ) { -tst_resm (TWARN , -"This test can only run on kernels that are 2.6.12 and higher" ); -exit (0 ); - } -#endif -tst_parse_opts (ac, av,NULL ,NULL );setup ();
testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c +0 -6
@@ -121,12 +121,6 @@ static void setup(void) {unsigned int i; -#if defined (__s390__) || (__s390x__) || (__ia64__) -if ((tst_kvercmp (2 ,6 ,12 )) <0 ) -tst_brk (TCONF , -"This test can only run on kernels that are 2.6.12 and higher" ); -#endif - page_sz =getpagesize (); fd =SAFE_OPEN ("cache" ,O_RDWR |O_CREAT |O_TRUNC ,S_IRWXU );
testcases/kernel/syscalls/renameat/renameat01.c +0 -6
@@ -133,12 +133,6 @@ static void setup(void)const char *fs_type;int i; -if ((tst_kvercmp (2 ,6 ,16 )) <0 ) { -tst_brkm (TCONF ,NULL , -"This test can only run on kernels that are " -"2.6.16 and higher" ); - } -tst_require_root ();tst_sig (NOFORK ,DEF_HANDLER , cleanup);
testcases/kernel/syscalls/signalfd/signalfd01.c +0 -6
@@ -262,12 +262,6 @@ int main(int argc, char **argv)int lc;int sfd; -if ((tst_kvercmp (2 ,6 ,22 )) <0 ) { -tst_resm (TWARN , -"This test can only run on kernels that are 2.6.22 and higher" ); -exit (0 ); - } -tst_parse_opts (argc, argv,NULL ,NULL );setup ();
testcases/kernel/syscalls/signalfd4/signalfd4_01.c +0 -5
@@ -129,11 +129,6 @@ int main(int argc, char *argv[])int lc;tst_parse_opts (argc, argv,NULL ,NULL ); -if ((tst_kvercmp (2 ,6 ,27 )) <0 ) { -tst_brkm (TCONF , -NULL , -"This test can only run on kernels that are 2.6.27 and higher" ); - }setup ();for (lc =0 ;TEST_LOOPING (lc); ++lc) {
testcases/kernel/syscalls/signalfd4/signalfd4_02.c +0 -5
@@ -125,11 +125,6 @@ int main(int argc, char *argv[])int lc;tst_parse_opts (argc, argv,NULL ,NULL ); -if ((tst_kvercmp (2 ,6 ,27 )) <0 ) { -tst_brkm (TCONF , -NULL , -"This test can only run on kernels that are 2.6.27 and higher" ); - }setup ();for (lc =0 ;TEST_LOOPING (lc); ++lc) {
testcases/kernel/syscalls/socket/socket01.c +0 -20
@@ -66,27 +66,7 @@ static void verify_socket(unsigned int n)tst_res (TPASS ,"%s successful" , tc->desc); } -/* -* See: -* commit 86c8f9d158f68538a971a47206a46a22c7479bac -* ... -* [IPV4] Fix EPROTONOSUPPORT error in inet_create -*/ -static void setup (void ) -{ -unsigned int i; - -if (tst_kvercmp (2 ,6 ,16 ) >=0 ) -return ; - -for (i =0 ; i <ARRAY_SIZE (tdat); i++) { -if (tdat[i].experrno ==EPROTONOSUPPORT ) - tdat[i].experrno =ESOCKTNOSUPPORT ; - } -} -static struct tst_test test = { .tcnt =ARRAY_SIZE (tdat), - .setup = setup, .test = verify_socket };
testcases/kernel/syscalls/socketpair/socketpair01.c +0 -20
@@ -70,27 +70,7 @@ static void verify_socketpair(unsigned int n)tst_res (TPASS ,"%s successful" , tc->desc); } -/* -* See: -* commit 86c8f9d158f68538a971a47206a46a22c7479bac -* ... -* [IPV4] Fix EPROTONOSUPPORT error in inet_create -*/ -static void setup (void ) -{ -unsigned int i; - -if (tst_kvercmp (2 ,6 ,16 ) >=0 ) -return ; - -for (i =0 ; i <ARRAY_SIZE (tdat); i++) { -if (tdat[i].experrno ==EPROTONOSUPPORT ) - tdat[i].experrno =ESOCKTNOSUPPORT ; - } -} -static struct tst_test test = { .tcnt =ARRAY_SIZE (tdat), - .setup = setup, .test = verify_socketpair };
testcases/kernel/syscalls/sockioctl/sockioctl01.c +2 -4
@@ -210,10 +210,8 @@ static void setup1(void)SAFE_BIND (cleanup, s, (struct sockaddr *)&sin0,sizeof (sin0)); sinlen =sizeof (fsin1); -if (strncmp (tdat[testno].desc,"ATMARK on UDP" ,14 ) ==0 ) { -if ((tst_kvercmp (2 ,6 ,39 )) >=0 ) - tdat[testno].experrno =ENOTTY ; - } +if (strncmp (tdat[testno].desc,"ATMARK on UDP" ,14 ) ==0 ) + tdat[testno].experrno =ENOTTY ; }static void setup2 (void )
testcases/kernel/syscalls/splice/splice01.c +0 -6
@@ -79,12 +79,6 @@ static void setup(void) {int i; -if (tst_fs_type ("." ) ==TST_NFS_MAGIC ) { -if (tst_kvercmp (2 ,6 ,32 ) <0 ) -tst_brk (TCONF ,"Cannot do splice on a file" -" on NFS filesystem before 2.6.32" ); - } -for (i =0 ; i <TEST_BLOCK_SIZE ; i++) buffer[i] = i &0xff ;
testcases/kernel/syscalls/symlinkat/symlinkat01.c +0 -7
@@ -134,13 +134,6 @@ int main(int ac, char **av)int lc;int i; -/* Disable test if the version of the kernel is less than 2.6.16 */ -if ((tst_kvercmp (2 ,6 ,16 )) <0 ) { -tst_resm (TWARN ,"This test can only run on kernels that are " ); -tst_resm (TWARN ,"2.6.16 and higher" ); -exit (0 ); - } -tst_parse_opts (ac, av,NULL ,NULL );setup ();
testcases/kernel/syscalls/sysctl/sysctl03.c +4 -8
@@ -68,14 +68,10 @@ static void verify_sysctl(void)static void setup (void ) { -if ((tst_kvercmp (2 ,6 ,32 )) <=0 ) { - exp_eno =EPERM ; - }else { -/* Look above this warning. */ -tst_res (TINFO , -"this test's results are based on potentially undocumented behavior in the kernel. read the NOTE in the source file for more details" ); - exp_eno =EACCES ; - } +/* Look above this warning. */ +tst_res (TINFO , +"this test's results are based on potentially undocumented behavior in the kernel. read the NOTE in the source file for more details" ); + exp_eno =EACCES ; }static void do_test (void )
testcases/kernel/syscalls/tee/tee01.c +0 -6
@@ -84,12 +84,6 @@ static void setup(void) {int i; -if (tst_fs_type ("." ) ==TST_NFS_MAGIC ) { -if ((tst_kvercmp (2 ,6 ,32 )) <0 ) -tst_brk (TCONF ,"Cannot do tee on a file" -" on NFS filesystem before 2.6.32" ); - } -for (i =0 ; i <TEST_BLOCK_SIZE ; i++) buffer[i] = i &0xff ;
testcases/kernel/syscalls/timer_create/timer_create01.c +0 -10
@@ -59,16 +59,6 @@ static void run(unsigned int n) evp.sigev_signo = nt->sigev_signo; evp.sigev_notify = nt->sigev_notify; -if (clock ==CLOCK_PROCESS_CPUTIME_ID || - clock ==CLOCK_THREAD_CPUTIME_ID ) { -/* (PROCESS_CPUTIME_ID & -* THREAD_CPUTIME_ID) -* is not supported on kernel versions -* lower than 2.6.12 -*/ -if (!have_cputime_timers ()) -continue ; - }if (clock ==CLOCK_MONOTONIC_RAW )continue ;
testcases/kernel/syscalls/timer_delete/timer_delete01.c +0 -6
@@ -30,12 +30,6 @@ static void run(void)for (i =0 ; i <CLOCKS_DEFINED ; ++i) {clock_t clock = clock_list[i]; -if (clock ==CLOCK_PROCESS_CPUTIME_ID || - clock ==CLOCK_THREAD_CPUTIME_ID ) { -if (!have_cputime_timers ()) -continue ; - } -tst_res (TINFO ,"Testing %s" ,get_clock_str (clock));TEST (tst_syscall (__NR_timer_create, clock,NULL , &timer_id));
testcases/kernel/syscalls/timer_settime/timer_settime01.c +0 -6
@@ -98,12 +98,6 @@ static void run(unsigned int n)for (i =0 ; i <CLOCKS_DEFINED ; ++i) {clock_t clock = clock_list[i]; -if (clock ==CLOCK_PROCESS_CPUTIME_ID || - clock ==CLOCK_THREAD_CPUTIME_ID ) { -if (!have_cputime_timers ()) -continue ; - } -TEST (tst_syscall (__NR_timer_create, clock,NULL , &timer));if (TST_RET !=0 ) { if (possibly_unsupported(clock) &&
testcases/kernel/syscalls/timer_settime/timer_settime02.c +0 -6
@@ -87,12 +87,6 @@ static void run(unsigned int n)for (i =0 ; i <CLOCKS_DEFINED ; ++i) {clock_t clock = clock_list[i]; -if (clock ==CLOCK_PROCESS_CPUTIME_ID || - clock ==CLOCK_THREAD_CPUTIME_ID ) { -if (!have_cputime_timers ()) -continue ; - } -/* Init temporary timer */ TEST (tst_syscall (__NR_timer_create, clock,NULL , &timer));if (TST_RET !=0 ) {
testcases/kernel/syscalls/timerfd/timerfd02.c +0 -5
@@ -127,11 +127,6 @@ int main(int argc, char *argv[])int lc;tst_parse_opts (argc, argv,NULL ,NULL ); -if ((tst_kvercmp (2 ,6 ,27 )) <0 ) { -tst_brkm (TCONF , -NULL , -"This test can only run on kernels that are 2.6.27 and higher" ); - }setup ();for (lc =0 ;TEST_LOOPING (lc); ++lc) {
testcases/kernel/syscalls/timerfd/timerfd03.c +0 -5
@@ -123,11 +123,6 @@ int main(int argc, char *argv[])int lc;tst_parse_opts (argc, argv,NULL ,NULL ); -if ((tst_kvercmp (2 ,6 ,27 )) <0 ) { -tst_brkm (TCONF , -NULL , -"This test can only run on kernels that are 2.6.27 and higher" ); - }setup ();for (lc =0 ;TEST_LOOPING (lc); ++lc) {
testcases/kernel/syscalls/timerfd/timerfd_create01.c +0 -3
@@ -66,9 +66,6 @@ int main(int argc, char *argv[])static void setup (void ) { -if ((tst_kvercmp (2 ,6 ,25 )) <0 ) -tst_brkm (TCONF ,NULL ,"This test needs kernel 2.6.25 or newer" ); -tst_sig (NOFORK ,DEF_HANDLER , cleanup);TEST_PAUSE ;
testcases/open_posix_testsuite/Makefile +0 -4
@@ -27,10 +27,6 @@ TEST_MAKE= env $(TEST_MAKE_ENV) $(MAKE) -k all: conformance-all functional-all stress-all tools-all -ifeq ($(shell uname -s), Linux) -include Makefile.linux -endif - AUTOGENERATED_FILES = include/mk/config.mk .PHONY: ac-clean
testcases/open_posix_testsuite/Makefile.linux deleted +0 -20
@@ -1,20 +0,0 @@ -cmd_disable = @set -e; \ - echo "Disabling: $(1)"; \ - echo "\#!/bin/sh" > $(1); \ - echo "echo $(1) skipped" >> $(1); \ - echo "echo $(2)" >> $(1); \ - echo "exit 0" >> $(1); \ - chmod a+x $(1) - -BROKEN := - -kver_cmp = $(shell $(top_srcdir)/scripts/tst_kvercmp.sh 2 6 22) -ifeq ($(kver_cmp), 1) -BROKEN += t_sigaction_16-1 -endif - -filter-known-fails: $(BROKEN) - -t_sigaction_16-1: - $(call cmd_disable,conformance/interfaces/sigaction/sigaction_16-1.run-test, \ - This fails on old linux because sem_wait always be interrupted by a signal.)
Signature · 5 lines
2.27.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v3 5/7] Remove old kernel version check in C case when using tst_kvercmp
Hi Xu,
Quoted 1 line
The oldest supported kernel version is 3.0, so remove them.
...
Quoted 6 lines
+++
b/testcases/kernel/syscalls/sysctl/sysctl03.ctestcases/kernel/syscalls/sysctl/sysctl03.c +0
-1@@ -68,14 +68,10 @@ static void verify_sysctl(void)static void setup (void ) { -if ((tst_kvercmp (2 ,6 ,32 )) <=0 ) {
testcases/kernel/syscalls/sysctl/sysctl03.c static void verify_sysctl(void) · line 73
Quoted 10 lines
testcases/kernel/syscalls/sysctl/sysctl03.c +3
-7- exp_eno =EPERM ; - }else { -/* Look above this warning. */ -tst_res (TINFO , -"this test's results are based on potentially undocumented behavior in the kernel. read the NOTE in the source file for more details" ); - exp_eno =EACCES ; - } +/* Look above this warning. */ +tst_res (TINFO , +"this test's results are based on potentially undocumented behavior in the kernel. read the NOTE in the source file for more details" );
NOTE after you get this merged, I'm going to update sysctl03.c. This warning is really old, it was added in b49b375167 ("Make test pass with undoc'ed sysctl(2) behavior.") (in 2010) and references
https://bugzilla.kernel.org/show_bug.cgi?id=15446, which was fixed in 2012.
Thus warning is not needed any more. But as the test also requires converting to docparse, I'll do it in separate patch.
Kind regards,
Petr
Quoted 2 lines
testcases/kernel/syscalls/sysctl/sysctl03.c +1
-0+ exp_eno =EACCES ; }
...
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v3 6/7 Remove old kernel version check when using min_kver
In reply to Yang XuThe oldest supported kernel version check is 3.0, so remove them.
--- testcases/cve/cve-2016-10044.c | 1 - testcases/cve/cve-2016-7117.c | 1 - testcases/cve/meltdown.c | 1 - testcases/kernel/controllers/memcg/regression/memcg_test_3.c | 1 - testcases/kernel/mem/cpuset/cpuset01.c | 1 - testcases/kernel/mem/hugetlb/hugemmap/hugemmap06.c | 1 - testcases/kernel/mem/ksm/ksm01.c | 1 - testcases/kernel/mem/ksm/ksm02.c | 1 - testcases/kernel/mem/ksm/ksm03.c | 1 - testcases/kernel/mem/ksm/ksm04.c | 1 - testcases/kernel/mem/ksm/ksm05.c | 1 - testcases/kernel/syscalls/clone/clone09.c | 1 - testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c | 1 - testcases/kernel/syscalls/epoll_ctl/epoll_ctl03.c | 1 - testcases/kernel/syscalls/fadvise/posix_fadvise04.c | 1 - testcases/kernel/syscalls/fchmodat/fchmodat01.c | 1 - testcases/kernel/syscalls/fcntl/fcntl35.c | 1 - testcases/kernel/syscalls/futex/futex_wake04.c | 1 - testcases/kernel/syscalls/getrusage/getrusage03.c | 1 - testcases/kernel/syscalls/keyctl/keyctl08.c | 1 - testcases/kernel/syscalls/madvise/madvise07.c | 1 - testcases/kernel/syscalls/migrate_pages/migrate_pages03.c | 1 - testcases/kernel/syscalls/mlock2/mlock201.c | 1 - testcases/kernel/syscalls/mlock2/mlock202.c | 1 - testcases/kernel/syscalls/mlock2/mlock203.c | 1 - testcases/kernel/syscalls/mmap/mmap12.c | 1 - testcases/kernel/syscalls/move_pages/move_pages12.c | 1 - testcases/kernel/syscalls/msync/msync04.c | 1 - testcases/kernel/syscalls/pipe2/pipe2_04.c | 1 - testcases/kernel/syscalls/preadv/preadv01.c | 1 - testcases/kernel/syscalls/preadv/preadv02.c | 1 - testcases/kernel/syscalls/preadv/preadv03.c | 1 - testcases/kernel/syscalls/pwritev/pwritev01.c | 1 - testcases/kernel/syscalls/pwritev/pwritev02.c | 1 - testcases/kernel/syscalls/pwritev/pwritev03.c | 1 - testcases/kernel/syscalls/recvmsg/recvmsg02.c | 1 - testcases/kernel/syscalls/sendfile/sendfile08.c | 1 - testcases/kernel/syscalls/sendfile/sendfile09.c | 1 - testcases/kernel/syscalls/setsockopt/setsockopt03.c | 1 - testcases/kernel/syscalls/socket/socket02.c | 1 - testcases/kernel/syscalls/socketpair/socketpair02.c | 1 - testcases/kernel/syscalls/splice/splice01.c | 1 - testcases/kernel/syscalls/splice/splice02.c | 1 - testcases/kernel/syscalls/splice/splice03.c | 1 - testcases/kernel/syscalls/splice/splice04.c | 1 - testcases/kernel/syscalls/splice/splice05.c | 1 - testcases/kernel/syscalls/switch/endian_switch01.c | 1 - testcases/kernel/syscalls/tee/tee01.c | 1 - testcases/kernel/syscalls/tee/tee02.c | 1 - testcases/kernel/syscalls/timerfd/timerfd01.c | 1 - testcases/kernel/syscalls/timerfd/timerfd_gettime01.c | 1 - testcases/kernel/syscalls/timerfd/timerfd_settime01.c | 1 - testcases/kernel/syscalls/timerfd/timerfd_settime02.c | 1 - testcases/kernel/syscalls/unlinkat/unlinkat01.c | 1 - testcases/kernel/syscalls/vmsplice/vmsplice01.c | 1 - testcases/kernel/syscalls/vmsplice/vmsplice02.c | 1 - testcases/kernel/syscalls/vmsplice/vmsplice03.c | 1 - testcases/kernel/syscalls/vmsplice/vmsplice04.c | 1 - 58 files changed, 58 deletions(-)
testcases/cve/cve-2016-10044.c +0 -1
@@ -61,7 +61,6 @@ found_mapping:static struct tst_test test = { .test_all = run, .cleanup = cleanup, - .min_kver ="2.6.8" , .tags = (const struct tst_tag []) { {"linux-git" ,"22f6b4d34fcf" }, {"CVE" ,"2016-10044" },
testcases/cve/cve-2016-7117.c +0 -1
@@ -149,7 +149,6 @@ static struct tst_test test = { .test_all = run, .setup = setup, .cleanup = cleanup, - .min_kver = "2.6.33", .max_runtime = 60, .tags = (const struct tst_tag []) { {"linux-git" ,"a2e2725541fa" },
testcases/cve/meltdown.c +0 -1
@@ -377,7 +377,6 @@ static struct tst_test test = { .setup = setup, .test_all = run, .cleanup = cleanup, - .min_kver = "2.6.32", .supported_archs = (const char *const []) {"x86" ,"x86_64" ,
testcases/kernel/controllers/memcg/regression/memcg_test_3.c +0 -1
@@ -81,7 +81,6 @@ static void cleanup(void)static struct tst_test test = { .needs_root =1 , .forks_child =1 , - .min_kver ="2.6.24" , .setup = setup, .cleanup = cleanup, .test_all = do_test,
testcases/kernel/mem/cpuset/cpuset01.c +0 -1
@@ -175,7 +175,6 @@ static struct tst_test test = { .forks_child = 1, .setup = setup, .test_all = test_cpuset, - .min_kver = "2.6.32", .needs_cgroup_ctrls = (const char *const []){ "cpuset", NULL }, };
testcases/kernel/mem/hugetlb/hugemmap/hugemmap06.c +0 -1
@@ -114,7 +114,6 @@ static void do_mmap(unsigned int j LTP_ATTRIBUTE_UNUSED) }static struct tst_test test = { - .min_kver ="2.6.32" , .needs_root =1 , .tcnt =LOOP , .needs_tmpdir =1 ,
testcases/kernel/mem/ksm/ksm01.c +0 -1
@@ -93,5 +93,4 @@ static struct tst_test test = {NULL }, .test_all = verify_ksm, - .min_kver = "2.6.32", };
testcases/kernel/mem/ksm/ksm02.c +0 -1
@@ -114,7 +114,6 @@ static struct tst_test test = {NULL }, .test_all = verify_ksm, - .min_kver = "2.6.32", .max_runtime = 32, .needs_cgroup_ctrls = (const char *const []){ "cpuset", NULL }, };
testcases/kernel/mem/ksm/ksm03.c +0 -1
@@ -96,6 +96,5 @@ static struct tst_test test = {NULL }, .test_all = verify_ksm, - .min_kver = "2.6.32", .needs_cgroup_ctrls = (const char *const []){ "memory", NULL }, };
testcases/kernel/mem/ksm/ksm04.c +0 -1
@@ -116,7 +116,6 @@ static struct tst_test test = {NULL }, .test_all = verify_ksm, - .min_kver = "2.6.32", .max_runtime = 32, .needs_cgroup_ctrls = (const char *const []){"memory" ,"cpuset" ,NULL
testcases/kernel/mem/ksm/ksm05.c +0 -1
@@ -87,7 +87,6 @@ static struct tst_test test = { .needs_root = 1, .forks_child = 1, .test_all = test_ksm, - .min_kver = "2.6.32", .save_restore = (const struct tst_path_val []) { {"/sys/kernel/mm/ksm/run" ,"1" ,TST_SR_TBROK }, {}
testcases/kernel/syscalls/clone/clone09.c +0 -1
@@ -87,5 +87,4 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .needs_root = 1, - .min_kver = "2.6.24", };
testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c +0 -1
@@ -44,7 +44,6 @@ static void run(unsigned int n) }static struct tst_test test = { - .min_kver ="2.6.27" , .tcnt =ARRAY_SIZE (tc), .test = run, };
testcases/kernel/syscalls/epoll_ctl/epoll_ctl03.c +0 -1
@@ -74,5 +74,4 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .test_all = run_all, - .min_kver = "2.6.17", };
testcases/kernel/syscalls/fadvise/posix_fadvise04.c +0 -1
@@ -83,5 +83,4 @@ static struct tst_test test = { .cleanup = cleanup, .test = verify_fadvise, .tcnt = ARRAY_SIZE(defined_advise), - .min_kver = "2.6.16", };
testcases/kernel/syscalls/fchmodat/fchmodat01.c +0 -1
@@ -97,7 +97,6 @@ static void cleanup(void) }static struct tst_test test = { - .min_kver ="2.6.16" , .tcnt =ARRAY_SIZE (tcases), .test = verify_fchmodat, .setup = setup,
testcases/kernel/syscalls/fcntl/fcntl35.c +0 -1
@@ -113,7 +113,6 @@ static void do_test(unsigned int n) }static struct tst_test test = { - .min_kver ="2.6.35" , .needs_root =1 , .forks_child =1 , .tcnt =ARRAY_SIZE (tcases),
testcases/kernel/syscalls/futex/futex_wake04.c +0 -1
@@ -130,7 +130,6 @@ static struct tst_test test = { .test_all = wakeup_thread2, .test_variants = ARRAY_SIZE(variants), .needs_root = 1, - .min_kver = "2.6.32", .needs_tmpdir = 1, .hugepages = {1, TST_NEEDS}, };
testcases/kernel/syscalls/getrusage/getrusage03.c +0 -1
@@ -177,7 +177,6 @@ static struct tst_test test = { .forks_child = 1, .child_needs_reinit = 1, .resource_files = resource, - .min_kver = "2.6.32", .min_mem_avail = 512, .tags = (const struct tst_tag []) { {"linux-git" ,"1f10206cf8e9" },
testcases/kernel/syscalls/keyctl/keyctl08.c +0 -1
@@ -28,7 +28,6 @@ void run(void)static struct tst_test test = { .test_all = run, .needs_root =1 , - .min_kver ="2.6.13" , .tags = (const struct tst_tag []) { {"CVE" ,"2016-9604" }, {"linux-git" ,"ee8f844e3c5a" },
testcases/kernel/syscalls/madvise/madvise07.c +0 -1
@@ -92,7 +92,6 @@ static void run(void)static struct tst_test test = { .test_all = run, - .min_kver ="2.6.31" , .needs_root =1 , .forks_child =1 };
testcases/kernel/syscalls/migrate_pages/migrate_pages03.c +0 -1
@@ -140,7 +140,6 @@ static void migrate_test(void)static struct tst_test test = { .max_runtime =300 , - .min_kver ="2.6.32" , .needs_root =1 , .setup = setup, .cleanup = cleanup,
testcases/kernel/syscalls/mlock2/mlock201.c +0 -1
@@ -144,5 +144,4 @@ static struct tst_test test = { .test = verify_mlock2, .setup = setup, .needs_root = 1, - .min_kver = "2.6.9", };
testcases/kernel/syscalls/mlock2/mlock202.c +0 -1
@@ -109,5 +109,4 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .needs_root = 1, - .min_kver = "2.6.9", };
testcases/kernel/syscalls/mlock2/mlock203.c +0 -1
@@ -88,5 +88,4 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .needs_root = 1, - .min_kver = "2.6.9", };
testcases/kernel/syscalls/mmap/mmap12.c +0 -1
@@ -135,5 +135,4 @@ static struct tst_test test = { .cleanup = cleanup, .test_all = verify_mmap, .needs_tmpdir = 1, - .min_kver = "2.6.25", };
testcases/kernel/syscalls/move_pages/move_pages12.c +0 -1
@@ -333,7 +333,6 @@ static void cleanup(void) }static struct tst_test test = { - .min_kver ="2.6.32" , .needs_root =1 , .forks_child =1 , .setup = setup,
testcases/kernel/syscalls/msync/msync04.c +0 -1
@@ -102,5 +102,4 @@ static struct tst_test test = { "tmpfs",NULL }, - .min_kver = "2.6.25", };
testcases/kernel/syscalls/pipe2/pipe2_04.c +0 -1
@@ -97,7 +97,6 @@ static void cleanup(void) }static struct tst_test test = { - .min_kver ="2.6.35" , .test_all = test_pipe2, .setup = setup, .cleanup = cleanup,
testcases/kernel/syscalls/preadv/preadv01.c +0 -1
@@ -105,7 +105,6 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .test = verify_preadv, - .min_kver = "2.6.30", .needs_tmpdir = 1, .bufs = (struct tst_buffers []) { {&rd_iovec, .iov_sizes = (int []){CHUNK ,0 ,-1 }},
testcases/kernel/syscalls/preadv/preadv02.c +0 -1
@@ -126,6 +126,5 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .test = verify_preadv, - .min_kver = "2.6.30", .needs_tmpdir = 1, };
testcases/kernel/syscalls/preadv/preadv03.c +0 -1
@@ -131,7 +131,6 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .test = verify_direct_preadv, - .min_kver = "2.6.30", .mntpoint = MNTPOINT, .mount_device = 1, .all_filesystems = 1,
testcases/kernel/syscalls/pwritev/pwritev01.c +0 -1
@@ -103,6 +103,5 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .test = verify_pwritev, - .min_kver = "2.6.30", .needs_tmpdir = 1, };
testcases/kernel/syscalls/pwritev/pwritev02.c +0 -1
@@ -117,6 +117,5 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .test = verify_pwritev, - .min_kver = "2.6.30", .needs_tmpdir = 1, };
testcases/kernel/syscalls/pwritev/pwritev03.c +0 -1
@@ -130,7 +130,6 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .test = verify_direct_pwritev, - .min_kver = "2.6.30", .mntpoint = MNTPOINT, .mount_device = 1, .all_filesystems = 1,
testcases/kernel/syscalls/recvmsg/recvmsg02.c +0 -1
@@ -94,7 +94,6 @@ static void cleanup(void) }static struct tst_test test = { - .min_kver ="2.6.27" , .test_all = verify_recvmsg, .cleanup = cleanup, .tags = (const struct tst_tag []) {
testcases/kernel/syscalls/sendfile/sendfile08.c +0 -1
@@ -71,7 +71,6 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .test_all = run, - .min_kver = "2.6.33", .tags = (const struct tst_tag []) { {"linux-git" ,"2cb4b05e76478" }, {}
testcases/kernel/syscalls/sendfile/sendfile09.c +0 -1
@@ -96,7 +96,6 @@ static struct tst_test test = { .setup = setup, .test = run, .tcnt = ARRAY_SIZE(tc), - .min_kver = "2.6.33", .max_runtime = 120, .tags = (const struct tst_tag []) { {"linux-git" ,"5d73320a96fcc" },
testcases/kernel/syscalls/setsockopt/setsockopt03.c +0 -1
@@ -74,7 +74,6 @@ static void run(void) }static struct tst_test test = { - .min_kver ="2.6.32" , .setup = setup, .test_all = run, .needs_root =1 ,
testcases/kernel/syscalls/socket/socket02.c +0 -1
@@ -68,6 +68,5 @@ static void cleanup(void)static struct tst_test test = { .tcnt =ARRAY_SIZE (tcases), .test = verify_socket, - .min_kver ="2.6.27" , .cleanup = cleanup };
testcases/kernel/syscalls/socketpair/socketpair02.c +0 -1
@@ -81,6 +81,5 @@ static void cleanup(void)static struct tst_test test = { .tcnt =ARRAY_SIZE (tcases), .test = verify_socketpair, - .min_kver ="2.6.27" , .cleanup = cleanup };
testcases/kernel/syscalls/splice/splice01.c +0 -1
@@ -101,5 +101,4 @@ static struct tst_test test = { .cleanup = cleanup, .test_all = splice_test, .needs_tmpdir = 1, - .min_kver = "2.6.17", };
testcases/kernel/syscalls/splice/splice02.c +0 -1
@@ -155,7 +155,6 @@ static struct tst_test test = { .setup = setup, .needs_tmpdir = 1, .forks_child = 1, - .min_kver = "2.6.17", .options = (struct tst_option []) { {"s:" , &sarg,"Size of output file in bytes (default: 16x max pipe size, i.e. 1M on intel)" }, {}
testcases/kernel/syscalls/splice/splice03.c +0 -1
@@ -123,5 +123,4 @@ static struct tst_test test = { .test = splice_verify, .tcnt = ARRAY_SIZE(tcases), .needs_tmpdir = 1, - .min_kver = "2.6.17", };
testcases/kernel/syscalls/splice/splice04.c +0 -1
@@ -83,5 +83,4 @@ static struct tst_test test = { {"l:", &str_len_data, "Length of test data (in bytes)"}, {} }, - .min_kver = "2.6.31" };
testcases/kernel/syscalls/splice/splice05.c +0 -1
@@ -108,5 +108,4 @@ static struct tst_test test = { {"l:", &str_len_data, "Length of test data (in bytes)"}, {} }, - .min_kver = "2.6.17" };
testcases/kernel/syscalls/switch/endian_switch01.c +0 -1
@@ -93,7 +93,6 @@ static void endian_test(void)static struct tst_test test = { .test_all = endian_test, - .min_kver ="2.6.26" , .forks_child =1 , };
testcases/kernel/syscalls/tee/tee01.c +0 -1
@@ -106,5 +106,4 @@ static struct tst_test test = { .cleanup = cleanup, .test_all = tee_test, .needs_tmpdir = 1, - .min_kver = "2.6.17", };
testcases/kernel/syscalls/tee/tee02.c +0 -1
@@ -90,5 +90,4 @@ static struct tst_test test = { .test = tee_verify, .tcnt = ARRAY_SIZE(tcases), .needs_tmpdir = 1, - .min_kver = "2.6.17", };
testcases/kernel/syscalls/timerfd/timerfd01.c +0 -1
@@ -158,5 +158,4 @@ static struct tst_test test = { .tcnt = ARRAY_SIZE(tcases), .test_variants = ARRAY_SIZE(variants), .setup = setup, - .min_kver = "2.6.25", };
testcases/kernel/syscalls/timerfd/timerfd_gettime01.c +0 -1
@@ -101,5 +101,4 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .needs_tmpdir = 1, - .min_kver = "2.6.25", };
testcases/kernel/syscalls/timerfd/timerfd_settime01.c +0 -1
@@ -108,5 +108,4 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .needs_tmpdir = 1, - .min_kver = "2.6.25", };
testcases/kernel/syscalls/timerfd/timerfd_settime02.c +0 -1
@@ -110,7 +110,6 @@ static struct tst_test test = { .test_variants = ARRAY_SIZE(variants), .setup = setup, .cleanup = cleanup, - .min_kver = "2.6.25", .taint_check = TST_TAINT_W | TST_TAINT_D, .max_runtime = 150, .tags = (const struct tst_tag []) {
testcases/kernel/syscalls/unlinkat/unlinkat01.c +0 -1
@@ -107,7 +107,6 @@ static void cleanup(void)static struct tst_test test = { .needs_tmpdir =1 , .tcnt =ARRAY_SIZE (tc), - .min_kver ="2.6.16" , .setup = setup, .test = run, .cleanup = cleanup,
testcases/kernel/syscalls/vmsplice/vmsplice01.c +0 -1
@@ -121,5 +121,4 @@ static struct tst_test test = { "nfs",NULL }, - .min_kver = "2.6.17", };
testcases/kernel/syscalls/vmsplice/vmsplice02.c +0 -1
@@ -103,5 +103,4 @@ static struct tst_test test = { "nfs",NULL }, - .min_kver = "2.6.17", };
testcases/kernel/syscalls/vmsplice/vmsplice03.c +0 -1
@@ -62,7 +62,6 @@ static void setup(void)static struct tst_test test = { .setup = setup, .test_all = vmsplice_test, - .min_kver ="2.6.23" , .bufs = (struct tst_buffers []) { {&iov, .iov_sizes = (int []){TEST_BLOCK_SIZE ,-1 }}, {}
testcases/kernel/syscalls/vmsplice/vmsplice04.c +0 -1
@@ -88,6 +88,5 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .test_all = vmsplice_test, - .min_kver = "2.6.17", .forks_child = 1, };
Signature · 5 lines
2.27.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v3 6/7] Remove old kernel version check when using min_kver
Hi Xu,
Quoted 1 line
The oldest supported kernel version check is 3.0, so remove them.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v3 7/7 doc/c-test-api.txt
In reply to Yang XuUpdate min_kver usage. Also inotify04 has removed tst_kvercmp2, so remove it.
--- doc/c-test-api.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
doc/c-test-api.txt +3 -3
@@ -559,7 +559,8 @@ static struct tst_test test = { Testcases for newly added kernel functionality require kernel newer than a certain version to run. All you need to skip a test on older kernels is to set the '.min_kver' string in the 'struct tst_test' to a minimal required -kernel version, e.g. '.min_kver = "2.6.30"'. +kernel version, e.g. '.min_kver = "3.10.0"'. For ltp, the oldest supported +kernel version is 3.0, so we don't add this check for old kernel ie 2.6.32. For more complicated operations such as skipping a test for a certain range of kernel versions, following functions could be used:
@@ -585,8 +586,7 @@ positive means that it's newer. The second function 'tst_kvercmp2()' allows for specifying per-vendor table of kernel versions as vendors typically backport fixes to their kernels and the -test may be relevant even if the kernel version does not suggests so. See -'testcases/kernel/syscalls/inotify/inotify04.c' for example usage. +test may be relevant even if the kernel version does not suggests so. WARNING: The shell 'tst_kvercmp' maps the result into unsigned integer - the process exit value.
Signature · 5 lines
2.27.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v3 7/7] doc/c-test-api.txt
Hi Xu,
Quoted 13 lines
Update
min_kverusage. Also inotify04 has removedtst_kvercmp2, so remove it.Signed-off-by Yang Xu <[email protected]>--- doc/c-test-api.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)doc/c-test-api.txt +0
-0
doc/c-test-api.txt static struct tst_test test = { · line 563
Quoted 6 lines
doc/c-test-api.txt +2
-1@@ -559,7 +559,8 @@ static struct tst_test test = { Testcases for newly added kernel functionality require kernel newer than a certain version to run. All you need to skip a test on older kernels is to set the '.min_kver' string in the 'struct tst_test' to a minimal required -kernel version, e.g. '.min_kver = "2.6.30"'. +kernel version, e.g. '.min_kver = "3.10.0"'. For ltp, the oldest supported +kernel version is 3.0, so we don't add this check for old kernel ie 2.6.32.
Again, not sure if this should be added.
doc/c-test-api.txt positive means that it's newer. · line 589
Quoted 9 lines
doc/c-test-api.txt +1
-2For more complicated operations such as skipping a test for a certain range of kernel versions, following functions could be used:@@ -585,8 +586,7 @@ positive means that it's newer. The second function 'tst_kvercmp2()' allows for specifying per-vendor table of kernel versions as vendors typically backport fixes to their kernels and the -test may be relevant even if the kernel version does not suggests so. See -'testcases/kernel/syscalls/inotify/inotify04.c' for example usage. +test may be relevant even if the kernel version does not suggests so.
+1 for this.
Also, I'd wait with this patchset to what brings the discussion of minimal level.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v3 7/7] doc/c-test-api.txt
Hi Petr
Quoted 27 lines
Hi Xu,
Quoted 13 lines
Update
min_kverusage. Also inotify04 has removedtst_kvercmp2, so remove it.Signed-off-by Yang Xu <[email protected]>--- doc/c-test-api.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)doc/c-test-api.txt +0
-0doc/c-test-api.txt static struct tst_test test = { · line 563
Quoted 6 lines
doc/c-test-api.txt +2
-1@@ -559,7 +559,8 @@ static struct tst_test test = { Testcases for newly added kernel functionality require kernel newer than a certain version to run. All you need to skip a test on older kernels is to set the '.min_kver' string in the 'struct tst_test' to a minimal required -kernel version, e.g. '.min_kver = "2.6.30"'. +kernel version, e.g. '.min_kver = "3.10.0"'. For ltp, the oldest supported +kernel version is 3.0, so we don't add this check for old kernel ie 2.6.32.Again, not sure if this should be added.
Quoted 3 lines
doc/c-test-api.txt +0
-0For more complicated operations such as skipping a test for a certain range of kernel versions, following functions could be used:@@ -585,8 +586,7 @@ positive means that it's newer.
Quoted 7 lines
doc/c-test-api.txt positive means that it's newer. · line 589
Quoted 5 lines
doc/c-test-api.txt +1
-2The second function 'tst_kvercmp2()' allows for specifying per-vendor table of kernel versions as vendors typically backport fixes to their kernels and the -test may be relevant even if the kernel version does not suggests so. See -'testcases/kernel/syscalls/inotify/inotify04.c' for example usage. +test may be relevant even if the kernel version does not suggests so.+1 for this.
I merged this patchset except this patch. Also I will update tst_kvercmp2 usage but in shell script. I will send a patchset for add RHEL9 fallback for this change[1]
Quoted 2 lines
Also, I'd wait with this patchset to what brings the discussion of minimal level.
I guess we can mention that old test kernel version raise to 3.10 in next release if nobody has objection or no reponse during this period.
[1]https://github.com/linux-test-project/ltp/commit/2aaff45db7960ce8e46e39fad8ae95a3f5db6cba
Best Regards
Yang Xu
Quoted 3 lines
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v3 7/7] doc/c-test-api.txt
Hi Xu,
...
Quoted 3 lines
I merged this patchset except this patch. Also I will update
tst_kvercmp2usage but in shell script. I will send a patchset for add RHEL9 fallback for this change[1]
Thank you!
Quoted 5 lines
Quoted 2 lines
Also, I'd wait with this patchset to what brings the discussion of minimal level.
I guess we can mention that old test kernel version raise to 3.10 in next release if nobody has objection or no reponse during this period.
Agree, new release will be sometime in January (quite soon, given Christmas and Chinese New Year).
Kind regards,
Petr
Quoted 1 line
[1]https://github.com/linux-test-project/ltp/commit/2aaff45db7960ce8e46e39fad8ae95a3f5db6cba
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v3 7/7] doc/c-test-api.txt
In reply to [email protected]Hi Xu,
I dared to update this patch as:
https://lore.kernel.org/ltp/[email protected]/
https://patchwork.ozlabs.org/project/ltp/list/?series=334834&state=*
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp