Re: [PATCH] selftests/livepatch: define max test-syscall processes

2024-06-06 Thread Marcos Paulo de Souza
On Thu, 2024-06-06 at 09:53 -0400, Ryan Sullivan wrote: > Define a maximum allowable number of pids that can be livepatched in > test-syscall.sh as with extremely large machines the output from a > large number of processes overflows the dev/kmsg "expect" buffer in > the "check_result" function

Re: [PATCH v3] selftests: livepatch: Test atomic replace against multiple modules

2024-06-04 Thread Marcos Paulo de Souza
On Tue, 2024-06-04 at 14:10 -0400, Joe Lawrence wrote: > On Mon, Jun 03, 2024 at 02:26:19PM -0300, Marcos Paulo de Souza > wrote: > > Adapt the current test-livepatch.sh script to account the number of > > applied livepatches and ensure that an atomic replace livepatch &g

Re: [PATCH v3] selftests: livepatch: Test atomic replace against multiple modules

2024-06-03 Thread Marcos Paulo de Souza
On Mon, 2024-06-03 at 14:26 -0300, Marcos Paulo de Souza wrote: > Adapt the current test-livepatch.sh script to account the number of > applied livepatches and ensure that an atomic replace livepatch > disables > all previously applied livepatches. > > Signed-off-by: Mar

Re: [PATCH v2] selftests: livepatch: Test atomic replace against multiple modules

2024-06-03 Thread Marcos Paulo de Souza
On Mon, 2024-06-03 at 14:52 +0200, Petr Mladek wrote: > On Fri 2024-05-31 18:06:48, Marcos Paulo de Souza wrote: > > On Fri, 2024-05-31 at 15:44 -0400, Joe Lawrence wrote: > > > On Sat, May 25, 2024 at 11:34:08AM -0300, Marcos Paulo de Souza > > > wrote: > > > &

[PATCH v3] selftests: livepatch: Test atomic replace against multiple modules

2024-06-03 Thread Marcos Paulo de Souza
Adapt the current test-livepatch.sh script to account the number of applied livepatches and ensure that an atomic replace livepatch disables all previously applied livepatches. Signed-off-by: Marcos Paulo de Souza --- Changes since v2: * Used variables to stop the name of other livepatches

Re: [PATCH v2] selftests: livepatch: Test atomic replace against multiple modules

2024-05-31 Thread Marcos Paulo de Souza
On Fri, 2024-05-31 at 15:44 -0400, Joe Lawrence wrote: > On Sat, May 25, 2024 at 11:34:08AM -0300, Marcos Paulo de Souza > wrote: > > Adapt the current test-livepatch.sh script to account the number of > > applied livepatches and ensure that an atomic replace livepatch &g

Re: [PATCH] tools/testing/selftests/livepatch: define max test-syscall processes

2024-05-29 Thread Marcos Paulo de Souza
expect" buffer in > the "check_result" function and causes a false error. I believe that 128 threads hammering getpid is good enough :) Tested-by: Marcos Paulo de Souza Reviewed-by: Marcos Paulo de Souza > > Reported-by: CKI Project > Signed-off-by: Ryan Sullivan > -

[PATCH v2] selftests: livepatch: Test atomic replace against multiple modules

2024-05-25 Thread Marcos Paulo de Souza
Adapt the current test-livepatch.sh script to account the number of applied livepatches and ensure that an atomic replace livepatch disables all previously applied livepatches. Signed-off-by: Marcos Paulo de Souza --- Changes since v1: * Added checks in the existing test-livepatch.sh instead

Re: [PATCH] selftests: livepatch: Test atomic replace against multiple modules

2024-03-22 Thread Marcos Paulo de Souza
On Thu, 2024-03-21 at 10:08 -0400, Joe Lawrence wrote: > On 3/12/24 08:12, Marcos Paulo de Souza wrote: > > This new test checks if a livepatch with replace attribute set > > replaces > > all previously applied livepatches. > > > > Signed-off-by: Marcos Paulo de

[PATCH] selftests: livepatch: Test atomic replace against multiple modules

2024-03-12 Thread Marcos Paulo de Souza
This new test checks if a livepatch with replace attribute set replaces all previously applied livepatches. Signed-off-by: Marcos Paulo de Souza --- tools/testing/selftests/livepatch/Makefile | 3 +- .../selftests/livepatch/test-atomic-replace.sh | 71 ++ 2

Re: kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.8-rc1-56-g539cd3f4da3f)

2024-03-01 Thread Marcos Paulo de Souza
On Wed, 28 Feb 2024 15:28:14 -0700 Shuah Khan wrote: > On 2/28/24 00:21, kernelci.org bot wrote: > > kselftest/next kselftest-livepatch: 1 runs, 1 regressions > > (v6.8-rc1-56-g539cd3f4da3f) > > > > Regressions Summary > > --- > > > > platform| arch | lab |

Re: kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.8-rc1-53-gae638551ab64a)

2024-02-26 Thread Marcos Paulo de Souza
On Fri, 23 Feb 2024 21:59:44 -0800 (PST) "kernelci.org bot" wrote: > kselftest/next kselftest-livepatch: 1 runs, 1 regressions > (v6.8-rc1-53-gae638551ab64a) > > Regressions Summary > --- > > platform| arch | lab | compiler | defconfig >

Re: [PATCH v2 4/4] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling

2024-02-23 Thread Marcos Paulo de Souza
On Wed, 21 Feb 2024 14:17:06 -0300 Marcos Paulo de Souza wrote: Shuah, please skip this one. The simplification is not worthy if it causes a new warning. This reply[1] explains what's going on. Thanks in advance, Marcos [1]: https://lore.kernel.org/linux-kselftest/20240223161244.17709-1

Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR

2024-02-23 Thread Marcos Paulo de Souza
On Fri, 23 Feb 2024 15:07:20 -0700 Shuah Khan wrote: > On 2/21/24 15:04, Marcos Paulo de Souza wrote: > > On Wed, 21 Feb 2024 14:12:00 -0700 Shuah Khan > > wrote: > > > >> On 2/21/24 05:26, Marcos Paulo de Souza wrote: > >>> On Tue, 20 Feb 20

Re: [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling

2024-02-23 Thread Marcos Paulo de Souza
On Fri, 23 Feb 2024 11:40:00 +0800 Yujie Liu wrote: > On Wed, Feb 21, 2024 at 09:29:47AM -0300, Marcos Paulo de Souza wrote: > > On Mon, 19 Feb 2024 15:16:51 +0800 kernel test robot wrote: > > > > > Hi Marcos, > > > > > > kernel test

Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR

2024-02-21 Thread Marcos Paulo de Souza
On Thu, 22 Feb 2024 09:28:19 +0800 Yujie Liu wrote: > On Wed, Feb 21, 2024 at 07:04:03PM -0300, Marcos Paulo de Souza wrote: > > On Wed, 21 Feb 2024 14:12:00 -0700 Shuah Khan > > wrote: > > > > > On 2/21/24 05:26, Marcos Paulo de Souza wrote: > > > >

Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR

2024-02-21 Thread Marcos Paulo de Souza
On Wed, 21 Feb 2024 14:12:00 -0700 Shuah Khan wrote: > On 2/21/24 05:26, Marcos Paulo de Souza wrote: > > On Tue, 20 Feb 2024 17:19:54 -0700 Shuah Khan > > wrote: > > > >> On 2/19/24 06:53, Marcos Paulo de Souza wrote: > >>> On Mon, 19 Feb

[PATCH v2 4/4] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling

2024-02-21 Thread Marcos Paulo de Souza
We don't need new targets only to run two make modules and make clean. We can test if TEST_GEN_MODS_DIR is specified, and then run the commands. Signed-off-by: Marcos Paulo de Souza --- tools/testing/selftests/lib.mk | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff

[PATCH v2 3/4] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR

2024-02-21 Thread Marcos Paulo de Souza
The directory itself doesn't need have path handling, since it's only to mean where is the directory that contains modules to be built. Signed-off-by: Marcos Paulo de Souza --- tools/testing/selftests/lib.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/testing/selftests/lib.mk b

[PATCH v2 2/4] selftests: livepatch: Avoid running the tests if kernel-devel is missing

2024-02-21 Thread Marcos Paulo de Souza
-by: Marcos Paulo de Souza --- tools/testing/selftests/livepatch/functions.sh | 13 + tools/testing/selftests/livepatch/test_modules/Makefile | 6 ++ 2 files changed, 19 insertions(+) diff --git a/tools/testing/selftests/livepatch/functions.sh b/tools/testing/selftests

[PATCH v2 1/4] selftests: livepatch: Add initial .gitignore

2024-02-21 Thread Marcos Paulo de Souza
Ignore the binary used to test livepatching a syscall. Signed-off-by: Marcos Paulo de Souza --- tools/testing/selftests/livepatch/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/livepatch/.gitignore b/tools/testing/selftests/livepatch/.gitignore new file

[PATCH v2 0/4] Improvements to livepatch kselftests on top of kselftest-next

2024-02-21 Thread Marcos Paulo de Souza
-by: Marcos Paulo de Souza --- Changes in v2: - Added a new patch to avoid building the modules/running the tests if kernel-devel is not installed. Resolving an issue reported by the build bot. - Reordered the patches, showing the more simple ones first. Besides patch 0002, all the other three didn't

Re: [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling

2024-02-21 Thread Marcos Paulo de Souza
On Mon, 19 Feb 2024 15:16:51 +0800 kernel test robot wrote: > Hi Marcos, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on 345e8abe4c355bc24bab3f4a5634122e55be8665] > > url: > https://github.com/intel-lab-lkp/linux/commi

Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR

2024-02-21 Thread Marcos Paulo de Souza
On Tue, 20 Feb 2024 17:19:54 -0700 Shuah Khan wrote: > On 2/19/24 06:53, Marcos Paulo de Souza wrote: > > On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza > > wrote: > > > >> On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot > >> wrote: &

Re: [PATCH] Fix implicit cast warning in test_klp_state.c

2024-02-20 Thread Marcos Paulo de Souza
On Tue, 20 Feb 2024 17:23:49 +0530 (GMT+05:30) Shresth Prasad wrote: > Looking at the function definition now, I do see that the function returns a > struct pointer but for me the compiler still complains about an implicit > conversion from int to struct pointer. > > Is there any particular

Re: [PATCH] Fix implicit cast warning in test_klp_state.c

2024-02-19 Thread Marcos Paulo de Souza
On Sat, 17 Feb 2024 04:21:26 +0530 Shresth Prasad wrote: > The function `klp_get_state` returns an `int` value, but the variable > `loglevel_state` is of type `struct klp_state *` and thus does an > implicit cast. Explicitly casting these values fixes: > > - warning:

Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR

2024-02-19 Thread Marcos Paulo de Souza
On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza wrote: > On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot wrote: > > > Hi Marcos, > > > > kernel test robot noticed the following build errors: > > > > [auto build test ERROR on 345e

Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR

2024-02-19 Thread Marcos Paulo de Souza
On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot wrote: > Hi Marcos, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665] > > url: > https://github.com/intel-lab-lkp/linux/commi

[PATCH bpf-next] selftests: bpf: Remove empty TEST_CUSTOM_PROGS

2024-02-16 Thread Marcos Paulo de Souza
Commit f04a32b2c5b5 ("selftests/bpf: Do not use sign-file as testcase") removed the TEST_CUSTOM_PROGS assignment, and removed it from being used on TEST_GEN_FILES. Remove two leftovers from that cleanup. Found by inspection. Signed-off-by: Marcos Paulo de Souza --- tools/testing/sel

[PATCH 3/3] selftests: livepatch: Add initial .gitignore

2024-02-15 Thread Marcos Paulo de Souza
Ignore the binary used to test livepatching a syscall. Signed-off-by: Marcos Paulo de Souza --- tools/testing/selftests/livepatch/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/livepatch/.gitignore b/tools/testing/selftests/livepatch/.gitignore new file

[PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling

2024-02-15 Thread Marcos Paulo de Souza
We don't need new targets only to run two make modules and make clean. We can test if TEST_GEN_MODS_DIR is specified, and then run the commands. Signed-off-by: Marcos Paulo de Souza --- tools/testing/selftests/lib.mk | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff

[PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR

2024-02-15 Thread Marcos Paulo de Souza
The directory itself doesn't need have path handling, since it's only to mean where is the directory that contains modules to be built. Signed-off-by: Marcos Paulo de Souza --- tools/testing/selftests/lib.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/testing/selftests/lib.mk b

[PATCH 0/3] Improvements to livepatch kselftests on top of kselftest-next

2024-02-15 Thread Marcos Paulo de Souza
de Souza --- Marcos Paulo de Souza (3): selftests: lib.mk: Do not process TEST_GEN_MODS_DIR selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling selftests: livepatch: Add initial .gitignore tools/testing/selftests/lib.mk | 19 +++ tools/testing

Re: [PATCH v6 1/3] kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable

2024-01-22 Thread Marcos Paulo de Souza
On Mon, 2024-01-22 at 10:15 -0700, Shuah Khan wrote: > On 1/12/24 10:43, Marcos Paulo de Souza wrote: > > Add TEST_GEN_MODS_DIR variable for kselftests. It can point to > > a directory containing kernel modules that will be used by > > selftest scripts. > > > >

Re: [PATCH v6 2/3] livepatch: Move tests from lib/livepatch to selftests/livepatch

2024-01-22 Thread Marcos Paulo de Souza
On Fri, 2024-01-19 at 14:19 +0100, Alexander Gordeev wrote: > On Fri, Jan 19, 2024 at 02:11:01PM +0100, Alexander Gordeev wrote: > > FWIW, for s390 part: > > > > Alexander Gordeev > > Acked-by: Alexander Gordeev Thanks Alexandre and Joe for testing and supporting the change. Shuah, now that

[PATCH v6 3/3] selftests: livepatch: Test livepatching a heavily called syscall

2024-01-12 Thread Marcos Paulo de Souza
Lawrence Reviewed-by: Petr Mladek Signed-off-by: Marcos Paulo de Souza --- tools/testing/selftests/livepatch/Makefile | 4 +- tools/testing/selftests/livepatch/test-syscall.sh | 53 ++ .../selftests/livepatch/test_klp-call_getpid.c | 44 .../selftests/livepatch

[PATCH v6 2/3] livepatch: Move tests from lib/livepatch to selftests/livepatch

2024-01-12 Thread Marcos Paulo de Souza
ewed-by: Petr Mladek Signed-off-by: Marcos Paulo de Souza --- MAINTAINERS| 1 - arch/s390/configs/debug_defconfig | 1 - arch/s390/configs/defconfig| 1 - lib/Kconfig.debug

[PATCH v6 1/3] kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable

2024-01-12 Thread Marcos Paulo de Souza
r Mladek Signed-off-by: Marcos Paulo de Souza --- Documentation/dev-tools/kselftest.rst | 4 tools/testing/selftests/lib.mk| 26 +- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools

[PATCH v6 0/3] livepatch: Move modules to selftests and add a new test

2024-01-12 Thread Marcos Paulo de Souza
pectations. For the current approach to be truly system agnostic gen_tar would need to include the module and program sources to be compiled in the target systems. Thanks in advance! Marcos Signed-off-by: Marcos Paulo de Souza --- Marcos Paulo de Souza (3): kselftests: lib.mk: Add TEST_GEN_MODS_DI

Re: [PATCH RESEND v4 1/3] kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable

2024-01-09 Thread Marcos Paulo de Souza
On Tue, 2024-01-09 at 12:31 -0700, Shuah Khan wrote: > On 1/8/24 10:13, Marcos Paulo de Souza wrote: > > On Wed, 2024-01-03 at 15:09 -0700, Shuah Khan wrote: > > > > > > > Copying source files and object files doesn't sound right. This > > > isn't > >

[PATCH v5 3/3] selftests: livepatch: Test livepatching a heavily called syscall

2024-01-09 Thread Marcos Paulo de Souza
Lawrence Signed-off-by: Marcos Paulo de Souza --- tools/testing/selftests/livepatch/Makefile | 4 +- tools/testing/selftests/livepatch/test-syscall.sh | 53 ++ .../selftests/livepatch/test_klp-call_getpid.c | 44 .../selftests/livepatch/test_modules/Makefile

[PATCH v5 2/3] livepatch: Move tests from lib/livepatch to selftests/livepatch

2024-01-09 Thread Marcos Paulo de Souza
igned-off-by: Marcos Paulo de Souza --- MAINTAINERS| 1 - arch/s390/configs/debug_defconfig | 1 - arch/s390/configs/defconfig| 1 - lib/Kconfig.debug | 22

[PATCH v5 1/3] kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable

2024-01-09 Thread Marcos Paulo de Souza
LE is needed because INSTALL_SINGLE_RULE would copy the entire TEST_GEN_MODS_DIR directory to the destination, even the files created by Kbuild to compile the modules. The new install rule copies only the .ko files, as we would expect the gen_tar to work. Reviewed-by: Joe Lawrence Signed-off-by: M

[PATCH v5 0/3] livepatch: Move modules to selftests and add a new test

2024-01-09 Thread Marcos Paulo de Souza
he current approach to be truly system agnostic gen_tar would need to include the module and program sources to be compiled in the target systems. Thanks in advance! Marcos Signed-off-by: Marcos Paulo de Souza --- Marcos Paulo de Souza (3): kselftests: lib.mk: Add TEST_GEN_MODS_DI

Re: [PATCH RESEND v4 1/3] kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable

2024-01-08 Thread Marcos Paulo de Souza
On Wed, 2024-01-03 at 15:09 -0700, Shuah Khan wrote: > On 1/2/24 15:31, Joe Lawrence wrote: > > On Wed, Dec 20, 2023 at 01:53:12PM -0300, Marcos Paulo de Souza > > wrote: > > > Add TEST_GEN_MODS_DIR variable for kselftests. It can point to > > > a di

Re: [PATCH] selftests/livepatch: fix and refactor new dmesg message code

2023-12-22 Thread Marcos Paulo de Souza
wk I had to do some manual testing to understand that the syntax you used "prints everything after the $last_dmesg_msg message on dmesg". Either way, it's better then using 'comm' utility. I tested on my x86_64 VM, and the tests passed as expected. LGTM, so Tested-by: Marcos Paulo

Re: [PATCH RESEND v4 0/3] livepatch: Move modules to selftests and add a new test

2023-12-21 Thread Marcos Paulo de Souza
On Wed, 2023-12-20 at 13:53 -0300, Marcos Paulo de Souza wrote: > Changes in v4: > * Documented how to compile the livepatch selftests without running > the >   tests (Joe) > * Removed the mention to lib/livepatch on MAINTAINERS file, reported > by >   check

[PATCH RESEND v4 3/3] selftests: livepatch: Test livepatching a heavily called syscall

2023-12-20 Thread Marcos Paulo de Souza
..b76a881d4013 --- /dev/null +++ b/tools/testing/selftests/livepatch/test-syscall.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2023 SUSE +# Author: Marcos Paulo de Souza + +. $(dirname $0)/functions.sh + +MOD_SYSCALL=test_klp_syscall + +setup_config

[PATCH RESEND v4 2/3] livepatch: Move tests from lib/livepatch to selftests/livepatch

2023-12-20 Thread Marcos Paulo de Souza
d host. Note that these modules need not binary compatible with the kernel built from the same sources. But the same is true for other packaged selftest binaries. The entire kernel sources are needed for rebuilding the selftests on another system. Signed-off-by: M

[PATCH RESEND v4 1/3] kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable

2023-12-20 Thread Marcos Paulo de Souza
tically built before running the tests via make -C tools/testing/selftests/livepatch/ run_tests Note that they are _not_ built when running the standalone tests by calling, for example, ./test-state.sh. Signed-off-by: Marcos Paulo de Souza --- Documentation/dev-tools/kselftest.rst | 4 too

[PATCH RESEND v4 0/3] livepatch: Move modules to selftests and add a new test

2023-12-20 Thread Marcos Paulo de Souza
! Marcos Signed-off-by: Marcos Paulo de Souza --- Marcos Paulo de Souza (3): kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable livepatch: Move tests from lib/livepatch to selftests/livepatch selftests: livepatch: Test livepatching a heavily called syscall Documentation

Re: [PATCH v3 3/3] selftests: livepatch: Test livepatching a heavily called syscall

2023-12-20 Thread Marcos Paulo de Souza
On Mon, 2023-12-18 at 13:47 -0700, Shuah Khan wrote: > On 12/15/23 13:36, Joe Lawrence wrote: > > On 12/11/23 16:53, Shuah Khan wrote: > > > On 12/6/23 07:39, Miroslav Benes wrote: > > > > Hi, > > > > > > > > On Tue, 5 Dec 2023, Shuah Khan wrote: > > > > > > > > > On 12/5/23 05:52,

Re: [PATCH v3 2/3] livepatch: Move tests from lib/livepatch to selftests/livepatch

2023-12-11 Thread Marcos Paulo de Souza
> > > > > > On Tue, Oct 31, 2023 at 06:10:52PM -0300, Marcos Paulo de > > > > > Souza > > > > > wrote: > > > > > > The modules are being moved from lib/livepatch to > > > > > > tools/testing/selftest

Re: [PATCH] Revert "selftests: error out if kernel header files are not yet built"

2023-12-11 Thread Marcos Paulo de Souza
On Mon, 2023-12-11 at 16:00 +0500, Muhammad Usama Anjum wrote: > On 12/9/23 7:01 AM, John Hubbard wrote: > > This reverts commit 9fc96c7c19df ("selftests: error out if kernel > > header > > files are not yet built"). > I don't think whole of this commit needs to be reverted. Lets leave > the >

Re: [PATCH v3 3/3] selftests: livepatch: Test livepatching a heavily called syscall

2023-12-01 Thread Marcos Paulo de Souza
On Thu, Nov 30, 2023 at 04:24:26PM -0700, Shuah Khan wrote: > On 10/31/23 15:10, Marcos Paulo de Souza wrote: > > The test proves that a syscall can be livepatched. It is interesting > > because syscalls are called a tricky way. Also the process gets > > livepatched

Re: [PATCH v3 0/3] livepatch: Move modules to selftests and add a new test

2023-11-30 Thread Marcos Paulo de Souza
Humble ping :) On Tue, Oct 31, 2023 at 06:10:50PM -0300, Marcos Paulo de Souza wrote: > This patchset moves the current kernel testing livepatch modules from > lib/livepatches to tools/testing/selftest/livepatch/test_modules, and compiles > them as out-of-tree modules befor

[PATCH v3 2/3] livepatch: Move tests from lib/livepatch to selftests/livepatch

2023-10-31 Thread Marcos Paulo de Souza
eeded for rebuilding the selftests on another system. Signed-off-by: Marcos Paulo de Souza --- arch/s390/configs/debug_defconfig | 1 - arch/s390/configs/defconfig| 1 - lib/Kconfig.debug | 22

[PATCH v3 3/3] selftests: livepatch: Test livepatching a heavily called syscall

2023-10-31 Thread Marcos Paulo de Souza
..b76a881d4013 --- /dev/null +++ b/tools/testing/selftests/livepatch/test-syscall.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2023 SUSE +# Author: Marcos Paulo de Souza + +. $(dirname $0)/functions.sh + +MOD_SYSCALL=test_klp_syscall + +setup_config

[PATCH v3 0/3] livepatch: Move modules to selftests and add a new test

2023-10-31 Thread Marcos Paulo de Souza
nel.org Cc: linux-s...@vger.kernel.org Cc: live-patch...@vger.kernel.org Signed-off-by: Marcos Paulo de Souza Changes in v3: * Rebased on top of v6.6-rc5 * The commits messages were improved (Thanks Petr!) * Created TEST_GEN_MODS_DIR variable to point to a directly that contains kernel modules,

[PATCH v3 1/3] kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable

2023-10-31 Thread Marcos Paulo de Souza
tically built before running the tests via make -C tools/testing/selftests/livepatch/ run_tests Note that they are _not_ built when running the standalone tests by calling, for example, ./test-state.sh. Signed-off-by: Marcos Paulo de Souza --- Documentation/dev-tools/kselftest.rst | 4 too

Purpose of gen_tar

2023-10-24 Thread Marcos Paulo de Souza
Hi, while testing a new patch on the livepatch kselftests, I was testing the gen_tar target and I figured that we only copy the resulting binaries to the final tar file. Per the kselftests documentation[1], the gen_tar target is used to package the tests to run "on different systems". But what

Re: # Toplevel Makefile doesn't process module build correctly on recursive make calls

2023-10-24 Thread Marcos Paulo de Souza
On Fri, Oct 20, 2023 at 06:21:40AM +0200, Nicolas Schier wrote: > On Thu, Oct 19, 2023 at 03:50:05PM -0300, Marcos Paulo de Souza wrote: > > On Sat, Oct 14, 2023 at 05:35:55PM +0900, Masahiro Yamada wrote: > > > On Tue, Oct 10, 2023 at 5:43 AM Marcos Paulo de S

[PATCH] Documentation: kselftests: Remove references to bpf tests

2023-10-09 Thread Marcos Paulo de Souza
vel_QA.rst Signed-off-by: Marcos Paulo de Souza --- Documentation/dev-tools/kselftest.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst index deede972f254..ab376b316c36 100644 --- a/Documentation