Linux-kselftest Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] selftests/livepatch: Trivial cleanups
@ 2020-01-13 12:49 Miroslav Benes
  2020-01-13 12:49 ` [PATCH 1/2] selftests/livepatch: Replace set_dynamic_debug() with setup_config() in README Miroslav Benes
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Miroslav Benes @ 2020-01-13 12:49 UTC (permalink / raw)
  To: jpoimboe, jikos, pmladek, joe.lawrence, shuah
  Cc: live-patching, linux-kselftest, linux-kernel, Miroslav Benes

Two trivial cleanups after recent changes in selftests/livepatch. Based
on "next" branch of Shuah's kselftest tree.

Miroslav Benes (2):
  selftests/livepatch: Replace set_dynamic_debug() with setup_config()
    in README
  selftests/livepatch: Remove unused local variable in
    set_ftrace_enabled()

 tools/testing/selftests/livepatch/README       | 2 +-
 tools/testing/selftests/livepatch/functions.sh | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

-- 
2.24.1


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

* [PATCH 1/2] selftests/livepatch: Replace set_dynamic_debug() with setup_config() in README
  2020-01-13 12:49 [PATCH 0/2] selftests/livepatch: Trivial cleanups Miroslav Benes
@ 2020-01-13 12:49 ` Miroslav Benes
  2020-01-13 12:59   ` Kamalesh Babulal
  2020-01-13 12:49 ` [PATCH 2/2] selftests/livepatch: Remove unused local variable in set_ftrace_enabled() Miroslav Benes
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Miroslav Benes @ 2020-01-13 12:49 UTC (permalink / raw)
  To: jpoimboe, jikos, pmladek, joe.lawrence, shuah
  Cc: live-patching, linux-kselftest, linux-kernel, Miroslav Benes

Commit 35c9e74cff4c ("selftests/livepatch: Make dynamic debug setup and
restore generic") introduced setup_config() to set up the environment
for each test. It superseded set_dynamic_debug().  README still mentions
set_dynamic_debug(), so update it to setup_config() which should be used
now in every test.

Signed-off-by: Miroslav Benes <mbenes@suse.cz>
---
 tools/testing/selftests/livepatch/README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/livepatch/README b/tools/testing/selftests/livepatch/README
index b73cd0e2dd51..621d325425c2 100644
--- a/tools/testing/selftests/livepatch/README
+++ b/tools/testing/selftests/livepatch/README
@@ -35,7 +35,7 @@ Adding tests
 ------------
 
 See the common functions.sh file for the existing collection of utility
-functions, most importantly set_dynamic_debug() and check_result().  The
+functions, most importantly setup_config() and check_result().  The
 latter function greps the kernel's ring buffer for "livepatch:" and
 "test_klp" strings, so tests be sure to include one of those strings for
 result comparison.  Other utility functions include general module
-- 
2.24.1


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

* [PATCH 2/2] selftests/livepatch: Remove unused local variable in set_ftrace_enabled()
  2020-01-13 12:49 [PATCH 0/2] selftests/livepatch: Trivial cleanups Miroslav Benes
  2020-01-13 12:49 ` [PATCH 1/2] selftests/livepatch: Replace set_dynamic_debug() with setup_config() in README Miroslav Benes
@ 2020-01-13 12:49 ` Miroslav Benes
  2020-01-13 13:00   ` Kamalesh Babulal
  2020-01-13 14:37 ` [PATCH 0/2] selftests/livepatch: Trivial cleanups Joe Lawrence
  2020-01-14  8:19 ` Petr Mladek
  3 siblings, 1 reply; 7+ messages in thread
From: Miroslav Benes @ 2020-01-13 12:49 UTC (permalink / raw)
  To: jpoimboe, jikos, pmladek, joe.lawrence, shuah
  Cc: live-patching, linux-kselftest, linux-kernel, Miroslav Benes

set_ftrace_enabled() contains unused local variable "sysctl". Remove it.

Signed-off-by: Miroslav Benes <mbenes@suse.cz>
---
 tools/testing/selftests/livepatch/functions.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
index a6e3d5517a6f..2aab9791791d 100644
--- a/tools/testing/selftests/livepatch/functions.sh
+++ b/tools/testing/selftests/livepatch/functions.sh
@@ -64,7 +64,6 @@ function set_dynamic_debug() {
 }
 
 function set_ftrace_enabled() {
-	local sysctl="$1"
 	result=$(sysctl kernel.ftrace_enabled="$1" 2>&1 | paste --serial --delimiters=' ')
 	echo "livepatch: $result" > /dev/kmsg
 }
-- 
2.24.1


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

* Re: [PATCH 1/2] selftests/livepatch: Replace set_dynamic_debug() with setup_config() in README
  2020-01-13 12:49 ` [PATCH 1/2] selftests/livepatch: Replace set_dynamic_debug() with setup_config() in README Miroslav Benes
@ 2020-01-13 12:59   ` Kamalesh Babulal
  0 siblings, 0 replies; 7+ messages in thread
From: Kamalesh Babulal @ 2020-01-13 12:59 UTC (permalink / raw)
  To: Miroslav Benes, jpoimboe, jikos, pmladek, joe.lawrence, shuah
  Cc: live-patching, linux-kselftest, linux-kernel

On 1/13/20 6:19 PM, Miroslav Benes wrote:
> Commit 35c9e74cff4c ("selftests/livepatch: Make dynamic debug setup and
> restore generic") introduced setup_config() to set up the environment
> for each test. It superseded set_dynamic_debug().  README still mentions
> set_dynamic_debug(), so update it to setup_config() which should be used
> now in every test.
> 
> Signed-off-by: Miroslav Benes <mbenes@suse.cz>

Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>


-- 
Kamalesh


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

* Re: [PATCH 2/2] selftests/livepatch: Remove unused local variable in set_ftrace_enabled()
  2020-01-13 12:49 ` [PATCH 2/2] selftests/livepatch: Remove unused local variable in set_ftrace_enabled() Miroslav Benes
@ 2020-01-13 13:00   ` Kamalesh Babulal
  0 siblings, 0 replies; 7+ messages in thread
From: Kamalesh Babulal @ 2020-01-13 13:00 UTC (permalink / raw)
  To: Miroslav Benes, jpoimboe, jikos, pmladek, joe.lawrence, shuah
  Cc: live-patching, linux-kselftest, linux-kernel

On 1/13/20 6:19 PM, Miroslav Benes wrote:
> set_ftrace_enabled() contains unused local variable "sysctl". Remove it.
> 
> Signed-off-by: Miroslav Benes <mbenes@suse.cz>

Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>


-- 
Kamalesh


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

* Re: [PATCH 0/2] selftests/livepatch: Trivial cleanups
  2020-01-13 12:49 [PATCH 0/2] selftests/livepatch: Trivial cleanups Miroslav Benes
  2020-01-13 12:49 ` [PATCH 1/2] selftests/livepatch: Replace set_dynamic_debug() with setup_config() in README Miroslav Benes
  2020-01-13 12:49 ` [PATCH 2/2] selftests/livepatch: Remove unused local variable in set_ftrace_enabled() Miroslav Benes
@ 2020-01-13 14:37 ` Joe Lawrence
  2020-01-14  8:19 ` Petr Mladek
  3 siblings, 0 replies; 7+ messages in thread
From: Joe Lawrence @ 2020-01-13 14:37 UTC (permalink / raw)
  To: Miroslav Benes, jpoimboe, jikos, pmladek, shuah
  Cc: live-patching, linux-kselftest, linux-kernel

On 1/13/20 7:49 AM, Miroslav Benes wrote:
> Two trivial cleanups after recent changes in selftests/livepatch. Based
> on "next" branch of Shuah's kselftest tree.
> 
> Miroslav Benes (2):
>    selftests/livepatch: Replace set_dynamic_debug() with setup_config()
>      in README
>    selftests/livepatch: Remove unused local variable in
>      set_ftrace_enabled()
> 
>   tools/testing/selftests/livepatch/README       | 2 +-
>   tools/testing/selftests/livepatch/functions.sh | 1 -
>   2 files changed, 1 insertion(+), 2 deletions(-)
> 

For the series:

Acked-by: Joe Lawrence <joe.lawrence@redhat.com>

-- Joe


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

* Re: [PATCH 0/2] selftests/livepatch: Trivial cleanups
  2020-01-13 12:49 [PATCH 0/2] selftests/livepatch: Trivial cleanups Miroslav Benes
                   ` (2 preceding siblings ...)
  2020-01-13 14:37 ` [PATCH 0/2] selftests/livepatch: Trivial cleanups Joe Lawrence
@ 2020-01-14  8:19 ` Petr Mladek
  3 siblings, 0 replies; 7+ messages in thread
From: Petr Mladek @ 2020-01-14  8:19 UTC (permalink / raw)
  To: Miroslav Benes, shuah
  Cc: jpoimboe, jikos, joe.lawrence, live-patching, linux-kselftest,
	linux-kernel

On Mon 2020-01-13 13:49:05, Miroslav Benes wrote:
> Two trivial cleanups after recent changes in selftests/livepatch. Based
> on "next" branch of Shuah's kselftest tree.
> 
> Miroslav Benes (2):
>   selftests/livepatch: Replace set_dynamic_debug() with setup_config()
>     in README
>   selftests/livepatch: Remove unused local variable in
>     set_ftrace_enabled()

For the entire series:

Reviewed-by: Petr Mladek <pmladek@suse.com>

Shuah, would you like to take it via your selftest tree, please?

Best Regards,
Petr

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

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-13 12:49 [PATCH 0/2] selftests/livepatch: Trivial cleanups Miroslav Benes
2020-01-13 12:49 ` [PATCH 1/2] selftests/livepatch: Replace set_dynamic_debug() with setup_config() in README Miroslav Benes
2020-01-13 12:59   ` Kamalesh Babulal
2020-01-13 12:49 ` [PATCH 2/2] selftests/livepatch: Remove unused local variable in set_ftrace_enabled() Miroslav Benes
2020-01-13 13:00   ` Kamalesh Babulal
2020-01-13 14:37 ` [PATCH 0/2] selftests/livepatch: Trivial cleanups Joe Lawrence
2020-01-14  8:19 ` Petr Mladek

Linux-kselftest Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-kselftest/0 linux-kselftest/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kselftest linux-kselftest/ https://lore.kernel.org/linux-kselftest \
		linux-kselftest@vger.kernel.org
	public-inbox-index linux-kselftest

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kselftest


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git