* [PATCH] sysctl: kselftests: use kernel module instead of built-in
@ 2018-09-05 2:20 Lei Yang
2018-09-05 16:47 ` Shuah Khan
0 siblings, 1 reply; 3+ messages in thread
From: Lei Yang @ 2018-09-05 2:20 UTC (permalink / raw)
To: mcgrof, shuah, linux-kselftest, linux-kernel
It uses modprobe $TEST_DRIVER in sysctl.sh, so update
config to use "m" instead
Signed-off-by: Lei Yang <Lei.Yang@windriver.com>
---
tools/testing/selftests/sysctl/config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/sysctl/config b/tools/testing/selftests/sysctl/config
index 6ca1480..fc263ef 100644
--- a/tools/testing/selftests/sysctl/config
+++ b/tools/testing/selftests/sysctl/config
@@ -1 +1 @@
-CONFIG_TEST_SYSCTL=y
+CONFIG_TEST_SYSCTL=m
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sysctl: kselftests: use kernel module instead of built-in
2018-09-05 2:20 [PATCH] sysctl: kselftests: use kernel module instead of built-in Lei Yang
@ 2018-09-05 16:47 ` Shuah Khan
2018-09-06 5:48 ` lei yang
0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2018-09-05 16:47 UTC (permalink / raw)
To: Lei Yang, mcgrof, linux-kselftest, linux-kernel, Shuah Khan
On 09/04/2018 08:20 PM, Lei Yang wrote:
> It uses modprobe $TEST_DRIVER in sysctl.sh, so update
> config to use "m" instead
>
> Signed-off-by: Lei Yang <Lei.Yang@windriver.com>
> ---
> tools/testing/selftests/sysctl/config | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/sysctl/config b/tools/testing/selftests/sysctl/config
> index 6ca1480..fc263ef 100644
> --- a/tools/testing/selftests/sysctl/config
> +++ b/tools/testing/selftests/sysctl/config
> @@ -1 +1 @@
> -CONFIG_TEST_SYSCTL=y
> +CONFIG_TEST_SYSCTL=m
>
What happens if it is a built-in? Can you elaborate in the changelog
On that note we might have other cases that do modprobe in scripts and
run into the same issue you are trying to solve. :)
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sysctl: kselftests: use kernel module instead of built-in
2018-09-05 16:47 ` Shuah Khan
@ 2018-09-06 5:48 ` lei yang
0 siblings, 0 replies; 3+ messages in thread
From: lei yang @ 2018-09-06 5:48 UTC (permalink / raw)
To: Shuah Khan, mcgrof, linux-kselftest, linux-kernel
On 2018年09月06日 00:47, Shuah Khan wrote:
> On 09/04/2018 08:20 PM, Lei Yang wrote:
>> It uses modprobe $TEST_DRIVER in sysctl.sh, so update
>> config to use "m" instead
>>
>> Signed-off-by: Lei Yang <Lei.Yang@windriver.com>
>> ---
>> tools/testing/selftests/sysctl/config | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/sysctl/config b/tools/testing/selftests/sysctl/config
>> index 6ca1480..fc263ef 100644
>> --- a/tools/testing/selftests/sysctl/config
>> +++ b/tools/testing/selftests/sysctl/config
>> @@ -1 +1 @@
>> -CONFIG_TEST_SYSCTL=y
>> +CONFIG_TEST_SYSCTL=m
>>
> What happens if it is a built-in? Can you elaborate in the changelog
>
> On that note we might have other cases that do modprobe in scripts and
> run into the same issue you are trying to solve. :)
I double-checked again, found that it doesn't work on either with
built-in or kernel module
if it's built-in, modprobe test_sysctl still return 0, so it doesn't
matter it's a built-in or module.
but the problem is that test_modprobe check module load before modprobe
execute , I'll sent a V2 patch to fix this and keep its build-in config
untouched
if changes nothing
1) when CONFIG_TEST_SYSCTL=y
root@intel-x86-64:/tmp/sysctl# ./sysctl.sh
Checking production write strict setting ... ok
./sysctl.sh: /sys/module/test_sysctl/ not present
You must have the following enabled in your kernel:
CONFIG_TEST_SYSCTL=y
root@intel-x86-64:/tmp/sysctl# zcat /proc/config.gz |grep TEST_SYS
CONFIG_TEST_SYSCTL=y
2) when CONFIG_TEST_SYSCTL=m
root@intel-x86-64:/tmp/sysctl# ./sysctl.sh
Checking production write strict setting ... ok
./sysctl.sh: /sys/module/test_sysctl/ not present
You must have the following enabled in your kernel:
CONFIG_TEST_SYSCTL=y
root@intel-x86-64:/tmp/sysctl# zcat /proc/config.gz |grep TEST_SYS
CONFIG_TEST_SYSCTL=m
Lei
> thanks,
> -- Shuah
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-06 5:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 2:20 [PATCH] sysctl: kselftests: use kernel module instead of built-in Lei Yang
2018-09-05 16:47 ` Shuah Khan
2018-09-06 5:48 ` lei yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).