Re: [PATCH] riscv: selftests: Add hwprobe binaries to .gitignore

2024-04-25 Thread Muhammad Usama Anjum
b/tools/testing/selftests/riscv/hwprobe/.gitignore > index 8113dc3bdd03..6e384e80ea1a 100644 > --- a/tools/testing/selftests/riscv/hwprobe/.gitignore > +++ b/tools/testing/selftests/riscv/hwprobe/.gitignore > @@ -1 +1,3 @@ > hwprobe > +cbo > +which-cpus >

Re: [PATCH bpf-next v3 06/11] bpf: Fix compare error in function retval_range_within

2024-04-25 Thread Andrii Nakryiko
On Thu, Apr 11, 2024 at 5:24 AM Xu Kuohai wrote: > > From: Xu Kuohai > > After checking lsm hook return range in verifier, the test case > "test_progs -t test_lsm" failed, and the failure log says: > > libbpf: prog 'test_int_hook': BPF program load failed: Invalid argument > libbpf: prog

Re: [PATCH] KVM: selftests: Avoid assuming "sudo" exists

2024-04-25 Thread Sean Christopherson
On Mon, Apr 15, 2024, Brendan Jackman wrote: > I ran into a failure running this test on a minimal rootfs. > > Can be fixed by just skipping the "sudo" in case we are already root. > > Signed-off-by: Brendan Jackman > --- > tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.sh | 13

Re: [PATCH 2/3] bpf: do not walk twice the hash map on free

2024-04-25 Thread kernel test robot
Hi Benjamin, kernel test robot noticed the following build warnings: [auto build test WARNING on 52578f7f53ff8fe3a8f6f3bc8b5956615c07a16e] url: https://github.com/intel-lab-lkp/linux/commits/Benjamin-Tissoires/bpf-do-not-walk-twice-the-map-on-free/20240425-220322 base

Re: [PATCH v4 0/9] Support Zve32[xf] and Zve64[xfd] Vector subextensions

2024-04-25 Thread patchwork-bot+linux-riscv
Hello: This series was applied to riscv/linux.git (fixes) by Palmer Dabbelt : On Fri, 12 Apr 2024 14:48:56 +0800 you wrote: > The series composes of two parts. The first part provides a quick fix for > the issue on a recent thread[1]. The issue happens when a platform has > ununified vector

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

2024-04-25 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. Reviewed-by: Willem de Bruijn Signed-off-by: Jakub Kicinski --- v2: - check "both or none" for addresses ---

[PATCH net-next v2 1/3] selftests: drv-net: extend the README with more info and example

2024-04-25 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 Reviewed-by: Willem de Bruijn Signed-off-by: Jakub Kicinski --- .../testing/selftests/drivers/net/README.rst | 97 --- 1 file

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

2024-04-25 Thread Jakub Kicinski
The shell lexer is not helping much, do very basic parsing manually. Reviewed-by: Willem de Bruijn Signed-off-by: Jakub Kicinski --- v2: - use split() to split the line on = --- .../selftests/drivers/net/lib/py/env.py | 26 ++- 1 file changed, 14 insertions(+), 12

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

2024-04-25 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. Improve the config validation. v2: - use split() in patch 2 - more validation in last patch v1: https://lore.kernel.org/r/20240424221444.4194069-1-k...@kernel.org/ Jakub Kicinski (3):

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

2024-04-25 Thread Jakub Kicinski
On Wed, 24 Apr 2024 21:45:49 -0400 Willem de Bruijn wrote: > Left two minor points comments inline, but nothing important. I'll respin, apply your suggestions and drop the unfortunate patch.

Re: [PATCH 0/2] tools/nolibc: implement strtol() and friends

2024-04-25 Thread Thomas Weißschuh
On 2024-04-25 18:30:39+, Willy Tarreau wrote: > Hi again Thomas, > > On Thu, Apr 25, 2024 at 06:09:25PM +0200, Thomas Weißschuh wrote: > > I wanted to implement sscanf() for ksft_min_kernel_version() and this is > > a prerequisite for it. > > > > It's also useful on its own so it gets its

[PATCH v2 4/4] selftests/resctrl: Enable MBA/MBA tests on AMD

2024-04-25 Thread Babu Moger
Enable MBA/MBM tests if UMC (Unified Memory Controller) support is available on the system. Tests will be skipped otherwise. Update noncont_cat_run_test to check for vendor. AMD supports non contiguous CBM masks but does not report it via CPUID. Signed-off-by: Babu Moger ---

[PATCH v2 3/4] selftests/resctrl: Add support for MBM and MBA tests on AMD

2024-04-25 Thread Babu Moger
Add support to read UMC (Unified Memory Controller) perf events to compare the numbers with QoS monitor for AMD. Signed-off-by: Babu Moger --- tools/testing/selftests/resctrl/resctrl_val.c | 67 --- 1 file changed, 59 insertions(+), 8 deletions(-) diff --git

[PATCH v2 2/4] selftests/resctrl: Pass sysfs controller name of the vendor

2024-04-25 Thread Babu Moger
Detect the vendor and pass the sysfs name for the vendor for searching the controller information. Signed-off-by: Babu Moger --- tools/testing/selftests/resctrl/resctrl_val.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git

[PATCH v2 1/4] selftests/resctrl: Rename variable imcs and num_of_imcs() to generic names

2024-04-25 Thread Babu Moger
In an effort to support MBM and MBA tests for AMD, renaming for variable and functions to generic names. For Intel, the memory controller is called Integrated Memory Controllers (IMC). For AMD, it is called Unified Memory Controller (UMC). No functional change. Signed-off-by: Babu Moger ---

[PATCH v2 0/4] selftests/resctrl: Enable MBM and MBA tests on AMD

2024-04-25 Thread Babu Moger
The MBM (Memory Bandwidth Monitoring) and MBA (Memory Bandwidth Allocation) features are not enabled for AMD systems. The reason was lack of perf counters to compare the resctrl test results. Starting with the commit 25e56847821f ("perf/x86/amd/uncore: Add memory controller support"), AMD now

Re: [PATCH v3] selftests/bpf: Add ring_buffer__consume_n test.

2024-04-25 Thread Andrea Righi
On Thu, Apr 25, 2024 at 11:47:07AM -0700, Andrii Nakryiko wrote: > On Thu, Apr 25, 2024 at 7:06 AM Andrea Righi > wrote: > > > > Add a testcase for the ring_buffer__consume_n() API. > > > > The test produces multiple samples in a ring buffer, using a > > sys_getpid() fentry prog, and consumes

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

2024-04-25 Thread Aaron Conole
Jakub Kicinski writes: > On Thu, 25 Apr 2024 19:57:19 +0100 Simon Horman wrote: >> openvswitch.sh does not appear to have any dependencies on Open vSwitch >> user-space. My understanding is that, rather, it makes use of >> tools/testing/selftests/net/openvswitch/ovs-dpctl.py to talk to the

Re: selftests: openvswitch: Questions about possible enhancements

2024-04-25 Thread Aaron Conole
Simon Horman writes: > On Wed, Apr 24, 2024 at 02:14:09PM -0400, Aaron Conole wrote: >> Simon Horman writes: >> >> > 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-25 Thread Aaron Conole
Jakub Kicinski writes: > 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

[PATCH] riscv: selftests: Add hwprobe binaries to .gitignore

2024-04-25 Thread Charlie Jenkins
3bdd03..6e384e80ea1a 100644 --- a/tools/testing/selftests/riscv/hwprobe/.gitignore +++ b/tools/testing/selftests/riscv/hwprobe/.gitignore @@ -1 +1,3 @@ hwprobe +cbo +which-cpus --- base-commit: ed30a4a51bb196781c8058073ea720133a65596f change-id: 20240425-gitignore_hwprobe_artifacts-fb0f2cd3509c -- - Charlie

Re: [PATCH 2/3] bpf: do not walk twice the hash map on free

2024-04-25 Thread Alexei Starovoitov
On Thu, Apr 25, 2024 at 6:59 AM Benjamin Tissoires wrote: > > If someone stores both a timer and a workqueue in a hash map, on free, we > would walk it twice. > Add a check in htab_free_malloced_timers_or_wq and free the timers > and workqueues if they are present. > > Fixes: 246331e3f1ea ("bpf:

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

2024-04-25 Thread Jakub Kicinski
On Thu, 25 Apr 2024 19:57:19 +0100 Simon Horman wrote: > openvswitch.sh does not appear to have any dependencies on Open vSwitch > user-space. My understanding is that, rather, it makes use of > tools/testing/selftests/net/openvswitch/ovs-dpctl.py to talk to the Kernel > using Netlink (which is

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

2024-04-25 Thread Simon Horman
+ Aaron On Thu, Apr 25, 2024 at 09:26:37AM +0100, Simon Horman wrote: > On Wed, Apr 24, 2024 at 05:30:00PM -0700, Jakub Kicinski wrote: > > On Wed, 24 Apr 2024 17:44:05 +0100 Simon Horman wrote: > > > I have recently been exercising the Open vSwitch kernel selftests, > > > using vng, > > > >

Re: [PATCH v3] selftests/bpf: Add ring_buffer__consume_n test.

2024-04-25 Thread Andrii Nakryiko
On Thu, Apr 25, 2024 at 7:06 AM Andrea Righi wrote: > > Add a testcase for the ring_buffer__consume_n() API. > > The test produces multiple samples in a ring buffer, using a > sys_getpid() fentry prog, and consumes them from user-space in batches, > rather than consuming all of them greedily,

Re: [linus:master] [selftests/harness] 0710a1a73f: kernel-selftests.pidfd.pidfd_setns_test.fail

2024-04-25 Thread Mickaël Salaün
FYI, I'm working on this issue. Regards, Mickaël On Fri, Mar 29, 2024 at 10:42:51AM +0800, kernel test robot wrote: > > > Hello, > > kernel test robot noticed "kernel-selftests.pidfd.pidfd_setns_test.fail" on: > > commit: 0710a1a73fb45033ebb06073e374ab7d44a05f15 ("selftests/harness: Merge

kselftest/next kselftest-livepatch: 2 runs, 1 regressions (v6.9-rc4-32-g693fe2f6a9ea)

2024-04-25 Thread kernelci.org bot
kselftest/next kselftest-livepatch: 2 runs, 1 regressions (v6.9-rc4-32-g693fe2f6a9ea) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions

kselftest/next kselftest-lkdtm: 5 runs, 2 regressions (v6.9-rc4-32-g693fe2f6a9ea)

2024-04-25 Thread kernelci.org bot
kselftest/next kselftest-lkdtm: 5 runs, 2 regressions (v6.9-rc4-32-g693fe2f6a9ea) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions

Re: [PATCH v3] selftests/bpf: Add ring_buffer__consume_n test.

2024-04-25 Thread Jiri Olsa
On Thu, Apr 25, 2024 at 04:06:27PM +0200, Andrea Righi wrote: > Add a testcase for the ring_buffer__consume_n() API. > > The test produces multiple samples in a ring buffer, using a > sys_getpid() fentry prog, and consumes them from user-space in batches, > rather than consuming all of them

Re: [PATCH 0/2] tools/nolibc: implement strtol() and friends

2024-04-25 Thread Willy Tarreau
Hi again Thomas, On Thu, Apr 25, 2024 at 06:09:25PM +0200, Thomas Weißschuh wrote: > I wanted to implement sscanf() for ksft_min_kernel_version() and this is > a prerequisite for it. > > It's also useful on its own so it gets its own submission. > > Signed-off-by: Thomas Weißschuh Nice work,

Re: [PATCH 2/2] tools/nolibc: implement strtol() and friends

2024-04-25 Thread Willy Tarreau
Hi Thomas, On Thu, Apr 25, 2024 at 06:09:27PM +0200, Thomas Weißschuh wrote: > The implementation always works on uintmax_t values. > > This is inefficient when only 32bit are needed. > However for all functions this only happens for strtol() on 32bit > platforms. That's indeed very useful! I

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

2024-04-25 Thread Yonghong Song
On 4/24/24 7:42 PM, Xu Kuohai wrote: 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

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

2024-04-25 Thread Sean Christopherson
On Wed, Apr 24, 2024, Oliver Upton wrote: > 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

kselftest/next build: 5 builds: 0 failed, 5 passed (v6.9-rc4-32-g693fe2f6a9ea)

2024-04-25 Thread kernelci.org bot
kselftest/next build: 5 builds: 0 failed, 5 passed (v6.9-rc4-32-g693fe2f6a9ea) Full Build Summary: https://kernelci.org/build/kselftest/branch/next/kernel/v6.9-rc4-32-g693fe2f6a9ea/ Tree: kselftest Branch: next Git Describe: v6.9-rc4-32-g693fe2f6a9ea Git Commit:

[PATCH 1/2] tools/nolibc: add limits for {u,}intmax_t, ulong and {u,}llong

2024-04-25 Thread Thomas Weißschuh
They are useful for users and necessary for strtol() and friends. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/stdint.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tools/include/nolibc/stdint.h b/tools/include/nolibc/stdint.h index

[PATCH 2/2] tools/nolibc: implement strtol() and friends

2024-04-25 Thread Thomas Weißschuh
The implementation always works on uintmax_t values. This is inefficient when only 32bit are needed. However for all functions this only happens for strtol() on 32bit platforms. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/stdlib.h| 109 +++

[PATCH 0/2] tools/nolibc: implement strtol() and friends

2024-04-25 Thread Thomas Weißschuh
I wanted to implement sscanf() for ksft_min_kernel_version() and this is a prerequisite for it. It's also useful on its own so it gets its own submission. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (2): tools/nolibc: add limits for {u,}intmax_t, ulong and {u,}llong

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

2024-04-25 Thread Shuah Khan
On 4/24/24 11:24, Nathan Chancellor wrote: 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

[PATCH v3] selftests/bpf: Add ring_buffer__consume_n test.

2024-04-25 Thread Andrea Righi
Add a testcase for the ring_buffer__consume_n() API. The test produces multiple samples in a ring buffer, using a sys_getpid() fentry prog, and consumes them from user-space in batches, rather than consuming all of them greedily, like ring_buffer__consume() does. Link:

Re: [PATCH] selftests/bpf: Add ring_buffer__consume_n test.

2024-04-25 Thread Andrea Righi
On Thu, Apr 25, 2024 at 02:23:30PM +0200, Jiri Olsa wrote: > On Thu, Apr 25, 2024 at 08:19:04AM +0200, Andrea Righi wrote: > > On Sun, Apr 21, 2024 at 10:11:33PM +0200, Jiri Olsa wrote: > > ... > > > > static struct test_ringbuf_map_key_lskel *skel_map_key; > > > > +static struct

[PATCH 3/3] selftests/bpf: drop an unused local variable

2024-04-25 Thread Benjamin Tissoires
Some copy/paste leftover, this is never used Fixes: e3d9eac99afd ("selftests/bpf: wq: add bpf_wq_init() checks") Signed-off-by: Benjamin Tissoires --- tools/testing/selftests/bpf/prog_tests/wq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/wq.c

[PATCH 2/3] bpf: do not walk twice the hash map on free

2024-04-25 Thread Benjamin Tissoires
If someone stores both a timer and a workqueue in a hash map, on free, we would walk it twice. Add a check in htab_free_malloced_timers_or_wq and free the timers and workqueues if they are present. Fixes: 246331e3f1ea ("bpf: allow struct bpf_wq to be embedded in arraymaps and hashmaps")

[PATCH 1/3] bpf: do not walk twice the map on free

2024-04-25 Thread Benjamin Tissoires
If someone stores both a timer and a workqueue in a map, on free we would walk it twice. Add a check in array_map_free_timers_wq and free the timers and workqueues if they are present. Fixes: 246331e3f1ea ("bpf: allow struct bpf_wq to be embedded in arraymaps and hashmaps") Signed-off-by:

[PATCH 0/3] bpf_wq followup series

2024-04-25 Thread Benjamin Tissoires
: 20240425-bpf-next-2114350587e3 Best regards, -- Benjamin Tissoires

Re: [PATCH v2] selftests/bpf: Add ring_buffer__consume_n test.

2024-04-25 Thread Jiri Olsa
On Thu, Apr 25, 2024 at 09:33:19AM +0200, Andrea Righi wrote: > Add a testcase for the ring_buffer__consume_n() API. > > The test produces multiple samples in a ring buffer, using a > sys_getpid() fentry prog, and consumes them from user-space in batches, > rather than consuming all of them

Re: [PATCH] selftests/bpf: Add ring_buffer__consume_n test.

2024-04-25 Thread Jiri Olsa
On Thu, Apr 25, 2024 at 08:19:04AM +0200, Andrea Righi wrote: > On Sun, Apr 21, 2024 at 10:11:33PM +0200, Jiri Olsa wrote: > ... > > > static struct test_ringbuf_map_key_lskel *skel_map_key; > > > +static struct test_ringbuf_n_lskel *skel_n; > > > > seems like there's no need for this to be

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

2024-04-25 Thread Benjamin Tissoires
On Apr 24 2024, Andrii Nakryiko wrote: > 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 > > --- > >

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

2024-04-25 Thread Benjamin Tissoires
On Apr 24 2024, Alexei Starovoitov wrote: > 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

Re: selftests: openvswitch: Questions about possible enhancements

2024-04-25 Thread Simon Horman
On Wed, Apr 24, 2024 at 05:30:00PM -0700, Jakub Kicinski wrote: > 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

Re: selftests: openvswitch: Questions about possible enhancements

2024-04-25 Thread Simon Horman
On Wed, Apr 24, 2024 at 02:14:09PM -0400, Aaron Conole wrote: > 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" > > > >

[PATCH v2] selftests/bpf: Add ring_buffer__consume_n test.

2024-04-25 Thread Andrea Righi
Add a testcase for the ring_buffer__consume_n() API. The test produces multiple samples in a ring buffer, using a sys_getpid() fentry prog, and consumes them from user-space in batches, rather than consuming all of them greedily, like ring_buffer__consume() does. Link:

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

2024-04-25 Thread Simon Horman
On Wed, Apr 24, 2024 at 01:59:29PM -0400, Benjamin Poirier wrote: > 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, > > >

Re: [PATCH] selftests/bpf: Add ring_buffer__consume_n test.

2024-04-25 Thread Andrea Righi
On Sun, Apr 21, 2024 at 10:11:33PM +0200, Jiri Olsa wrote: ... > > static struct test_ringbuf_map_key_lskel *skel_map_key; > > +static struct test_ringbuf_n_lskel *skel_n; > > seems like there's no need for this to be static variable Can you elaborate more? I think we want these pointers to be