lib/tst_kvercmp: Remove old distnames
PATCH 1/4 lib/tst_kvercmp: Remove old distnames
Our travis-ci has dropped or never used them, they are useless. So delete.
--- 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 2/4 shell: Remove old kernel version check
The oldest supported kernel version is 3.10, we don't need these checks. If people need to run these cases on old kernel, please use old release tag.
--- doc/shell-test-api.txt | 14 +++++----- testcases/commands/mkswap/mkswap01.sh | 7 +---- .../kernel/containers/netns/netns_sysfs.sh | 4 --- .../cgroup/cgroup_regression_test.sh | 9 ------ .../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 | 16 +++-------- .../ftrace_test/ftrace_regression02.sh | 4 --- .../ftrace_stress/ftrace_trace_clock.sh | 28 ++++--------------- .../ftrace_stress/ftrace_trace_stat.sh | 6 ---- .../multicast/grp-operation/mcast-lib.sh | 1 - testcases/network/virt/virt_lib.sh | 8 ------ 27 files changed, 48 insertions(+), 172 deletions(-)
doc/shell-test-api.txt +7 -7
@@ -656,14 +656,14 @@ with syntax similar to the shell test command. [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 5.0.0 +if tst_kvcmp -le 5.0.0; then + tst_brk TCONF "Kernel newer than 5.0.0 is needed" fi -# Exit the test if kernel is newer than 3.8 and older than 4.0.1 -if tst_kvcmp -gt 3.8 -a -lt 4.0.1; then - tst_brk TCONF "Kernel must be older than 3.8 or newer than 4.0.1" +# Exit the test if kernel is newer than 3.10 and older than 4.0.1 +if tst_kvcmp -gt 3.10 -a -lt 4.0.1; then + tst_brk TCONF "Kernel must be older than 3.10 or newer than 4.0.1" fi -------------------------------------------------------------------------------
@@ -680,7 +680,7 @@ fi | -o | Does logical or between two expressions |======================================================================= -The format for kernel version has to either be with one dot e.g. '2.6' or with +The format for kernel version has to either be with one dot e.g. '3.10' or with two dots e.g. '4.8.1'. .tst_fs_has_free
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 -9
@@ -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
@@ -255,11 +251,6 @@ test5() #--------------------------------------------------------------------------- test6() { - if tst_kvcmp -ge "3.0"; then - tst_res TCONF "CONFIG_CGROUP_NS is NOT supported in Kernels >= 3.0" - return - fi - if ! grep -q -w "ns" /proc/cgroups; then tst_res TCONF "CONFIG_CGROUP_NS is NOT enabled" return
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 +4 -12
@@ -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"
@@ -59,10 +55,8 @@ setup() tst_brk TBROK "Unable to find $DEBUGFS_CONTROL" fi - if tst_kvcmp -ge 3.4 ; then - NEW_INTERFACE=1 - EMPTY_FLAG="=_" - fi + NEW_INTERFACE=1 + EMPTY_FLAG="=_" grep -v "^#" "$DEBUGFS_CONTROL" > "$DYNDEBUG_STATEMENTS" }
@@ -87,10 +81,8 @@ do_all_flags() for INPUT_LINE in $ALL_INPUTS; do do_flag "+p" "$OPTION" "$INPUT_LINE" - if tst_kvcmp -ge 3.2 || [ $NEW_INTERFACE -eq 1 ] ; then - do_flag "+flmt" "$OPTION" "$INPUT_LINE" - do_flag "-flmt" "$OPTION" "$INPUT_LINE" - fi + do_flag "+flmt" "$OPTION" "$INPUT_LINE" + do_flag "-flmt" "$OPTION" "$INPUT_LINE" do_flag "-p" "$OPTION" "$INPUT_LINE" done
testcases/kernel/tracing/ftrace_test/ftrace_regression02.sh +0 -4
@@ -54,10 +54,6 @@ ftrace_signal_test() fi } -if tst_kvcmp -lt "3.2"; then - tst_brkm TCONF "The test should be run in kernels >= 3.2.0 Skip the test..." -fi - ftrace_signal_test tst_exit
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)
testcases/network/virt/virt_lib.sh +0 -8
@@ -44,10 +44,6 @@ virt_lib_setup() { case "$virt_type" in vxlan|geneve) - if tst_kvcmp -lt "3.8"; then - tst_brk TCONF "test must be run with kernel 3.8 or newer" - fi - if [ "$TST_IPV6" ] && tst_kvcmp -lt "3.12"; then tst_brk TCONF "test must be run with kernels >= 3.12" fi
@@ -252,10 +248,6 @@ virt_minimize_timeout() vxlan_setup_subnet_uni() { - if tst_kvcmp -lt "3.10"; then - tst_brk TCONF "test must be run with kernel 3.10 or newer" - fi - [ "$(ip link add type $virt_type help 2>&1 | grep remote)" ] || \ tst_brk TCONF "iproute doesn't support remote unicast address"
Signature · 5 lines
2.27.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v1 2/4] shell: Remove old kernel version check
Hi Xu,
Quoted 2 lines
The oldest supported kernel version is 3.10, we don't need these checks. If people need to run these cases on old kernel, please use old release tag.
I suspect many of these tests are outdated or even horribly broken. Removing these tst_kvcmp will just hide that. Although this change is valid IMHO tests deserve careful check for their validity than just removing these obvious marks about their age.
Change in doc/shell-test-api.txt should be in separate commit.
Kind regards,
Petr
Quoted 600 lines
Signed-off-by Yang Xu <[email protected]>--- doc/shell-test-api.txt | 14 +++++----- testcases/commands/mkswap/mkswap01.sh | 7 +---- .../kernel/containers/netns/netns_sysfs.sh | 4 --- .../cgroup/cgroup_regression_test.sh | 9 ------ .../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 | 16 +++-------- .../ftrace_test/ftrace_regression02.sh | 4 --- .../ftrace_stress/ftrace_trace_clock.sh | 28 ++++--------------- .../ftrace_stress/ftrace_trace_stat.sh | 6 ---- .../multicast/grp-operation/mcast-lib.sh | 1 - testcases/network/virt/virt_lib.sh | 8 ------ 27 files changed, 48 insertions(+), 172 deletions(-)doc/shell-test-api.txt +7
-7@@ -656,14 +656,14 @@ with syntax similar to the shell test command. [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 5.0.0 +if tst_kvcmp -le 5.0.0; then + tst_brk TCONF "Kernel newer than 5.0.0 is needed" fi -# Exit the test if kernel is newer than 3.8 and older than 4.0.1 -if tst_kvcmp -gt 3.8 -a -lt 4.0.1; then - tst_brk TCONF "Kernel must be older than 3.8 or newer than 4.0.1" +# Exit the test if kernel is newer than 3.10 and older than 4.0.1 +if tst_kvcmp -gt 3.10 -a -lt 4.0.1; then + tst_brk TCONF "Kernel must be older than 3.10 or newer than 4.0.1" fi -------------------------------------------------------------------------------@@ -680,7 +680,7 @@ fi | -o | Does logical or between two expressions |======================================================================= -The format for kernel version has to either be with one dot e.g. '2.6' or with +The format for kernel version has to either be with one dot e.g. '3.10' or with two dots e.g. '4.8.1'. .tst_fs_has_freetestcases/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/nulltestcases/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
-9@@ -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@@ -255,11 +251,6 @@ test5() #--------------------------------------------------------------------------- test6() { - if tst_kvcmp -ge "3.0"; then - tst_res TCONF "CONFIG_CGROUP_NS is NOT supported in Kernels >= 3.0" - return - fi - if ! grep -q -w "ns" /proc/cgroups; then tst_res TCONF "CONFIG_CGROUP_NS is NOT enabled" returntestcases/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 ] ; thentestcases/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 ; thentestcases/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 python3testcases/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 python3testcases/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 python3testcases/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 python3testcases/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 python3testcases/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 python3testcases/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=0testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh +4
-12@@ -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"@@ -59,10 +55,8 @@ setup() tst_brk TBROK "Unable to find $DEBUGFS_CONTROL" fi - if tst_kvcmp -ge 3.4 ; then - NEW_INTERFACE=1 - EMPTY_FLAG="=_" - fi + NEW_INTERFACE=1 + EMPTY_FLAG="=_" grep -v "^#" "$DEBUGFS_CONTROL" > "$DYNDEBUG_STATEMENTS" }@@ -87,10 +81,8 @@ do_all_flags() for INPUT_LINE in $ALL_INPUTS; do do_flag "+p" "$OPTION" "$INPUT_LINE" - if tst_kvcmp -ge 3.2 || [ $NEW_INTERFACE -eq 1 ] ; then - do_flag "+flmt" "$OPTION" "$INPUT_LINE" - do_flag "-flmt" "$OPTION" "$INPUT_LINE" - fi + do_flag "+flmt" "$OPTION" "$INPUT_LINE" + do_flag "-flmt" "$OPTION" "$INPUT_LINE" do_flag "-p" "$OPTION" "$INPUT_LINE" donetestcases/kernel/tracing/ftrace_test/ftrace_regression02.sh +0
-4@@ -54,10 +54,6 @@ ftrace_signal_test() fi } -if tst_kvcmp -lt "3.2"; then - tst_brkm TCONF "The test should be run in kernels >= 3.2.0 Skip the test..." -fi - ftrace_signal_test tst_exittestcases/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 donetestcases/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 2testcases/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)testcases/network/virt/virt_lib.sh +0
-8@@ -44,10 +44,6 @@ virt_lib_setup() { case "$virt_type" in vxlan|geneve) - if tst_kvcmp -lt "3.8"; then - tst_brk TCONF "test must be run with kernel 3.8 or newer" - fi - if [ "$TST_IPV6" ] && tst_kvcmp -lt "3.12"; then tst_brk TCONF "test must be run with kernels >= 3.12" fi@@ -252,10 +248,6 @@ virt_minimize_timeout() vxlan_setup_subnet_uni() { - if tst_kvcmp -lt "3.10"; then - tst_brk TCONF "test must be run with kernel 3.10 or newer" - fi - [ "$(ip link add type $virt_type help 2>&1 | grep remote)" ] || \ tst_brk TCONF "iproute doesn't support remote unicast address"
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v1 2/4] shell: Remove old kernel version check
Hi Petr
Quoted 6 lines
Hi Xu,
Quoted 2 lines
The oldest supported kernel version is 3.10, we don't need these checks. If people need to run these cases on old kernel, please use old release tag.
I suspect many of these tests are outdated or even horribly broken.
On my weekly test environment, cgroup related cases and runpwtest01 case works well. And other cases reports TCONF because of kernel config ie runpwtests_exclusive0[1-6].sh.
pass cases:
testcases/commands/mkswap/mkswap01.sh | 7 +----
.../kernel/containers/netns/netns_sysfs.sh | 4 ---
.../cgroup/cgroup_regression_test.sh | 9 ------
.../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 ++----
.../security/cap_bound/run_capbounds.sh | 6 ----
.../tracing/dynamic_debug/dynamic_debug01.sh | 16 +++--------
.../ftrace_test/ftrace_regression02.sh | 4 ---
.../ftrace_stress/ftrace_trace_clock.sh | 28 ++---------------
.../ftrace_stress/ftrace_trace_stat.sh | 6 ----Quoted 3 lines
Removing these
tst_kvcmpwill just hide that. Although this change is valid IMHO tests deserve careful check for their validity than just removing these obvious marks about their age.
Agree, so I have tried them and it works well, so I don't think it will hide because it only removes old kernel version check.
Quoted 3 lines
Change in
doc/shell-test-api.txtshould be in separate commit.
OK.
Best Regards
Yang Xu
Quoted 603 lines
Kind regards,
PetrQuoted 600 lines
Signed-off-by Yang Xu <[email protected]>--- doc/shell-test-api.txt | 14 +++++----- testcases/commands/mkswap/mkswap01.sh | 7 +---- .../kernel/containers/netns/netns_sysfs.sh | 4 --- .../cgroup/cgroup_regression_test.sh | 9 ------ .../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 | 16 +++-------- .../ftrace_test/ftrace_regression02.sh | 4 --- .../ftrace_stress/ftrace_trace_clock.sh | 28 ++++--------------- .../ftrace_stress/ftrace_trace_stat.sh | 6 ---- .../multicast/grp-operation/mcast-lib.sh | 1 - testcases/network/virt/virt_lib.sh | 8 ------ 27 files changed, 48 insertions(+), 172 deletions(-)doc/shell-test-api.txt +7
-7@@ -656,14 +656,14 @@ with syntax similar to the shell test command. [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 5.0.0 +if tst_kvcmp -le 5.0.0; then + tst_brk TCONF "Kernel newer than 5.0.0 is needed" fi -# Exit the test if kernel is newer than 3.8 and older than 4.0.1 -if tst_kvcmp -gt 3.8 -a -lt 4.0.1; then - tst_brk TCONF "Kernel must be older than 3.8 or newer than 4.0.1" +# Exit the test if kernel is newer than 3.10 and older than 4.0.1 +if tst_kvcmp -gt 3.10 -a -lt 4.0.1; then + tst_brk TCONF "Kernel must be older than 3.10 or newer than 4.0.1" fi -------------------------------------------------------------------------------@@ -680,7 +680,7 @@ fi | -o | Does logical or between two expressions |======================================================================= -The format for kernel version has to either be with one dot e.g. '2.6' or with +The format for kernel version has to either be with one dot e.g. '3.10' or with two dots e.g. '4.8.1'. .tst_fs_has_freetestcases/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/nulltestcases/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
-9@@ -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@@ -255,11 +251,6 @@ test5() #--------------------------------------------------------------------------- test6() { - if tst_kvcmp -ge "3.0"; then - tst_res TCONF "CONFIG_CGROUP_NS is NOT supported in Kernels >= 3.0" - return - fi - if ! grep -q -w "ns" /proc/cgroups; then tst_res TCONF "CONFIG_CGROUP_NS is NOT enabled" returntestcases/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 ] ; thentestcases/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 ; thentestcases/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 python3testcases/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 python3testcases/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 python3testcases/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 python3testcases/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 python3testcases/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 python3testcases/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=0testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh +4
-12@@ -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"@@ -59,10 +55,8 @@ setup() tst_brk TBROK "Unable to find $DEBUGFS_CONTROL" fi - if tst_kvcmp -ge 3.4 ; then - NEW_INTERFACE=1 - EMPTY_FLAG="=_" - fi + NEW_INTERFACE=1 + EMPTY_FLAG="=_" grep -v "^#" "$DEBUGFS_CONTROL" > "$DYNDEBUG_STATEMENTS" }@@ -87,10 +81,8 @@ do_all_flags() for INPUT_LINE in $ALL_INPUTS; do do_flag "+p" "$OPTION" "$INPUT_LINE" - if tst_kvcmp -ge 3.2 || [ $NEW_INTERFACE -eq 1 ] ; then - do_flag "+flmt" "$OPTION" "$INPUT_LINE" - do_flag "-flmt" "$OPTION" "$INPUT_LINE" - fi + do_flag "+flmt" "$OPTION" "$INPUT_LINE" + do_flag "-flmt" "$OPTION" "$INPUT_LINE" do_flag "-p" "$OPTION" "$INPUT_LINE" donetestcases/kernel/tracing/ftrace_test/ftrace_regression02.sh +0
-4@@ -54,10 +54,6 @@ ftrace_signal_test() fi } -if tst_kvcmp -lt "3.2"; then - tst_brkm TCONF "The test should be run in kernels >= 3.2.0 Skip the test..." -fi - ftrace_signal_test tst_exittestcases/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 donetestcases/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 2testcases/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)testcases/network/virt/virt_lib.sh +0
-8@@ -44,10 +44,6 @@ virt_lib_setup() { case "$virt_type" in vxlan|geneve) - if tst_kvcmp -lt "3.8"; then - tst_brk TCONF "test must be run with kernel 3.8 or newer" - fi - if [ "$TST_IPV6" ] && tst_kvcmp -lt "3.12"; then tst_brk TCONF "test must be run with kernels >= 3.12" fi@@ -252,10 +248,6 @@ virt_minimize_timeout() vxlan_setup_subnet_uni() { - if tst_kvcmp -lt "3.10"; then - tst_brk TCONF "test must be run with kernel 3.10 or newer" - fi - [ "$(ip link add type $virt_type help 2>&1 | grep remote)" ] || \ tst_brk TCONF "iproute doesn't support remote unicast address"
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH 3/4 Remove old kernel version check in C case when using tst_kvercmp
In reply to Yang XuThe oldest supported kernel version is 3.10, so remove them.
--- include/lapi/common_timers.h | 5 --- include/lapi/init_module.h | 13 ------ .../kernel/containers/mqns/mqns_helper.h | 3 -- .../kernel/containers/pidns/pidns_helper.h | 3 -- .../kernel/containers/userns/userns_helper.h | 3 -- testcases/kernel/containers/utsname/utstest.c | 3 -- .../controllers/cgroup_xattr/cgroup_xattr.c | 5 --- .../kernel/device-drivers/acpi/ltp_acpi.c | 20 --------- .../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 --- .../kernel/firmware/fw_load_user/fw_load.c | 5 --- testcases/kernel/input/input_helper.c | 18 ++------ testcases/kernel/mem/vma/vma01.c | 8 +--- .../power_management/pm_get_sched_values.c | 20 +-------- .../security/prot_hsymlinks/prot_hsymlinks.c | 4 -- .../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 | 14 +----- .../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 ---- .../syscalls/finit_module/finit_module01.c | 2 - .../syscalls/finit_module/finit_module02.c | 2 - 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/ioctl/ioctl01.c | 8 ---- testcases/kernel/syscalls/ioperm/ioperm01.c | 11 +---- testcases/kernel/syscalls/ioperm/ioperm02.c | 15 +------ .../kernel/syscalls/ipc/msgrcv/msgrcv07.c | 3 +- testcases/kernel/syscalls/linkat/linkat01.c | 6 --- testcases/kernel/syscalls/linkat/linkat02.c | 3 -- testcases/kernel/syscalls/madvise/madvise02.c | 8 +--- testcases/kernel/syscalls/mbind/mbind01.c | 6 --- .../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 ------ testcases/kernel/syscalls/pipe2/pipe2_01.c | 4 -- .../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 | 11 +---- 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/network/netstress/netstress.c | 3 -- testcases/open_posix_testsuite/Makefile | 4 -- testcases/open_posix_testsuite/Makefile.linux | 20 --------- 83 files changed, 48 insertions(+), 679 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>
include/lapi/init_module.h +0 -13
@@ -21,17 +21,4 @@ static inline int finit_module(int fd, const char *param_values, int flags) {return tst_syscall (__NR_finit_module, fd, param_values, flags); } - -static inline void finit_module_supported_by_kernel (void ) -{ -long ret; - -if ((tst_kvercmp (3 ,8 ,0 )) <0 ) { -/* Check if the syscall is backported on an older kernel */ - ret =syscall (__NR_finit_module,0 ,"" ,0 ); -if (ret ==-1 && errno ==ENOSYS ) -tst_brk (TCONF ,"Test not supported on kernel version < v3.8" ); - } -} -#endif /* LAPI_INIT_MODULE_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/userns/userns_helper.h +0 -3
@@ -29,9 +29,6 @@ static int check_newuser(void) {int pid, status; -if (tst_kvercmp (3 ,8 ,0 ) <0 ) -tst_brkm (TCONF ,NULL ,"CLONE_NEWUSER not supported" ); - pid =do_clone_unshare_test (T_CLONE ,CLONE_NEWUSER , dummy_child,NULL );if (pid ==-1 )tst_brkm (TCONF |TERRNO ,NULL ,"CLONE_NEWUSER 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/controllers/cgroup_xattr/cgroup_xattr.c +0 -5
@@ -150,11 +150,6 @@ void setup(int argc, char *argv[])if (access ("/proc/cgroups" ,F_OK ) ==-1 )tst_brkm (TCONF ,NULL ,"Kernel doesn't support cgroups" ); -if (tst_kvercmp (3 ,7 ,0 ) <0 ) { -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 3.7 or newer" ); - } -for (i =0 ; i <ARRAY_SIZE (tkeys); ++i) {if (!strcmp (tkeys[i].name,"security." )) { tkeys[i].good =tst_kvercmp (3 ,15 ,0 ) <0 ;
testcases/kernel/device-drivers/acpi/ltp_acpi.c +0 -20
@@ -57,8 +57,6 @@ static int tc_acpi_str(void)int res, ret =0 ;char descr[4096 ], sysfs_path[4096 ]; -int not_kver_3_7 =tst_kvercmp (3 ,7 ,0 ) <0 ; -while (1 ) {SAFE_FILE_PRINTF (cleanup, dev_tcase,"%d" ,ACPI_TRAVERSE );
@@ -86,19 +84,6 @@ static int tc_acpi_str(void)continue ; } -/* -* Find device description in sysfs. -* -* New sysfs interface to export device description -* implemented since Linux 3.7 -*/ -if (not_kver_3_7) { -tst_resm (TINFO ,"sysfs _STR check required Linux 3.7+" ); - ret =TCONF ; -/* continue, we can still traverse ACPI devices */ -continue ; - } -strcat (sysfs_path,"/description" );if (access (sysfs_path,R_OK )) { tst_resm(TINFO, "can't find description file '%s'",
@@ -148,11 +133,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/firmware/fw_load_user/fw_load.c +0 -5
@@ -114,11 +114,6 @@ void setup(int argc, char *argv[])tst_require_root (); -if (tst_kvercmp (3 ,7 ,0 ) <0 ) { -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 3.7 or newer" ); - } -char fw_size_param[19 ];snprintf (fw_size_param,19 ,"fw_size=%d" , fw_size);char *const mod_params[2 ] = { fw_size_param,NULL };
testcases/kernel/input/input_helper.c +4 -14
@@ -249,27 +249,17 @@ int check_sync_event(struct input_event *iev)int no_events_queued (int fd,int stray_sync_event) {struct pollfd fds = {.fd = fd, .events =POLLIN }; -int ret, res, sync_event_ignored; +int ret, res;struct input_event ev; -if (tst_kvercmp (3 ,7 ,0 ) <0 && stray_sync_event) - sync_event_ignored =1 ; - ret =poll (&fds,1 ,30 );if (ret >0 ) { res =read (fd, &ev,sizeof (ev)); -if (res ==sizeof (ev)) { -if (sync_event_ignored &&check_sync_event (&ev)) { - ret =0 ; -tst_resm (TINFO , -"Ignoring stray sync event (known problem)" ); - }else { -tst_resm (TINFO , -"Unexpected ev type=%i code=%i value=%i" , - ev.type, ev.code, ev.value); - } +tst_resm (TINFO , +"Unexpected ev type=%i code=%i value=%i" , + ev.type, ev.code, ev.value); } }
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/security/prot_hsymlinks/prot_hsymlinks.c +0 -4
@@ -193,10 +193,6 @@ static void setup(int argc, char *argv[])tst_require_root (); -if (tst_kvercmp (3 ,7 ,0 ) <0 ) -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 3.7 or newer" ); -if (eaccess ("/etc/passwd" ,W_OK )) {tst_brkm (TCONF ,NULL ,"/etc/passwd is not accessible" );
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 +2 -12
@@ -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 ) {
@@ -126,13 +121,8 @@ static void test02(void)tst_brk (TFAIL |TERRNO ,"fallocate() or lseek() failed" ); } -if (tst_kvercmp (3 ,1 ,0 ) <0 ) { -tst_res (TINFO ,"lseek() doesn't support SEEK_HOLE, " -"this is expected for < 3.1 kernels" ); - }else { -tst_brk (TBROK |TERRNO , -"lseek() doesn't support SEEK_HOLE" ); - } +tst_brk (TBROK |TERRNO , +"lseek() doesn't support SEEK_HOLE" ); }else {tst_res (TINFO ,"found a hole at '%ld' offset" , ret); }
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/finit_module/finit_module01.c +0 -2
@@ -25,8 +25,6 @@ static char *mod_path;static void setup (void ) { -finit_module_supported_by_kernel (); -tst_module_exists (MODULE_NAME , &mod_path); fd =SAFE_OPEN (mod_path,O_RDONLY |O_CLOEXEC );
testcases/kernel/syscalls/finit_module/finit_module02.c +0 -2
@@ -81,8 +81,6 @@ static void setup(void) {unsigned long int i; -finit_module_supported_by_kernel (); -tst_module_exists (MODULE_NAME , &mod_path); kernel_lockdown =tst_lockdown_enabled ();
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
@@ -156,13 +156,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/ioctl/ioctl01.c +0 -8
@@ -79,14 +79,6 @@ static void setup(void)tst_brk (TBROK ,"You must specify a tty device with -D option" ); fd =SAFE_OPEN (device,O_RDWR ,0777 ); - -if (tst_kvercmp (3 ,7 ,0 ) <0 ) { -for (i =0 ; i <ARRAY_SIZE (tcases); i++) { -if (tcases[i].request ==INVAL_IOCTL ) - tcases[i].error =EINVAL ; - } - } - fd_file =SAFE_OPEN ("x" ,O_CREAT ,0777 ); }
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/ipc/msgrcv/msgrcv07.c +1 -2
@@ -247,8 +247,7 @@ static void setup(void) { msgkey =GETIPCKEY (); -if (tst_kvercmp (3 ,8 ,0 ) >=0 ) - msg_copy_sup =1 ; + msg_copy_sup =1 ; }static void (*testfunc[])(void ) = {test_msg_except, test_msg_noerror,
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 +1 -7
@@ -97,14 +97,9 @@ static void tcases_filter(void)#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 )
@@ -114,8 +109,7 @@ static void tcases_filter(void)/* In kernel commit 1998cc0, madvise(MADV_WILLNEED) to * anon mem doesn't return -EBADF now, as now we support * swap prefretch. */ -if ((tst_kvercmp (3 ,9 ,0 )) >0 && - tc->exp_errno ==EBADF ) +if (tc->exp_errno ==EBADF ) tc->skip =1 ;break ;case MADV_FREE :
testcases/kernel/syscalls/mbind/mbind01.c +0 -6
@@ -197,12 +197,6 @@ static void do_test(unsigned int i)tst_res (TINFO ,"case %s" , tc->desc);if (tc->policy ==MPOL_LOCAL ) { -if ((tst_kvercmp (3 ,8 ,0 )) <0 ) { -tst_res (TCONF ,"%s is not supported" , -tst_mempolicy_mode_name (tc->policy)); -return ; - } -if ((tst_kvercmp (5 ,14 ,0 )) >=0 ) tc->check_policy =NULL ; }
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/pipe2/pipe2_01.c +0 -4
@@ -54,10 +54,6 @@ static void verify_pipe2(unsigned int n)int get_flag =0 , i =0 ;tst_res (TINFO ,"%s " , tc->message); -if ((tc->flags ==O_DIRECT ) && (tst_kvercmp (3 ,4 ,0 )) <0 ) { -tst_res (TCONF ,"O_DIRECT needs Linux 3.4 or newer" ); -return ; - }SAFE_PIPE2 (fds, tc->flags);for (i =0 ; i <2 ; i++) {
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
@@ -263,12 +263,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 -9
@@ -185,13 +185,7 @@ static void setup0(void) "errno: %s", strerror(errno)); } -/* -* kernel commit 46ce341b2f176c2611f12ac390adf862e932eb02 -* changed -EINVAL to -ENOIOCTLCMD, so vfs_ioctl now -* returns -ENOTTY. -*/ -if ((tst_kvercmp (3 ,5 ,0 )) >=0 ) - tdat[testno].experrno =ENOTTY ; + tdat[testno].experrno =ENOTTY ; } }
@@ -211,8 +205,7 @@ static void setup1(void) sinlen =sizeof (fsin1);if (strncmp (tdat[testno].desc,"ATMARK on UDP" ,14 ) ==0 ) { -if ((tst_kvercmp (2 ,6 ,39 )) >=0 ) - tdat[testno].experrno =ENOTTY ; + tdat[testno].experrno =ENOTTY ; } }
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/network/netstress/netstress.c +0 -3
@@ -882,9 +882,6 @@ static void setup(void)if (!clients_num) clients_num =sysconf (_SC_NPROCESSORS_ONLN); -if (tfo_value >0 &&tst_kvercmp (3 ,7 ,0 ) <0 ) -tst_brk (TCONF ,"Test must be run with kernel 3.7 or newer" ); -if (busy_poll >=0 &&tst_kvercmp (3 ,11 ,0 ) <0 )tst_brk (TCONF ,"Test must be run with kernel 3.11 or newer" );
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 v1 3/4] Remove old kernel version check in C case when using tst_kvercmp
Hi Xu,
Quoted 1 line
The oldest supported kernel version is 3.10, so remove them.
Well, 3.10 is the oldest *tested* distribution [1], the document actually does not state what is the minimal supported version. If I remember correctly some time ago we agreed on ML on 3.0. I'm OK, if we raise it to 3.10, but it should be stated.
Also Cc [email protected], in case somebody is really using new LTP on very old kernels (I hope not).
Kind regards,
Petr
[1] https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions
Quoted 1,861 lines
Signed-off-by Yang Xu <[email protected]>--- include/lapi/common_timers.h | 5 --- include/lapi/init_module.h | 13 ------ .../kernel/containers/mqns/mqns_helper.h | 3 -- .../kernel/containers/pidns/pidns_helper.h | 3 -- .../kernel/containers/userns/userns_helper.h | 3 -- testcases/kernel/containers/utsname/utstest.c | 3 -- .../controllers/cgroup_xattr/cgroup_xattr.c | 5 --- .../kernel/device-drivers/acpi/ltp_acpi.c | 20 --------- .../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 --- .../kernel/firmware/fw_load_user/fw_load.c | 5 --- testcases/kernel/input/input_helper.c | 18 ++------ testcases/kernel/mem/vma/vma01.c | 8 +--- .../power_management/pm_get_sched_values.c | 20 +-------- .../security/prot_hsymlinks/prot_hsymlinks.c | 4 -- .../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 | 14 +----- .../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 ---- .../syscalls/finit_module/finit_module01.c | 2 - .../syscalls/finit_module/finit_module02.c | 2 - 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/ioctl/ioctl01.c | 8 ---- testcases/kernel/syscalls/ioperm/ioperm01.c | 11 +---- testcases/kernel/syscalls/ioperm/ioperm02.c | 15 +------ .../kernel/syscalls/ipc/msgrcv/msgrcv07.c | 3 +- testcases/kernel/syscalls/linkat/linkat01.c | 6 --- testcases/kernel/syscalls/linkat/linkat02.c | 3 -- testcases/kernel/syscalls/madvise/madvise02.c | 8 +--- testcases/kernel/syscalls/mbind/mbind01.c | 6 --- .../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 ------ testcases/kernel/syscalls/pipe2/pipe2_01.c | 4 -- .../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 | 11 +---- 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/network/netstress/netstress.c | 3 -- testcases/open_posix_testsuite/Makefile | 4 -- testcases/open_posix_testsuite/Makefile.linux | 20 --------- 83 files changed, 48 insertions(+), 679 deletions(-) delete mode 100644 testcases/open_posix_testsuite/Makefile.linuxinclude/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> include/lapi/init_module.h +0
-13@@ -21,17 +21,4 @@ static inline int finit_module(int fd, const char *param_values, int flags) {return tst_syscall (__NR_finit_module, fd, param_values, flags); } - -static inline void finit_module_supported_by_kernel (void ) -{ -long ret; - -if ((tst_kvercmp (3 ,8 ,0 )) <0 ) { -/* Check if the syscall is backported on an older kernel */ - ret =syscall (__NR_finit_module,0 ,"" ,0 ); -if (ret ==-1 && errno ==ENOSYS ) -tst_brk (TCONF ,"Test not supported on kernel version < v3.8" ); - } -} -#endif /* LAPI_INIT_MODULE_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/userns/userns_helper.h +0
-3@@ -29,9 +29,6 @@ static int check_newuser(void) {int pid, status; -if (tst_kvercmp (3 ,8 ,0 ) <0 ) -tst_brkm (TCONF ,NULL ,"CLONE_NEWUSER not supported" ); - pid =do_clone_unshare_test (T_CLONE ,CLONE_NEWUSER , dummy_child,NULL );if (pid ==-1 )tst_brkm (TCONF |TERRNO ,NULL ,"CLONE_NEWUSER 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/controllers/cgroup_xattr/cgroup_xattr.c +0
-5@@ -150,11 +150,6 @@ void setup(int argc, char *argv[])if (access ("/proc/cgroups" ,F_OK ) ==-1 )tst_brkm (TCONF ,NULL ,"Kernel doesn't support cgroups" ); -if (tst_kvercmp (3 ,7 ,0 ) <0 ) { -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 3.7 or newer" ); - } -for (i =0 ; i <ARRAY_SIZE (tkeys); ++i) {if (!strcmp (tkeys[i].name,"security." )) { tkeys[i].good =tst_kvercmp (3 ,15 ,0 ) <0 ;testcases/kernel/device-drivers/acpi/ltp_acpi.c +0
-20@@ -57,8 +57,6 @@ static int tc_acpi_str(void)int res, ret =0 ;char descr[4096 ], sysfs_path[4096 ]; -int not_kver_3_7 =tst_kvercmp (3 ,7 ,0 ) <0 ; -while (1 ) {SAFE_FILE_PRINTF (cleanup, dev_tcase,"%d" ,ACPI_TRAVERSE );@@ -86,19 +84,6 @@ static int tc_acpi_str(void)continue ; } -/* -* Find device description in sysfs. -* -* New sysfs interface to export device description -* implemented since Linux 3.7 -*/ -if (not_kver_3_7) { -tst_resm (TINFO ,"sysfs _STR check required Linux 3.7+" ); - ret =TCONF ; -/* continue, we can still traverse ACPI devices */ -continue ; - } -strcat (sysfs_path,"/description" );if (access (sysfs_path,R_OK )) { tst_resm(TINFO, "can't find description file '%s'",@@ -148,11 +133,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/firmware/fw_load_user/fw_load.c +0
-5@@ -114,11 +114,6 @@ void setup(int argc, char *argv[])tst_require_root (); -if (tst_kvercmp (3 ,7 ,0 ) <0 ) { -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 3.7 or newer" ); - } -char fw_size_param[19 ];snprintf (fw_size_param,19 ,"fw_size=%d" , fw_size);char *const mod_params[2 ] = { fw_size_param,NULL };testcases/kernel/input/input_helper.c +4
-14@@ -249,27 +249,17 @@ int check_sync_event(struct input_event *iev)int no_events_queued (int fd,int stray_sync_event) {struct pollfd fds = {.fd = fd, .events =POLLIN }; -int ret, res, sync_event_ignored; +int ret, res;struct input_event ev; -if (tst_kvercmp (3 ,7 ,0 ) <0 && stray_sync_event) - sync_event_ignored =1 ; - ret =poll (&fds,1 ,30 );if (ret >0 ) { res =read (fd, &ev,sizeof (ev)); -if (res ==sizeof (ev)) { -if (sync_event_ignored &&check_sync_event (&ev)) { - ret =0 ; -tst_resm (TINFO , -"Ignoring stray sync event (known problem)" ); - }else { -tst_resm (TINFO , -"Unexpected ev type=%i code=%i value=%i" , - ev.type, ev.code, ev.value); - } +tst_resm (TINFO , +"Unexpected ev type=%i code=%i value=%i" , + ev.type, ev.code, ev.value); } }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/security/prot_hsymlinks/prot_hsymlinks.c +0
-4@@ -193,10 +193,6 @@ static void setup(int argc, char *argv[])tst_require_root (); -if (tst_kvercmp (3 ,7 ,0 ) <0 ) -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 3.7 or newer" ); -if (eaccess ("/etc/passwd" ,W_OK )) {tst_brkm (TCONF ,NULL ,"/etc/passwd is not accessible" );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@@ -28,11 +28,6 @@ static void test_clone_tid(int t);static int child_clone_child_settid (void *);static int child_clone_parent_settid (void *); -#ifdef CLONE_STOPPED -static void test_clone_stopped (int t); -static int child_clone_stopped (void *); -static int stopped_flag; -#endif static void test_clone_thread (int t);static int child_clone_thread (void *);@@ -57,10 +52,6 @@ static struct test_case { test_clone_tid, child_clone_child_settid}, {"CLONE_PARENT_SETTID" ,CLONE_PARENT_SETTID |CLONE_VM |SIGCHLD , test_clone_tid, child_clone_parent_settid}, -#ifdef CLONE_STOPPED - {"CLONE_STOPPED", CLONE_STOPPED | CLONE_VM | SIGCHLD, - test_clone_stopped, child_clone_stopped}, -#endif {"CLONE_THREAD", CLONE_THREAD | CLONE_SIGHAND | CLONE_VM |CLONE_CHILD_CLEARTID |SIGCHLD , test_clone_thread, child_clone_thread},@@ -147,40 +138,6 @@ static int child_clone_parent_settid(void *arg LTP_ATTRIBUTE_UNUSED)return 0 ; } -#ifdef CLONE_STOPPED -static void test_clone_stopped (int t) -{ -pid_t child; - -if (tst_kvercmp (2 ,6 ,38 ) >=0 ) { -tst_res (TCONF ,"CLONE_STOPPED skipped for kernels >= 2.6.38" ); -return ; - } - - child =clone_child (&test_cases[t]); - -TST_PROCESS_STATE_WAIT (child,'T' ,0 ); - - stopped_flag =0 ; - -SAFE_KILL (child,SIGCONT ); - -tst_reap_children (); - -if (stopped_flag ==1 ) -tst_res (TPASS ,"clone stopped and resumed as expected" ); -else -tst_res (TFAIL ,"clone not stopped, flag %d" , stopped_flag); -} - -static int child_clone_stopped(void *arg LTP_ATTRIBUTE_UNUSED) -{ - stopped_flag =1 ; -tst_syscall (__NR_exit,0 ); -return 0 ; -} -#endif -static void test_clone_thread (int t) {pid_t child;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 +2
-12@@ -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 ) {@@ -126,13 +121,8 @@ static void test02(void)tst_brk (TFAIL |TERRNO ,"fallocate() or lseek() failed" ); } -if (tst_kvercmp (3 ,1 ,0 ) <0 ) { -tst_res (TINFO ,"lseek() doesn't support SEEK_HOLE, " -"this is expected for < 3.1 kernels" ); - }else { -tst_brk (TBROK |TERRNO , -"lseek() doesn't support SEEK_HOLE" ); - } +tst_brk (TBROK |TERRNO , +"lseek() doesn't support SEEK_HOLE" ); }else {tst_res (TINFO ,"found a hole at '%ld' offset" , ret); }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/finit_module/finit_module01.c +0
-2@@ -25,8 +25,6 @@ static char *mod_path;static void setup (void ) { -finit_module_supported_by_kernel (); -tst_module_exists (MODULE_NAME , &mod_path); fd =SAFE_OPEN (mod_path,O_RDONLY |O_CLOEXEC );testcases/kernel/syscalls/finit_module/finit_module02.c +0
-2@@ -81,8 +81,6 @@ static void setup(void) {unsigned long int i; -finit_module_supported_by_kernel (); -tst_module_exists (MODULE_NAME , &mod_path); kernel_lockdown =tst_lockdown_enabled ();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@@ -156,13 +156,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/ioctl/ioctl01.c +0
-8@@ -79,14 +79,6 @@ static void setup(void)tst_brk (TBROK ,"You must specify a tty device with -D option" ); fd =SAFE_OPEN (device,O_RDWR ,0777 ); - -if (tst_kvercmp (3 ,7 ,0 ) <0 ) { -for (i =0 ; i <ARRAY_SIZE (tcases); i++) { -if (tcases[i].request ==INVAL_IOCTL ) - tcases[i].error =EINVAL ; - } - } - fd_file =SAFE_OPEN ("x" ,O_CREAT ,0777 ); }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/ipc/msgrcv/msgrcv07.c +1
-2@@ -247,8 +247,7 @@ static void setup(void) { msgkey =GETIPCKEY (); -if (tst_kvercmp (3 ,8 ,0 ) >=0 ) - msg_copy_sup =1 ; + msg_copy_sup =1 ; }static void (*testfunc[])(void ) = {test_msg_except, test_msg_noerror,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 +1
-7@@ -97,14 +97,9 @@ static void tcases_filter(void)#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 )@@ -114,8 +109,7 @@ static void tcases_filter(void)/* In kernel commit 1998cc0, madvise(MADV_WILLNEED) to * anon mem doesn't return -EBADF now, as now we support * swap prefretch. */ -if ((tst_kvercmp (3 ,9 ,0 )) >0 && - tc->exp_errno ==EBADF ) +if (tc->exp_errno ==EBADF ) tc->skip =1 ;break ;case MADV_FREE :testcases/kernel/syscalls/mbind/mbind01.c +0
-6@@ -197,12 +197,6 @@ static void do_test(unsigned int i)tst_res (TINFO ,"case %s" , tc->desc);if (tc->policy ==MPOL_LOCAL ) { -if ((tst_kvercmp (3 ,8 ,0 )) <0 ) { -tst_res (TCONF ,"%s is not supported" , -tst_mempolicy_mode_name (tc->policy)); -return ; - } -if ((tst_kvercmp (5 ,14 ,0 )) >=0 ) tc->check_policy =NULL ; }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/pipe2/pipe2_01.c +0
-4@@ -54,10 +54,6 @@ static void verify_pipe2(unsigned int n)int get_flag =0 , i =0 ;tst_res (TINFO ,"%s " , tc->message); -if ((tc->flags ==O_DIRECT ) && (tst_kvercmp (3 ,4 ,0 )) <0 ) { -tst_res (TCONF ,"O_DIRECT needs Linux 3.4 or newer" ); -return ; - }SAFE_PIPE2 (fds, tc->flags);for (i =0 ; i <2 ; i++) {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@@ -263,12 +263,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
-9@@ -185,13 +185,7 @@ static void setup0(void) "errno: %s", strerror(errno)); } -/* -* kernel commit 46ce341b2f176c2611f12ac390adf862e932eb02 -* changed -EINVAL to -ENOIOCTLCMD, so vfs_ioctl now -* returns -ENOTTY. -*/ -if ((tst_kvercmp (3 ,5 ,0 )) >=0 ) - tdat[testno].experrno =ENOTTY ; + tdat[testno].experrno =ENOTTY ; } }@@ -211,8 +205,7 @@ static void setup1(void) sinlen =sizeof (fsin1);if (strncmp (tdat[testno].desc,"ATMARK on UDP" ,14 ) ==0 ) { -if ((tst_kvercmp (2 ,6 ,39 )) >=0 ) - tdat[testno].experrno =ENOTTY ; + tdat[testno].experrno =ENOTTY ; } }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/network/netstress/netstress.c +0
-3@@ -882,9 +882,6 @@ static void setup(void)if (!clients_num) clients_num =sysconf (_SC_NPROCESSORS_ONLN); -if (tfo_value >0 &&tst_kvercmp (3 ,7 ,0 ) <0 ) -tst_brk (TCONF ,"Test must be run with kernel 3.7 or newer" ); -if (busy_poll >=0 &&tst_kvercmp (3 ,11 ,0 ) <0 )tst_brk (TCONF ,"Test must be run with kernel 3.11 or newer" );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-cleantestcases/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 · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Re: [LTP] [PATCH v1 3/4] Remove old kernel version check in C case when using tst_kvercmp
Hi Petr
Quoted 6 lines
Hi Xu,
Quoted 1 line
The oldest supported kernel version is 3.10, so remove them.
Well, 3.10 is the oldest *tested* distribution [1], the document actually does not state what is the minimal supported version. If I remember correctly some time ago we agreed on ML on 3.0.
Oh, yes, sorry, I misunderstand the old *test* distribution as the oldest kernel version.
It has been two years since we agreed on ML on 3.0. I think it is time to raise to 3.10
Quoted 2 lines
I'm OK, if we raise it to 3.10, but it should
be stated.
Yes.
Quoted 3 lines
Also Cc [email protected], in case somebody is really using new LTP on very old kernels (I hope not).
I will CC [email protected] on v2 if we all agree raise it to 3.10.
Best Regards
Yang Xu
Quoted 1,867 lines
Kind regards,
Petr[1] https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions
Quoted 1,861 lines
Signed-off-by Yang Xu <[email protected]>--- include/lapi/common_timers.h | 5 --- include/lapi/init_module.h | 13 ------ .../kernel/containers/mqns/mqns_helper.h | 3 -- .../kernel/containers/pidns/pidns_helper.h | 3 -- .../kernel/containers/userns/userns_helper.h | 3 -- testcases/kernel/containers/utsname/utstest.c | 3 -- .../controllers/cgroup_xattr/cgroup_xattr.c | 5 --- .../kernel/device-drivers/acpi/ltp_acpi.c | 20 --------- .../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 --- .../kernel/firmware/fw_load_user/fw_load.c | 5 --- testcases/kernel/input/input_helper.c | 18 ++------ testcases/kernel/mem/vma/vma01.c | 8 +--- .../power_management/pm_get_sched_values.c | 20 +-------- .../security/prot_hsymlinks/prot_hsymlinks.c | 4 -- .../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 | 14 +----- .../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 ---- .../syscalls/finit_module/finit_module01.c | 2 - .../syscalls/finit_module/finit_module02.c | 2 - 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/ioctl/ioctl01.c | 8 ---- testcases/kernel/syscalls/ioperm/ioperm01.c | 11 +---- testcases/kernel/syscalls/ioperm/ioperm02.c | 15 +------ .../kernel/syscalls/ipc/msgrcv/msgrcv07.c | 3 +- testcases/kernel/syscalls/linkat/linkat01.c | 6 --- testcases/kernel/syscalls/linkat/linkat02.c | 3 -- testcases/kernel/syscalls/madvise/madvise02.c | 8 +--- testcases/kernel/syscalls/mbind/mbind01.c | 6 --- .../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 ------ testcases/kernel/syscalls/pipe2/pipe2_01.c | 4 -- .../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 | 11 +---- 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/network/netstress/netstress.c | 3 -- testcases/open_posix_testsuite/Makefile | 4 -- testcases/open_posix_testsuite/Makefile.linux | 20 --------- 83 files changed, 48 insertions(+), 679 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> include/lapi/init_module.h +0
-13@@ -21,17 +21,4 @@ static inline int finit_module(int fd, const char *param_values, int flags) {return tst_syscall (__NR_finit_module, fd, param_values, flags); } - -static inline void finit_module_supported_by_kernel (void ) -{ -long ret; - -if ((tst_kvercmp (3 ,8 ,0 )) <0 ) { -/* Check if the syscall is backported on an older kernel */ - ret =syscall (__NR_finit_module,0 ,"" ,0 ); -if (ret ==-1 && errno ==ENOSYS ) -tst_brk (TCONF ,"Test not supported on kernel version < v3.8" ); - } -} -#endif /* LAPI_INIT_MODULE_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/userns/userns_helper.h +0
-3@@ -29,9 +29,6 @@ static int check_newuser(void) {int pid, status; -if (tst_kvercmp (3 ,8 ,0 ) <0 ) -tst_brkm (TCONF ,NULL ,"CLONE_NEWUSER not supported" ); - pid =do_clone_unshare_test (T_CLONE ,CLONE_NEWUSER , dummy_child,NULL );if (pid ==-1 )tst_brkm (TCONF |TERRNO ,NULL ,"CLONE_NEWUSER 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/controllers/cgroup_xattr/cgroup_xattr.c +0
-5@@ -150,11 +150,6 @@ void setup(int argc, char *argv[])if (access ("/proc/cgroups" ,F_OK ) ==-1 )tst_brkm (TCONF ,NULL ,"Kernel doesn't support cgroups" ); -if (tst_kvercmp (3 ,7 ,0 ) <0 ) { -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 3.7 or newer" ); - } -for (i =0 ; i <ARRAY_SIZE (tkeys); ++i) {if (!strcmp (tkeys[i].name,"security." )) { tkeys[i].good =tst_kvercmp (3 ,15 ,0 ) <0 ;testcases/kernel/device-drivers/acpi/ltp_acpi.c +0
-20@@ -57,8 +57,6 @@ static int tc_acpi_str(void)int res, ret =0 ;char descr[4096 ], sysfs_path[4096 ]; -int not_kver_3_7 =tst_kvercmp (3 ,7 ,0 ) <0 ; -while (1 ) {SAFE_FILE_PRINTF (cleanup, dev_tcase,"%d" ,ACPI_TRAVERSE );@@ -86,19 +84,6 @@ static int tc_acpi_str(void)continue ; } -/* -* Find device description in sysfs. -* -* New sysfs interface to export device description -* implemented since Linux 3.7 -*/ -if (not_kver_3_7) { -tst_resm (TINFO ,"sysfs _STR check required Linux 3.7+" ); - ret =TCONF ; -/* continue, we can still traverse ACPI devices */ -continue ; - } -strcat (sysfs_path,"/description" );if (access (sysfs_path,R_OK )) { tst_resm(TINFO, "can't find description file '%s'",@@ -148,11 +133,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/firmware/fw_load_user/fw_load.c +0
-5@@ -114,11 +114,6 @@ void setup(int argc, char *argv[])tst_require_root (); -if (tst_kvercmp (3 ,7 ,0 ) <0 ) { -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 3.7 or newer" ); - } -char fw_size_param[19 ];snprintf (fw_size_param,19 ,"fw_size=%d" , fw_size);char *const mod_params[2 ] = { fw_size_param,NULL };testcases/kernel/input/input_helper.c +4
-14@@ -249,27 +249,17 @@ int check_sync_event(struct input_event *iev)int no_events_queued (int fd,int stray_sync_event) {struct pollfd fds = {.fd = fd, .events =POLLIN }; -int ret, res, sync_event_ignored; +int ret, res;struct input_event ev; -if (tst_kvercmp (3 ,7 ,0 ) <0 && stray_sync_event) - sync_event_ignored =1 ; - ret =poll (&fds,1 ,30 );if (ret >0 ) { res =read (fd, &ev,sizeof (ev)); -if (res ==sizeof (ev)) { -if (sync_event_ignored &&check_sync_event (&ev)) { - ret =0 ; -tst_resm (TINFO , -"Ignoring stray sync event (known problem)" ); - }else { -tst_resm (TINFO , -"Unexpected ev type=%i code=%i value=%i" , - ev.type, ev.code, ev.value); - } +tst_resm (TINFO , +"Unexpected ev type=%i code=%i value=%i" , + ev.type, ev.code, ev.value); } }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/security/prot_hsymlinks/prot_hsymlinks.c +0
-4@@ -193,10 +193,6 @@ static void setup(int argc, char *argv[])tst_require_root (); -if (tst_kvercmp (3 ,7 ,0 ) <0 ) -tst_brkm (TCONF ,NULL , -"Test must be run with kernel 3.7 or newer" ); -if (eaccess ("/etc/passwd" ,W_OK )) {tst_brkm (TCONF ,NULL ,"/etc/passwd is not accessible" );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@@ -28,11 +28,6 @@ static void test_clone_tid(int t);static int child_clone_child_settid (void *);static int child_clone_parent_settid (void *); -#ifdef CLONE_STOPPED -static void test_clone_stopped (int t); -static int child_clone_stopped (void *); -static int stopped_flag; -#endif static void test_clone_thread (int t);static int child_clone_thread (void *);@@ -57,10 +52,6 @@ static struct test_case { test_clone_tid, child_clone_child_settid}, {"CLONE_PARENT_SETTID" ,CLONE_PARENT_SETTID |CLONE_VM |SIGCHLD , test_clone_tid, child_clone_parent_settid}, -#ifdef CLONE_STOPPED - {"CLONE_STOPPED", CLONE_STOPPED | CLONE_VM | SIGCHLD, - test_clone_stopped, child_clone_stopped}, -#endif {"CLONE_THREAD", CLONE_THREAD | CLONE_SIGHAND | CLONE_VM |CLONE_CHILD_CLEARTID |SIGCHLD , test_clone_thread, child_clone_thread},@@ -147,40 +138,6 @@ static int child_clone_parent_settid(void *arg LTP_ATTRIBUTE_UNUSED)return 0 ; } -#ifdef CLONE_STOPPED -static void test_clone_stopped (int t) -{ -pid_t child; - -if (tst_kvercmp (2 ,6 ,38 ) >=0 ) { -tst_res (TCONF ,"CLONE_STOPPED skipped for kernels >= 2.6.38" ); -return ; - } - - child =clone_child (&test_cases[t]); - -TST_PROCESS_STATE_WAIT (child,'T' ,0 ); - - stopped_flag =0 ; - -SAFE_KILL (child,SIGCONT ); - -tst_reap_children (); - -if (stopped_flag ==1 ) -tst_res (TPASS ,"clone stopped and resumed as expected" ); -else -tst_res (TFAIL ,"clone not stopped, flag %d" , stopped_flag); -} - -static int child_clone_stopped(void *arg LTP_ATTRIBUTE_UNUSED) -{ - stopped_flag =1 ; -tst_syscall (__NR_exit,0 ); -return 0 ; -} -#endif -static void test_clone_thread (int t) {pid_t child;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 +2
-12@@ -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 ) {@@ -126,13 +121,8 @@ static void test02(void)tst_brk (TFAIL |TERRNO ,"fallocate() or lseek() failed" ); } -if (tst_kvercmp (3 ,1 ,0 ) <0 ) { -tst_res (TINFO ,"lseek() doesn't support SEEK_HOLE, " -"this is expected for < 3.1 kernels" ); - }else { -tst_brk (TBROK |TERRNO , -"lseek() doesn't support SEEK_HOLE" ); - } +tst_brk (TBROK |TERRNO , +"lseek() doesn't support SEEK_HOLE" ); }else {tst_res (TINFO ,"found a hole at '%ld' offset" , ret); }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/finit_module/finit_module01.c +0
-2@@ -25,8 +25,6 @@ static char *mod_path;static void setup (void ) { -finit_module_supported_by_kernel (); -tst_module_exists (MODULE_NAME , &mod_path); fd =SAFE_OPEN (mod_path,O_RDONLY |O_CLOEXEC );testcases/kernel/syscalls/finit_module/finit_module02.c +0
-2@@ -81,8 +81,6 @@ static void setup(void) {unsigned long int i; -finit_module_supported_by_kernel (); -tst_module_exists (MODULE_NAME , &mod_path); kernel_lockdown =tst_lockdown_enabled ();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@@ -156,13 +156,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/ioctl/ioctl01.c +0
-8@@ -79,14 +79,6 @@ static void setup(void)tst_brk (TBROK ,"You must specify a tty device with -D option" ); fd =SAFE_OPEN (device,O_RDWR ,0777 ); - -if (tst_kvercmp (3 ,7 ,0 ) <0 ) { -for (i =0 ; i <ARRAY_SIZE (tcases); i++) { -if (tcases[i].request ==INVAL_IOCTL ) - tcases[i].error =EINVAL ; - } - } - fd_file =SAFE_OPEN ("x" ,O_CREAT ,0777 ); }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/ipc/msgrcv/msgrcv07.c +1
-2@@ -247,8 +247,7 @@ static void setup(void) { msgkey =GETIPCKEY (); -if (tst_kvercmp (3 ,8 ,0 ) >=0 ) - msg_copy_sup =1 ; + msg_copy_sup =1 ; }static void (*testfunc[])(void ) = {test_msg_except, test_msg_noerror,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 +1
-7@@ -97,14 +97,9 @@ static void tcases_filter(void)#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 )@@ -114,8 +109,7 @@ static void tcases_filter(void)/* In kernel commit 1998cc0, madvise(MADV_WILLNEED) to * anon mem doesn't return -EBADF now, as now we support * swap prefretch. */ -if ((tst_kvercmp (3 ,9 ,0 )) >0 && - tc->exp_errno ==EBADF ) +if (tc->exp_errno ==EBADF ) tc->skip =1 ;break ;case MADV_FREE :testcases/kernel/syscalls/mbind/mbind01.c +0
-6@@ -197,12 +197,6 @@ static void do_test(unsigned int i)tst_res (TINFO ,"case %s" , tc->desc);if (tc->policy ==MPOL_LOCAL ) { -if ((tst_kvercmp (3 ,8 ,0 )) <0 ) { -tst_res (TCONF ,"%s is not supported" , -tst_mempolicy_mode_name (tc->policy)); -return ; - } -if ((tst_kvercmp (5 ,14 ,0 )) >=0 ) tc->check_policy =NULL ; }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/pipe2/pipe2_01.c +0
-4@@ -54,10 +54,6 @@ static void verify_pipe2(unsigned int n)int get_flag =0 , i =0 ;tst_res (TINFO ,"%s " , tc->message); -if ((tc->flags ==O_DIRECT ) && (tst_kvercmp (3 ,4 ,0 )) <0 ) { -tst_res (TCONF ,"O_DIRECT needs Linux 3.4 or newer" ); -return ; - }SAFE_PIPE2 (fds, tc->flags);for (i =0 ; i <2 ; i++) {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@@ -263,12 +263,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
-9@@ -185,13 +185,7 @@ static void setup0(void) "errno: %s", strerror(errno)); } -/* -* kernel commit 46ce341b2f176c2611f12ac390adf862e932eb02 -* changed -EINVAL to -ENOIOCTLCMD, so vfs_ioctl now -* returns -ENOTTY. -*/ -if ((tst_kvercmp (3 ,5 ,0 )) >=0 ) - tdat[testno].experrno =ENOTTY ; + tdat[testno].experrno =ENOTTY ; } }@@ -211,8 +205,7 @@ static void setup1(void) sinlen =sizeof (fsin1);if (strncmp (tdat[testno].desc,"ATMARK on UDP" ,14 ) ==0 ) { -if ((tst_kvercmp (2 ,6 ,39 )) >=0 ) - tdat[testno].experrno =ENOTTY ; + tdat[testno].experrno =ENOTTY ; } }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/network/netstress/netstress.c +0
-3@@ -882,9 +882,6 @@ static void setup(void)if (!clients_num) clients_num =sysconf (_SC_NPROCESSORS_ONLN); -if (tfo_value >0 &&tst_kvercmp (3 ,7 ,0 ) <0 ) -tst_brk (TCONF ,"Test must be run with kernel 3.7 or newer" ); -if (busy_poll >=0 &&tst_kvercmp (3 ,11 ,0 ) <0 )tst_brk (TCONF ,"Test must be run with kernel 3.11 or newer" );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-cleantestcases/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 · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH 4/4 Remove old kernel version check when using min_kver
In reply to Yang XuThe oldest supported kernel version check is 3.10, so remove them.
--- doc/c-test-api.txt | 2 +- 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/logging/kmsg/kmsg01.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/getxattr/getxattr05.c | 1 - testcases/kernel/syscalls/ipc/msgrcv/msgrcv03.c | 1 - testcases/kernel/syscalls/kcmp/kcmp01.c | 1 - testcases/kernel/syscalls/kcmp/kcmp02.c | 1 - testcases/kernel/syscalls/kcmp/kcmp03.c | 1 - testcases/kernel/syscalls/keyctl/keyctl08.c | 1 - testcases/kernel/syscalls/madvise/madvise05.c | 1 - testcases/kernel/syscalls/madvise/madvise06.c | 1 - testcases/kernel/syscalls/madvise/madvise07.c | 1 - testcases/kernel/syscalls/madvise/madvise08.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/setsockopt02.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 - 69 files changed, 1 insertion(+), 69 deletions(-)
doc/c-test-api.txt +1 -1
@@ -559,7 +559,7 @@ 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 = "4.10.0"'. For more complicated operations such as skipping a test for a certain range of kernel versions, following functions could be used:
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/logging/kmsg/kmsg01.c +0 -1
@@ -573,5 +573,4 @@ static struct tst_test test = { .cleanup = cleanup, .needs_root = 1, .test_all = test_kmsg, - .min_kver = "3.5.0" };
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/getxattr/getxattr05.c +0 -1
@@ -175,7 +175,6 @@ static struct tst_test test = { .cleanup = cleanup, .tcnt = ARRAY_SIZE(tcases), .test = do_getxattr, - .min_kver = "3.8", };#else /* HAVE_SYS_XATTR_H && HAVE_LIBACL*/
testcases/kernel/syscalls/ipc/msgrcv/msgrcv03.c +0 -1
@@ -83,7 +83,6 @@ static struct tst_test test = {"CONFIG_CHECKPOINT_RESTORE" ,NULL }, - .min_kver = "3.8.0", .tcnt = ARRAY_SIZE(tcases), .test = verify_msgrcv, .setup = setup,
testcases/kernel/syscalls/kcmp/kcmp01.c +0 -1
@@ -103,6 +103,5 @@ static struct tst_test test = { .cleanup = cleanup, .forks_child = 1, .test = verify_kcmp, - .min_kver = "3.5.0", .needs_tmpdir = 1, };
testcases/kernel/syscalls/kcmp/kcmp02.c +0 -1
@@ -94,6 +94,5 @@ static struct tst_test test = { .setup = setup, .cleanup = cleanup, .test = verify_kcmp, - .min_kver = "3.5.0", .needs_tmpdir = 1 };
testcases/kernel/syscalls/kcmp/kcmp03.c +0 -1
@@ -87,5 +87,4 @@ static struct tst_test test = { .cleanup = cleanup, .forks_child = 1, .test = verify_kcmp, - .min_kver = "3.5.0" };
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/madvise05.c +0 -1
@@ -46,7 +46,6 @@ static void verify_madvise(void) }static struct tst_test test = { - .min_kver ="3.9.0" , .test_all = verify_madvise, .tags = (const struct tst_tag []) { {"linux-git" ,"ee53664bda16" },
testcases/kernel/syscalls/madvise/madvise06.c +0 -1
@@ -235,7 +235,6 @@ static void test_advice_willneed(void)static struct tst_test test = { .test_all = test_advice_willneed, .setup = setup, - .min_kver ="3.10.0" , .needs_tmpdir =1 , .needs_root =1 , .save_restore = (const struct tst_path_val []) {
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/madvise/madvise08.c +0 -1
@@ -208,7 +208,6 @@ static struct tst_test test = { .tcnt = 2, .setup = setup, .cleanup = cleanup, - .min_kver = "3.4.0", .needs_tmpdir = 1, .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/setsockopt02.c +0 -1
@@ -96,5 +96,4 @@ static struct tst_test test = { .needs_root = 1, .setup = setup, .cleanup = cleanup, - .min_kver = "3.2", };
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
Hi,
Quoted 2 lines
Our travis-ci has dropped or never used them, they are useless. So delete.
They were here before CI. They were meant for using by tests (no CI related at all).
Added by Wanlong Gao ~10 years ago. Agree they can be dropped, but Cc Cyril, Li and Jan.
Quoted 48 lines
Signed-off-by Yang Xu <[email protected]>--- 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 +0
-5@@ -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
testcases/kernel/syscalls/inotify/inotify04.c void verify_inotify(void) · line 110
Quoted 10 lines
testcases/kernel/syscalls/inotify/inotify04.c +3
-5* 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++;
Isn't this unrelated change? I guess you remove it as part of cleanup of old versions.
Quoted 7 lines
testcases/kernel/syscalls/inotify/inotify04.c +0
-0event_set[test_cnt].mask =IN_DELETE_SELF ;strcpy (event_set[test_cnt].name,TEST_FILE );testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh +0
-0
testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh setup() · line 65
Quoted 9 lines
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
Maybe first remove it from tests and then from infrastructure? But I'm ok to keep it in single patch, but commit message should be adjusted to not mention CI (not related to CI at all).
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 7 lines · Petr Vorel
Hi,
Quoted 2 lines
Our travis-ci has dropped or never used them, they are useless. So delete.
They were here before CI. They were meant for using by tests (no CI related at all).
Right, it's not just CI. RHEL5 is EOL, presumably Oracle as well, so those likely won't be missed.
RHEL6 has 2 more years - Isn't this removal going to break tst_kvercmp2()?
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Jan, Petr
Quoted 12 lines · Petr Vorel
Quoted 7 lines
Hi,
Quoted 2 lines
Our travis-ci has dropped or never used them, they are useless. So delete.
They were here before CI. They were meant for using by tests (no CI related at all).
Right, it's not just CI. RHEL5 is EOL, presumably Oracle as well, so those likely won't be missed.
RHEL6 has 2 more years - Isn't this removal going to breaktst_kvercmp2()?
I have removed tst_kvercmp2 usage for RHEL6 in testcases/kernel/syscalls/inotify/inotify04.c and ../kernel/tracing/dynamic_debug/dynamic_debug01.sh, so it should not break tst_kvercmp2.
Also, the current lastest ltp can't ensure that can be compile successfully on rhel6 because of lack of ci, so I think we don't need to still maintain the old version check. If people want to use old kernel ie RHEL6, why not use the old ltp release?
ps: @Jan, if you want to keep RHEL6, I will keep it. But two more years, we still need to drop it.
Best Regards
Yang Xu
Quoted 1 line
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Jan Stancek
Acked-byQuoted 12 lines · On Tue, Dec 13, 2022 at 3:31 AM [email protected]…
Hi Jan, Petr
Quoted 9 lines · Petr Vorel
Quoted 7 lines
Hi,
Quoted 2 lines
Our travis-ci has dropped or never used them, they are useless. So delete.
They were here before CI. They were meant for using by tests (no CI related at all).
Quoted 8 lines
Quoted 3 lines
Right, it's not just CI. RHEL5 is EOL, presumably Oracle as well, so those likely won't be missed.
RHEL6 has 2 more years - Isn't this removal going to breaktst_kvercmp2()?I have removed
tst_kvercmp2usage for RHEL6 intestcases/kernel/syscalls/inotify/inotify04.cand../kernel/tracing/dynamic_debug/dynamic_debug01.sh, so it should not breaktst_kvercmp2.
OK, you convinced me it's OK to drop it.
Quoted 5 lines
Also, the current lastest ltp can't ensure that can be compile successfully on rhel6 because of lack of ci, so I think we don't need to still maintain the old version check. If people want to use old kernel ie RHEL6, why not use the old ltp release?
They can, but they also likely want fixes to tests. I know there have been some workarounds, such as using pre-configured LTP to workaround autotools issue.
Quoted 3 lines
ps: @Jan, if you want to keep RHEL6, I will keep it. But two more years, we still need to drop it.
You showed this isn't significant change for those few users that still might exist (and EOL is coming), so:
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 26 lines
Quoted 11 lines · On Tue, Dec 13, 2022 at 3:31 AM [email protected]…
Hi Jan, Petr
Quoted 8 lines · Petr Vorel
Quoted 7 lines
Hi,
Quoted 2 lines
Our travis-ci has dropped or never used them, they are useless. So delete.
They were here before CI. They were meant for using by tests (no CI related at all).
Quoted 8 lines
Quoted 3 lines
Right, it's not just CI. RHEL5 is EOL, presumably Oracle as well, so those likely won't be missed.
RHEL6 has 2 more years - Isn't this removal going to breaktst_kvercmp2()?I have removed
tst_kvercmp2usage for RHEL6 intestcases/kernel/syscalls/inotify/inotify04.cand../kernel/tracing/dynamic_debug/dynamic_debug01.sh, so it should not breaktst_kvercmp2.OK, you convinced me it's OK to drop it.
Quoted 8 lines
Quoted 4 lines
Also, the current lastest ltp can't ensure that can be compile successfully on rhel6 because of lack of ci, so I think we don't need to still maintain the old version check. If people want to use old kernel ie RHEL6, why not use the old ltp release?
They can, but they also likely want fixes to tests. I know there have been some workarounds, such as using pre-configured LTP to workaround autotools issue.
BTW if anybody wishes (and have time) to run some sort of stable branch in LTP tree, why not? Not sure how many people would be interested to be worth for that person to invest time.
Kind regards,
Petr
Quoted 7 lines
Quoted 2 lines
ps: @Jan, if you want to keep RHEL6, I will keep it. But two more years, we still need to drop it.
You showed this isn't significant change for those few users that still might exist (and EOL is coming), so:
Acked-by Jan Stancek <[email protected]>
Thanks Jan for review (suppose ack is just for this first patch).
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Jan
Quoted 12 lines · Petr Vorel
Quoted 7 lines
Hi,
Quoted 2 lines
Our travis-ci has dropped or never used them, they are useless. So delete.
They were here before CI. They were meant for using by tests (no CI related at all).
Right, it's not just CI. RHEL5 is EOL, presumably Oracle as well, so those likely won't be missed.
RHEL6 has 2 more years - Isn't this removal going to breaktst_kvercmp2()?
I compile ltp on RHEL6, then it failed on the first step as below:
make autotools
m4/ax_check_compile_flag.m4:39: AX_CHECK_COMPILE_FLAG is expanded from... configure.ac:396: the top level
autom4te: /usr/bin/m4 failed with exit status: 63
aclocal: autom4te failed with exit status: 63
make: *** [aclocal.m4] Error 63
It seems ltp has been broken when using RHEL6 . Or I miss something?
ps:Gao has left FJ from 2016, so that email address is useless.
Best Regards
Yang Xu
Quoted 1 line
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Petr
Quoted 63 lines
Hi,
Quoted 2 lines
Our travis-ci has dropped or never used them, they are useless. So delete.
They were here before CI. They were meant for using by tests (no CI related at all).
Added by Wanlong Gao ~10 years ago. Agree they can be dropped, but Cc Cyril, Li and Jan.
Quoted 53 lines
Signed-off-by Yang Xu <[email protected]>--- 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 +0
-8@@ -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,"" );
Quoted 8 lines
testcases/kernel/syscalls/inotify/inotify04.c void verify_inotify(void) · line 110
Quoted 5 lines
testcases/kernel/syscalls/inotify/inotify04.c +3
-2- test_cnt++; - } + event_set[test_cnt].mask =IN_ATTRIB ; +strcpy (event_set[test_cnt].name,"" ); + test_cnt++;Isn't this unrelated change? I guess you remove it as part of cleanup of old versions.
Yes, just remove this useless if statement.
Quoted 11 lines
Quoted 10 lines
testcases/kernel/syscalls/inotify/inotify04.c +0
-0event_set[test_cnt].mask =IN_DELETE_SELF ;strcpy (event_set[test_cnt].name,TEST_FILE );testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh +0
-0@@ -59,8 +59,7 @@ setup() tst_brk TBROK "Unable to find $DEBUGFS_CONTROL" fi
Quoted 10 lines
testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh setup() · line 65
Quoted 6 lines
testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh +1
-2- # 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="=_" fiMaybe first remove it from tests and then from infrastructure? But I'm ok to keep it in single patch, but commit message should be adjusted to not mention CI (not related to CI at all).
Yes.
Best Regards
Yang Xu
Quoted 5 lines
Acked-by Petr Vorel <[email protected]>Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp