Re: [PATCH 1/2] selftests: harness: remove unneeded __constructor_order_last()

2024-05-17 Thread Masahiro Yamada
On Sat, May 18, 2024 at 8:26 AM Kees Cook wrote: > > On Fri, May 17, 2024 at 08:45:05PM +0900, Masahiro Yamada wrote: > > __constructor_order_last() is unneeded. > > > > If __constructor_order_last() is not called on reverse-order systems, > > __constructor_order will remain 0 instead of being

Re: [PATCH net-next v9 05/14] netdev: netdevice devmem allocator

2024-05-17 Thread David Wei
On 2024-05-10 16:21, Mina Almasry wrote: > +/* This returns the absolute dma_addr_t calculated from > + * net_iov_owner(niov)->owner->base_dma_addr, not the page_pool-owned > + * niov->dma_addr. > + * > + * The absolute dma_addr_t is a dma_addr_t that is always uncompressed. > + * > + * The

[PATCH] selftests: drivers/s390x: Use SKIP() during FIXTURE_SETUP

2024-05-17 Thread Kees Cook
Instead of mixing selftest harness and ksft helpers, perform SKIP testing from the FIXTURE_SETUPs. This also means TEST_HARNESS_MAIN does not need to be open-coded. Signed-off-by: Kees Cook --- Cc: Christian Borntraeger Cc: Janosch Frank Cc: Claudio Imbrenda Cc: David Hildenbrand Cc: Shuah

[PATCH] selftests: hid: Do not open-code TEST_HARNESS_MAIN

2024-05-17 Thread Kees Cook
Avoid open-coding TEST_HARNESS_MAIN. (It might change, for example.) Signed-off-by: Kees Cook --- Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Shuah Khan Cc: Masahiro Yamada Cc: linux-in...@vger.kernel.org Cc: linux-kselftest@vger.kernel.org --- tools/testing/selftests/hid/hid_bpf.c | 12

[PATCH] selftests: rtc: rtctest: Do not open-code TEST_HARNESS_MAIN

2024-05-17 Thread Kees Cook
Argument processing is specific to the test harness code. Any optional information needs to be passed via environment variables. Move alternate path to the RTC_DEV environment variable. Also do not open-code TEST_HARNESS_MAIN because its definition may change. Additionally, setup checking can be

Re: [PATCH 1/2] selftests: harness: remove unneeded __constructor_order_last()

2024-05-17 Thread Kees Cook
On Fri, May 17, 2024 at 08:45:05PM +0900, Masahiro Yamada wrote: > __constructor_order_last() is unneeded. > > If __constructor_order_last() is not called on reverse-order systems, > __constructor_order will remain 0 instead of being set to > _CONSTRUCTOR_ORDER_BACKWARD (= -1). > >

Re: [PATCH 0/2] selftests: harness: refactor __constructor_order

2024-05-17 Thread Kees Cook
On Fri, May 17, 2024 at 08:45:04PM +0900, Masahiro Yamada wrote: > > This series refactors __constructor_order because > __constructor_order_last() is unneeded. > > BTW, the comments in kselftest_harness.h was confusing to me. > > As far as I tested, all arches executed constructors in the

Re: [PATCH net v3] selftests: net: local_termination: annotate the expected failures

2024-05-17 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski : On Thu, 16 May 2024 08:25:13 -0700 you wrote: > Vladimir said when adding this test: > > The bridge driver fares particularly badly [...] mainly because > it does not implement IFF_UNICAST_FLT. > > See commit

Re: [PATCHv2 net] selftests/net: use tc rule to filter the na packet

2024-05-17 Thread Simon Horman
On Fri, May 17, 2024 at 12:04:20PM -0700, Jakub Kicinski wrote: > On Fri, 17 May 2024 10:14:02 +0100 Simon Horman wrote: > > Jakub, is there a way to tell how long a test took to execute? > > Perhaps it's obvious, but I couldn't see it. > > It's not obvious, and it was broken. There's an 'info'

Re: [PATCHv2 net] selftests/net: use tc rule to filter the na packet

2024-05-17 Thread Jakub Kicinski
On Fri, 17 May 2024 10:14:02 +0100 Simon Horman wrote: > Jakub, is there a way to tell how long a test took to execute? > Perhaps it's obvious, but I couldn't see it. It's not obvious, and it was broken. There's an 'info' file with extra metadata in the directory with results:

Re: [PATCH] kunit: tool: Build compile_commands.json

2024-05-17 Thread Nathan Chancellor
Hi Brendan, On Thu, May 16, 2024 at 07:40:53PM +, Brendan Jackman wrote: > compile_commands.json is used by clangd[1] to provide code navigation > and completion functionality to editors. See [2] for an example > configuration that includes this functionality for VSCode. > > It can currently

Re: [PATCH v5 07/16] riscv: add ISA extensions validation callback

2024-05-17 Thread Conor Dooley
On Fri, May 17, 2024 at 04:52:47PM +0200, Clément Léger wrote: > Since a few extensions (Zicbom/Zicboz) already needs validation and > future ones will need it as well (Zc*) add a validate() callback to > struct riscv_isa_ext_data. This require to rework the way extensions are > parsed and split

Re: [PATCH v5 05/16] KVM: riscv: selftests: Add Zimop extension to get-reg-list test

2024-05-17 Thread Anup Patel
On Fri, May 17, 2024 at 8:23 PM Clément Léger wrote: > > The KVM RISC-V allows Zimop extension for Guest/VM so add this > extension to get-reg-list test. > > Signed-off-by: Clément Léger LGTM. Reviewed-by: Anup Patel Acked-by: Anup Patel Regards, Anup > --- >

Re: [PATCH v5 04/16] RISC-V: KVM: Allow Zimop extension for Guest/VM

2024-05-17 Thread Anup Patel
On Fri, May 17, 2024 at 8:23 PM Clément Léger wrote: > > Extend the KVM ISA extension ONE_REG interface to allow KVM user space > to detect and enable Zimop extension for Guest/VM. > > Signed-off-by: Clément Léger LGTM. Reviewed-by: Anup Patel Acked-by: Anup Patel Regards, Anup > --- >

[PATCH v5 16/16] KVM: riscv: selftests: Add Zcmop extension to get-reg-list test

2024-05-17 Thread Clément Léger
The KVM RISC-V allows Zcmop extension for Guest/VM so add this extension to get-reg-list test. Signed-off-by: Clément Léger Reviewed-by: Anup Patel Acked-by: Anup Patel --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH v5 15/16] RISC-V: KVM: Allow Zcmop extension for Guest/VM

2024-05-17 Thread Clément Léger
Extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zcmop extension for Guest/VM. Signed-off-by: Clément Léger Reviewed-by: Anup Patel Acked-by: Anup Patel --- arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu_onereg.c | 2 ++ 2 files

[PATCH v5 14/16] riscv: hwprobe: export Zcmop ISA extension

2024-05-17 Thread Clément Léger
Export Zcmop ISA extension through hwprobe. Signed-off-by: Clément Léger --- Documentation/arch/riscv/hwprobe.rst | 4 arch/riscv/include/uapi/asm/hwprobe.h | 1 + arch/riscv/kernel/sys_hwprobe.c | 1 + 3 files changed, 6 insertions(+) diff --git

[PATCH v5 13/16] riscv: add ISA extension parsing for Zcmop

2024-05-17 Thread Clément Léger
Add parsing for Zcmop ISA extension which was ratified in commit b854a709c00 ("Zcmop is ratified/1.0") of the riscv-isa-manual. Signed-off-by: Clément Léger --- arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpufeature.c | 1 + 2 files changed, 2 insertions(+) diff --git

[PATCH v5 12/16] dt-bindings: riscv: add Zcmop ISA extension description

2024-05-17 Thread Clément Léger
Add description for the Zcmop (Compressed May-Be-Operations) ISA extension which was ratified in commit c732a4f39a4 ("Zcmop is ratified/1.0") of the riscv-isa-manual. Signed-off-by: Clément Léger Acked-by: Conor Dooley --- .../devicetree/bindings/riscv/extensions.yaml| 12

[PATCH v5 11/16] KVM: riscv: selftests: Add some Zc* extensions to get-reg-list test

2024-05-17 Thread Clément Léger
The KVM RISC-V allows Zca, Zcf, Zcd and Zcb extensions for Guest/VM so add these extensions to get-reg-list test. Signed-off-by: Clément Léger Reviewed-by: Anup Patel Acked-by: Anup Patel --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 16 1 file changed, 16

[PATCH v5 10/16] RISC-V: KVM: Allow Zca, Zcf, Zcd and Zcb extensions for Guest/VM

2024-05-17 Thread Clément Léger
Extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zca, Zcf, Zcd and Zcb extensions for Guest/VM. Signed-off-by: Clément Léger Reviewed-by: Anup Patel Acked-by: Anup Patel --- arch/riscv/include/uapi/asm/kvm.h | 4 arch/riscv/kvm/vcpu_onereg.c

[PATCH v5 09/16] riscv: hwprobe: export Zca, Zcf, Zcd and Zcb ISA extensions

2024-05-17 Thread Clément Léger
Export Zca, Zcf, Zcd and Zcb ISA extension through hwprobe. Signed-off-by: Clément Léger --- Documentation/arch/riscv/hwprobe.rst | 20 arch/riscv/include/uapi/asm/hwprobe.h | 4 arch/riscv/kernel/sys_hwprobe.c | 4 3 files changed, 28 insertions(+) diff

[PATCH v5 08/16] riscv: add ISA parsing for Zca, Zcf, Zcd and Zcb

2024-05-17 Thread Clément Léger
The Zc* standard extension for code reduction introduces new extensions. This patch adds support for Zca, Zcf, Zcd and Zcb. Zce, Zcmt and Zcmp are left out of this patch since they are targeting microcontrollers/ embedded CPUs instead of application processors. Signed-off-by: Clément Léger ---

[PATCH v5 07/16] riscv: add ISA extensions validation callback

2024-05-17 Thread Clément Léger
Since a few extensions (Zicbom/Zicboz) already needs validation and future ones will need it as well (Zc*) add a validate() callback to struct riscv_isa_ext_data. This require to rework the way extensions are parsed and split it in two phases. First phase is isa string or isa extension list

[PATCH v5 06/16] dt-bindings: riscv: add Zca, Zcf, Zcd and Zcb ISA extension description

2024-05-17 Thread Clément Léger
Add description for Zca, Zcf, Zcd and Zcb extensions which are part the Zc* standard extensions for code size reduction. Additional validation rules are added since Zcb depends on Zca, Zcf, depends on Zca and F, Zcd depends on Zca and D and finally, Zcf can not be present on rv64. Signed-off-by:

[PATCH v5 05/16] KVM: riscv: selftests: Add Zimop extension to get-reg-list test

2024-05-17 Thread Clément Léger
The KVM RISC-V allows Zimop extension for Guest/VM so add this extension to get-reg-list test. Signed-off-by: Clément Léger --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c

[PATCH v5 03/16] riscv: hwprobe: export Zimop ISA extension

2024-05-17 Thread Clément Léger
Export Zimop ISA extension through hwprobe. Signed-off-by: Clément Léger --- Documentation/arch/riscv/hwprobe.rst | 4 arch/riscv/include/uapi/asm/hwprobe.h | 1 + arch/riscv/kernel/sys_hwprobe.c | 1 + 3 files changed, 6 insertions(+) diff --git

[PATCH v5 04/16] RISC-V: KVM: Allow Zimop extension for Guest/VM

2024-05-17 Thread Clément Léger
Extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zimop extension for Guest/VM. Signed-off-by: Clément Léger --- arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu_onereg.c | 2 ++ 2 files changed, 3 insertions(+) diff --git

[PATCH v5 02/16] riscv: add ISA extension parsing for Zimop

2024-05-17 Thread Clément Léger
Add parsing for Zimop ISA extension which was ratified in commit 58220614a5f of the riscv-isa-manual. Signed-off-by: Clément Léger --- arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpufeature.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/hwcap.h

[PATCH v5 01/16] dt-bindings: riscv: add Zimop ISA extension description

2024-05-17 Thread Clément Léger
Add description for the Zimop (May-Be-Operations) ISA extension which was ratified in commit 58220614a5f of the riscv-isa-manual. Signed-off-by: Clément Léger --- Documentation/devicetree/bindings/riscv/extensions.yaml | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH v5 00/16] Add support for a few Zc* extensions, Zcmop and Zimop

2024-05-17 Thread Clément Léger
Add support for (yet again) more RVA23U64 missing extensions. Add support for Zimop, Zcmop, Zca, Zcf, Zcd and Zcb extensions ISA string parsing, hwprobe and kvm support. Zce, Zcmt and Zcmp extensions have been left out since they target microcontrollers/embedded CPUs and are not needed by

Re: [PATCH v4 65/66] selftests/wireguard: Drop define _GNU_SOURCE

2024-05-17 Thread Jason A. Donenfeld
On Fri, May 10, 2024 at 12:07:22AM +, Edward Liaw wrote: > _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent > redefinition warnings. > > Signed-off-by: Edward Liaw > --- > tools/testing/selftests/wireguard/qemu/init.c | 2 -- > 1 file changed, 2 deletions(-) > > diff

Re: [PATCH net v3] selftests: net: local_termination: annotate the expected failures

2024-05-17 Thread Petr Machata
Hangbin Liu writes: > On Thu, May 16, 2024 at 08:25:13AM -0700, Jakub Kicinski wrote: >> Vladimir said when adding this test: >> >> The bridge driver fares particularly badly [...] mainly because >> it does not implement IFF_UNICAST_FLT. >> >> See commit 90b9566aa5cd ("selftests:

[PATCH 2/2] selftests: harness: rename __constructor_order for clarification

2024-05-17 Thread Masahiro Yamada
Now, __constructor_order is boolean; 1 for forward-order systems, 0 for reverse-order systems while parsing __LIST_APPEND(). Change it into a bool variable, and rename it for clarification. Signed-off-by: Masahiro Yamada --- tools/testing/selftests/kselftest_harness.h | 10 -- 1 file

[PATCH 1/2] selftests: harness: remove unneeded __constructor_order_last()

2024-05-17 Thread Masahiro Yamada
__constructor_order_last() is unneeded. If __constructor_order_last() is not called on reverse-order systems, __constructor_order will remain 0 instead of being set to _CONSTRUCTOR_ORDER_BACKWARD (= -1). __LIST_APPEND() will still take the 'else' branch, so there is no difference in the

[PATCH 0/2] selftests: harness: refactor __constructor_order

2024-05-17 Thread Masahiro Yamada
This series refactors __constructor_order because __constructor_order_last() is unneeded. BTW, the comments in kselftest_harness.h was confusing to me. As far as I tested, all arches executed constructors in the forward order. [test code] #include static int x; static void

Re: [PATCHv2 net] selftests/net: use tc rule to filter the na packet

2024-05-17 Thread Simon Horman
On Fri, May 17, 2024 at 09:03:27AM +0800, Hangbin Liu wrote: > Test arp_ndisc_untracked_subnets use tcpdump to filter the unsolicited > and untracked na messages. It set -e before calling tcpdump. But if > tcpdump filters 0 packet, it will return none zero, and cause the script > to exit. > >

Re: [PATCH net v3] selftests: net: local_termination: annotate the expected failures

2024-05-17 Thread Hangbin Liu
On Thu, May 16, 2024 at 08:25:13AM -0700, Jakub Kicinski wrote: > Vladimir said when adding this test: > > The bridge driver fares particularly badly [...] mainly because > it does not implement IFF_UNICAST_FLT. > > See commit 90b9566aa5cd ("selftests: forwarding: add a test for >

Re: [PATCH net v3] selftests: net: local_termination: annotate the expected failures

2024-05-17 Thread Simon Horman
On Thu, May 16, 2024 at 08:25:13AM -0700, Jakub Kicinski wrote: > Vladimir said when adding this test: > > The bridge driver fares particularly badly [...] mainly because > it does not implement IFF_UNICAST_FLT. > > See commit 90b9566aa5cd ("selftests: forwarding: add a test for >

Re: [PATCH] selftest: rtc: Add to check rtc alarm status for alarm related test

2024-05-17 Thread Joseph Jang
On 2024/5/17 4:08 PM, Alexandre Belloni wrote: On 17/05/2024 15:53:58+0800, Joseph Jang wrote: On 2024/5/17 3:19 PM, Alexandre Belloni wrote: On 16/05/2024 19:28:47-0700, Joseph Jang wrote: In alarm_wkalm_set and alarm_wkalm_set_minute test, they use different ioctl

Re: [PATCH] kselftest/alsa: Ensure _GNU_SOURCE is defined

2024-05-17 Thread Takashi Iwai
On Thu, 16 May 2024 17:27:33 +0200, Mark Brown wrote: > > The pcmtest driver tests use the kselftest harness which requires that > _GNU_SOURCE is defined but nothing causes it to be defined. Since the > KHDR_INCLUDES Makefile variable has had the required define added let's > use that, this

Re: [PATCH] selftest: rtc: Add to check rtc alarm status for alarm related test

2024-05-17 Thread Alexandre Belloni
On 17/05/2024 15:53:58+0800, Joseph Jang wrote: > > > On 2024/5/17 3:19 PM, Alexandre Belloni wrote: > > On 16/05/2024 19:28:47-0700, Joseph Jang wrote: > > > In alarm_wkalm_set and alarm_wkalm_set_minute test, they use different > > > ioctl (RTC_ALM_SET/RTC_WKALM_SET) for alarm feature

Re: [PATCH] selftest: rtc: Add to check rtc alarm status for alarm related test

2024-05-17 Thread Joseph Jang
On 2024/5/17 3:19 PM, Alexandre Belloni wrote: On 16/05/2024 19:28:47-0700, Joseph Jang wrote: In alarm_wkalm_set and alarm_wkalm_set_minute test, they use different ioctl (RTC_ALM_SET/RTC_WKALM_SET) for alarm feature detection. They will skip testing if RTC_ALM_SET/RTC_WKALM_SET ioctl

Re: [PATCH] selftest: rtc: Add to check rtc alarm status for alarm related test

2024-05-17 Thread Alexandre Belloni
On 16/05/2024 19:28:47-0700, Joseph Jang wrote: > In alarm_wkalm_set and alarm_wkalm_set_minute test, they use different > ioctl (RTC_ALM_SET/RTC_WKALM_SET) for alarm feature detection. They will > skip testing if RTC_ALM_SET/RTC_WKALM_SET ioctl returns an EINVAL error > code. This design may miss

[PATCH bpf-next] selftests/bpf: Fix prog numbers in test_sockmap

2024-05-17 Thread Geliang Tang
From: Geliang Tang bpf_prog5 and bpf_prog7 are removed from progs/test_sockmap_kern.h in commit d79a32129b21 ("bpf: Selftests, remove prints from sockmap tests"), now there are only 9 progs in it, not 11: SEC("sk_skb1") int bpf_prog1(struct __sk_buff *skb) SEC("sk_skb2")

kselftest/next kselftest-seccomp: 6 runs, 7 regressions (v6.9-8287-g31a59b76b978)

2024-05-17 Thread kernelci.org bot
kselftest/next kselftest-seccomp: 6 runs, 7 regressions (v6.9-8287-g31a59b76b978) This legacy KernelCI providing this report will shutdown sometime soon in favor of our new KernelCI infra. Not all tests are being migrated. If you are still using this report and want us to prioritize your usecase

kselftest/next kselftest-livepatch: 2 runs, 1 regressions (v6.9-8287-g31a59b76b978)

2024-05-17 Thread kernelci.org bot
kselftest/next kselftest-livepatch: 2 runs, 1 regressions (v6.9-8287-g31a59b76b978) This legacy KernelCI providing this report will shutdown sometime soon in favor of our new KernelCI infra. Not all tests are being migrated. If you are still using this report and want us to prioritize your

kselftest/next kselftest-lkdtm: 5 runs, 1 regressions (v6.9-8287-g31a59b76b978)

2024-05-17 Thread kernelci.org bot
kselftest/next kselftest-lkdtm: 5 runs, 1 regressions (v6.9-8287-g31a59b76b978) This legacy KernelCI providing this report will shutdown sometime soon in favor of our new KernelCI infra. Not all tests are being migrated. If you are still using this report and want us to prioritize your usecase in