Re: [PATCH v3 00/16] selftests/resctrl: resctrl_val() related cleanups & improvements

2024-04-24 Thread Reinette Chatre
Hi Shuah and Ilpo, On 4/24/2024 6:49 AM, Shuah Khan wrote: > On 4/8/24 10:32, Ilpo Järvinen wrote: >> Hi all, >> >> This series does a number of cleanups into resctrl_val() and >> generalizes it by removing test name specific handling from the >> function. >> >> One of the changes improves

Re: [PATCH v3 11/16] selftests/resctrl: Add ->init() callback into resctrl_val_param

2024-04-24 Thread Reinette Chatre
Hi Ilpo, On 4/8/2024 9:32 AM, Ilpo Järvinen wrote: > The struct resctrl_val_param is there to customize behavior inside > resctrl_val() which is currently not used to full extent and there are > number of strcmp()s for test name in resctrl_val done by resctrl_val(). > > Create ->init() hook into

Re: [PATCH v3 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-04-24 Thread Reinette Chatre
Hi Ilpo, On 4/8/2024 9:32 AM, Ilpo Järvinen wrote: > For MBM/MBA tests, measure_vals() calls get_mem_bw_imc() that performs > the measurement over a duration of sleep(1) call. The memory bandwidth > numbers from IMC are derived over this duration. The resctrl FS derived > memory bandwidth,

Re: [PATCH v3 09/16] selftests/resctrl: Simplify mem bandwidth file code for MBA & MBM tests

2024-04-24 Thread Reinette Chatre
Hi Ilpo, On 4/8/2024 9:32 AM, Ilpo Järvinen wrote: > initialize_mem_bw_resctrl() and set_mbm_path() contain complicated set > of conditions, each yielding different file to be opened to measure > memory bandwidth through resctrl FS. In practice, only two of them are > used. For MBA test, ctrlgrp

Re: [PATCH v3 07/16] selftests/resctrl: Cleanup bm_pid and ppid usage & limit scope

2024-04-24 Thread Reinette Chatre
Hi Ilpo, On 4/8/2024 9:32 AM, Ilpo Järvinen wrote: > 'bm_pid' and 'ppid' are global variables. As they are used by different > processes and in signal handler, they cannot be entirely converted into > local variables. > > The scope of those variables can still be reduced into resctrl_val.c >

Re: [PATCH v3 01/16] selftests/resctrl: Open get_mem_bw_imc() fd for loops

2024-04-24 Thread Reinette Chatre
Hi Ilpo, On 4/8/2024 9:32 AM, Ilpo Järvinen wrote: > get_mem_bw_imc() handles fds in a for loop but close() is based on two > fixed indexes READ and WRITE. > > Open code all for loops to READ+WRITE entries for clarity. > > Suggested-by: Reinette Chatre > Signed-off-by: Ilpo Järvinen > --- >

[PATCH bpf-next 6/6] selftests/bpf: Use start_server_addr in test_tcp_check_syncookie

2024-04-24 Thread Geliang Tang
From: Geliang Tang Include network_helpers.h in test_tcp_check_syncookie_user.c, use public helper start_server_addr() in it instead of the local defined function start_server(). This can avoid duplicate code. Add a helper setsockopt_v6only() to set IPV6_V6ONLY sockopt, set it to setsockopt

[PATCH bpf-next 5/6] selftests/bpf: Use start_server_addr in sockopt_inherit

2024-04-24 Thread Geliang Tang
From: Geliang Tang Include network_helpers.h in prog_tests/sockopt_inherit.c, use public helper start_server_addr() instead of the local defined function start_server(). This can avoid duplicate code. Add a helper setsockopt_custom() to set SOL_CUSTOM sockopt looply, set it to setsockopt

[PATCH bpf-next 4/6] selftests/bpf: Add setsockopt for network_helper_opts

2024-04-24 Thread Geliang Tang
From: Geliang Tang __start_server() sets SO_REUSPORT through setsockopt() when the parameter 'reuseport' is set. This patch makes it more flexible by adding setsockopt function pointer, together with optval and optlen fields into struct network_helper_opts. Then 'reuseport' parameter can be

[PATCH bpf-next 3/6] selftests/bpf: Drop start_server_proto helper

2024-04-24 Thread Geliang Tang
From: Geliang Tang Protocol can be set by __start_server() helper directly now, this makes the heler start_server_proto() useless. This patch drops it, and implenments start_server() using make_sockaddr() and __start_server(). Signed-off-by: Geliang Tang ---

[PATCH bpf-next 2/6] selftests/bpf: Make start_mptcp_server static

2024-04-24 Thread Geliang Tang
From: Geliang Tang start_mptcp_server() shouldn't be a public helper, it only be used in MPTCP tests. This patch moves it into prog_tests/mptcp.c, and implenments it using make_sockaddr() and start_server_addr() instead of using start_server_proto(). Signed-off-by: Geliang Tang ---

[PATCH bpf-next 1/6] selftests/bpf: Add opts argument for __start_server

2024-04-24 Thread Geliang Tang
From: Geliang Tang This patch adds network_helper_opts parameter for __start_server() instead of "int protocol" and "int timeout_ms". This not only reduces the number of parameters, but also makes it more flexible. Signed-off-by: Geliang Tang --- tools/testing/selftests/bpf/network_helpers.c

[PATCH bpf-next 0/6] use network helpers, part 3

2024-04-24 Thread Geliang Tang
From: Geliang Tang This patchset adds opts argument for __start_server, and adds setsockopt pointer together with optval and optlen into struct network_helper_opts to make start_server_addr helper more flexible. With these modifications, many duplicate codes can be dropped. Patch 4 addresses

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-24 Thread Xu Kuohai
On 4/25/2024 6:06 AM, Yonghong Song wrote: On 4/23/24 7:25 PM, Xu Kuohai wrote: On 4/24/2024 5:55 AM, Yonghong Song wrote: On 4/20/24 1:33 AM, Xu Kuohai wrote: On 4/20/2024 7:00 AM, Eduard Zingerman wrote: On Thu, 2024-04-11 at 20:27 +0800, Xu Kuohai wrote: From: Xu Kuohai With lsm

Re: [PATCH net-next 0/4] selftests: drv-net: round some sharp edges

2024-04-24 Thread Willem de Bruijn
Jakub Kicinski wrote: > I had to explain how to run the driver tests twice already. > Improve the README so we can just point to it. > Also fix a potential problem with the SSH remote sessions. > > Jakub Kicinski (4): > selftests: drv-net: force pseudo-terminal allocation in ssh > selftests:

Re: [PATCH net-next 4/4] selftests: drv-net: validate the environment

2024-04-24 Thread Willem de Bruijn
Jakub Kicinski wrote: > Throw a slightly more helpful exception when env variables > are partially populated. Prior to this change we'd get > a dictionary key exception somewhere later on. > > Signed-off-by: Jakub Kicinski > --- > .../selftests/drivers/net/lib/py/env.py | 20

Re: [PATCH net-next 3/4] selftests: drv-net: reimplement the config parser

2024-04-24 Thread Willem de Bruijn
Jakub Kicinski wrote: > The shell lexer is not helping much, do very basic parsing > manually. > > Signed-off-by: Jakub Kicinski > --- > .../selftests/drivers/net/lib/py/env.py | 26 ++- > 1 file changed, 14 insertions(+), 12 deletions(-) > > diff --git

Re: selftests: openvswitch: Questions about possible enhancements

2024-04-24 Thread Jakub Kicinski
On Wed, 24 Apr 2024 17:44:05 +0100 Simon Horman wrote: > I have recently been exercising the Open vSwitch kernel selftests, > using vng, Speaking of ovs tests, we currently don't run them in CI (and suffer related skips in pmtu.sh) because Amazon Linux doesn't have ovs packaged and building it

Re: [PATCH bpf-next v2 12/16] selftests/bpf: wq: add bpf_wq_init() checks

2024-04-24 Thread Andrii Nakryiko
On Sat, Apr 20, 2024 at 2:10 AM Benjamin Tissoires wrote: > > Allows to test if allocation/free works > > Signed-off-by: Benjamin Tissoires > > --- > > changes in v2: > - dropped mark_precise checks > --- > tools/testing/selftests/bpf/bpf_experimental.h | 1 + >

Re: ynl: maybe minor bug?

2024-04-24 Thread Jakub Kicinski
On Wed, 24 Apr 2024 16:19:49 -0700 Joe Damato wrote: > I'm not sure whether: > > 1. tools/net/ynl/lib/ynl.py should be raising NlError when there is an >extack in this case (I think this is probably the way to go?), or > > 2. the tests should be changed so that they don't expect an exception

ynl: maybe minor bug?

2024-04-24 Thread Joe Damato
Hi there: I am probably just doing something wrong, but I tried to run tools/testing/selftests/drivers/net/stats.py today and hit what is possibly a bug? Background info: Python 3.12.3 I'm using net-next at commit 9dd15d5088e9 ("Merge branch 'sparx5-port-mirroring'") with a couple driver

Re: [PATCH net-next 1/4] selftests: drv-net: force pseudo-terminal allocation in ssh

2024-04-24 Thread Jakub Kicinski
On Wed, 24 Apr 2024 15:14:41 -0700 Jakub Kicinski wrote: > This is not yet needed, because we don't terminate remote background > commands. But once we do, if we run ssh without -t the ssh session > may close and the program may carry on happily running. > > I have hit this problem experimenting

[PATCH 1/2] KVM: selftests: Fix nx_huge_pages_test for default_hugepagesz=1G

2024-04-24 Thread Dongsheng Zhang
From: donsheng If the host was booted with the "default_hugepagesz=1G" kernel command-line parameter, running the NX hugepage test will fail with error "Invalid argument" at the TEST_ASSERT line in kvm_util.c's __vm_mem_region_delete() function: static void __vm_mem_region_delete(struct kvm_vm

[PATCH 2/2] KVM: selftests: Add assertion for mem_size in vm_mem_add()

2024-04-24 Thread Dongsheng Zhang
From: donsheng If mmap() is called with MAP_HUGETLB and the requested mapping size is not a multiple of the underlying hugetlb page size, kernel will automatically align the mmap size, but munmap() will fail if you specify the size you asked for rather than the size that was assigned by Linux

[PATCH net-next 3/4] selftests: drv-net: reimplement the config parser

2024-04-24 Thread Jakub Kicinski
The shell lexer is not helping much, do very basic parsing manually. Signed-off-by: Jakub Kicinski --- .../selftests/drivers/net/lib/py/env.py | 26 ++- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/tools/testing/selftests/drivers/net/lib/py/env.py

[PATCH net-next 4/4] selftests: drv-net: validate the environment

2024-04-24 Thread Jakub Kicinski
Throw a slightly more helpful exception when env variables are partially populated. Prior to this change we'd get a dictionary key exception somewhere later on. Signed-off-by: Jakub Kicinski --- .../selftests/drivers/net/lib/py/env.py | 20 +++ 1 file changed, 20

[PATCH net-next 2/4] selftests: drv-net: extend the README with more info and example

2024-04-24 Thread Jakub Kicinski
Add more info to the README. It's also now copied to GitHub for increased visibility: https://github.com/linux-netdev/nipa/wiki/Running-driver-tests Signed-off-by: Jakub Kicinski --- .../testing/selftests/drivers/net/README.rst | 97 --- 1 file changed, 85 insertions(+), 12

[PATCH net-next 1/4] selftests: drv-net: force pseudo-terminal allocation in ssh

2024-04-24 Thread Jakub Kicinski
This is not yet needed, because we don't terminate remote background commands. But once we do, if we run ssh without -t the ssh session may close and the program may carry on happily running. I have hit this problem experimenting with mausezahn, let's fix it already to avoid someone else wasting

[PATCH net-next 0/4] selftests: drv-net: round some sharp edges

2024-04-24 Thread Jakub Kicinski
I had to explain how to run the driver tests twice already. Improve the README so we can just point to it. Also fix a potential problem with the SSH remote sessions. Jakub Kicinski (4): selftests: drv-net: force pseudo-terminal allocation in ssh selftests: drv-net: extend the README with more

Re: [RFC PATCH net-next v8 04/14] netdev: support binding dma-buf to netdevice

2024-04-24 Thread Mina Almasry
On Wed, Apr 24, 2024 at 10:36 AM David Wei wrote: > > On 2024-04-02 5:20 pm, Mina Almasry wrote: > > + /* We hold the rtnl_lock while binding/unbinding dma-buf, so we can't > > + * race with another thread that is also modifying this value. > > However, > > + * the driver may read

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-24 Thread Yonghong Song
On 4/23/24 7:25 PM, Xu Kuohai wrote: On 4/24/2024 5:55 AM, Yonghong Song wrote: On 4/20/24 1:33 AM, Xu Kuohai wrote: On 4/20/2024 7:00 AM, Eduard Zingerman wrote: On Thu, 2024-04-11 at 20:27 +0800, Xu Kuohai wrote: From: Xu Kuohai With lsm return value check, the no-alu32 version

Re: [PATCH] selftests/nolibc: disable brk()/sbrk() tests on musl

2024-04-24 Thread Willy Tarreau
On Wed, Apr 24, 2024 at 04:13:13AM +0200, Willy Tarreau wrote: > On Wed, Apr 24, 2024 at 12:15:33AM +0200, Thomas Weißschuh wrote: > > On musl calls to brk() and sbrk() always fail with ENOMEM. > > Detect this and skip the tests on musl. > > > > Tested on glibc 2.39 and musl 1.2.5 in addition to

Re: [PATCH bpf-next v2 10/16] selftests/bpf: add bpf_wq tests

2024-04-24 Thread Alexei Starovoitov
On Tue, Apr 23, 2024 at 7:56 PM Alexei Starovoitov wrote: > > On Sat, Apr 20, 2024 at 2:10 AM Benjamin Tissoires wrote: > > > > + > > +SEC("tc") > > +/* test that workqueues can be used from an array > > + */ > > +__retval(0) > > +long test_call_array_sleepable(void *ctx) > > +{ > > + int

Re: [PATCH net-next v5 0/7] selftests: drv-net: support testing with a remote system

2024-04-24 Thread Willem de Bruijn
Jakub Kicinski wrote: > On Wed, 24 Apr 2024 10:13:41 -0400 Willem de Bruijn wrote: > > > I haven't thought about this part much, TBH. I'm not aware of any > > > scheme used in other tests. > > > IIUC the problem is that we need root locally, and then try to SSH > > > over to remote. But normally

Re: [PATCH bpf-next v2 0/5] use network helpers, part 2

2024-04-24 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Martin KaFai Lau : On Tue, 23 Apr 2024 18:35:26 +0800 you wrote: > From: Geliang Tang > > This patchset uses more network helpers in test_sock_addr.c, but > first of all, patch 2 is needed to make network_helpers.c independent > of

Re: [PATCH 4/6] Add GHCB allocations and helpers

2024-04-24 Thread Sean Christopherson
On Tue, Apr 23, 2024, Sean Christopherson wrote: > Oof, and doesn't SNP support effectively *require* version 2? I.e. shouldn't > the KVM patch[*] that adds support for the AP reset MSR protocol bump the > version? > The GHCB spec very cleary states that that's v2+. Ah, the SNP series does bump

Re: [PATCH v4 2/9] riscv: smp: fail booting up smp if inconsistent vlen is detected

2024-04-24 Thread Alexandre Ghiti
Hi Andy, On 12/04/2024 08:48, Andy Chiu wrote: Currently we only support Vector for SMP platforms, that is, all SMP cores have the same vlenb. If we happen to detect a mismatching vlen, it is better to just fail bootting it up to prevent further race/scheduling issues. Also, move

Re: [PATCH net-next v5 0/7] selftests: drv-net: support testing with a remote system

2024-04-24 Thread Jakub Kicinski
On Wed, 24 Apr 2024 10:13:41 -0400 Willem de Bruijn wrote: > > I haven't thought about this part much, TBH. I'm not aware of any > > scheme used in other tests. > > IIUC the problem is that we need root locally, and then try to SSH > > over to remote. But normally the SSH keys belong to the

Re: [ovs-dev] selftests: openvswitch: Questions about possible enhancements

2024-04-24 Thread Aaron Conole
Benjamin Poirier writes: > On 2024-04-24 18:37 +0100, Simon Horman wrote: >> On Wed, Apr 24, 2024 at 05:44:05PM +0100, Simon Horman wrote: >> > Hi Aaron, Jakub, all, >> > >> > I have recently been exercising the Open vSwitch kernel selftests, >> > using vng, something like this: >> > >> >

Re: selftests: openvswitch: Questions about possible enhancements

2024-04-24 Thread Aaron Conole
Simon Horman writes: > Hi Aaron, Jakub, all, > > I have recently been exercising the Open vSwitch kernel selftests, > using vng, something like this: > > TESTDIR="tools/testing/selftests/net/openvswitch" > > vng -v --run . --user root --cpus 2 \ > --overlay-rwdir

Re: [PATCH v4 05/10] platform: Add test managed platform_device/driver APIs

2024-04-24 Thread Stephen Boyd
Quoting Stephen Boyd (2024-04-22 16:23:58) > diff --git a/drivers/base/test/platform_kunit.c > b/drivers/base/test/platform_kunit.c > new file mode 100644 > index ..54af6db2a6d8 > --- /dev/null > +++ b/drivers/base/test/platform_kunit.c > @@ -0,0 +1,174 @@ > +//

Re: [ovs-dev] selftests: openvswitch: Questions about possible enhancements

2024-04-24 Thread Benjamin Poirier
On 2024-04-24 18:37 +0100, Simon Horman wrote: > On Wed, Apr 24, 2024 at 05:44:05PM +0100, Simon Horman wrote: > > Hi Aaron, Jakub, all, > > > > I have recently been exercising the Open vSwitch kernel selftests, > > using vng, something like this: > > > >

Re: [ovs-dev] selftests: openvswitch: Questions about possible enhancements

2024-04-24 Thread Simon Horman
On Wed, Apr 24, 2024 at 05:44:05PM +0100, Simon Horman wrote: > Hi Aaron, Jakub, all, > > I have recently been exercising the Open vSwitch kernel selftests, > using vng, something like this: > > TESTDIR="tools/testing/selftests/net/openvswitch" > > vng -v --run . --user root

Re: [RFC PATCH net-next v8 04/14] netdev: support binding dma-buf to netdevice

2024-04-24 Thread David Wei
On 2024-04-02 5:20 pm, Mina Almasry wrote: > Add a netdev_dmabuf_binding struct which represents the > dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to > rx queues on the netdevice. On the binding, the dma_buf_attach > & dma_buf_map_attachment will occur. The entries in the

[PATCH v2 07/10] selftests: sync: ksft_exit_pass() does not return

2024-04-24 Thread Nathan Chancellor
After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn"), ksft_exit_...() functions are marked as __noreturn, which means the return type should not be 'int' but 'void' because they are not returning anything (and never were since exit() has

[PATCH v2 10/10] selftests: kselftest: Make ksft_exit functions return void instead of int

2024-04-24 Thread Nathan Chancellor
Commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn") marked functions that call exit() as __noreturn but it did not change the return type of these functions from 'void' to 'int' like it should have (since a noreturn function by definition

[PATCH v2 09/10] selftests: x86: ksft_exit_pass() does not return

2024-04-24 Thread Nathan Chancellor
After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn"), ksft_exit_...() functions are marked as __noreturn, which means the return type should not be 'int' but 'void' because they are not returning anything (and never were since exit() has

[PATCH v2 08/10] selftests: timers: ksft_exit functions do not return

2024-04-24 Thread Nathan Chancellor
After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn"), ksft_exit_...() functions are marked as __noreturn, which means the return type should not be 'int' but 'void' because they are not returning anything (and never were since exit() has

[PATCH v2 06/10] selftests/resctrl: ksft_exit_skip() does not return

2024-04-24 Thread Nathan Chancellor
After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn"), ksft_exit_...() functions are marked as __noreturn, which means the return type should not be 'int' but 'void' because they are not returning anything (and never were since exit() has

[PATCH v2 05/10] selftests: pidfd: ksft_exit functions do not return

2024-04-24 Thread Nathan Chancellor
After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn"), ksft_exit_...() functions are marked as __noreturn, which means the return type should not be 'int' but 'void' because they are not returning anything (and never were since exit() has

[PATCH v2 04/10] selftests/mm: ksft_exit functions do not return

2024-04-24 Thread Nathan Chancellor
After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn"), ksft_exit_...() functions are marked as __noreturn, which means the return type should not be 'int' but 'void' because they are not returning anything (and never were since exit() has

[PATCH v2 03/10] selftests: membarrier: ksft_exit_pass() does not return

2024-04-24 Thread Nathan Chancellor
After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn"), ksft_exit_...() functions are marked as __noreturn, which means the return type should not be 'int' but 'void' because they are not returning anything (and never were since exit() has

[PATCH v2 02/10] selftests/ipc: ksft_exit functions do not return

2024-04-24 Thread Nathan Chancellor
After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn"), ksft_exit_...() functions are marked as __noreturn, which means the return type should not be 'int' but 'void' because they are not returning anything (and never were since exit() has

[PATCH v2 00/10] selftests: Make ksft_exit functions return void instead of int

2024-04-24 Thread Nathan Chancellor
Hi all, Commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn") marked functions that call exit() as __noreturn but it did not change the return type of these functions from 'void' to 'int' like it should have (since a noreturn function by

[PATCH v2 01/10] selftests/clone3: ksft_exit functions do not return

2024-04-24 Thread Nathan Chancellor
After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn"), ksft_exit_...() functions are marked as __noreturn, which means the return type should not be 'int' but 'void' because they are not returning anything (and never were since exit() has

Re: [PATCH] KVM: selftests: Add 'malloc' failure check in test_vmx_nested_state

2024-04-24 Thread Oliver Upton
Hey, On Wed, Apr 24, 2024 at 07:51:44AM -0700, Sean Christopherson wrote: > On Wed, Apr 24, 2024, Andrew Jones wrote: > > On Tue, Apr 23, 2024 at 12:15:47PM -0700, Sean Christopherson wrote: > > ... > > > I almost wonder if we should just pick a prefix that's less obviously > > > connected > > >

selftests: openvswitch: Questions about possible enhancements

2024-04-24 Thread Simon Horman
Hi Aaron, Jakub, all, I have recently been exercising the Open vSwitch kernel selftests, using vng, something like this: TESTDIR="tools/testing/selftests/net/openvswitch" vng -v --run . --user root --cpus 2 \ --overlay-rwdir "$PWD" -- \ "modprobe

Re: [PATCH] selftests: Make ksft_exit functions return void instead of int

2024-04-24 Thread Shuah Khan
On 4/24/24 10:10, Nathan Chancellor wrote: On Wed, Apr 24, 2024 at 10:00:12AM -0600, Shuah Khan wrote: Signed-off-by: Nathan Chancellor --- clone patch tools/testing/selftests/clone3/clone3_clear_sighand.c| 2 +- tools/testing/selftests/clone3/clone3_set_tid.c

Re: [PATCH bpf-next v2 11/16] bpf: wq: add bpf_wq_init

2024-04-24 Thread Alexei Starovoitov
On Wed, Apr 24, 2024 at 8:06 AM Alexei Starovoitov wrote: > > On Tue, Apr 23, 2024 at 7:55 PM Alexei Starovoitov > wrote: > > > > On Sat, Apr 20, 2024 at 2:10 AM Benjamin Tissoires > > wrote: > > > > > > We need to teach the verifier about the second argument which is declared > > > as void *

Re: [PATCH] selftests: Make ksft_exit functions return void instead of int

2024-04-24 Thread Nathan Chancellor
On Wed, Apr 24, 2024 at 10:00:12AM -0600, Shuah Khan wrote: > On 4/24/24 09:05, Nathan Chancellor wrote: > > On Wed, Apr 24, 2024 at 07:44:31AM -0600, Shuah Khan wrote: > > > On 4/17/24 09:37, Nathan Chancellor wrote: > > > > Commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that > > > >

Re: [PATCH v2 25/25] KVM: selftests: Add fred exception tests

2024-04-24 Thread Sean Christopherson
On Sat, Mar 30, 2024, Muhammad Usama Anjum wrote: > On 2/7/24 10:26 PM, Xin Li wrote: > > Add tests for FRED event data and VMX nested-exception. > > > > FRED is designed to save a complete event context in its stack frame, > > e.g., FRED saves the faulting linear address of a #PF into a 64-bit >

Re: [PATCH] selftests: Make ksft_exit functions return void instead of int

2024-04-24 Thread Shuah Khan
On 4/24/24 09:05, Nathan Chancellor wrote: On Wed, Apr 24, 2024 at 07:44:31AM -0600, Shuah Khan wrote: On 4/17/24 09:37, Nathan Chancellor wrote: Commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn") marked functions that call exit() as

Re: [PATCH v3 06/17] riscv: Fix extension subset checking

2024-04-24 Thread Charlie Jenkins
On Wed, Apr 24, 2024 at 04:21:05PM +0100, Conor Dooley wrote: > On Wed, Apr 24, 2024 at 11:13:40AM -0400, Charlie Jenkins wrote: > > On Wed, Apr 24, 2024 at 03:51:54PM +0100, Conor Dooley wrote: > > > On Wed, Apr 24, 2024 at 04:22:02PM +0200, Alexandre Ghiti wrote: > > > > Hi Charlie, > > > > > >

Re: [PATCH v3 06/17] riscv: Fix extension subset checking

2024-04-24 Thread Conor Dooley
On Wed, Apr 24, 2024 at 11:13:40AM -0400, Charlie Jenkins wrote: > On Wed, Apr 24, 2024 at 03:51:54PM +0100, Conor Dooley wrote: > > On Wed, Apr 24, 2024 at 04:22:02PM +0200, Alexandre Ghiti wrote: > > > Hi Charlie, > > > > > > On 21/04/2024 03:04, Charlie Jenkins wrote: > > > > This loop is

Re: [PATCH v3 06/17] riscv: Fix extension subset checking

2024-04-24 Thread Charlie Jenkins
On Wed, Apr 24, 2024 at 03:51:54PM +0100, Conor Dooley wrote: > On Wed, Apr 24, 2024 at 04:22:02PM +0200, Alexandre Ghiti wrote: > > Hi Charlie, > > > > On 21/04/2024 03:04, Charlie Jenkins wrote: > > > This loop is supposed to check if ext->subset_ext_ids[j] is valid, rather > > > than if

Re: [PATCH bpf-next v2 11/16] bpf: wq: add bpf_wq_init

2024-04-24 Thread Alexei Starovoitov
On Tue, Apr 23, 2024 at 7:55 PM Alexei Starovoitov wrote: > > On Sat, Apr 20, 2024 at 2:10 AM Benjamin Tissoires wrote: > > > > We need to teach the verifier about the second argument which is declared > > as void * but which is of type KF_ARG_PTR_TO_MAP. We could have dropped > > this extra

Re: [PATCH] selftests: Make ksft_exit functions return void instead of int

2024-04-24 Thread Nathan Chancellor
On Wed, Apr 24, 2024 at 07:44:31AM -0600, Shuah Khan wrote: > On 4/17/24 09:37, Nathan Chancellor wrote: > > Commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that > > unconditionally call exit() as __noreturn") marked functions that call > > exit() as __noreturn but it did not change the

Re: [PATCH v3 06/17] riscv: Fix extension subset checking

2024-04-24 Thread Conor Dooley
On Wed, Apr 24, 2024 at 04:22:02PM +0200, Alexandre Ghiti wrote: > Hi Charlie, > > On 21/04/2024 03:04, Charlie Jenkins wrote: > > This loop is supposed to check if ext->subset_ext_ids[j] is valid, rather > > than if ext->subset_ext_ids[i] is valid, before setting the extension > > id

Re: [PATCH] KVM: selftests: Add 'malloc' failure check in test_vmx_nested_state

2024-04-24 Thread Sean Christopherson
On Wed, Apr 24, 2024, Andrew Jones wrote: > On Tue, Apr 23, 2024 at 12:15:47PM -0700, Sean Christopherson wrote: > ... > > I almost wonder if we should just pick a prefix that's less obviously > > connected > > to KVM and/or selftests, but unique and short. > > > > How about kvmsft_ ? It's based

Re: [PATCH] KVM: selftests: Add 'malloc' failure check in test_vmx_nested_state

2024-04-24 Thread Sean Christopherson
On Wed, Apr 24, 2024, Dan Carpenter wrote: > On Tue, Apr 23, 2024 at 12:15:47PM -0700, Sean Christopherson wrote: > > On Tue, Apr 23, 2024, Andrew Jones wrote: > > > On Tue, Apr 23, 2024 at 07:56:01AM -0700, Sean Christopherson wrote: > > > > +others > > > > > > > > On Tue, Apr 23, 2024, Markus

Re: [PATCH 4/6] Add GHCB allocations and helpers

2024-04-24 Thread Sean Christopherson
On Tue, Apr 23, 2024, Sean Christopherson wrote: > On Tue, Apr 09, 2024, Peter Gonda wrote: > > Add GHCB management functionality similar to the ucall management. > > Allows for selftest vCPUs to acquire GHCBs for their usage. > > Do we actually need a dedicated pool of GHCBs? The conundrum with

Re: [PATCH v3 06/17] riscv: Fix extension subset checking

2024-04-24 Thread Alexandre Ghiti
Hi Charlie, On 21/04/2024 03:04, Charlie Jenkins wrote: This loop is supposed to check if ext->subset_ext_ids[j] is valid, rather than if ext->subset_ext_ids[i] is valid, before setting the extension id ext->subset_ext_ids[j] in isainfo->isa. Signed-off-by: Charlie Jenkins Reviewed-by: Conor

Re: [PATCH net-next v5 0/7] selftests: drv-net: support testing with a remote system

2024-04-24 Thread Willem de Bruijn
Jakub Kicinski wrote: > On Tue, 23 Apr 2024 13:57:45 -0400 Willem de Bruijn wrote: > > Only possible non-obvious observation is that some kselftests expect > > as root, and the ssh remote logic extends that to expecting ssh > > root access to the remote host. > > > > Would it make sense to

[PATCH net-next 8/8] selftests: openvswitch: add psample test

2024-04-24 Thread Adrian Moreno
Add a test to verify sampling packets via psample works. In order to do that, create a subcommand in ovs-dpctl.py to listen to on the psample multicast group and print samples. In order to also test simultaneous sFlow and psample actions, add missing parsing support for "userspace" action (via

[PATCH net-next 7/8] selftests: openvswitch: add sample action.

2024-04-24 Thread Adrian Moreno
Add sample action support to ovs-dpctl.py. Signed-off-by: Adrian Moreno --- .../selftests/net/openvswitch/ovs-dpctl.py| 96 ++- 1 file changed, 95 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py

[PATCH net-next 0/8] net: openvswitch: Add sample multicasting.

2024-04-24 Thread Adrian Moreno
** Background ** Currently, OVS supports several packet sampling mechanisms (sFlow, per-bridge IPFIX, per-flow IPFIX). These end up being translated into a userspace action that needs to be handled by ovs-vswitchd's handler threads only to be forwarded to some third party application that will

Re: [PATCH v3 00/16] selftests/resctrl: resctrl_val() related cleanups & improvements

2024-04-24 Thread Shuah Khan
On 4/8/24 10:32, Ilpo Järvinen wrote: Hi all, This series does a number of cleanups into resctrl_val() and generalizes it by removing test name specific handling from the function. One of the changes improves MBA/MBM measurement by narrowing down the period the resctrl FS derived memory

Re: [PATCH] selftests: Make ksft_exit functions return void instead of int

2024-04-24 Thread Shuah Khan
On 4/17/24 09:37, Nathan Chancellor wrote: Commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn") marked functions that call exit() as __noreturn but it did not change the return type of these functions from 'void' to 'int' like it should have

Re: [PATCH 0/2] selftests: Make sh helper and power supply test POSIX-compliant

2024-04-24 Thread Shuah Khan
On 4/15/24 09:32, Nícolas F. R. A. Prado wrote: The patches in this series make the ktap sh helper and the power_supply selftest POSIX-compliant. Tested with bash, dash and busybox ash. Signed-off-by: Nícolas F. R. A. Prado --- Nícolas F. R. A. Prado (2): selftests: ktap_helpers: Make

Re: [PATCH 2/2] KVM: selftests: Add KVM/PV clock selftest to prove timer drift correction

2024-04-24 Thread David Woodhouse
On Mon, 2024-04-22 at 15:02 -0700, Chen, Zide wrote: > the selftest works for me, and I ran the test for 1000+ iterations, > w/ or w/o TSC scaling, the TEST_ASSERT(delta_corrected <= ±1) never > got hit. This is awesome! I think that with further care we can get even better than that. Let's look

Re: [PATCH v1 0/5] arm64/mm: uffd write-protect and soft-dirty tracking

2024-04-24 Thread Catalin Marinas
On Wed, Apr 24, 2024 at 11:39:23AM +0100, Ryan Roberts wrote: > - Have a chat with Catalin about appetite for soft-dirty on arm64; But > likely > that will be left here until/unless there is clear justificaiton that the > use case cannot be met with uffd-wp. I agree, I wouldn't use the

[PATCH v1] selftests/mm: soft-dirty should fail if a testcase fails

2024-04-24 Thread Ryan Roberts
Previously soft-dirty was unconditionally exiting with success, even if one of it's testcases failed. Let's fix that so that failure can be reported to automated systems properly. Reviewed-by: Muhammad Usama Anjum Reviewed-by: David Hildenbrand Signed-off-by: Ryan Roberts --- Applies on top

Re: [PATCH bpf-next 4/4] selftests/bpf: Add a null pointer check for the serial_test_tp_attach_query

2024-04-24 Thread Markus Elfring
… > Add the malloc failure checking to avoid possible null > dereference. … How do you think about to use the following wording variant? Add a return value check so that a null pointer dereference will be avoided after a memory allocation failure. Would you like to add the tag “Fixes”

Re: [PATCH bpf-next 3/4] selftests/bpf: Add a null pointer check for the load_btf_spec

2024-04-24 Thread Markus Elfring
… > Add the malloc failure checking to avoid possible null > dereference. … How do you think about the following wording variant? Add a return value check so that a null pointer dereference will be avoided after a memory allocation failure. Would you like to add the tag “Fixes”

Re: [PATCH v1 5/5] selftests/mm: soft-dirty should fail if a testcase fails

2024-04-24 Thread Ryan Roberts
On 23/04/2024 09:44, Muhammad Usama Anjum wrote: > On 4/23/24 1:24 PM, Ryan Roberts wrote: >> On 22/04/2024 10:33, David Hildenbrand wrote: >>> On 19.04.24 09:43, Ryan Roberts wrote: Previously soft-dirty was unconditionally exiting with success, even if one of it's testcases failed.

Re: [PATCH v1 0/5] arm64/mm: uffd write-protect and soft-dirty tracking

2024-04-24 Thread Ryan Roberts
On 23/04/2024 22:02, David Hildenbrand wrote: >>> >>> Shivansh, do you speak for CRIU? Are you able to comment on whether CRIU >>> supports checkpointing an app that uses uffd? >> >> I do not speak for CRIU - I'm just a user (and hopefully a future >> contributor), but not a maintainer or owner. I

Re: [PATCH bpf-next 2/4] selftests/bpf/sockopt: Add a null pointer check for the run_test

2024-04-24 Thread Markus Elfring
… > This patch will add the malloc failure checking … * Please use a corresponding imperative wording for the change description. * Would you like to add the tag “Fixes” accordingly? Regards, Markus

Re: [PATCH bpf-next 1/4] selftests/bpf: Add some null pointer checks

2024-04-24 Thread Markus Elfring
… > This patch will add the malloc failure checking … * Please use a corresponding imperative wording for the change description. * Would you like to add the tag “Fixes” accordingly? … > +++ b/tools/testing/selftests/bpf/test_progs.c > @@ -582,6 +582,11 @@ int compare_stack_ips(int smap_fd,

Re: [PATCH] KVM: selftests: Add 'malloc' failure check in test_vmx_nested_state

2024-04-24 Thread Andrew Jones
On Tue, Apr 23, 2024 at 12:15:47PM -0700, Sean Christopherson wrote: ... > I almost wonder if we should just pick a prefix that's less obviously > connected > to KVM and/or selftests, but unique and short. > How about kvmsft_ ? It's based on the ksft_ prefix of kselftest.h. Maybe it's too close