[LTP] [PATCH v2 2/6] shell: Remove old kernel version check

Richard Palethorpe rpalethorpe@suse.de
Thu Dec 15 12:25:10 CET 2022


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.


More information about the ltp mailing list