All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v2 1/6] lib/tst_kvercmp: Remove old distnames
@ 2022-12-14 11:44 Yang Xu
  2022-12-14 11:44 ` [LTP] [PATCH v2 2/6] shell: Remove old kernel version check Yang Xu
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Yang Xu @ 2022-12-14 11:44 UTC (permalink / raw)
  To: ltp

The oldest supported test distributions kernel version is 3.10[1], so these old version
check is useless.

[1]https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions
Acked-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 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(-)

diff --git a/lib/tst_kvercmp.c b/lib/tst_kvercmp.c
index dc0daa746..a01b4332b 100644
--- a/lib/tst_kvercmp.c
+++ b/lib/tst_kvercmp.c
@@ -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";
 
diff --git a/testcases/kernel/syscalls/inotify/inotify04.c b/testcases/kernel/syscalls/inotify/inotify04.c
index fb9f5c293..c4fce399c 100644
--- a/testcases/kernel/syscalls/inotify/inotify04.c
+++ b/testcases/kernel/syscalls/inotify/inotify04.c
@@ -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);
diff --git a/testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh b/testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh
index 4b159517b..ca6c840b1 100755
--- a/testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh
+++ b/testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh
@@ -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
-- 
2.27.0


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

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

* [LTP] [PATCH v2 2/6] shell: Remove old kernel version check
  2022-12-14 11:44 [LTP] [PATCH v2 1/6] lib/tst_kvercmp: Remove old distnames Yang Xu
@ 2022-12-14 11:44 ` Yang Xu
  2022-12-15  5:46   ` xuyang2018.jy
  2022-12-14 11:45 ` [LTP] [PATCH v2 3/6] doc/shell-test-api.txt Yang Xu
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Yang Xu @ 2022-12-14 11:44 UTC (permalink / raw)
  To: ltp

The oldest supported test distribution kernel version is 3.0[1], we don't need these checks.
If users want to run these cases on old kernel, they can use old release tag.

[1]https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 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  |  4 ---
 .../ftrace_stress/ftrace_trace_clock.sh       | 28 ++++---------------
 .../ftrace_stress/ftrace_trace_stat.sh        |  6 ----
 .../multicast/grp-operation/mcast-lib.sh      |  1 -
 24 files changed, 37 insertions(+), 145 deletions(-)

diff --git a/testcases/commands/mkswap/mkswap01.sh b/testcases/commands/mkswap/mkswap01.sh
index fe1695876..e03c46c31 100755
--- a/testcases/commands/mkswap/mkswap01.sh
+++ b/testcases/commands/mkswap/mkswap01.sh
@@ -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
 
diff --git a/testcases/kernel/containers/netns/netns_sysfs.sh b/testcases/kernel/containers/netns/netns_sysfs.sh
index 9fc390eaf..179242721 100755
--- a/testcases/kernel/containers/netns/netns_sysfs.sh
+++ b/testcases/kernel/containers/netns/netns_sysfs.sh
@@ -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"
diff --git a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
index bfa9097ec..d26456b2d 100755
--- a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
+++ b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
@@ -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
diff --git a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
index 9939f13a3..87ba7da1f 100755
--- a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
+++ b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
@@ -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}
diff --git a/testcases/kernel/controllers/memcg/functional/memcg_limit_in_bytes.sh b/testcases/kernel/controllers/memcg/functional/memcg_limit_in_bytes.sh
index 77d293329..8ad399a97 100755
--- a/testcases/kernel/controllers/memcg/functional/memcg_limit_in_bytes.sh
+++ b/testcases/kernel/controllers/memcg/functional/memcg_limit_in_bytes.sh
@@ -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()
diff --git a/testcases/kernel/controllers/memcg/functional/memcg_memsw_limit_in_bytes_test.sh b/testcases/kernel/controllers/memcg/functional/memcg_memsw_limit_in_bytes_test.sh
index 96f5360a8..74748a528 100755
--- a/testcases/kernel/controllers/memcg/functional/memcg_memsw_limit_in_bytes_test.sh
+++ b/testcases/kernel/controllers/memcg/functional/memcg_memsw_limit_in_bytes_test.sh
@@ -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()
diff --git a/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh b/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
index 94d4e4c00..58759263e 100755
--- a/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
+++ b/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
@@ -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")
diff --git a/testcases/kernel/power_management/pm_include.sh b/testcases/kernel/power_management/pm_include.sh
index f3e160445..ad72028c9 100755
--- a/testcases/kernel/power_management/pm_include.sh
+++ b/testcases/kernel/power_management/pm_include.sh
@@ -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() {
diff --git a/testcases/kernel/power_management/runpwtests01.sh b/testcases/kernel/power_management/runpwtests01.sh
index d470d112e..2caf9eab5 100755
--- a/testcases/kernel/power_management/runpwtests01.sh
+++ b/testcases/kernel/power_management/runpwtests01.sh
@@ -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)
diff --git a/testcases/kernel/power_management/runpwtests02.sh b/testcases/kernel/power_management/runpwtests02.sh
index 8c7936fc4..805befb03 100755
--- a/testcases/kernel/power_management/runpwtests02.sh
+++ b/testcases/kernel/power_management/runpwtests02.sh
@@ -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)
diff --git a/testcases/kernel/power_management/runpwtests03.sh b/testcases/kernel/power_management/runpwtests03.sh
index 3fb85d273..72ad2ad68 100755
--- a/testcases/kernel/power_management/runpwtests03.sh
+++ b/testcases/kernel/power_management/runpwtests03.sh
@@ -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
diff --git a/testcases/kernel/power_management/runpwtests04.sh b/testcases/kernel/power_management/runpwtests04.sh
index 4b727a5bc..6565320d2 100755
--- a/testcases/kernel/power_management/runpwtests04.sh
+++ b/testcases/kernel/power_management/runpwtests04.sh
@@ -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
diff --git a/testcases/kernel/power_management/runpwtests05.sh b/testcases/kernel/power_management/runpwtests05.sh
index 1c87d8d0c..03b6752bf 100755
--- a/testcases/kernel/power_management/runpwtests05.sh
+++ b/testcases/kernel/power_management/runpwtests05.sh
@@ -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
 
diff --git a/testcases/kernel/power_management/runpwtests06.sh b/testcases/kernel/power_management/runpwtests06.sh
index 1ec193ad4..16e50a670 100755
--- a/testcases/kernel/power_management/runpwtests06.sh
+++ b/testcases/kernel/power_management/runpwtests06.sh
@@ -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"
diff --git a/testcases/kernel/power_management/runpwtests_exclusive01.sh b/testcases/kernel/power_management/runpwtests_exclusive01.sh
index 3a824e5eb..f309d7c19 100755
--- a/testcases/kernel/power_management/runpwtests_exclusive01.sh
+++ b/testcases/kernel/power_management/runpwtests_exclusive01.sh
@@ -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
 
diff --git a/testcases/kernel/power_management/runpwtests_exclusive02.sh b/testcases/kernel/power_management/runpwtests_exclusive02.sh
index fa445185e..547e88fea 100755
--- a/testcases/kernel/power_management/runpwtests_exclusive02.sh
+++ b/testcases/kernel/power_management/runpwtests_exclusive02.sh
@@ -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
 
diff --git a/testcases/kernel/power_management/runpwtests_exclusive03.sh b/testcases/kernel/power_management/runpwtests_exclusive03.sh
index 0d5724825..67c7243e8 100755
--- a/testcases/kernel/power_management/runpwtests_exclusive03.sh
+++ b/testcases/kernel/power_management/runpwtests_exclusive03.sh
@@ -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
 
diff --git a/testcases/kernel/power_management/runpwtests_exclusive04.sh b/testcases/kernel/power_management/runpwtests_exclusive04.sh
index 15e031a43..46985b3be 100755
--- a/testcases/kernel/power_management/runpwtests_exclusive04.sh
+++ b/testcases/kernel/power_management/runpwtests_exclusive04.sh
@@ -25,7 +25,7 @@ export TST_TOTAL=2
 . pm_include.sh
 
 # Checking test environment
-check_kervel_arch
+check_arch
 
 tst_require_cmds python3
 
diff --git a/testcases/kernel/power_management/runpwtests_exclusive05.sh b/testcases/kernel/power_management/runpwtests_exclusive05.sh
index 9d4e01683..38450d1fd 100755
--- a/testcases/kernel/power_management/runpwtests_exclusive05.sh
+++ b/testcases/kernel/power_management/runpwtests_exclusive05.sh
@@ -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
 
diff --git a/testcases/kernel/security/cap_bound/run_capbounds.sh b/testcases/kernel/security/cap_bound/run_capbounds.sh
index 6164f62d6..ddf186426 100755
--- a/testcases/kernel/security/cap_bound/run_capbounds.sh
+++ b/testcases/kernel/security/cap_bound/run_capbounds.sh
@@ -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
 
diff --git a/testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh b/testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh
index ca6c840b1..9d0575b90 100755
--- a/testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh
+++ b/testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh
@@ -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"
diff --git a/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_clock.sh b/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_clock.sh
index 4a3e68a72..50329c684 100755
--- a/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_clock.sh
+++ b/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_clock.sh
@@ -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
 
diff --git a/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_stat.sh b/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_stat.sh
index 50aeef970..f7177c988 100755
--- a/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_stat.sh
+++ b/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_stat.sh
@@ -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
diff --git a/testcases/network/stress/multicast/grp-operation/mcast-lib.sh b/testcases/network/stress/multicast/grp-operation/mcast-lib.sh
index f890deea9..30368b079 100644
--- a/testcases/network/stress/multicast/grp-operation/mcast-lib.sh
+++ b/testcases/network/stress/multicast/grp-operation/mcast-lib.sh
@@ -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)
-- 
2.27.0


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

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

* [LTP] [PATCH v2 3/6] doc/shell-test-api.txt
  2022-12-14 11:44 [LTP] [PATCH v2 1/6] lib/tst_kvercmp: Remove old distnames Yang Xu
  2022-12-14 11:44 ` [LTP] [PATCH v2 2/6] shell: Remove old kernel version check Yang Xu
@ 2022-12-14 11:45 ` Yang Xu
  2022-12-14 11:45 ` [LTP] [PATCH v2 4/6] Remove old kernel version check in C case when using tst_kvercmp Yang Xu
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Yang Xu @ 2022-12-14 11:45 UTC (permalink / raw)
  To: ltp

Update tst_kvcmp usage.

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 doc/shell-test-api.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/doc/shell-test-api.txt b/doc/shell-test-api.txt
index 73c9eff91..f35561e54 100644
--- a/doc/shell-test-api.txt
+++ b/doc/shell-test-api.txt
@@ -652,13 +652,15 @@ tst_kvcmp
 +++++++++
 
 This command compares the currently running kernel version given conditions
-with syntax similar to the shell test command.
+with syntax similar to the shell test command. Now, the oldest supported kernel
+version for ltp is 3.0, so we don't need this if comparing with very old version
+ie 2.6.8 .
 
 [source,sh]
 -------------------------------------------------------------------------------
-# Exit the test if kernel version is older or equal to 2.6.8
-if tst_kvcmp -le 2.6.8; then
-	tst_brk TCONF "Kernel newer than 2.6.8 is needed"
+# Exit the test if kernel version is older or equal to 4.0.0
+if tst_kvcmp -le 4.0.0; then
+	tst_brk TCONF "Kernel newer than 4.0.0 is needed"
 fi
 
 # Exit the test if kernel is newer than 3.8 and older than 4.0.1
-- 
2.27.0


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

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

* [LTP] [PATCH v2 4/6] Remove old kernel version check in C case when using tst_kvercmp
  2022-12-14 11:44 [LTP] [PATCH v2 1/6] lib/tst_kvercmp: Remove old distnames Yang Xu
  2022-12-14 11:44 ` [LTP] [PATCH v2 2/6] shell: Remove old kernel version check Yang Xu
  2022-12-14 11:45 ` [LTP] [PATCH v2 3/6] doc/shell-test-api.txt Yang Xu
@ 2022-12-14 11:45 ` Yang Xu
  2022-12-14 11:45 ` [LTP] [PATCH v2 5/6] Remove old kernel version check when using min_kver Yang Xu
  2022-12-14 11:45 ` [LTP] [PATCH v2 6/6] doc/c-test-api.txt Yang Xu
  4 siblings, 0 replies; 8+ messages in thread
From: Yang Xu @ 2022-12-14 11:45 UTC (permalink / raw)
  To: ltp

The oldest supported kernel version is 3.0, so remove them.

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 include/lapi/common_timers.h                  |  5 ---
 .../kernel/containers/mqns/mqns_helper.h      |  3 --
 .../kernel/containers/pidns/pidns_helper.h    |  3 --
 testcases/kernel/containers/utsname/utstest.c |  3 --
 .../kernel/device-drivers/acpi/ltp_acpi.c     |  5 ---
 .../block/block_dev_user/block_dev.c          |  5 ---
 .../device-drivers/pci/tpci_user/tpci.c       |  5 ---
 .../device-drivers/tbio/tbio_user/tbio.c      |  5 ---
 .../kernel/device-drivers/uaccess/uaccess.c   |  5 ---
 testcases/kernel/mem/vma/vma01.c              |  8 +---
 .../power_management/pm_get_sched_values.c    | 20 +--------
 .../kernel/syscalls/adjtimex/adjtimex02.c     |  2 +-
 testcases/kernel/syscalls/clone/clone08.c     | 43 -------------------
 testcases/kernel/syscalls/eventfd/eventfd01.c |  3 --
 .../kernel/syscalls/eventfd2/eventfd2_01.c    |  4 --
 .../kernel/syscalls/eventfd2/eventfd2_02.c    |  4 --
 .../kernel/syscalls/eventfd2/eventfd2_03.c    |  5 ---
 .../kernel/syscalls/faccessat/faccessat01.c   |  4 --
 .../kernel/syscalls/fallocate/fallocate04.c   |  5 ---
 .../kernel/syscalls/fchownat/fchownat01.c     |  3 --
 .../kernel/syscalls/fchownat/fchownat02.c     |  3 --
 testcases/kernel/syscalls/fcntl/fcntl29.c     |  4 --
 testcases/kernel/syscalls/fcntl/fcntl30.c     |  4 --
 testcases/kernel/syscalls/fcntl/fcntl31.c     | 32 +++-----------
 .../kernel/syscalls/fgetxattr/fgetxattr02.c   |  8 ----
 testcases/kernel/syscalls/fstatat/fstatat01.c |  3 --
 .../kernel/syscalls/futimesat/futimesat01.c   |  3 --
 .../kernel/syscalls/getxattr/getxattr02.c     | 11 +----
 testcases/kernel/syscalls/inotify/inotify02.c | 15 -------
 testcases/kernel/syscalls/inotify/inotify04.c | 14 ------
 testcases/kernel/syscalls/ioperm/ioperm01.c   | 11 +----
 testcases/kernel/syscalls/ioperm/ioperm02.c   | 15 +------
 testcases/kernel/syscalls/linkat/linkat01.c   |  6 ---
 testcases/kernel/syscalls/linkat/linkat02.c   |  3 --
 testcases/kernel/syscalls/madvise/madvise02.c |  7 ---
 .../syscalls/migrate_pages/migrate_pages02.c  |  3 --
 testcases/kernel/syscalls/mincore/mincore01.c |  6 ---
 testcases/kernel/syscalls/mknodat/mknodat01.c |  3 --
 testcases/kernel/syscalls/mknodat/mknodat02.c |  5 ---
 testcases/kernel/syscalls/mlock/mlock02.c     | 31 -------------
 .../kernel/syscalls/mlockall/mlockall02.c     | 32 ++++++--------
 .../kernel/syscalls/move_pages/move_pages09.c | 23 ++--------
 .../syscalls/move_pages/move_pages_support.c  |  7 ++-
 testcases/kernel/syscalls/munmap/munmap03.c   |  7 ---
 testcases/kernel/syscalls/open/open12.c       | 22 ----------
 testcases/kernel/syscalls/open/open13.c       |  5 ---
 testcases/kernel/syscalls/openat/openat02.c   | 12 ------
 .../remap_file_pages/remap_file_pages01.c     |  9 ----
 .../remap_file_pages/remap_file_pages02.c     |  6 ---
 .../kernel/syscalls/renameat/renameat01.c     |  6 ---
 .../kernel/syscalls/signalfd/signalfd01.c     |  6 ---
 .../kernel/syscalls/signalfd4/signalfd4_01.c  |  5 ---
 .../kernel/syscalls/signalfd4/signalfd4_02.c  |  5 ---
 testcases/kernel/syscalls/socket/socket01.c   | 20 ---------
 .../kernel/syscalls/socketpair/socketpair01.c | 20 ---------
 .../kernel/syscalls/sockioctl/sockioctl01.c   |  6 +--
 testcases/kernel/syscalls/splice/splice01.c   |  6 ---
 .../kernel/syscalls/symlinkat/symlinkat01.c   |  7 ---
 testcases/kernel/syscalls/sysctl/sysctl03.c   | 12 ++----
 testcases/kernel/syscalls/tee/tee01.c         |  6 ---
 .../syscalls/timer_create/timer_create01.c    | 10 -----
 .../syscalls/timer_delete/timer_delete01.c    |  6 ---
 .../syscalls/timer_settime/timer_settime01.c  |  6 ---
 .../syscalls/timer_settime/timer_settime02.c  |  6 ---
 testcases/kernel/syscalls/timerfd/timerfd02.c |  5 ---
 testcases/kernel/syscalls/timerfd/timerfd03.c |  5 ---
 .../syscalls/timerfd/timerfd_create01.c       |  3 --
 testcases/open_posix_testsuite/Makefile       |  4 --
 testcases/open_posix_testsuite/Makefile.linux | 20 ---------
 69 files changed, 40 insertions(+), 574 deletions(-)
 delete mode 100644 testcases/open_posix_testsuite/Makefile.linux

diff --git a/include/lapi/common_timers.h b/include/lapi/common_timers.h
index 8d88ac47a..884c997a1 100644
--- a/include/lapi/common_timers.h
+++ b/include/lapi/common_timers.h
@@ -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>
diff --git a/testcases/kernel/containers/mqns/mqns_helper.h b/testcases/kernel/containers/mqns/mqns_helper.h
index 605378d48..03f50aa36 100644
--- a/testcases/kernel/containers/mqns/mqns_helper.h
+++ b/testcases/kernel/containers/mqns/mqns_helper.h
@@ -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);
diff --git a/testcases/kernel/containers/pidns/pidns_helper.h b/testcases/kernel/containers/pidns/pidns_helper.h
index dad7a6d38..3b356768f 100644
--- a/testcases/kernel/containers/pidns/pidns_helper.h
+++ b/testcases/kernel/containers/pidns/pidns_helper.h
@@ -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");
diff --git a/testcases/kernel/containers/utsname/utstest.c b/testcases/kernel/containers/utsname/utstest.c
index d22db79c8..9ad19b6b2 100644
--- a/testcases/kernel/containers/utsname/utstest.c
+++ b/testcases/kernel/containers/utsname/utstest.c
@@ -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");
diff --git a/testcases/kernel/device-drivers/acpi/ltp_acpi.c b/testcases/kernel/device-drivers/acpi/ltp_acpi.c
index f2dc6a4dd..08d4d8632 100644
--- a/testcases/kernel/device-drivers/acpi/ltp_acpi.c
+++ b/testcases/kernel/device-drivers/acpi/ltp_acpi.c
@@ -148,11 +148,6 @@ int main(int argc, char *argv[])
 
 	tst_require_root();
 
-	if (tst_kvercmp(2, 6, 0) < 0) {
-		tst_brkm(TCONF, NULL,
-			"Test must be run with kernel 2.6 or newer");
-	}
-
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 
 	tst_module_load(NULL, module_name, NULL);
diff --git a/testcases/kernel/device-drivers/block/block_dev_user/block_dev.c b/testcases/kernel/device-drivers/block/block_dev_user/block_dev.c
index 9e5e9c2c0..543c36795 100644
--- a/testcases/kernel/device-drivers/block/block_dev_user/block_dev.c
+++ b/testcases/kernel/device-drivers/block/block_dev_user/block_dev.c
@@ -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);
 }
 
diff --git a/testcases/kernel/device-drivers/pci/tpci_user/tpci.c b/testcases/kernel/device-drivers/pci/tpci_user/tpci.c
index 659c54261..96018f18c 100644
--- a/testcases/kernel/device-drivers/pci/tpci_user/tpci.c
+++ b/testcases/kernel/device-drivers/pci/tpci_user/tpci.c
@@ -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);
 }
 
diff --git a/testcases/kernel/device-drivers/tbio/tbio_user/tbio.c b/testcases/kernel/device-drivers/tbio/tbio_user/tbio.c
index be1420b98..e882dc768 100644
--- a/testcases/kernel/device-drivers/tbio/tbio_user/tbio.c
+++ b/testcases/kernel/device-drivers/tbio/tbio_user/tbio.c
@@ -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;
 
diff --git a/testcases/kernel/device-drivers/uaccess/uaccess.c b/testcases/kernel/device-drivers/uaccess/uaccess.c
index f7537ef4c..f682ff7f6 100644
--- a/testcases/kernel/device-drivers/uaccess/uaccess.c
+++ b/testcases/kernel/device-drivers/uaccess/uaccess.c
@@ -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);
diff --git a/testcases/kernel/mem/vma/vma01.c b/testcases/kernel/mem/vma/vma01.c
index 31322918c..d220b636c 100644
--- a/testcases/kernel/mem/vma/vma01.c
+++ b/testcases/kernel/mem/vma/vma01.c
@@ -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.");
diff --git a/testcases/kernel/power_management/pm_get_sched_values.c b/testcases/kernel/power_management/pm_get_sched_values.c
index 32bacd789..e75c5852e 100644
--- a/testcases/kernel/power_management/pm_get_sched_values.c
+++ b/testcases/kernel/power_management/pm_get_sched_values.c
@@ -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;
diff --git a/testcases/kernel/syscalls/adjtimex/adjtimex02.c b/testcases/kernel/syscalls/adjtimex/adjtimex02.c
index 747d83254..dab640ff3 100644
--- a/testcases/kernel/syscalls/adjtimex/adjtimex02.c
+++ b/testcases/kernel/syscalls/adjtimex/adjtimex02.c
@@ -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;
diff --git a/testcases/kernel/syscalls/clone/clone08.c b/testcases/kernel/syscalls/clone/clone08.c
index ad285a497..dd97f3ff1 100644
--- a/testcases/kernel/syscalls/clone/clone08.c
+++ b/testcases/kernel/syscalls/clone/clone08.c
@@ -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;
diff --git a/testcases/kernel/syscalls/eventfd/eventfd01.c b/testcases/kernel/syscalls/eventfd/eventfd01.c
index c24aa3197..9b60434a2 100644
--- a/testcases/kernel/syscalls/eventfd/eventfd01.c
+++ b/testcases/kernel/syscalls/eventfd/eventfd01.c
@@ -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;
diff --git a/testcases/kernel/syscalls/eventfd2/eventfd2_01.c b/testcases/kernel/syscalls/eventfd2/eventfd2_01.c
index c9ecdc58e..85ad86d42 100644
--- a/testcases/kernel/syscalls/eventfd2/eventfd2_01.c
+++ b/testcases/kernel/syscalls/eventfd2/eventfd2_01.c
@@ -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);
diff --git a/testcases/kernel/syscalls/eventfd2/eventfd2_02.c b/testcases/kernel/syscalls/eventfd2/eventfd2_02.c
index 2125b528e..5f3b6ee67 100644
--- a/testcases/kernel/syscalls/eventfd2/eventfd2_02.c
+++ b/testcases/kernel/syscalls/eventfd2/eventfd2_02.c
@@ -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;
diff --git a/testcases/kernel/syscalls/eventfd2/eventfd2_03.c b/testcases/kernel/syscalls/eventfd2/eventfd2_03.c
index e26714ddc..909004edb 100644
--- a/testcases/kernel/syscalls/eventfd2/eventfd2_03.c
+++ b/testcases/kernel/syscalls/eventfd2/eventfd2_03.c
@@ -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");
diff --git a/testcases/kernel/syscalls/faccessat/faccessat01.c b/testcases/kernel/syscalls/faccessat/faccessat01.c
index 1ab494e7a..d11e8cf12 100644
--- a/testcases/kernel/syscalls/faccessat/faccessat01.c
+++ b/testcases/kernel/syscalls/faccessat/faccessat01.c
@@ -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();
diff --git a/testcases/kernel/syscalls/fallocate/fallocate04.c b/testcases/kernel/syscalls/fallocate/fallocate04.c
index 568a9e3f1..0014241da 100644
--- a/testcases/kernel/syscalls/fallocate/fallocate04.c
+++ b/testcases/kernel/syscalls/fallocate/fallocate04.c
@@ -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) {
diff --git a/testcases/kernel/syscalls/fchownat/fchownat01.c b/testcases/kernel/syscalls/fchownat/fchownat01.c
index a658f07db..3b29f1e75 100644
--- a/testcases/kernel/syscalls/fchownat/fchownat01.c
+++ b/testcases/kernel/syscalls/fchownat/fchownat01.c
@@ -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;
diff --git a/testcases/kernel/syscalls/fchownat/fchownat02.c b/testcases/kernel/syscalls/fchownat/fchownat02.c
index 701623dd7..c39b0a919 100644
--- a/testcases/kernel/syscalls/fchownat/fchownat02.c
+++ b/testcases/kernel/syscalls/fchownat/fchownat02.c
@@ -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);
diff --git a/testcases/kernel/syscalls/fcntl/fcntl29.c b/testcases/kernel/syscalls/fcntl/fcntl29.c
index 587476454..c94c9e748 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl29.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl29.c
@@ -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();
diff --git a/testcases/kernel/syscalls/fcntl/fcntl30.c b/testcases/kernel/syscalls/fcntl/fcntl30.c
index 27f464389..c4c3f81f1 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl30.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl30.c
@@ -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;
diff --git a/testcases/kernel/syscalls/fcntl/fcntl31.c b/testcases/kernel/syscalls/fcntl/fcntl31.c
index f6e2b01ff..f6f625e85 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl31.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl31.c
@@ -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;
 
diff --git a/testcases/kernel/syscalls/fgetxattr/fgetxattr02.c b/testcases/kernel/syscalls/fgetxattr/fgetxattr02.c
index c3cff0aab..1a9a39c9b 100644
--- a/testcases/kernel/syscalls/fgetxattr/fgetxattr02.c
+++ b/testcases/kernel/syscalls/fgetxattr/fgetxattr02.c
@@ -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);
diff --git a/testcases/kernel/syscalls/fstatat/fstatat01.c b/testcases/kernel/syscalls/fstatat/fstatat01.c
index 28e3d472f..c18ffacf2 100644
--- a/testcases/kernel/syscalls/fstatat/fstatat01.c
+++ b/testcases/kernel/syscalls/fstatat/fstatat01.c
@@ -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();
diff --git a/testcases/kernel/syscalls/futimesat/futimesat01.c b/testcases/kernel/syscalls/futimesat/futimesat01.c
index 9b1e75b7f..46bd57c48 100644
--- a/testcases/kernel/syscalls/futimesat/futimesat01.c
+++ b/testcases/kernel/syscalls/futimesat/futimesat01.c
@@ -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();
diff --git a/testcases/kernel/syscalls/getxattr/getxattr02.c b/testcases/kernel/syscalls/getxattr/getxattr02.c
index dca6b13be..a42057d0a 100644
--- a/testcases/kernel/syscalls/getxattr/getxattr02.c
+++ b/testcases/kernel/syscalls/getxattr/getxattr02.c
@@ -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));
diff --git a/testcases/kernel/syscalls/inotify/inotify02.c b/testcases/kernel/syscalls/inotify/inotify02.c
index 576ef431c..cd1cb97bd 100644
--- a/testcases/kernel/syscalls/inotify/inotify02.c
+++ b/testcases/kernel/syscalls/inotify/inotify02.c
@@ -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 "
diff --git a/testcases/kernel/syscalls/inotify/inotify04.c b/testcases/kernel/syscalls/inotify/inotify04.c
index c4fce399c..70c7fecfd 100644
--- a/testcases/kernel/syscalls/inotify/inotify04.c
+++ b/testcases/kernel/syscalls/inotify/inotify04.c
@@ -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 "
diff --git a/testcases/kernel/syscalls/ioperm/ioperm01.c b/testcases/kernel/syscalls/ioperm/ioperm01.c
index 8f2cc684d..4bc30ff4f 100644
--- a/testcases/kernel/syscalls/ioperm/ioperm01.c
+++ b/testcases/kernel/syscalls/ioperm/ioperm01.c
@@ -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, rngadam@yahoo.com
-	 * */
-	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)
diff --git a/testcases/kernel/syscalls/ioperm/ioperm02.c b/testcases/kernel/syscalls/ioperm/ioperm02.c
index 33c501904..eab701d95 100644
--- a/testcases/kernel/syscalls/ioperm/ioperm02.c
+++ b/testcases/kernel/syscalls/ioperm/ioperm02.c
@@ -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, rngadam@yahoo.com
-	 */
-	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");
diff --git a/testcases/kernel/syscalls/linkat/linkat01.c b/testcases/kernel/syscalls/linkat/linkat01.c
index 044a275ae..57cfbcfc6 100644
--- a/testcases/kernel/syscalls/linkat/linkat01.c
+++ b/testcases/kernel/syscalls/linkat/linkat01.c
@@ -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();
diff --git a/testcases/kernel/syscalls/linkat/linkat02.c b/testcases/kernel/syscalls/linkat/linkat02.c
index 796190fef..47383acec 100644
--- a/testcases/kernel/syscalls/linkat/linkat02.c
+++ b/testcases/kernel/syscalls/linkat/linkat02.c
@@ -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);
diff --git a/testcases/kernel/syscalls/madvise/madvise02.c b/testcases/kernel/syscalls/madvise/madvise02.c
index 29e0ace00..b158dc351 100644
--- a/testcases/kernel/syscalls/madvise/madvise02.c
+++ b/testcases/kernel/syscalls/madvise/madvise02.c
@@ -96,15 +96,8 @@ static void tcases_filter(void)
 			tc->skip = 0;
 #endif /* if !defined(UCLINUX) */
 		break;
-		case MADV_REMOVE:
-			if ((tst_kvercmp(2, 6, 16)) < 0)
-				tc->skip = 1;
-		break;
 		case MADV_MERGEABLE:
 		case MADV_UNMERGEABLE:
-			if ((tst_kvercmp(2, 6, 32)) < 0)
-				tc->skip = 1;
-
 			/* kernel configured with CONFIG_KSM,
 			 * skip EINVAL test for MADV_MERGEABLE. */
 			if (access(KSM_SYS_DIR, F_OK) == 0)
diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages02.c b/testcases/kernel/syscalls/migrate_pages/migrate_pages02.c
index 4d5b2b8d5..780aae1b5 100644
--- a/testcases/kernel/syscalls/migrate_pages/migrate_pages02.c
+++ b/testcases/kernel/syscalls/migrate_pages/migrate_pages02.c
@@ -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:
diff --git a/testcases/kernel/syscalls/mincore/mincore01.c b/testcases/kernel/syscalls/mincore/mincore01.c
index e2dfe04cf..03ec3b4e6 100644
--- a/testcases/kernel/syscalls/mincore/mincore01.c
+++ b/testcases/kernel/syscalls/mincore/mincore01.c
@@ -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)
diff --git a/testcases/kernel/syscalls/mknodat/mknodat01.c b/testcases/kernel/syscalls/mknodat/mknodat01.c
index bff2c6a4e..6500ca362 100644
--- a/testcases/kernel/syscalls/mknodat/mknodat01.c
+++ b/testcases/kernel/syscalls/mknodat/mknodat01.c
@@ -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;
diff --git a/testcases/kernel/syscalls/mknodat/mknodat02.c b/testcases/kernel/syscalls/mknodat/mknodat02.c
index 28c5c8a4b..eda247fda 100644
--- a/testcases/kernel/syscalls/mknodat/mknodat02.c
+++ b/testcases/kernel/syscalls/mknodat/mknodat02.c
@@ -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);
diff --git a/testcases/kernel/syscalls/mlock/mlock02.c b/testcases/kernel/syscalls/mlock/mlock02.c
index 1119e7ad0..50ee31d1c 100644
--- a/testcases/kernel/syscalls/mlock/mlock02.c
+++ b/testcases/kernel/syscalls/mlock/mlock02.c
@@ -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);
diff --git a/testcases/kernel/syscalls/mlockall/mlockall02.c b/testcases/kernel/syscalls/mlockall/mlockall02.c
index f2eca09c0..e301bcb03 100644
--- a/testcases/kernel/syscalls/mlockall/mlockall02.c
+++ b/testcases/kernel/syscalls/mlockall/mlockall02.c
@@ -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) {
diff --git a/testcases/kernel/syscalls/move_pages/move_pages09.c b/testcases/kernel/syscalls/move_pages/move_pages09.c
index 5c2d8d320..308249146 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages09.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages09.c
@@ -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 <Brice.Goglin@inria.fr>
-		 * 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);
 	}
diff --git a/testcases/kernel/syscalls/move_pages/move_pages_support.c b/testcases/kernel/syscalls/move_pages/move_pages_support.c
index 717321a48..1604e91f6 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages_support.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages_support.c
@@ -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);
diff --git a/testcases/kernel/syscalls/munmap/munmap03.c b/testcases/kernel/syscalls/munmap/munmap03.c
index 3b88b531e..23875e7b3 100644
--- a/testcases/kernel/syscalls/munmap/munmap03.c
+++ b/testcases/kernel/syscalls/munmap/munmap03.c
@@ -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);
diff --git a/testcases/kernel/syscalls/open/open12.c b/testcases/kernel/syscalls/open/open12.c
index 02ef5b5b0..2ec53ae15 100644
--- a/testcases/kernel/syscalls/open/open12.c
+++ b/testcases/kernel/syscalls/open/open12.c
@@ -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) {
diff --git a/testcases/kernel/syscalls/open/open13.c b/testcases/kernel/syscalls/open/open13.c
index 3838221e1..e777a305d 100644
--- a/testcases/kernel/syscalls/open/open13.c
+++ b/testcases/kernel/syscalls/open/open13.c
@@ -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();
diff --git a/testcases/kernel/syscalls/openat/openat02.c b/testcases/kernel/syscalls/openat/openat02.c
index b0a6ff78f..98ef61e0d 100644
--- a/testcases/kernel/syscalls/openat/openat02.c
+++ b/testcases/kernel/syscalls/openat/openat02.c
@@ -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 "
diff --git a/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c b/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c
index 631db51a7..09143a2d0 100644
--- a/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c
+++ b/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c
@@ -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();
diff --git a/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c b/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c
index 1d8f620ca..d296022ce 100644
--- a/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c
+++ b/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c
@@ -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);
diff --git a/testcases/kernel/syscalls/renameat/renameat01.c b/testcases/kernel/syscalls/renameat/renameat01.c
index 9df4b7086..3de103563 100644
--- a/testcases/kernel/syscalls/renameat/renameat01.c
+++ b/testcases/kernel/syscalls/renameat/renameat01.c
@@ -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);
diff --git a/testcases/kernel/syscalls/signalfd/signalfd01.c b/testcases/kernel/syscalls/signalfd/signalfd01.c
index 3df941785..48a17a634 100644
--- a/testcases/kernel/syscalls/signalfd/signalfd01.c
+++ b/testcases/kernel/syscalls/signalfd/signalfd01.c
@@ -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();
diff --git a/testcases/kernel/syscalls/signalfd4/signalfd4_01.c b/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
index 7909f587a..76f3be27f 100644
--- a/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
+++ b/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
@@ -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) {
diff --git a/testcases/kernel/syscalls/signalfd4/signalfd4_02.c b/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
index 4c9c2022a..18f86b4a7 100644
--- a/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
+++ b/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
@@ -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) {
diff --git a/testcases/kernel/syscalls/socket/socket01.c b/testcases/kernel/syscalls/socket/socket01.c
index 467154834..4724609d1 100644
--- a/testcases/kernel/syscalls/socket/socket01.c
+++ b/testcases/kernel/syscalls/socket/socket01.c
@@ -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
 };
diff --git a/testcases/kernel/syscalls/socketpair/socketpair01.c b/testcases/kernel/syscalls/socketpair/socketpair01.c
index 7c301f681..675eb535d 100644
--- a/testcases/kernel/syscalls/socketpair/socketpair01.c
+++ b/testcases/kernel/syscalls/socketpair/socketpair01.c
@@ -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
 };
diff --git a/testcases/kernel/syscalls/sockioctl/sockioctl01.c b/testcases/kernel/syscalls/sockioctl/sockioctl01.c
index 486236af9..155f0cec5 100644
--- a/testcases/kernel/syscalls/sockioctl/sockioctl01.c
+++ b/testcases/kernel/syscalls/sockioctl/sockioctl01.c
@@ -210,10 +210,8 @@ static void setup1(void)
 	SAFE_BIND(cleanup, s, (struct sockaddr *)&sin0, sizeof(sin0));
 	sinlen = sizeof(fsin1);
 
-	if (strncmp(tdat[testno].desc, "ATMARK on UDP", 14) == 0) {
-		if ((tst_kvercmp(2, 6, 39)) >= 0)
-			tdat[testno].experrno = ENOTTY;
-	}
+	if (strncmp(tdat[testno].desc, "ATMARK on UDP", 14) == 0)
+		tdat[testno].experrno = ENOTTY;
 }
 
 static void setup2(void)
diff --git a/testcases/kernel/syscalls/splice/splice01.c b/testcases/kernel/syscalls/splice/splice01.c
index 82407743f..f5b2cbe17 100644
--- a/testcases/kernel/syscalls/splice/splice01.c
+++ b/testcases/kernel/syscalls/splice/splice01.c
@@ -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;
 
diff --git a/testcases/kernel/syscalls/symlinkat/symlinkat01.c b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
index 711f10aec..d510872f0 100644
--- a/testcases/kernel/syscalls/symlinkat/symlinkat01.c
+++ b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
@@ -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();
diff --git a/testcases/kernel/syscalls/sysctl/sysctl03.c b/testcases/kernel/syscalls/sysctl/sysctl03.c
index ea41f9d09..73f98f0b1 100644
--- a/testcases/kernel/syscalls/sysctl/sysctl03.c
+++ b/testcases/kernel/syscalls/sysctl/sysctl03.c
@@ -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)
diff --git a/testcases/kernel/syscalls/tee/tee01.c b/testcases/kernel/syscalls/tee/tee01.c
index dd4d8bfa5..87a7ecd09 100644
--- a/testcases/kernel/syscalls/tee/tee01.c
+++ b/testcases/kernel/syscalls/tee/tee01.c
@@ -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;
 
diff --git a/testcases/kernel/syscalls/timer_create/timer_create01.c b/testcases/kernel/syscalls/timer_create/timer_create01.c
index 1cb9a9fdc..d56e68c23 100644
--- a/testcases/kernel/syscalls/timer_create/timer_create01.c
+++ b/testcases/kernel/syscalls/timer_create/timer_create01.c
@@ -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;
 
diff --git a/testcases/kernel/syscalls/timer_delete/timer_delete01.c b/testcases/kernel/syscalls/timer_delete/timer_delete01.c
index 6e5fc9940..bdc2e44cc 100644
--- a/testcases/kernel/syscalls/timer_delete/timer_delete01.c
+++ b/testcases/kernel/syscalls/timer_delete/timer_delete01.c
@@ -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));
diff --git a/testcases/kernel/syscalls/timer_settime/timer_settime01.c b/testcases/kernel/syscalls/timer_settime/timer_settime01.c
index 599ef2891..5aee8b38a 100644
--- a/testcases/kernel/syscalls/timer_settime/timer_settime01.c
+++ b/testcases/kernel/syscalls/timer_settime/timer_settime01.c
@@ -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) &&
diff --git a/testcases/kernel/syscalls/timer_settime/timer_settime02.c b/testcases/kernel/syscalls/timer_settime/timer_settime02.c
index 564f1c2ce..3309a81ad 100644
--- a/testcases/kernel/syscalls/timer_settime/timer_settime02.c
+++ b/testcases/kernel/syscalls/timer_settime/timer_settime02.c
@@ -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) {
diff --git a/testcases/kernel/syscalls/timerfd/timerfd02.c b/testcases/kernel/syscalls/timerfd/timerfd02.c
index 9d2e3ff3c..936cdbc53 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd02.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd02.c
@@ -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) {
diff --git a/testcases/kernel/syscalls/timerfd/timerfd03.c b/testcases/kernel/syscalls/timerfd/timerfd03.c
index ca70d1759..89dec325f 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd03.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd03.c
@@ -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) {
diff --git a/testcases/kernel/syscalls/timerfd/timerfd_create01.c b/testcases/kernel/syscalls/timerfd/timerfd_create01.c
index b9fe38954..3d70b84f0 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd_create01.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd_create01.c
@@ -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;
diff --git a/testcases/open_posix_testsuite/Makefile b/testcases/open_posix_testsuite/Makefile
index affabf9f7..8b4c8c0a2 100644
--- a/testcases/open_posix_testsuite/Makefile
+++ b/testcases/open_posix_testsuite/Makefile
@@ -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
diff --git a/testcases/open_posix_testsuite/Makefile.linux b/testcases/open_posix_testsuite/Makefile.linux
deleted file mode 100644
index 77e20a958..000000000
--- a/testcases/open_posix_testsuite/Makefile.linux
+++ /dev/null
@@ -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.)
-- 
2.27.0


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

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

* [LTP] [PATCH v2 5/6] Remove old kernel version check when using min_kver
  2022-12-14 11:44 [LTP] [PATCH v2 1/6] lib/tst_kvercmp: Remove old distnames Yang Xu
                   ` (2 preceding siblings ...)
  2022-12-14 11:45 ` [LTP] [PATCH v2 4/6] Remove old kernel version check in C case when using tst_kvercmp Yang Xu
@ 2022-12-14 11:45 ` Yang Xu
  2022-12-14 11:45 ` [LTP] [PATCH v2 6/6] doc/c-test-api.txt Yang Xu
  4 siblings, 0 replies; 8+ messages in thread
From: Yang Xu @ 2022-12-14 11:45 UTC (permalink / raw)
  To: ltp

The oldest supported kernel version check is 3.0, so remove them.

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 testcases/cve/cve-2016-10044.c                               | 1 -
 testcases/cve/cve-2016-7117.c                                | 1 -
 testcases/cve/meltdown.c                                     | 1 -
 testcases/kernel/controllers/memcg/regression/memcg_test_3.c | 1 -
 testcases/kernel/mem/cpuset/cpuset01.c                       | 1 -
 testcases/kernel/mem/hugetlb/hugemmap/hugemmap06.c           | 1 -
 testcases/kernel/mem/ksm/ksm01.c                             | 1 -
 testcases/kernel/mem/ksm/ksm02.c                             | 1 -
 testcases/kernel/mem/ksm/ksm03.c                             | 1 -
 testcases/kernel/mem/ksm/ksm04.c                             | 1 -
 testcases/kernel/mem/ksm/ksm05.c                             | 1 -
 testcases/kernel/syscalls/clone/clone09.c                    | 1 -
 testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c   | 1 -
 testcases/kernel/syscalls/epoll_ctl/epoll_ctl03.c            | 1 -
 testcases/kernel/syscalls/fadvise/posix_fadvise04.c          | 1 -
 testcases/kernel/syscalls/fchmodat/fchmodat01.c              | 1 -
 testcases/kernel/syscalls/fcntl/fcntl35.c                    | 1 -
 testcases/kernel/syscalls/futex/futex_wake04.c               | 1 -
 testcases/kernel/syscalls/getrusage/getrusage03.c            | 1 -
 testcases/kernel/syscalls/keyctl/keyctl08.c                  | 1 -
 testcases/kernel/syscalls/madvise/madvise07.c                | 1 -
 testcases/kernel/syscalls/migrate_pages/migrate_pages03.c    | 1 -
 testcases/kernel/syscalls/mlock2/mlock201.c                  | 1 -
 testcases/kernel/syscalls/mlock2/mlock202.c                  | 1 -
 testcases/kernel/syscalls/mlock2/mlock203.c                  | 1 -
 testcases/kernel/syscalls/mmap/mmap12.c                      | 1 -
 testcases/kernel/syscalls/move_pages/move_pages12.c          | 1 -
 testcases/kernel/syscalls/msync/msync04.c                    | 1 -
 testcases/kernel/syscalls/pipe2/pipe2_04.c                   | 1 -
 testcases/kernel/syscalls/preadv/preadv01.c                  | 1 -
 testcases/kernel/syscalls/preadv/preadv02.c                  | 1 -
 testcases/kernel/syscalls/preadv/preadv03.c                  | 1 -
 testcases/kernel/syscalls/pwritev/pwritev01.c                | 1 -
 testcases/kernel/syscalls/pwritev/pwritev02.c                | 1 -
 testcases/kernel/syscalls/pwritev/pwritev03.c                | 1 -
 testcases/kernel/syscalls/recvmsg/recvmsg02.c                | 1 -
 testcases/kernel/syscalls/sendfile/sendfile08.c              | 1 -
 testcases/kernel/syscalls/sendfile/sendfile09.c              | 1 -
 testcases/kernel/syscalls/setsockopt/setsockopt03.c          | 1 -
 testcases/kernel/syscalls/socket/socket02.c                  | 1 -
 testcases/kernel/syscalls/socketpair/socketpair02.c          | 1 -
 testcases/kernel/syscalls/splice/splice01.c                  | 1 -
 testcases/kernel/syscalls/splice/splice02.c                  | 1 -
 testcases/kernel/syscalls/splice/splice03.c                  | 1 -
 testcases/kernel/syscalls/splice/splice04.c                  | 1 -
 testcases/kernel/syscalls/splice/splice05.c                  | 1 -
 testcases/kernel/syscalls/switch/endian_switch01.c           | 1 -
 testcases/kernel/syscalls/tee/tee01.c                        | 1 -
 testcases/kernel/syscalls/tee/tee02.c                        | 1 -
 testcases/kernel/syscalls/timerfd/timerfd01.c                | 1 -
 testcases/kernel/syscalls/timerfd/timerfd_gettime01.c        | 1 -
 testcases/kernel/syscalls/timerfd/timerfd_settime01.c        | 1 -
 testcases/kernel/syscalls/timerfd/timerfd_settime02.c        | 1 -
 testcases/kernel/syscalls/unlinkat/unlinkat01.c              | 1 -
 testcases/kernel/syscalls/vmsplice/vmsplice01.c              | 1 -
 testcases/kernel/syscalls/vmsplice/vmsplice02.c              | 1 -
 testcases/kernel/syscalls/vmsplice/vmsplice03.c              | 1 -
 testcases/kernel/syscalls/vmsplice/vmsplice04.c              | 1 -
 58 files changed, 58 deletions(-)

diff --git a/testcases/cve/cve-2016-10044.c b/testcases/cve/cve-2016-10044.c
index b0a329d83..9ac644fc2 100644
--- a/testcases/cve/cve-2016-10044.c
+++ b/testcases/cve/cve-2016-10044.c
@@ -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"},
diff --git a/testcases/cve/cve-2016-7117.c b/testcases/cve/cve-2016-7117.c
index 64bf0a85e..109333985 100644
--- a/testcases/cve/cve-2016-7117.c
+++ b/testcases/cve/cve-2016-7117.c
@@ -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"},
diff --git a/testcases/cve/meltdown.c b/testcases/cve/meltdown.c
index cd16b0fb2..398e496a9 100644
--- a/testcases/cve/meltdown.c
+++ b/testcases/cve/meltdown.c
@@ -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",
diff --git a/testcases/kernel/controllers/memcg/regression/memcg_test_3.c b/testcases/kernel/controllers/memcg/regression/memcg_test_3.c
index 4bf4270bb..f29c2bea5 100644
--- a/testcases/kernel/controllers/memcg/regression/memcg_test_3.c
+++ b/testcases/kernel/controllers/memcg/regression/memcg_test_3.c
@@ -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,
diff --git a/testcases/kernel/mem/cpuset/cpuset01.c b/testcases/kernel/mem/cpuset/cpuset01.c
index 6e9691edb..956ac30c8 100644
--- a/testcases/kernel/mem/cpuset/cpuset01.c
+++ b/testcases/kernel/mem/cpuset/cpuset01.c
@@ -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 },
 };
 
diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap06.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap06.c
index 91dfa0616..79bea8e8b 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap06.c
+++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap06.c
@@ -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,
diff --git a/testcases/kernel/mem/ksm/ksm01.c b/testcases/kernel/mem/ksm/ksm01.c
index fafa2da71..bcd095865 100644
--- a/testcases/kernel/mem/ksm/ksm01.c
+++ b/testcases/kernel/mem/ksm/ksm01.c
@@ -93,5 +93,4 @@ static struct tst_test test = {
 		NULL
 	},
 	.test_all = verify_ksm,
-	.min_kver = "2.6.32",
 };
diff --git a/testcases/kernel/mem/ksm/ksm02.c b/testcases/kernel/mem/ksm/ksm02.c
index b5c90464e..bce639dce 100644
--- a/testcases/kernel/mem/ksm/ksm02.c
+++ b/testcases/kernel/mem/ksm/ksm02.c
@@ -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 },
 };
diff --git a/testcases/kernel/mem/ksm/ksm03.c b/testcases/kernel/mem/ksm/ksm03.c
index 94029054f..4a733269f 100644
--- a/testcases/kernel/mem/ksm/ksm03.c
+++ b/testcases/kernel/mem/ksm/ksm03.c
@@ -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 },
 };
diff --git a/testcases/kernel/mem/ksm/ksm04.c b/testcases/kernel/mem/ksm/ksm04.c
index 2302a2a1d..4f1f2f721 100644
--- a/testcases/kernel/mem/ksm/ksm04.c
+++ b/testcases/kernel/mem/ksm/ksm04.c
@@ -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
diff --git a/testcases/kernel/mem/ksm/ksm05.c b/testcases/kernel/mem/ksm/ksm05.c
index c4cb779aa..25f3435b2 100644
--- a/testcases/kernel/mem/ksm/ksm05.c
+++ b/testcases/kernel/mem/ksm/ksm05.c
@@ -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},
 		{}
diff --git a/testcases/kernel/syscalls/clone/clone09.c b/testcases/kernel/syscalls/clone/clone09.c
index e4691f513..37528e4b6 100644
--- a/testcases/kernel/syscalls/clone/clone09.c
+++ b/testcases/kernel/syscalls/clone/clone09.c
@@ -87,5 +87,4 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.needs_root = 1,
-	.min_kver = "2.6.24",
 };
diff --git a/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c b/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
index ed359d434..6d2bf2a30 100644
--- a/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
+++ b/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
@@ -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,
 };
diff --git a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl03.c b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl03.c
index e96960ba9..c92b0b62e 100644
--- a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl03.c
+++ b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl03.c
@@ -74,5 +74,4 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.test_all = run_all,
-	.min_kver = "2.6.17",
 };
diff --git a/testcases/kernel/syscalls/fadvise/posix_fadvise04.c b/testcases/kernel/syscalls/fadvise/posix_fadvise04.c
index f389a219b..8baf91bb0 100644
--- a/testcases/kernel/syscalls/fadvise/posix_fadvise04.c
+++ b/testcases/kernel/syscalls/fadvise/posix_fadvise04.c
@@ -83,5 +83,4 @@ static struct tst_test test = {
 	.cleanup = cleanup,
 	.test = verify_fadvise,
 	.tcnt = ARRAY_SIZE(defined_advise),
-	.min_kver = "2.6.16",
 };
diff --git a/testcases/kernel/syscalls/fchmodat/fchmodat01.c b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
index 925f397ef..3deff0ebe 100644
--- a/testcases/kernel/syscalls/fchmodat/fchmodat01.c
+++ b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
@@ -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,
diff --git a/testcases/kernel/syscalls/fcntl/fcntl35.c b/testcases/kernel/syscalls/fcntl/fcntl35.c
index 8eb71486f..2d730377b 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl35.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl35.c
@@ -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),
diff --git a/testcases/kernel/syscalls/futex/futex_wake04.c b/testcases/kernel/syscalls/futex/futex_wake04.c
index 110c628c3..176dd4aeb 100644
--- a/testcases/kernel/syscalls/futex/futex_wake04.c
+++ b/testcases/kernel/syscalls/futex/futex_wake04.c
@@ -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},
 };
diff --git a/testcases/kernel/syscalls/getrusage/getrusage03.c b/testcases/kernel/syscalls/getrusage/getrusage03.c
index 7e7a1f555..fc14e93cf 100644
--- a/testcases/kernel/syscalls/getrusage/getrusage03.c
+++ b/testcases/kernel/syscalls/getrusage/getrusage03.c
@@ -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"},
diff --git a/testcases/kernel/syscalls/keyctl/keyctl08.c b/testcases/kernel/syscalls/keyctl/keyctl08.c
index bc01192e7..be4b23b14 100644
--- a/testcases/kernel/syscalls/keyctl/keyctl08.c
+++ b/testcases/kernel/syscalls/keyctl/keyctl08.c
@@ -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"},
diff --git a/testcases/kernel/syscalls/madvise/madvise07.c b/testcases/kernel/syscalls/madvise/madvise07.c
index ca76d237b..d6e2e7d1f 100644
--- a/testcases/kernel/syscalls/madvise/madvise07.c
+++ b/testcases/kernel/syscalls/madvise/madvise07.c
@@ -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
 };
diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
index f77e47539..4d3299b61 100644
--- a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
+++ b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
@@ -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,
diff --git a/testcases/kernel/syscalls/mlock2/mlock201.c b/testcases/kernel/syscalls/mlock2/mlock201.c
index 1d1f5b7ac..b0e5f12b7 100644
--- a/testcases/kernel/syscalls/mlock2/mlock201.c
+++ b/testcases/kernel/syscalls/mlock2/mlock201.c
@@ -144,5 +144,4 @@ static struct tst_test test = {
 	.test = verify_mlock2,
 	.setup = setup,
 	.needs_root = 1,
-	.min_kver = "2.6.9",
 };
diff --git a/testcases/kernel/syscalls/mlock2/mlock202.c b/testcases/kernel/syscalls/mlock2/mlock202.c
index 630da6568..3b4965065 100644
--- a/testcases/kernel/syscalls/mlock2/mlock202.c
+++ b/testcases/kernel/syscalls/mlock2/mlock202.c
@@ -109,5 +109,4 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.needs_root = 1,
-	.min_kver = "2.6.9",
 };
diff --git a/testcases/kernel/syscalls/mlock2/mlock203.c b/testcases/kernel/syscalls/mlock2/mlock203.c
index 8451b2cd1..0a519ad51 100644
--- a/testcases/kernel/syscalls/mlock2/mlock203.c
+++ b/testcases/kernel/syscalls/mlock2/mlock203.c
@@ -88,5 +88,4 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.needs_root = 1,
-	.min_kver = "2.6.9",
 };
diff --git a/testcases/kernel/syscalls/mmap/mmap12.c b/testcases/kernel/syscalls/mmap/mmap12.c
index 2c0ebfb22..995a2bab0 100644
--- a/testcases/kernel/syscalls/mmap/mmap12.c
+++ b/testcases/kernel/syscalls/mmap/mmap12.c
@@ -135,5 +135,4 @@ static struct tst_test test = {
 	.cleanup = cleanup,
 	.test_all = verify_mmap,
 	.needs_tmpdir = 1,
-	.min_kver = "2.6.25",
 };
diff --git a/testcases/kernel/syscalls/move_pages/move_pages12.c b/testcases/kernel/syscalls/move_pages/move_pages12.c
index df55bbbe9..fd7017d79 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages12.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages12.c
@@ -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,
diff --git a/testcases/kernel/syscalls/msync/msync04.c b/testcases/kernel/syscalls/msync/msync04.c
index abe8f1659..72ddc27a4 100644
--- a/testcases/kernel/syscalls/msync/msync04.c
+++ b/testcases/kernel/syscalls/msync/msync04.c
@@ -102,5 +102,4 @@ static struct tst_test test = {
 		"tmpfs",
 		NULL
 	},
-	.min_kver = "2.6.25",
 };
diff --git a/testcases/kernel/syscalls/pipe2/pipe2_04.c b/testcases/kernel/syscalls/pipe2/pipe2_04.c
index 45e0f075b..3911f95b4 100644
--- a/testcases/kernel/syscalls/pipe2/pipe2_04.c
+++ b/testcases/kernel/syscalls/pipe2/pipe2_04.c
@@ -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,
diff --git a/testcases/kernel/syscalls/preadv/preadv01.c b/testcases/kernel/syscalls/preadv/preadv01.c
index 4b257968d..62f9296f2 100644
--- a/testcases/kernel/syscalls/preadv/preadv01.c
+++ b/testcases/kernel/syscalls/preadv/preadv01.c
@@ -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}},
diff --git a/testcases/kernel/syscalls/preadv/preadv02.c b/testcases/kernel/syscalls/preadv/preadv02.c
index 12d93da43..500059e42 100644
--- a/testcases/kernel/syscalls/preadv/preadv02.c
+++ b/testcases/kernel/syscalls/preadv/preadv02.c
@@ -126,6 +126,5 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.test = verify_preadv,
-	.min_kver = "2.6.30",
 	.needs_tmpdir = 1,
 };
diff --git a/testcases/kernel/syscalls/preadv/preadv03.c b/testcases/kernel/syscalls/preadv/preadv03.c
index 00b25c549..d4595dda6 100644
--- a/testcases/kernel/syscalls/preadv/preadv03.c
+++ b/testcases/kernel/syscalls/preadv/preadv03.c
@@ -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,
diff --git a/testcases/kernel/syscalls/pwritev/pwritev01.c b/testcases/kernel/syscalls/pwritev/pwritev01.c
index 1ee783855..66358f7c4 100644
--- a/testcases/kernel/syscalls/pwritev/pwritev01.c
+++ b/testcases/kernel/syscalls/pwritev/pwritev01.c
@@ -103,6 +103,5 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.test = verify_pwritev,
-	.min_kver = "2.6.30",
 	.needs_tmpdir = 1,
 };
diff --git a/testcases/kernel/syscalls/pwritev/pwritev02.c b/testcases/kernel/syscalls/pwritev/pwritev02.c
index 82792df27..0881b7566 100644
--- a/testcases/kernel/syscalls/pwritev/pwritev02.c
+++ b/testcases/kernel/syscalls/pwritev/pwritev02.c
@@ -117,6 +117,5 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.test = verify_pwritev,
-	.min_kver = "2.6.30",
 	.needs_tmpdir = 1,
 };
diff --git a/testcases/kernel/syscalls/pwritev/pwritev03.c b/testcases/kernel/syscalls/pwritev/pwritev03.c
index 91a5e3c54..8b91de336 100644
--- a/testcases/kernel/syscalls/pwritev/pwritev03.c
+++ b/testcases/kernel/syscalls/pwritev/pwritev03.c
@@ -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,
diff --git a/testcases/kernel/syscalls/recvmsg/recvmsg02.c b/testcases/kernel/syscalls/recvmsg/recvmsg02.c
index b15b37867..3aac4dd36 100644
--- a/testcases/kernel/syscalls/recvmsg/recvmsg02.c
+++ b/testcases/kernel/syscalls/recvmsg/recvmsg02.c
@@ -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[]) {
diff --git a/testcases/kernel/syscalls/sendfile/sendfile08.c b/testcases/kernel/syscalls/sendfile/sendfile08.c
index da334f1f5..66fd40cae 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile08.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile08.c
@@ -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"},
 		{}
diff --git a/testcases/kernel/syscalls/sendfile/sendfile09.c b/testcases/kernel/syscalls/sendfile/sendfile09.c
index 66d5f31a9..4a2d2083f 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile09.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile09.c
@@ -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"},
diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt03.c b/testcases/kernel/syscalls/setsockopt/setsockopt03.c
index 191c4cdfe..210b75429 100644
--- a/testcases/kernel/syscalls/setsockopt/setsockopt03.c
+++ b/testcases/kernel/syscalls/setsockopt/setsockopt03.c
@@ -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,
diff --git a/testcases/kernel/syscalls/socket/socket02.c b/testcases/kernel/syscalls/socket/socket02.c
index 59fd942d5..51b8cc59c 100644
--- a/testcases/kernel/syscalls/socket/socket02.c
+++ b/testcases/kernel/syscalls/socket/socket02.c
@@ -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
 };
diff --git a/testcases/kernel/syscalls/socketpair/socketpair02.c b/testcases/kernel/syscalls/socketpair/socketpair02.c
index e23945c53..eb679d5d9 100644
--- a/testcases/kernel/syscalls/socketpair/socketpair02.c
+++ b/testcases/kernel/syscalls/socketpair/socketpair02.c
@@ -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
 };
diff --git a/testcases/kernel/syscalls/splice/splice01.c b/testcases/kernel/syscalls/splice/splice01.c
index f5b2cbe17..508ccdeb7 100644
--- a/testcases/kernel/syscalls/splice/splice01.c
+++ b/testcases/kernel/syscalls/splice/splice01.c
@@ -101,5 +101,4 @@ static struct tst_test test = {
 	.cleanup = cleanup,
 	.test_all = splice_test,
 	.needs_tmpdir = 1,
-	.min_kver = "2.6.17",
 };
diff --git a/testcases/kernel/syscalls/splice/splice02.c b/testcases/kernel/syscalls/splice/splice02.c
index b29415a8a..1da1186b2 100644
--- a/testcases/kernel/syscalls/splice/splice02.c
+++ b/testcases/kernel/syscalls/splice/splice02.c
@@ -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)"},
 		{}
diff --git a/testcases/kernel/syscalls/splice/splice03.c b/testcases/kernel/syscalls/splice/splice03.c
index f3c135dee..c054e6c1c 100644
--- a/testcases/kernel/syscalls/splice/splice03.c
+++ b/testcases/kernel/syscalls/splice/splice03.c
@@ -123,5 +123,4 @@ static struct tst_test test = {
 	.test = splice_verify,
 	.tcnt = ARRAY_SIZE(tcases),
 	.needs_tmpdir = 1,
-	.min_kver = "2.6.17",
 };
diff --git a/testcases/kernel/syscalls/splice/splice04.c b/testcases/kernel/syscalls/splice/splice04.c
index 896f45839..5e6e8df05 100644
--- a/testcases/kernel/syscalls/splice/splice04.c
+++ b/testcases/kernel/syscalls/splice/splice04.c
@@ -83,5 +83,4 @@ static struct tst_test test = {
 		{"l:", &str_len_data, "Length of test data (in bytes)"},
 		{}
 	},
-	.min_kver = "2.6.31"
 };
diff --git a/testcases/kernel/syscalls/splice/splice05.c b/testcases/kernel/syscalls/splice/splice05.c
index d77dc887e..501df10f6 100644
--- a/testcases/kernel/syscalls/splice/splice05.c
+++ b/testcases/kernel/syscalls/splice/splice05.c
@@ -108,5 +108,4 @@ static struct tst_test test = {
 		{"l:", &str_len_data, "Length of test data (in bytes)"},
 		{}
 	},
-	.min_kver = "2.6.17"
 };
diff --git a/testcases/kernel/syscalls/switch/endian_switch01.c b/testcases/kernel/syscalls/switch/endian_switch01.c
index f357ff54d..bee35184a 100644
--- a/testcases/kernel/syscalls/switch/endian_switch01.c
+++ b/testcases/kernel/syscalls/switch/endian_switch01.c
@@ -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,
 };
 
diff --git a/testcases/kernel/syscalls/tee/tee01.c b/testcases/kernel/syscalls/tee/tee01.c
index 87a7ecd09..d1489d045 100644
--- a/testcases/kernel/syscalls/tee/tee01.c
+++ b/testcases/kernel/syscalls/tee/tee01.c
@@ -106,5 +106,4 @@ static struct tst_test test = {
 	.cleanup = cleanup,
 	.test_all = tee_test,
 	.needs_tmpdir = 1,
-	.min_kver = "2.6.17",
 };
diff --git a/testcases/kernel/syscalls/tee/tee02.c b/testcases/kernel/syscalls/tee/tee02.c
index 885877d1f..5ebb3c3f6 100644
--- a/testcases/kernel/syscalls/tee/tee02.c
+++ b/testcases/kernel/syscalls/tee/tee02.c
@@ -90,5 +90,4 @@ static struct tst_test test = {
 	.test = tee_verify,
 	.tcnt = ARRAY_SIZE(tcases),
 	.needs_tmpdir = 1,
-	.min_kver = "2.6.17",
 };
diff --git a/testcases/kernel/syscalls/timerfd/timerfd01.c b/testcases/kernel/syscalls/timerfd/timerfd01.c
index 9f5694217..4461c4fd4 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd01.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd01.c
@@ -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",
 };
diff --git a/testcases/kernel/syscalls/timerfd/timerfd_gettime01.c b/testcases/kernel/syscalls/timerfd/timerfd_gettime01.c
index aba77c05d..8dd31f9f0 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd_gettime01.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd_gettime01.c
@@ -101,5 +101,4 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.needs_tmpdir = 1,
-	.min_kver = "2.6.25",
 };
diff --git a/testcases/kernel/syscalls/timerfd/timerfd_settime01.c b/testcases/kernel/syscalls/timerfd/timerfd_settime01.c
index 36577e2c4..7ebcaf4b4 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd_settime01.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd_settime01.c
@@ -108,5 +108,4 @@ static struct tst_test test = {
 	.setup = setup,
 	.cleanup = cleanup,
 	.needs_tmpdir = 1,
-	.min_kver = "2.6.25",
 };
diff --git a/testcases/kernel/syscalls/timerfd/timerfd_settime02.c b/testcases/kernel/syscalls/timerfd/timerfd_settime02.c
index 84ce95538..33d9f7b46 100644
--- a/testcases/kernel/syscalls/timerfd/timerfd_settime02.c
+++ b/testcases/kernel/syscalls/timerfd/timerfd_settime02.c
@@ -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[]) {
diff --git a/testcases/kernel/syscalls/unlinkat/unlinkat01.c b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
index cdbb09927..7dba1d641 100644
--- a/testcases/kernel/syscalls/unlinkat/unlinkat01.c
+++ b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
@@ -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,
diff --git a/testcases/kernel/syscalls/vmsplice/vmsplice01.c b/testcases/kernel/syscalls/vmsplice/vmsplice01.c
index 36ecc08ef..17486179b 100644
--- a/testcases/kernel/syscalls/vmsplice/vmsplice01.c
+++ b/testcases/kernel/syscalls/vmsplice/vmsplice01.c
@@ -121,5 +121,4 @@ static struct tst_test test = {
 		"nfs",
 		NULL
 	},
-	.min_kver = "2.6.17",
 };
diff --git a/testcases/kernel/syscalls/vmsplice/vmsplice02.c b/testcases/kernel/syscalls/vmsplice/vmsplice02.c
index 0135b6f7e..8f1965c2e 100644
--- a/testcases/kernel/syscalls/vmsplice/vmsplice02.c
+++ b/testcases/kernel/syscalls/vmsplice/vmsplice02.c
@@ -103,5 +103,4 @@ static struct tst_test test = {
 		"nfs",
 		NULL
 	},
-	.min_kver = "2.6.17",
 };
diff --git a/testcases/kernel/syscalls/vmsplice/vmsplice03.c b/testcases/kernel/syscalls/vmsplice/vmsplice03.c
index 622c11017..d3a39254b 100644
--- a/testcases/kernel/syscalls/vmsplice/vmsplice03.c
+++ b/testcases/kernel/syscalls/vmsplice/vmsplice03.c
@@ -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}},
 		{}
diff --git a/testcases/kernel/syscalls/vmsplice/vmsplice04.c b/testcases/kernel/syscalls/vmsplice/vmsplice04.c
index 9aaa0b56f..96c24bc60 100644
--- a/testcases/kernel/syscalls/vmsplice/vmsplice04.c
+++ b/testcases/kernel/syscalls/vmsplice/vmsplice04.c
@@ -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,
 };
-- 
2.27.0


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

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

* [LTP] [PATCH v2 6/6] doc/c-test-api.txt
  2022-12-14 11:44 [LTP] [PATCH v2 1/6] lib/tst_kvercmp: Remove old distnames Yang Xu
                   ` (3 preceding siblings ...)
  2022-12-14 11:45 ` [LTP] [PATCH v2 5/6] Remove old kernel version check when using min_kver Yang Xu
@ 2022-12-14 11:45 ` Yang Xu
  4 siblings, 0 replies; 8+ messages in thread
From: Yang Xu @ 2022-12-14 11:45 UTC (permalink / raw)
  To: ltp

Update min_kver usage. Also inotify04 has removed tst_kvercmp2,
so remove it.

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 doc/c-test-api.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/c-test-api.txt b/doc/c-test-api.txt
index e6d121dce..f4da9ff41 100644
--- a/doc/c-test-api.txt
+++ b/doc/c-test-api.txt
@@ -559,7 +559,8 @@ static struct tst_test test = {
 Testcases for newly added kernel functionality require kernel newer than a
 certain version to run. All you need to skip a test on older kernels is to
 set the '.min_kver' string in the 'struct tst_test' to a minimal required
-kernel version, e.g. '.min_kver = "2.6.30"'.
+kernel version, e.g. '.min_kver = "3.10.0"'. For ltp, the oldest supported
+kernel version is 3.0, so we don't add this check for old kernel ie 2.6.32.
 
 For more complicated operations such as skipping a test for a certain range
 of kernel versions, following functions could be used:
@@ -585,8 +586,7 @@ positive means that it's newer.
 
 The second function 'tst_kvercmp2()' allows for specifying per-vendor table of
 kernel versions as vendors typically backport fixes to their kernels and the
-test may be relevant even if the kernel version does not suggests so. See
-'testcases/kernel/syscalls/inotify/inotify04.c' for example usage.
+test may be relevant even if the kernel version does not suggests so.
 
 WARNING: The shell 'tst_kvercmp' maps the result into unsigned integer - the
          process exit value.
-- 
2.27.0


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

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

* Re: [LTP] [PATCH v2 2/6] shell: Remove old kernel version check
  2022-12-14 11:44 ` [LTP] [PATCH v2 2/6] shell: Remove old kernel version check Yang Xu
@ 2022-12-15  5:46   ` xuyang2018.jy
  2022-12-15 11:25     ` Richard Palethorpe
  0 siblings, 1 reply; 8+ messages in thread
From: xuyang2018.jy @ 2022-12-15  5:46 UTC (permalink / raw)
  To: ltp

Hi ALL


> The oldest supported test distribution kernel version is 3.0[1], we don't need these checks.
> If users want to run these cases on old kernel, they can use old release tag.
> 
> [1]https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
>   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  |  4 ---
>   .../ftrace_stress/ftrace_trace_clock.sh       | 28 ++++---------------
>   .../ftrace_stress/ftrace_trace_stat.sh        |  6 ----
>   .../multicast/grp-operation/mcast-lib.sh      |  1 -
>   24 files changed, 37 insertions(+), 145 deletions(-)
> 
> diff --git a/testcases/commands/mkswap/mkswap01.sh b/testcases/commands/mkswap/mkswap01.sh
> index fe1695876..e03c46c31 100755
> --- a/testcases/commands/mkswap/mkswap01.sh
> +++ b/testcases/commands/mkswap/mkswap01.sh
> @@ -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
>   
> diff --git a/testcases/kernel/containers/netns/netns_sysfs.sh b/testcases/kernel/containers/netns/netns_sysfs.sh
> index 9fc390eaf..179242721 100755
> --- a/testcases/kernel/containers/netns/netns_sysfs.sh
> +++ b/testcases/kernel/containers/netns/netns_sysfs.sh
> @@ -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"
> diff --git a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> index bfa9097ec..d26456b2d 100755
> --- a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> +++ b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> @@ -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
> -

Here should return directly instead of removing. IOW, the test6 is 
useless. But now it is safe because "grep -q -w "ns" /proc/cgroups" also 
return directly. So I mean to remove this test6 at a separate patch in 
the future or v3.

Best Regards
Yang Xu
>   	if ! grep -q -w "ns" /proc/cgroups; then
>   		tst_res TCONF "CONFIG_CGROUP_NS is NOT enabled"
>   		return
> diff --git a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
> index 9939f13a3..87ba7da1f 100755
> --- a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
> +++ b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh
> @@ -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}
> diff --git a/testcases/kernel/controllers/memcg/functional/memcg_limit_in_bytes.sh b/testcases/kernel/controllers/memcg/functional/memcg_limit_in_bytes.sh
> index 77d293329..8ad399a97 100755
> --- a/testcases/kernel/controllers/memcg/functional/memcg_limit_in_bytes.sh
> +++ b/testcases/kernel/controllers/memcg/functional/memcg_limit_in_bytes.sh
> @@ -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()
> diff --git a/testcases/kernel/controllers/memcg/functional/memcg_memsw_limit_in_bytes_test.sh b/testcases/kernel/controllers/memcg/functional/memcg_memsw_limit_in_bytes_test.sh
> index 96f5360a8..74748a528 100755
> --- a/testcases/kernel/controllers/memcg/functional/memcg_memsw_limit_in_bytes_test.sh
> +++ b/testcases/kernel/controllers/memcg/functional/memcg_memsw_limit_in_bytes_test.sh
> @@ -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()
> diff --git a/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh b/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
> index 94d4e4c00..58759263e 100755
> --- a/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
> +++ b/testcases/kernel/controllers/memcg/regression/memcg_regression_test.sh
> @@ -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")
> diff --git a/testcases/kernel/power_management/pm_include.sh b/testcases/kernel/power_management/pm_include.sh
> index f3e160445..ad72028c9 100755
> --- a/testcases/kernel/power_management/pm_include.sh
> +++ b/testcases/kernel/power_management/pm_include.sh
> @@ -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() {
> diff --git a/testcases/kernel/power_management/runpwtests01.sh b/testcases/kernel/power_management/runpwtests01.sh
> index d470d112e..2caf9eab5 100755
> --- a/testcases/kernel/power_management/runpwtests01.sh
> +++ b/testcases/kernel/power_management/runpwtests01.sh
> @@ -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)
> diff --git a/testcases/kernel/power_management/runpwtests02.sh b/testcases/kernel/power_management/runpwtests02.sh
> index 8c7936fc4..805befb03 100755
> --- a/testcases/kernel/power_management/runpwtests02.sh
> +++ b/testcases/kernel/power_management/runpwtests02.sh
> @@ -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)
> diff --git a/testcases/kernel/power_management/runpwtests03.sh b/testcases/kernel/power_management/runpwtests03.sh
> index 3fb85d273..72ad2ad68 100755
> --- a/testcases/kernel/power_management/runpwtests03.sh
> +++ b/testcases/kernel/power_management/runpwtests03.sh
> @@ -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
> diff --git a/testcases/kernel/power_management/runpwtests04.sh b/testcases/kernel/power_management/runpwtests04.sh
> index 4b727a5bc..6565320d2 100755
> --- a/testcases/kernel/power_management/runpwtests04.sh
> +++ b/testcases/kernel/power_management/runpwtests04.sh
> @@ -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
> diff --git a/testcases/kernel/power_management/runpwtests05.sh b/testcases/kernel/power_management/runpwtests05.sh
> index 1c87d8d0c..03b6752bf 100755
> --- a/testcases/kernel/power_management/runpwtests05.sh
> +++ b/testcases/kernel/power_management/runpwtests05.sh
> @@ -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
>   
> diff --git a/testcases/kernel/power_management/runpwtests06.sh b/testcases/kernel/power_management/runpwtests06.sh
> index 1ec193ad4..16e50a670 100755
> --- a/testcases/kernel/power_management/runpwtests06.sh
> +++ b/testcases/kernel/power_management/runpwtests06.sh
> @@ -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"
> diff --git a/testcases/kernel/power_management/runpwtests_exclusive01.sh b/testcases/kernel/power_management/runpwtests_exclusive01.sh
> index 3a824e5eb..f309d7c19 100755
> --- a/testcases/kernel/power_management/runpwtests_exclusive01.sh
> +++ b/testcases/kernel/power_management/runpwtests_exclusive01.sh
> @@ -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
>   
> diff --git a/testcases/kernel/power_management/runpwtests_exclusive02.sh b/testcases/kernel/power_management/runpwtests_exclusive02.sh
> index fa445185e..547e88fea 100755
> --- a/testcases/kernel/power_management/runpwtests_exclusive02.sh
> +++ b/testcases/kernel/power_management/runpwtests_exclusive02.sh
> @@ -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
>   
> diff --git a/testcases/kernel/power_management/runpwtests_exclusive03.sh b/testcases/kernel/power_management/runpwtests_exclusive03.sh
> index 0d5724825..67c7243e8 100755
> --- a/testcases/kernel/power_management/runpwtests_exclusive03.sh
> +++ b/testcases/kernel/power_management/runpwtests_exclusive03.sh
> @@ -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
>   
> diff --git a/testcases/kernel/power_management/runpwtests_exclusive04.sh b/testcases/kernel/power_management/runpwtests_exclusive04.sh
> index 15e031a43..46985b3be 100755
> --- a/testcases/kernel/power_management/runpwtests_exclusive04.sh
> +++ b/testcases/kernel/power_management/runpwtests_exclusive04.sh
> @@ -25,7 +25,7 @@ export TST_TOTAL=2
>   . pm_include.sh
>   
>   # Checking test environment
> -check_kervel_arch
> +check_arch
>   
>   tst_require_cmds python3
>   
> diff --git a/testcases/kernel/power_management/runpwtests_exclusive05.sh b/testcases/kernel/power_management/runpwtests_exclusive05.sh
> index 9d4e01683..38450d1fd 100755
> --- a/testcases/kernel/power_management/runpwtests_exclusive05.sh
> +++ b/testcases/kernel/power_management/runpwtests_exclusive05.sh
> @@ -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
>   
> diff --git a/testcases/kernel/security/cap_bound/run_capbounds.sh b/testcases/kernel/security/cap_bound/run_capbounds.sh
> index 6164f62d6..ddf186426 100755
> --- a/testcases/kernel/security/cap_bound/run_capbounds.sh
> +++ b/testcases/kernel/security/cap_bound/run_capbounds.sh
> @@ -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
>   
> diff --git a/testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh b/testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh
> index ca6c840b1..9d0575b90 100755
> --- a/testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh
> +++ b/testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh
> @@ -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"
> diff --git a/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_clock.sh b/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_clock.sh
> index 4a3e68a72..50329c684 100755
> --- a/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_clock.sh
> +++ b/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_clock.sh
> @@ -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
>   
> diff --git a/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_stat.sh b/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_stat.sh
> index 50aeef970..f7177c988 100755
> --- a/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_stat.sh
> +++ b/testcases/kernel/tracing/ftrace_test/ftrace_stress/ftrace_trace_stat.sh
> @@ -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
> diff --git a/testcases/network/stress/multicast/grp-operation/mcast-lib.sh b/testcases/network/stress/multicast/grp-operation/mcast-lib.sh
> index f890deea9..30368b079 100644
> --- a/testcases/network/stress/multicast/grp-operation/mcast-lib.sh
> +++ b/testcases/network/stress/multicast/grp-operation/mcast-lib.sh
> @@ -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)

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

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

* Re: [LTP] [PATCH v2 2/6] shell: Remove old kernel version check
  2022-12-15  5:46   ` xuyang2018.jy
@ 2022-12-15 11:25     ` Richard Palethorpe
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Palethorpe @ 2022-12-15 11:25 UTC (permalink / raw)
  To: xuyang2018.jy; +Cc: ltp

Hello,

"xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com> writes:

> Hi ALL
>
>
>> The oldest supported test distribution kernel version is 3.0[1], we don't need these checks.
>> If users want to run these cases on old kernel, they can use old release tag.
>> 
>> [1]https://github.com/linux-test-project/ltp/wiki/Supported-kernel,-libc,-toolchain-versions
>> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
>> ---
>>   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  |  4 ---
>>   .../ftrace_stress/ftrace_trace_clock.sh       | 28 ++++---------------
>>   .../ftrace_stress/ftrace_trace_stat.sh        |  6 ----
>>   .../multicast/grp-operation/mcast-lib.sh      |  1 -
>>   24 files changed, 37 insertions(+), 145 deletions(-)
>> 
>> diff --git a/testcases/commands/mkswap/mkswap01.sh b/testcases/commands/mkswap/mkswap01.sh
>> index fe1695876..e03c46c31 100755
>> --- a/testcases/commands/mkswap/mkswap01.sh
>> +++ b/testcases/commands/mkswap/mkswap01.sh
>> @@ -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
>>   
>> diff --git a/testcases/kernel/containers/netns/netns_sysfs.sh b/testcases/kernel/containers/netns/netns_sysfs.sh
>> index 9fc390eaf..179242721 100755
>> --- a/testcases/kernel/containers/netns/netns_sysfs.sh
>> +++ b/testcases/kernel/containers/netns/netns_sysfs.sh
>> @@ -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"
>> diff --git a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
>> index bfa9097ec..d26456b2d 100755
>> --- a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
>> +++ b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
>> @@ -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
>> -
>
> Here should return directly instead of removing. IOW, the test6 is 
> useless. But now it is safe because "grep -q -w "ns" /proc/cgroups" also 
> return directly. So I mean to remove this test6 at a separate patch in 
> the future or v3.

It needs removing in a V3 IMO. Because the below logic has not been
tested in a long time and may not reliably result in TCONF.

-- 
Thank you,
Richard.

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

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

end of thread, other threads:[~2022-12-15 11:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14 11:44 [LTP] [PATCH v2 1/6] lib/tst_kvercmp: Remove old distnames Yang Xu
2022-12-14 11:44 ` [LTP] [PATCH v2 2/6] shell: Remove old kernel version check Yang Xu
2022-12-15  5:46   ` xuyang2018.jy
2022-12-15 11:25     ` Richard Palethorpe
2022-12-14 11:45 ` [LTP] [PATCH v2 3/6] doc/shell-test-api.txt Yang Xu
2022-12-14 11:45 ` [LTP] [PATCH v2 4/6] Remove old kernel version check in C case when using tst_kvercmp Yang Xu
2022-12-14 11:45 ` [LTP] [PATCH v2 5/6] Remove old kernel version check when using min_kver Yang Xu
2022-12-14 11:45 ` [LTP] [PATCH v2 6/6] doc/c-test-api.txt Yang Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.