* [PATCH] selftests/livepatch: normalize sysctl error message
@ 2022-08-11 21:21 Joe Lawrence
2022-08-19 5:59 ` Kamalesh Babulal
2022-09-23 13:46 ` Petr Mladek
0 siblings, 2 replies; 3+ messages in thread
From: Joe Lawrence @ 2022-08-11 21:21 UTC (permalink / raw)
To: live-patching
Cc: linux-kselftest, Joe Lawrence, Miroslav Benes, Petr Mladek,
Yannick Cote, Dennis Li
The livepatch kselftests rely on comparing expected and actual output
from such commands as sysctl. A recent commit in procps-ng v4.0.0 [1]
changed sysctl's output to emit key pathnames like:
sysctl: setting key "/proc/sys/kernel/ftrace_enabled": Device or resource busy
versus previous dotted output:
sysctl: setting key "kernel.ftrace_enabled": Device or resource busy
The modification in output was later reverted [2], but since the change
has been tagged in procps-ng v4.0.0, update the livepatch kselftest to
handle either case.
[1] https://gitlab.com/procps-ng/procps/-/commit/6389deca5bf667f5fab5912acde78ba8e0febbc7
[2] https://gitlab.com/procps-ng/procps/-/commit/b159c198c9160a8eb13254e2b631d0035b9b542c
Reported-by: Dennis(Zhuoheng) Li <denli@redhat.com>
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
---
tools/testing/selftests/livepatch/functions.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
index 9230b869371d..d5001c9eb72e 100644
--- a/tools/testing/selftests/livepatch/functions.sh
+++ b/tools/testing/selftests/livepatch/functions.sh
@@ -86,7 +86,7 @@ function set_ftrace_enabled() {
if [[ "$result" != "$1" ]] ; then
if [[ $can_fail -eq 1 ]] ; then
- echo "livepatch: $err" > /dev/kmsg
+ echo "livepatch: $err" | sed 's#/proc/sys/kernel/#kernel.#' > /dev/kmsg
return
fi
--
2.26.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/livepatch: normalize sysctl error message
2022-08-11 21:21 [PATCH] selftests/livepatch: normalize sysctl error message Joe Lawrence
@ 2022-08-19 5:59 ` Kamalesh Babulal
2022-09-23 13:46 ` Petr Mladek
1 sibling, 0 replies; 3+ messages in thread
From: Kamalesh Babulal @ 2022-08-19 5:59 UTC (permalink / raw)
To: Joe Lawrence, live-patching
Cc: linux-kselftest, Miroslav Benes, Petr Mladek, Yannick Cote,
Dennis Li
On 8/12/22 02:51, Joe Lawrence wrote:
> The livepatch kselftests rely on comparing expected and actual output
> from such commands as sysctl. A recent commit in procps-ng v4.0.0 [1]
> changed sysctl's output to emit key pathnames like:
>
> sysctl: setting key "/proc/sys/kernel/ftrace_enabled": Device or resource busy
>
> versus previous dotted output:
>
> sysctl: setting key "kernel.ftrace_enabled": Device or resource busy
>
> The modification in output was later reverted [2], but since the change
> has been tagged in procps-ng v4.0.0, update the livepatch kselftest to
> handle either case.
>
> [1] https://gitlab.com/procps-ng/procps/-/commit/6389deca5bf667f5fab5912acde78ba8e0febbc7
> [2] https://gitlab.com/procps-ng/procps/-/commit/b159c198c9160a8eb13254e2b631d0035b9b542c
>
> Reported-by: Dennis(Zhuoheng) Li <denli@redhat.com>
> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Reviewed-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
> ---
> tools/testing/selftests/livepatch/functions.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests/livepatch/functions.sh
> index 9230b869371d..d5001c9eb72e 100644
> --- a/tools/testing/selftests/livepatch/functions.sh
> +++ b/tools/testing/selftests/livepatch/functions.sh
> @@ -86,7 +86,7 @@ function set_ftrace_enabled() {
>
> if [[ "$result" != "$1" ]] ; then
> if [[ $can_fail -eq 1 ]] ; then
> - echo "livepatch: $err" > /dev/kmsg
> + echo "livepatch: $err" | sed 's#/proc/sys/kernel/#kernel.#' > /dev/kmsg
> return
> fi
>
--
Thanks,
Kamalesh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/livepatch: normalize sysctl error message
2022-08-11 21:21 [PATCH] selftests/livepatch: normalize sysctl error message Joe Lawrence
2022-08-19 5:59 ` Kamalesh Babulal
@ 2022-09-23 13:46 ` Petr Mladek
1 sibling, 0 replies; 3+ messages in thread
From: Petr Mladek @ 2022-09-23 13:46 UTC (permalink / raw)
To: Joe Lawrence
Cc: live-patching, linux-kselftest, Miroslav Benes, Yannick Cote,
Dennis Li
On Thu 2022-08-11 17:21:38, Joe Lawrence wrote:
> The livepatch kselftests rely on comparing expected and actual output
> from such commands as sysctl. A recent commit in procps-ng v4.0.0 [1]
> changed sysctl's output to emit key pathnames like:
>
> sysctl: setting key "/proc/sys/kernel/ftrace_enabled": Device or resource busy
>
> versus previous dotted output:
>
> sysctl: setting key "kernel.ftrace_enabled": Device or resource busy
>
> The modification in output was later reverted [2], but since the change
> has been tagged in procps-ng v4.0.0, update the livepatch kselftest to
> handle either case.
>
> [1] https://gitlab.com/procps-ng/procps/-/commit/6389deca5bf667f5fab5912acde78ba8e0febbc7
> [2] https://gitlab.com/procps-ng/procps/-/commit/b159c198c9160a8eb13254e2b631d0035b9b542c
>
> Reported-by: Dennis(Zhuoheng) Li <denli@redhat.com>
> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
JFYI, the patch has been committed into livepatching.git, branch
for-6.1/fixes.
Best Regards,
Petr
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-23 13:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-11 21:21 [PATCH] selftests/livepatch: normalize sysctl error message Joe Lawrence
2022-08-19 5:59 ` Kamalesh Babulal
2022-09-23 13:46 ` Petr Mladek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox