Re: [PATCH v2] selftests/net: synchronize udpgso_bench rx and tx

2023-10-31 Thread Willem de Bruijn
Lucas Karpinski wrote: > The sockets used by udpgso_bench_tx aren't always ready when > udpgso_bench_tx transmits packets. This issue is more prevalent in -rt > kernels, but can occur in both. Replace the hacky sleep calls with a > function that checks whether the ports in the namespace are ready f

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

2023-10-31 Thread Marcos Paulo de Souza
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 livepatched kernel function. The modules are now built as out-of-tree modules, but being

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

2023-10-31 Thread Marcos Paulo de Souza
The test proves that a syscall can be livepatched. It is interesting because syscalls are called a tricky way. Also the process gets livepatched either when sleeping in the userspace or when entering or leaving the kernel space. The livepatch is a bit tricky: 1. The syscall function name is arch

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

2023-10-31 Thread Marcos Paulo de Souza
1 files changed, 325 insertions(+), 121 deletions(-) --- base-commit: 6489bf2e1df1c84e9bcd4694029ff35b39fd3397 change-id: 20231031-send-lp-kselftests-4c917dcd4565 Best regards, -- Marcos Paulo de Souza

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

2023-10-31 Thread Marcos Paulo de Souza
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 result they are always binary compatible and the same tests can be used for older or ne

[PATCH 0/3] selftests/nolibc: various build improvements

2023-10-31 Thread Thomas Weißschuh
With the out-of-tree builds it's possible do incremental tests fairly fast: time ./run-tests.sh i386: 162 test(s): 162 passed, 0 skipped, 0 failed => status: success x86_64:162 test(s): 162 passed, 0 skipped, 0 failed => status: success arm64: 162 test(s): 162 p

[PATCH 1/3] selftests/nolibc: use EFI -bios for LoongArch qemu

2023-10-31 Thread Thomas Weißschuh
qemu for LoongArch does not work properly with direct kernel boot. The kernel will panic during initialization and hang without any output. When booting in EFI mode everything work correctly. While users most likely don't have the LoongArch EFI binary installed at least an explicit error about 'f

[PATCH 2/3] selftests/nolibc: anchor paths in $(srcdir) if possible

2023-10-31 Thread Thomas Weißschuh
It is easier to recognize paths from their well-known location in the source tree than having to resolve the relative path in ones head. Acked-by: Willy Tarreau Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 3/3] selftests/nolibc: support out-of-tree builds

2023-10-31 Thread Thomas Weißschuh
Out of tree builds are much more convenient when building for multiple architectures or configurations in parallel. Only absolute O= parameters are supported as Makefile.include will always resolve relative paths in relation to $(srctree) instead of the current directory. Add a call to "make outp

Re: selftests: user_events: ftrace_test - RIP: 0010:tracing_update_buffers (kernel/trace/trace.c:6470)

2023-10-31 Thread Beau Belgrave
On Tue, Oct 31, 2023 at 12:07:02PM -0400, Steven Rostedt wrote: > On Tue, 31 Oct 2023 10:45:51 -0400 > Steven Rostedt wrote: > > > @@ -1404,7 +1424,7 @@ event_enable_write(struct file *filp, const char > > __user *ubuf, size_t cnt, > > ret = -ENODEV; > > mutex_lock(&event

Re: [RFC] drm/tests: annotate intentional stack trace in drm_test_rect_calc_hscale()

2023-10-31 Thread Naresh Kamboju
kunit_helpers drm_dp_mst_helper_test drm_display_helper drm_damage_helper_test drm_connector_test drm_cmdline_parser_test drm_buddy_test prime_numbers drm_buddy tda998x onboard_usb_hub hdlcd cec crct10dif_ce drm_dma_helper drm_kms_helper drm fuse backlight dm_mod ip_tables x_tables [ 629.756007] CP

Re: selftests: user_events: ftrace_test - RIP: 0010:tracing_update_buffers (kernel/trace/trace.c:6470)

2023-10-31 Thread Steven Rostedt
On Tue, 31 Oct 2023 10:45:51 -0400 Steven Rostedt wrote: > @@ -1404,7 +1424,7 @@ event_enable_write(struct file *filp, const char __user > *ubuf, size_t cnt, > ret = -ENODEV; > mutex_lock(&event_mutex); > file = event_file_data(filp); > - if

Re: [PATCH v2] selftests/net: synchronize udpgso_bench rx and tx

2023-10-31 Thread Paolo Abeni
On Tue, 2023-10-31 at 09:26 -0400, Lucas Karpinski wrote: > > Since you wrote the same function verbatim in 3 different files, I > > think it would be better place it in separate, new, net_helper.sh > > file > > and include such file from the various callers. Possibly > > additionally > > rename th

Re: selftests: user_events: ftrace_test - RIP: 0010:tracing_update_buffers (kernel/trace/trace.c:6470)

2023-10-31 Thread Steven Rostedt
On Tue, 31 Oct 2023 00:00:31 -0400 Steven Rostedt wrote: > But the I applied: > > f5ca233e2e66d ("tracing: Increase trace array ref count on enable and > filter files") > > And do the above commands again and BOOM! it crashes with: The below patch appears to solve this. Care to test it? --

Re: [PATCH v2] selftests/net: synchronize udpgso_bench rx and tx

2023-10-31 Thread Lucas Karpinski
> Since you wrote the same function verbatim in 3 different files, I > think it would be better place it in separate, new, net_helper.sh file > and include such file from the various callers. Possibly additionally > rename the function as wait_local_udp_port_listen. > Thanks, I'll move it over. I t

Re: [PATCH v2] selftests/net: synchronize udpgso_bench rx and tx

2023-10-31 Thread Paolo Abeni
On Mon, 2023-10-30 at 13:40 -0400, Lucas Karpinski wrote: > The sockets used by udpgso_bench_tx aren't always ready when > udpgso_bench_tx transmits packets. This issue is more prevalent in -rt > kernels, but can occur in both. Replace the hacky sleep calls with a > function that checks whether the

Re: [PATCH v2] selftests/net: synchronize udpgso_bench rx and tx

2023-10-31 Thread Paolo Abeni
On Mon, 2023-10-30 at 13:40 -0400, Lucas Karpinski wrote: > The sockets used by udpgso_bench_tx aren't always ready when > udpgso_bench_tx transmits packets. This issue is more prevalent in -rt > kernels, but can occur in both. Replace the hacky sleep calls with a > function that checks whether the

Re: [PATCH 21/24] selftests/resctrl: Get resource id from cache id

2023-10-31 Thread Maciej Wieczór-Retman
On 2023-10-27 at 16:30:38 +0300, Ilpo Järvinen wrote: >On Fri, 27 Oct 2023, Maciej Wieczór-Retman wrote: > >> On 2023-10-24 at 12:26:31 +0300, Ilpo Järvinen wrote: >> >Resource id is acquired differently depending on CPU. AMD tests use id >> >from L3 cache, whereas CPUs from other vendors base the

Re: [PATCH 16/24] selftests/resctrl: Rewrite Cache Allocation Technology (CAT) test

2023-10-31 Thread Maciej Wieczór-Retman
On 2023-10-27 at 15:32:58 +0300, Ilpo Järvinen wrote: >On Fri, 27 Oct 2023, Maciej Wieczór-Retman wrote: >> On 2023-10-24 at 12:26:26 +0300, Ilpo Järvinen wrote: >> >- ksft_print_msg("%s Check cache miss rate within %lu%%\n", >> >- ret ? "Fail:" : "Pass:", max_diff_percent); >> >