[PATCH v4 0/3] selftests: livepatch: test livepatching a kprobed function

Michael Vetter posted 3 patches 1 month, 4 weeks ago
There is a newer version of this series
tools/testing/selftests/livepatch/Makefile    |  3 +-
.../testing/selftests/livepatch/functions.sh  | 19 ++++--
.../selftests/livepatch/test-kprobe.sh        | 62 +++++++++++++++++++
.../selftests/livepatch/test_modules/Makefile |  3 +-
.../livepatch/test_modules/test_klp_kprobe.c  | 38 ++++++++++++
5 files changed, 117 insertions(+), 8 deletions(-)
create mode 100755 tools/testing/selftests/livepatch/test-kprobe.sh
create mode 100644 tools/testing/selftests/livepatch/test_modules/test_klp_kprobe.c
[PATCH v4 0/3] selftests: livepatch: test livepatching a kprobed function
Posted by Michael Vetter 1 month, 4 weeks ago
Thanks to Miroslav, Petr and Marcos for the reviews!

V4:
Use variable for /sys/kernel/debug.
Be consistent with "" around variables.
Fix path in commit message to /sys/kernel/debug/kprobes/enabled.

V3:
Save and restore kprobe state also when test fails, by integrating it
into setup_config() and cleanup().
Rename SYSFS variables in a more logical way.
Sort test modules in alphabetical order.
Rename module description.

V2:
Save and restore kprobe state.

Michael Vetter (3):
  selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR
  selftests: livepatch: save and restore kprobe state
  selftests: livepatch: test livepatching a kprobed function

 tools/testing/selftests/livepatch/Makefile    |  3 +-
 .../testing/selftests/livepatch/functions.sh  | 19 ++++--
 .../selftests/livepatch/test-kprobe.sh        | 62 +++++++++++++++++++
 .../selftests/livepatch/test_modules/Makefile |  3 +-
 .../livepatch/test_modules/test_klp_kprobe.c  | 38 ++++++++++++
 5 files changed, 117 insertions(+), 8 deletions(-)
 create mode 100755 tools/testing/selftests/livepatch/test-kprobe.sh
 create mode 100644 tools/testing/selftests/livepatch/test_modules/test_klp_kprobe.c

-- 
2.46.1
Re: [PATCH v4 0/3] selftests: livepatch: test livepatching a kprobed function
Posted by Marcos Paulo de Souza 1 month, 3 weeks ago
On Mon, 2024-09-30 at 11:33 +0200, Michael Vetter wrote:
> Thanks to Miroslav, Petr and Marcos for the reviews!

As the only changes were regarding bash nitpicks I keep my review from
earlier patchset, so:

Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com>

> 
> V4:
> Use variable for /sys/kernel/debug.
> Be consistent with "" around variables.
> Fix path in commit message to /sys/kernel/debug/kprobes/enabled.
> 
> V3:
> Save and restore kprobe state also when test fails, by integrating it
> into setup_config() and cleanup().
> Rename SYSFS variables in a more logical way.
> Sort test modules in alphabetical order.
> Rename module description.
> 
> V2:
> Save and restore kprobe state.
> 
> Michael Vetter (3):
>   selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR
>   selftests: livepatch: save and restore kprobe state
>   selftests: livepatch: test livepatching a kprobed function
> 
>  tools/testing/selftests/livepatch/Makefile    |  3 +-
>  .../testing/selftests/livepatch/functions.sh  | 19 ++++--
>  .../selftests/livepatch/test-kprobe.sh        | 62
> +++++++++++++++++++
>  .../selftests/livepatch/test_modules/Makefile |  3 +-
>  .../livepatch/test_modules/test_klp_kprobe.c  | 38 ++++++++++++
>  5 files changed, 117 insertions(+), 8 deletions(-)
>  create mode 100755 tools/testing/selftests/livepatch/test-kprobe.sh
>  create mode 100644
> tools/testing/selftests/livepatch/test_modules/test_klp_kprobe.c
>