Re: [PATCH v2] selftests: livepatch: handle PRINTK_CALLER in check_result()

2025-01-27 Thread Petr Mladek
On Sun 2025-01-19 22:02:38, Madhavan Srinivasan wrote: > Some arch configs (like ppc64) enable CONFIG_PRINTK_CALLER, > which adds the caller id as part of the dmesg. With recent > util-linux's update 467a5b3192f16 ('dmesg: add caller_id support') > the standard "dmesg" has been enhanced to print PR

Re: [PATCH v2] selftests: livepatch: handle PRINTK_CALLER in check_result()

2025-01-20 Thread Petr Mladek
+[T789] livepatch: 'test_klp_livepatch': completing unpatching transition > +[T789] livepatch: 'test_klp_livepatch': unpatching complete > +[ T3659] % rmmod test_klp_livepatch > > ERROR: livepatch kselftest(s) failed > not ok 1 selftests: livepatch: te

Re: [PATCH] selftests: livepatch: handle PRINTK_CALLER in check_result()

2025-01-16 Thread Petr Mladek
On Thu 2025-01-16 08:10:44, Joe Lawrence wrote: > On 1/16/25 04:29, Petr Mladek wrote: > > On Tue 2025-01-14 20:01:44, Madhavan Srinivasan wrote: > >> Some arch configs (like ppc64) enable CONFIG_PRINTK_CALLER, which > >> adds the caller id as part of the dmesg. Due to

Re: [PATCH] selftests: livepatch: handle PRINTK_CALLER in check_result()

2025-01-16 Thread Petr Mladek
On Tue 2025-01-14 20:01:44, Madhavan Srinivasan wrote: > Some arch configs (like ppc64) enable CONFIG_PRINTK_CALLER, which > adds the caller id as part of the dmesg. Due to this, even though > the expected vs observed are same, end testcase results are failed. CONFIG_PRINTK_CALLER is not the only

Re: [PATCH v2 2/2] selftests/lib.mk: Introduce check to validate required configs

2025-01-07 Thread Petr Mladek
On Sat 2024-12-21 01:05:36, Siddharth Menon wrote: > Currently, kselftests does not have a generalised mechanism to skip > compilation > and run tests when required kernel configuration flags are missing. > > This patch introduces a check to validate the presence of required config > flags > spe

Re: [PATCH v2 1/2] selftests: Introduce script to validate required configs

2025-01-07 Thread Petr Mladek
On Sat 2024-12-21 01:05:35, Siddharth Menon wrote: > This patch adds a script to validate that the current kernel configuration > satisfies the requirements for selftests. The script compares the current > kernel configs against the required selftest configs. > > A config mismatch exits with error

Re: [PATCH 2/3] selftests/lib.mk: Introduce check to validate required configs

2024-12-12 Thread Petr Mladek
On Tue 2024-12-10 22:40:51, BiscuitBobby wrote: > On Tue, 10 Dec 2024 at 20:26, Petr Mladek wrote: > > > > What is the reason to add another set of dependencies, please? > > I had done this because not every test required all the options specified in > tools/testing/self

Re: [PATCH 2/3] selftests/lib.mk: Introduce check to validate required configs

2024-12-10 Thread Petr Mladek
On Thu 2024-12-05 17:17:56, Siddharth Menon wrote: > Currently, kselftests does not have a generalised mechanism to skip > compilation > and run tests when required kernel configuration flags are missing. > > This patch introduces a check to validate the presence of required config > flags > spe

Re: [PATCH] selftests/livepatch: Check if CONFIG_LIVEPATCH is enabled

2024-11-15 Thread Petr Mladek
On Wed 2024-11-06 23:11:20, Siddharth Menon wrote: > When CONFIG_LIVEPATCH is disabled, compilation fails due to the > required structs from the livepatch header file being undefined. > This checks for CONFIG_LIVEPATCH in order to verify that > it is enabled before compiling livepatch self-tests. >

Re: [PATCH v2] selftests: livepatch: test livepatching a kprobed function

2024-09-19 Thread Petr Mladek
On Tue 2024-09-17 15:50:53, Michael Vetter wrote: > The test proves that a function that is being kprobed and uses a > post_handler cannot be livepatched. > > Only one ftrace_ops with FTRACE_OPS_FL_IPMODIFY set may be registered > to any given function at a time. > > --- /dev/null > +++ b/tools/t

Re: [PATCH] selftests/livepatch: wait for atomic replace to occur

2024-08-26 Thread Petr Mladek
Hi, JFYI, I have committed the patch into livepatching.git, branch for-6.11/selftests-fixup. Few nits below :-) On Fri 2024-08-23 09:09:26, Ryan B. Sullivan wrote: > Changes from v2: > > Adds: > Reported-by: CKI Project > Closes: > https://datawarehouse.cki-project.org/kcidb/tests

Re: [PATCH] selftests/livepatch: wait for atomic replace to occur

2024-08-23 Thread Petr Mladek
nly one moduled listed, found $nmods" > > # These modules were disabled by the atomic replace > for mod in $MOD_LIVEPATCH3 $MOD_LIVEPATCH2 $MOD_LIVEPATCH1; do Otherwise, it looks good to me. With the added references: Reviewed-by: Petr Mladek Best Regards, Petr PS: No need to resend the patch. I would add the references when committing. I am going to wait few more days before committing.

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

2024-06-18 Thread Petr Mladek
On Mon 2024-06-03 14:26:19, 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: Marcos Paulo de Souza JFYI, the patch

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

2024-06-18 Thread Petr Mladek
he test. But it is not worth another respin. I am going to push this version (with the typo fixed). Reviewed-by: Petr Mladek Best Regards, Petr

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

2024-06-14 Thread Petr Mladek
On Thu 2024-06-06 09:53:48, 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 and causes

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

2024-06-03 Thread Petr Mladek
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: > > > Adapt the current test-livepatch.sh script to account the number of > > > applied livepatches and en

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

2024-05-31 Thread Petr Mladek
;check_result" function and causes a false error. > > Reported-by: CKI Project > Signed-off-by: Ryan Sullivan Looks reasonable. Reviewed-by: Petr Mladek Best Regards, Petr PS: I am going to queue it for 6.11. I will add it into a pull request for 6.10-rcX if there will be anoth

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

2024-05-28 Thread Petr Mladek
ouza I am not completely sure if it is a good idea to test so many aspects and use so many different test modules in a single test. It might be harder to maintain and analyze eventual problems. But the change will help to catch more problems which is good. I am fine with it: Reviewed-by: Petr Mladek

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

2024-01-11 Thread Petr Mladek
to create random > locations when the livepatch gets enabled. Nothing is guarantted. > The magic is in the randomness. > > Reviewed-by: Joe Lawrence > Signed-off-by: Marcos Paulo de Souza Reviewed-by: Petr Mladek Best Regards, Petr

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

2024-01-11 Thread Petr Mladek
epatched kernel function. > > > Reviewed-by: Joe Lawrence > Signed-off-by: Marcos Paulo de Souza Looks good and works for me. Reviewed-by: Petr Mladek Best Regards, Petr

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

2024-01-11 Thread Petr Mladek
n > 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: Marcos Paulo de Souza I am not export on kbuild. But it looks reasonable and works for me. Reviewed-by: Petr Mladek Best Regards, Petr

Re: selftests/livepatch fails on s390

2023-12-20 Thread Petr Mladek
On Tue 2023-12-19 09:50:18, Joe Lawrence wrote: > On 12/19/23 04:45, Alexander Gordeev wrote: > > On Mon, Dec 18, 2023 at 05:44:54PM -0500, Joe Lawrence wrote: > > > >> @@ -280,7 +268,13 @@ function set_pre_patch_ret { > >> function start_test { > >>local test="$1" > >> > >> - save_dmesg >

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

2023-12-08 Thread Petr Mladek
On Fri 2023-12-08 09:06:30, Miroslav Benes wrote: > > > My idea is to abandon this way completely, take the selftests and build > > > and run them on the system right away. > > > > > > Both should be doable, hopefully, if we wire it all correctly... and > > > document it. > > > > > I can't thin