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

2023-12-01 Thread Joe Lawrence
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/selftests/livepatch/test_modules. > > This code moving will allow writing more complex tests, like for example an > userspace C code that will call a livepatch

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

2023-12-07 Thread Joe Lawrence
On 12/6/23 10:05, Miroslav Benes wrote: > On Fri, 1 Dec 2023, Joe Lawrence wrote: > >> 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/selftests/livepatch/test_modules.

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

2023-12-15 Thread Joe Lawrence
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, mpdeso...@suse.com wrote: On Fri, 2023-12-01 at 16:38 +, Shuah Khan wrote: >>> 0003-selftests-livepatch-Test-livepatching-a-heavil

Re: selftests/livepatch fails on s390

2023-12-18 Thread Joe Lawrence
On 12/18/23 05:44, Alexander Gordeev wrote: > Hi all, > > The livepatch selftest somehow fails in -next on s390 due to what > appears to me as 'comm' usage issue. E.g the removal of timestamp- > less line "with link type OSD_10GIG." in the below output forces > 'comm' to produce the correct resul

Re: selftests/livepatch fails on s390

2023-12-18 Thread Joe Lawrence
On Mon, Dec 18, 2023 at 11:44:23AM -0500, Joe Lawrence wrote: > > [ ... snip ... ] > > If we pre-trim the timestamps, the output is what we expect: > > $ comm --nocheck-order -13 \ > <(sed 's/^\[[ 0-9.]*\] //' /tmp/A) \ > <(sed '

Re: selftests/livepatch fails on s390

2023-12-19 Thread Joe Lawrence
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 >> +

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

2023-12-20 Thread Joe Lawrence
rg/live-patching/zyaimypyhxva9...@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com/ Signed-off-by: Joe Lawrence --- .../testing/selftests/livepatch/functions.sh | 37 +-- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/tools/testing/selftests/livepatch/function

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

2024-01-02 Thread Joe Lawrence
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 directory containing kernel modules that will be used by > selftest scripts. > > The modules are built as external modules for the running kernel. > As a resu

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

2024-01-03 Thread Joe Lawrence
-lp-kselftests-4c917dcd4565 > > Best regards, > -- > Marcos Paulo de Souza > Hi Marcos, I made it through retrofitting [1] to our current packaging scheme on top of the patchset, no big surprises found. With that, I'm happy to ack this version, unless you want to modify the TEST_GEN_MODS_DIR / rsync behavior as I reported in my reply yesterday. (Not a show stopper IMHO, but I'll leave that up to kselftest folks.) Reviewed-by: Joe Lawrence [1] https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2844/commits -- Joe

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

2024-01-17 Thread Joe Lawrence
On 1/12/24 12:43, Marcos Paulo de Souza wrote: > Changes in v6: > - Rebased on top of 70d201a40823 (thanks Alexander Gordeev!) > - Resolved a conflict because of 43e8832fed08 being reverted > - Resolved a missing static declaration for lp_sys_getpid, since > -Wmissing-prototypes warning was enabl

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

2024-02-21 Thread Joe Lawrence
On 2/21/24 07:44, Nicolai Stange wrote: > Shresth Prasad writes: > >> I checked the source code and yes I am on the latest Linux next repo. >> >> Here's the warning: >> /home/shresthp/dev/linux_work/linux_next/tools/testing/selftests/livepatch/test_modules/test_klp_state.c:38:24: >> warning: ass

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

2024-03-21 Thread Joe Lawrence
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 Souza > --- > tools/testing/selftests/livepatch/Makefile | 3 +- > .../selftests/livepatch/te

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

2024-03-25 Thread Joe Lawrence
On 3/22/24 16:31, Marcos Paulo de Souza wrote: > 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 applie

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

2024-05-31 Thread Joe Lawrence
+164,20 @@ livepatch: '$MOD_LIVEPATCH': starting patching transition > livepatch: '$MOD_LIVEPATCH': completing patching transition > livepatch: '$MOD_LIVEPATCH': patching complete > $MOD_LIVEPATCH: this has been live patched > +% insmod test_modules/test_klp_syscall.ko Similar minor nit here, too. If we think copy/pasting all the $MOD_FOO is annoying, I am fine with leaving this as is. I don't have a strong opinion other than following some convention. With that, I'm happy to ack as-is or with variable names. Acked-by: Joe Lawrence -- Joe

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

2024-06-04 Thread Joe Lawrence
; -# - load an atomic replace livepatch and verify that only the second is > active > -# - remove the first livepatch and verify that the atomic replace livepatch > -# is still active > +# - load two addtional livepatches and check the number of livepatch modules nit: s/addtional/additional as Miroslav spotted in v2 Otherwise LGTM, Acked-by: Joe Lawrence -- Joe

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

2024-08-22 Thread Joe Lawrence
' || > +die "Expecting only one moduled listed, found $nmods" > > # These modules were disabled by the atomic replace > for mod in $MOD_LIVEPATCH3 $MOD_LIVEPATCH2 $MOD_LIVEPATCH1; do With commit msg additions above: Acked-by: Joe Lawrence Thanks, -- Joe

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

2025-01-16 Thread Joe Lawrence
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 this, even though >> the expected vs observed are same, end testcase results are fail

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

2025-01-15 Thread Joe Lawrence
_dmesg { > p=1 }' | \ >grep -e 'livepatch:' -e 'test_klp' | \ >grep -v '\(tainting\|taints\) kernel' | \ > - sed 's/^\[[ 0-9.]*\] //') > + sed 's/^\[[ 0-9.]*\] //