diff options
author | Joe Lawrence <joe.lawrence@redhat.com> | 2022-08-11 23:21:38 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2022-09-23 15:16:48 +0200 |
commit | 857300b7d5fd5ee4549cf687cd9b46eeb1663b5b (patch) | |
tree | 6c1dac619b3d1415bd9a56f7b7983d128bfa7e18 | |
parent | livepatch: Add a missing newline character in klp_module_coming() (diff) | |
download | linux-857300b7d5fd5ee4549cf687cd9b46eeb1663b5b.tar.xz linux-857300b7d5fd5ee4549cf687cd9b46eeb1663b5b.zip |
selftests/livepatch: normalize sysctl error message
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>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220811212138.182575-1-joe.lawrence@redhat.com
-rw-r--r-- | tools/testing/selftests/livepatch/functions.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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 |