Re: [PATCH] KVM: riscv: selftests: Add SBI base extension test

2024-04-06 Thread Haibo Xu
On Sun, Apr 7, 2024 at 12:45 PM Anup Patel wrote: > > On Sun, Apr 7, 2024 at 8:11 AM Haibo Xu wrote: > > > > On Tue, Apr 2, 2024 at 10:12 PM Andrew Jones > > wrote: > > > > > > On Mon, Apr 01, 2024 at 04:20:18PM +0800, Haibo Xu wrote: > > > > This is the first patch to enable the base extension

Re: [PATCH] KVM: riscv: selftests: Add SBI base extension test

2024-04-06 Thread Anup Patel
On Sun, Apr 7, 2024 at 8:11 AM Haibo Xu wrote: > > On Tue, Apr 2, 2024 at 10:12 PM Andrew Jones wrote: > > > > On Mon, Apr 01, 2024 at 04:20:18PM +0800, Haibo Xu wrote: > > > This is the first patch to enable the base extension selftest > > > for the SBI implementation in KVM. Test for other exte

Re: [PATCH] KVM: riscv: selftests: Add SBI base extension test

2024-04-06 Thread Haibo Xu
On Tue, Apr 2, 2024 at 10:12 PM Andrew Jones wrote: > > On Mon, Apr 01, 2024 at 04:20:18PM +0800, Haibo Xu wrote: > > This is the first patch to enable the base extension selftest > > for the SBI implementation in KVM. Test for other extensions > > will be added later. > > I'm not sure we want SBI

Re: [PATCH] selftests/timers/posix_timers: reimplement check_timer_distribution()

2024-04-06 Thread Thomas Gleixner
On Sat, Apr 06 2024 at 17:10, Oleg Nesterov wrote: > Yes, this changes the "semantics" of check_timer_distribution(), perhaps it > should be renamed. Definitely. > But I do not see a better approach, and in fact I think that > > Test that all running threads _eventually_ receive > CLOCK_PR

Re: [RFC PATCH v3 6/9] selftests: cgroup: Add basic tests for pids controller

2024-04-06 Thread Muhammad Usama Anjum
On 4/5/24 10:05 PM, Michal Koutný wrote: > This commit adds (and wires in) new test program for checking basic pids > controller functionality -- restricting tasks in a cgroup and correct > event counting. > > Signed-off-by: Michal Koutný > --- > tools/testing/selftests/cgroup/Makefile| 2

Re: [PATCH v6 2/2] selftests/timers/posix_timers: Test delivery of signals across threads

2024-04-06 Thread Muhammad Usama Anjum
On 4/7/24 2:13 AM, Oleg Nesterov wrote: > Muhammad, > > I am sorry, but... are you aware that this patch was applied over a year ago, > and then this code was updated to use the ksft_API? Sorry, didn't realized this is already applied. So this patch is already applied and it has already been made

Re: [PATCH 3/4] selftests/arm: Add elf test

2024-04-06 Thread Muhammad Usama Anjum
On 4/5/24 1:44 PM, Dev Jain wrote: > This patch introduces an ELF parsing test; the 5th byte of the ELF header > must be 0x01 for a 32-bit process. A basic sanity check is required to ensure > that we are actually testing a 32-bit build. > > Signed-off-by: Dev Jain > --- > tools/testing/selftest

Re: [PATCH 2/4] selftests/arm: Add signal tests

2024-04-06 Thread Muhammad Usama Anjum
On 4/5/24 1:44 PM, Dev Jain wrote: > This patch introduces two signal tests, and generic test wrappers similar to > selftests/arm64/signal directory, along with the mangling testcases found > therein. arm_cpsr, dumped by the kernel to user space in the ucontext > structure > to the signal handler,

Re: [PATCH 1/3] io_uring: Add REQ_F_CQE_SKIP support for io_uring zerocopy

2024-04-06 Thread Pavel Begunkov
On 4/5/24 21:04, Oliver Crumrine wrote: Pavel Begunkov wrote: On 4/4/24 23:17, Oliver Crumrine wrote: In his patch to enable zerocopy networking for io_uring, Pavel Begunkov specifically disabled REQ_F_CQE_SKIP, as (at least from my understanding) the userspace program wouldn't receive the IORI

Re: [PATCH 1/4] selftests/arm: Add mm test

2024-04-06 Thread Muhammad Usama Anjum
On 4/5/24 1:44 PM, Dev Jain wrote: > This patch tests the 4GB VA restriction for 32-bit processes; it is required > to test the compat layer, whether the kernel knows that it is running a 32-bit > process or not. Chunks are allocated until the VA gets exhausted; mmap must > fail beyond 4GB. This is

Re: [PATCH 4/4] selftests: Add build infrastructure along with README

2024-04-06 Thread Muhammad Usama Anjum
On 4/5/24 1:44 PM, Dev Jain wrote: > Add arm target, individual Makefile targets, and instructions to build the > tests. > > Signed-off-by: Dev Jain > --- > tools/testing/selftests/Makefile| 1 + > tools/testing/selftests/arm/Makefile| 57 + > tools/testi

Re: [PATCH v6 2/2] selftests/timers/posix_timers: Test delivery of signals across threads

2024-04-06 Thread Oleg Nesterov
Muhammad, I am sorry, but... are you aware that this patch was applied over a year ago, and then this code was updated to use the ksft_API? Oleg. On 04/07, Muhammad Usama Anjum wrote: > > On 3/16/23 5:30 PM, Marco Elver wrote: > > From: Dmitry Vyukov > > > > Test that POSIX timers using CLOCK_

Re: [PATCH 2/2] tracing/selftests: Default to verbose mode when running in kselftest

2024-04-06 Thread Muhammad Usama Anjum
On 3/25/24 9:15 PM, Mark Brown wrote: > In order to facilitate debugging of issues from automated runs of the ftrace > selftests turn on verbose logging by default when run from the kselftest > runner. This is primarily used by automated systems where developers may > not have direct access to the

Re: [PATCH 1/2] tracing/selftests: Support log output when generating KTAP output

2024-04-06 Thread Muhammad Usama Anjum
On 3/25/24 9:15 PM, Mark Brown wrote: > When -v is specified ftracetest will dump logs of test execution to the > console which if -K is also specified for KTAP output will result in > output that is not properly KTAP formatted. All that's required for KTAP > formatting is that anything we log have

Re: [PATCH] net: change maximum number of UDP segments to 128

2024-04-06 Thread Muhammad Usama Anjum
On 4/6/24 1:25 PM, Yuri Benditovich wrote: > Earlier commit fc8b2a619469378 ("net: more strict VIRTIO_NET_HDR_GSO_UDP_L4 > validation") > added check of potential number of UDP segment vs UDP_MAX_SEGMENTS > in linux/virtio_net.h. > After this change certification test of USO guest-to-guest > trans

Re: [PATCH v6 2/2] selftests/timers/posix_timers: Test delivery of signals across threads

2024-04-06 Thread Muhammad Usama Anjum
On 3/16/23 5:30 PM, Marco Elver wrote: > From: Dmitry Vyukov > > Test that POSIX timers using CLOCK_PROCESS_CPUTIME_ID eventually deliver > a signal to all running threads. This effectively tests that the kernel > doesn't prefer any one thread (or subset of threads) for signal delivery. > > Sig

Re: [PATCH v20 5/5] ring-buffer/selftest: Add ring-buffer mapping test

2024-04-06 Thread Muhammad Usama Anjum
On 4/6/24 10:36 PM, Vincent Donnefort wrote: > This test maps a ring-buffer and validate the meta-page after reset and > after emitting few events. > > Cc: Shuah Khan > Cc: Shuah Khan > Cc: linux-kselftest@vger.kernel.org > Signed-off-by: Vincent Donnefort Acked-by: Muhammad Usama Anjum > >

Re: [PATCH 3/3] io_uring: Support IOSQE_CQE_SKIP_SUCCESS in io_uring zerocopy test

2024-04-06 Thread Muhammad Usama Anjum
On 4/5/24 3:19 AM, Oliver Crumrine wrote: > Add support for the IOSQE_CQE_SKIP_SUCCESS flag in the io_uring_zerocopy_tx > test, using the "-a" option. Instead of incrementing when > IORING_CQE_F_MORE is set, remember how many SQEs are sent and simply > wait on notifs instead of regular completions.

Re: [PATCH v4 4/4] selftests/bpf: Add tests for ring__consume_n and ring_buffer__consume_n

2024-04-06 Thread Andrii Nakryiko
On Sat, Apr 6, 2024 at 10:39 AM Andrii Nakryiko wrote: > > On Sat, Apr 6, 2024 at 2:20 AM Andrea Righi > wrote: > > > > Add tests for new API ring__consume_n() and ring_buffer__consume_n(). > > > > Signed-off-by: Andrea Righi > > --- > > tools/testing/selftests/bpf/prog_tests/ringbuf.c | 8 +++

Re: [PATCH v4 0/4] libbpf: API to partially consume items from ringbuffer

2024-04-06 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Sat, 6 Apr 2024 11:15:40 +0200 you wrote: > Introduce ring__consume_n() and ring_buffer__consume_n() API to > partially consume items from one (or more) ringbuffer(s). > > This can be useful, for example, to con

Re: [PATCH v4 2/4] libbpf: ringbuf: allow to consume up to a certain amount of items

2024-04-06 Thread Andrii Nakryiko
On Sat, Apr 6, 2024 at 2:20 AM Andrea Righi wrote: > > In some cases, instead of always consuming all items from ring buffers > in a greedy way, we may want to consume up to a certain amount of items, > for example when we need to copy items from the BPF ring buffer to a > limited user buffer. > >

Re: [PATCH v4 4/4] selftests/bpf: Add tests for ring__consume_n and ring_buffer__consume_n

2024-04-06 Thread Andrii Nakryiko
On Sat, Apr 6, 2024 at 2:20 AM Andrea Righi wrote: > > Add tests for new API ring__consume_n() and ring_buffer__consume_n(). > > Signed-off-by: Andrea Righi > --- > tools/testing/selftests/bpf/prog_tests/ringbuf.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/tools/testing/sel

[PATCH v20 5/5] ring-buffer/selftest: Add ring-buffer mapping test

2024-04-06 Thread Vincent Donnefort
This test maps a ring-buffer and validate the meta-page after reset and after emitting few events. Cc: Shuah Khan Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Signed-off-by: Vincent Donnefort diff --git a/tools/testing/selftests/ring-buffer/Makefile b/tools/testing/selftests/ring-buffer

Re: [PATCH] selftests/timers/posix_timers: reimplement check_timer_distribution()

2024-04-06 Thread Oleg Nesterov
Dmitry, Thomas, To simplify the review I've attached the code with this patch applied below. Yes, this changes the "semantics" of check_timer_distribution(), perhaps it should be renamed. But I do not see a better approach, and in fact I think that Test that all running threads _eventua

[PATCH] selftests/timers/posix_timers: reimplement check_timer_distribution()

2024-04-06 Thread Oleg Nesterov
Thomas says: The signal distribution test has a tendency to hang for a long time as the signal delivery is not really evenly distributed. In fact it might never be distributed across all threads ever in the way it is written. To me even the This primarily

Re: [PATCH] net: change maximum number of UDP segments to 128

2024-04-06 Thread Willem de Bruijn
Yuri Benditovich wrote: > Earlier commit fc8b2a619469378 ("net: more strict VIRTIO_NET_HDR_GSO_UDP_L4 > validation") > added check of potential number of UDP segment vs UDP_MAX_SEGMENTS > in linux/virtio_net.h. > After this change certification test of USO guest-to-guest > transmit on Windows driv

[PATCH net-next] selftests/bpf: eliminate warning of get_cgroup_id_from_path()

2024-04-06 Thread Jason Xing
From: Jason Xing The output goes like this if I make samples/bpf: ...warning: no previous prototype for ‘get_cgroup_id_from_path’... Make this function static could solve the warning problem since no one outside of the file calls it. Signed-off-by: Jason Xing --- tools/testing/selftests/bpf/c

Re: [PATCH 0/2] tracing/selftests: Verbosity improvements to KTAP output

2024-04-06 Thread Google
On Thu, 4 Apr 2024 10:32:33 -0600 Shuah Khan wrote: > On 3/26/24 13:11, Shuah Khan wrote: > > On 3/26/24 10:08, Steven Rostedt wrote: > >> > >> Shuah, > >> > >> If Masami is OK with this, can you take this through your tree? > >> > >> Acked-by: Steven Rostedt (Google) > >> > >> -- Steve > >> > >

[PATCH v4 4/4] selftests/bpf: Add tests for ring__consume_n and ring_buffer__consume_n

2024-04-06 Thread Andrea Righi
Add tests for new API ring__consume_n() and ring_buffer__consume_n(). Signed-off-by: Andrea Righi --- tools/testing/selftests/bpf/prog_tests/ringbuf.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/bpf/prog_tests/ringbuf.c b/tools/testing/selftests/bpf/prog_

[PATCH v4 3/4] libbpf: Add ring__consume_n / ring_buffer__consume_n

2024-04-06 Thread Andrea Righi
Introduce a new API to consume items from a ring buffer, limited to a specified amount, and return to the caller the actual number of items consumed. Link: https://lore.kernel.org/lkml/20240310154726.734289-1-andrea.ri...@canonical.com/T Signed-off-by: Andrea Righi --- tools/lib/bpf/libbpf.h

[PATCH v4 2/4] libbpf: ringbuf: allow to consume up to a certain amount of items

2024-04-06 Thread Andrea Righi
In some cases, instead of always consuming all items from ring buffers in a greedy way, we may want to consume up to a certain amount of items, for example when we need to copy items from the BPF ring buffer to a limited user buffer. This change allows to set an upper limit to the amount of items

[PATCH v4 0/4] libbpf: API to partially consume items from ringbuffer

2024-04-06 Thread Andrea Righi
Introduce ring__consume_n() and ring_buffer__consume_n() API to partially consume items from one (or more) ringbuffer(s). This can be useful, for example, to consume just a single item or when we need to copy multiple items to a limited user-space buffer from the ringbuffer callback. Practical ex

[PATCH v4 1/4] libbpf: Start v1.5 development cycle

2024-04-06 Thread Andrea Righi
Bump libbpf.map to v1.5.0 to start a new libbpf version cycle. Signed-off-by: Andrea Righi --- tools/lib/bpf/libbpf.map | 3 +++ tools/lib/bpf/libbpf_version.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map index 51

[PATCH] net: change maximum number of UDP segments to 128

2024-04-06 Thread Yuri Benditovich
Earlier commit fc8b2a619469378 ("net: more strict VIRTIO_NET_HDR_GSO_UDP_L4 validation") added check of potential number of UDP segment vs UDP_MAX_SEGMENTS in linux/virtio_net.h. After this change certification test of USO guest-to-guest transmit on Windows driver for virtio-net device fails, for