[PATCH 0/8] kselftests: livepatch: Adapt tests to be executed on 4.12 kernels

Marcos Paulo de Souza posted 8 patches 3 weeks, 3 days ago
tools/testing/selftests/livepatch/Makefile         |   3 +
tools/testing/selftests/livepatch/functions.sh     |  16 +-
tools/testing/selftests/livepatch/test-kprobe.sh   |  54 ++++---
.../selftests/livepatch/test-sysfs-patched-attr.sh |  95 ++++++++++++
.../selftests/livepatch/test-sysfs-replace-attr.sh |  75 ++++++++++
.../selftests/livepatch/test-sysfs-stack-attr.sh   | 121 +++++++++++++++
tools/testing/selftests/livepatch/test-sysfs.sh    | 164 ---------------------
.../livepatch/test_modules/test_klp_syscall.c      |   7 +-
8 files changed, 344 insertions(+), 191 deletions(-)
[PATCH 0/8] kselftests: livepatch: Adapt tests to be executed on 4.12 kernels
Posted by Marcos Paulo de Souza 3 weeks, 3 days ago
These patches don't really change how the patches are run, just skip
some tests on kernels that don't support a feature (like kprobe and
livepatched living together) or when a livepatch sysfs attribute is
missing.

The last patch slightly adjusts check_result function to skip dmesg
messages on SLE kernels when a livepatch is removed.

These patches are based on printk/for-next branch.

Please review! Thanks!

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
Marcos Paulo de Souza (8):
      selftests: livepatch: test-syscall: Check for ARCH_HAS_SYSCALL_WRAPPER
      selftests: livepatch: test-kprobe: Replace true/false mod param by 1/0
      selftests: livepatch: test-kprobe: Check if kprobes can work with livepatches
      selftests: livepatch: functions: Introduce check_sysfs_exists
      selftests: livepatch: sysfs: Split tests of replace attribute
      selftests: livepatch: sysfs: Split tests of stack_order attribute
      selftests: livepatch: sysfs: Split tests of patched attribute
      selftests: livepatch: functions.sh: Extend check for taint flag kernel message

 tools/testing/selftests/livepatch/Makefile         |   3 +
 tools/testing/selftests/livepatch/functions.sh     |  16 +-
 tools/testing/selftests/livepatch/test-kprobe.sh   |  54 ++++---
 .../selftests/livepatch/test-sysfs-patched-attr.sh |  95 ++++++++++++
 .../selftests/livepatch/test-sysfs-replace-attr.sh |  75 ++++++++++
 .../selftests/livepatch/test-sysfs-stack-attr.sh   | 121 +++++++++++++++
 tools/testing/selftests/livepatch/test-sysfs.sh    | 164 ---------------------
 .../livepatch/test_modules/test_klp_syscall.c      |   7 +-
 8 files changed, 344 insertions(+), 191 deletions(-)
---
base-commit: 920e5001f4beb38685d5b8cac061cb1d2760eeab
change-id: 20260309-lp-tests-old-fixes-f955abc8ec27

Best regards,
--  
Marcos Paulo de Souza <mpdesouza@suse.com>
Re: [PATCH 0/8] kselftests: livepatch: Adapt tests to be executed on 4.12 kernels
Posted by Petr Mladek 2 weeks, 3 days ago
On Fri 2026-03-13 17:58:31, Marcos Paulo de Souza wrote:
> These patches don't really change how the patches are run, just skip
> some tests on kernels that don't support a feature (like kprobe and
> livepatched living together) or when a livepatch sysfs attribute is
> missing.
> 
> The last patch slightly adjusts check_result function to skip dmesg
> messages on SLE kernels when a livepatch is removed.
> 
> These patches are based on printk/for-next branch.
> 
> Please review! Thanks!

JFYI, I am suprised how good was the review made by the Sashiko AI, see
https://sashiko.dev/#/patchset/20260313-lp-tests-old-fixes-v1-0-71ac6dfb3253%40suse.com

It pointed out many problems mentioned in the human review.
IMHO, it was also able to explain them very well.

Well, it missed some higher level views.

Best Regards,
Petr