[RFC PATCH v2 30/35] KVM: selftests: Add test to verify APIC MSR accesses for SAVIC guest

2025-09-22 Thread Neeraj Upadhyay
nsure correctness. Add savic_test.c, a new selftest designed to validate APIC MSR accesses in SAVIC mode. The test creates an SEV-SNP VM with SAVIC enabled and systematically performs rdmsr/wrmsr operations on a comprehensive set of APIC registers. The test verifies several key behaviors: * Ensure

[RFC PATCH v2 34/35] KVM: selftests: Add NMI test for SAVIC guests

2025-09-22 Thread Neeraj Upadhyay
NMIs : NMIs sent via the Interrupt Command Register (ICR) are handled by the guest's #VC handler, following the same INCOMPLETE_IPI exception path as regular IPIs. Add a comprehensive set of test cases to savic_test.c to validate this entire flow: * Verify that a host-injected NMI is correct

[PATCH 6.1 14/15] selftests: net: genetlink: add Netlink and Generic Netlink test suite

2025-09-20 Thread Yana Bashlykova
This commit introduces a comprehensive test suite for Netlink and Generic Netlink functionality. The tests cover: - Basic socket operations and protocol validation - Controller family resolution and policy checks - Multicast group communication - Error handling and edge cases - Socket option

Re: [PATCH net v5 4/4] selftest: netcons: add test for netconsole over bonded interfaces

2025-09-19 Thread Jakub Kicinski
k namespaces. The test sends kernel log messages and > verifies that they are properly received on the bonded RX interfaces > with both IPv4 and IPv6, and using basic and extended netconsole > formats. I'm not great at reading bash but I don't think this tests what we care about. We

Re: [PATCH bpf-next v2 2/3] selftests/bpf: Add test for overwrite ring buffer

2025-09-19 Thread Andrii Nakryiko
On Fri, Sep 5, 2025 at 8:13 AM Xu Kuohai wrote: > > From: Xu Kuohai > > Add test for overwiret mode ring buffer. The test creates a bpf ring > buffer in overwrite mode, then repeatlly reserves and commits data > to check if the ring buffer works as expected both before and

[PATCH V2 7/8] mshare: selftests: Add test case to demostrate the swapping of mshare memory

2025-09-19 Thread Yongting Lin
This case is quit simple by using madvise(MADV_PAGEOUT), but for verifying the memory size of being swappd, we need to setup the memcg and attach test process to this memcg before perform the test. Signed-off-by: Yongting Lin --- tools/testing/selftests/mshare/.gitignore | 1 + tools/testing

[PATCH V2 8/8] mshare: selftests: Add test case to demostrate that mshare partly supports THP

2025-09-19 Thread Yongting Lin
o THP or khuged to replace pages with THP. +*/ + ksft_print_msg("Tip: Please enable transparent hugepages for shmem before running this test.\n" + "For example: echo always > /sys/kernel/mm/transparent_hugepage/shmem_enabled\n"); + +

[PATCH V2 5/8] mshare: selftests: Add test case ioctl unmap

2025-09-19 Thread Yongting Lin
This test case aims to verify whether the guest VMA will vanish when corresponding VMA of host mm got ioctl unmap. Signed-off-by: Yongting Lin --- tools/testing/selftests/mshare/basic.c | 20 1 file changed, 20 insertions(+) diff --git a/tools/testing/selftests/mshare

[PATCH V2 4/8] mshare: selftests: Add test case shared memory

2025-09-19 Thread Yongting Lin
This test case aims to verify the basic functionalities of mshare. Create a mshare file and use ioctl to create mapping for host mm with supportive flags, then create processes to map mshare file to their memory space, and eventually verify the correctiness of sharing memory. To ensure these

Re: [PATCH bpf-next 4/5] selftests/bpf: sockmap_redir: Let test specify skel's redirect_type

2025-09-19 Thread Jakub Sitnicki
On Fri, Sep 05, 2025 at 01:11 PM +02, Michal Luczaj wrote: > Preparatory patch before adding SK_PASS/SK_DROP support: allow to > dynamically switch BPF program's redirect_type. This way, after setting up > for a redirection, test can make the BPF program skip the actual > bpf_{

[PATCH v2 0/11] RCU torture-test updates for v6.18

2025-09-18 Thread Paul E. McKenney
Hello! This series contains torture-test updates for v6.18: 1. Fix jitter.sh spin time. 2. Add --do-normal parameter to torture.sh help text. 3. Announce kernel boot status at torture-test startup. 4. Suppress "Writer stall state" reports during boot. 5.

[PATCH] kunit: test: Assert parsed_filters allocation in parse_filter_attr_test()

2025-09-18 Thread Guangshuo Li
kunit_kcalloc() may fail. parse_filter_attr_test() uses the returned pointer without checking it, and then writes to parsed_filters[j], which can lead to a NULL pointer dereference under low-memory conditions. Use KUNIT_ASSERT_NOT_ERR_OR_NULL() to abort the test on allocation failure, per KUnit

[PATCH net v5 4/4] selftest: netcons: add test for netconsole over bonded interfaces

2025-09-18 Thread Breno Leitao
This patch adds a selftest that verifies netconsole functionality over bonded network interfaces using netdevsim. It sets up two bonded interfaces acting as transmit (TX) and receive (RX) ends, placed in separate network namespaces. The test sends kernel log messages and verifies that they are

[PATCH net v5 3/4] selftest: netcons: create a torture test

2025-09-18 Thread Breno Leitao
Create a netconsole test that puts a lot of pressure on the netconsole list manipulation. Do it by creating dynamic targets and deleting targets while messages are being sent. Also put interface down while the messages are being sent, as creating parallel targets. The code launches three

[PATCH v2 03/11] torture: Announce kernel boot status at torture-test startup

2025-09-18 Thread Paul E. McKenney
Sometimes a given system takes surprisingly long to boot, for example, in one recent case, 70 seconds instead of three seconds. It would be good to fix these slow-boot issues, but it would also be good for the torture tests to announce that the system was still booting at the start of the test

Re: [PATCH] selftests/futex: Conditionally run futex_numa_mpol test

2025-09-17 Thread André Almeida
Em 08/09/2025 08:37, Wake Liu escreveu: The futex_numa_mpol test requires libnuma, which is not available on all platforms. When the test is not built, the run.sh script fails because it unconditionally tries to execute the test binary. Check for the futex_numa_mpol executable before running it

Re: [PATCH net-next v6] selftests: net: add test for ipv6 fragmentation

2025-09-17 Thread patchwork-bot+netdevbpf
ot;) was backported to > stable without some prerequisite commits. This caused a regression when > sending IPv6 UDP packets by preventing fragmentation and instead > returning -1 (EMSGSIZE). > > [...] Here is the summary with links: - [net-next,v6] selftests: net: add

[PATCH 4/4] KVM: selftests: Add a VMX test for LA57 nested state

2025-09-17 Thread Jim Mattson
-0,0 +1,137 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * vmx_la57_nested_state_test + * + * Copyright (C) 2025, Google LLC. + * + * Test KVM's ability to save and restore nested state when the L1 guest + * is using 5-level paging and the L2 guest is using 4-level paging. + * + * This

[PATCH 0/4] KVM: selftests: Add test of SET_NESTED_STATE with 48-bit L2 on 57-bit L1

2025-09-17 Thread Jim Mattson
eater than 48 bits wide. Add a regression test that reproduces the KVM_SET_NESTED_STATE failure conditions. To do so, the first three patches add support for 5-level paging in the selftest L1 VM. Jim Mattson (4): KVM: selftests: Use a loop to create guest page tables KVM: selftests: Use a lo

[PATCH] selftests/futex: Conditionally run futex_numa_mpol test

2025-09-17 Thread Wake Liu
The futex_numa_mpol test requires libnuma, which is not available on all platforms. When the test is not built, the run.sh script fails because it unconditionally tries to execute the test binary. Check for the futex_numa_mpol executable before running it. If the binary is not present, print a

[PATCH net v4 3/4] selftest: netcons: create a torture test

2025-09-17 Thread Breno Leitao
Create a netconsole test that puts a lot of pressure on the netconsole list manipulation. Do it by creating dynamic targets and deleting targets while messages are being sent. Also put interface down while the messages are being sent, as creating parallel targets. The code launches three

Re: [PATCH net v4 4/4] selftest: netcons: add test for netconsole over bonded interfaces

2025-09-17 Thread Breno Leitao
On Wed, Sep 17, 2025 at 09:13:09AM -0700, Jakub Kicinski wrote: > On Wed, 17 Sep 2025 05:51:45 -0700 Breno Leitao wrote: > > tools/testing/selftests/drivers/net/Makefile | 1 + > > .../selftests/drivers/net/lib/sh/lib_netcons.sh| 167 > > +++-- > > .../selftests/driver

Re: [PATCH net v4 4/4] selftest: netcons: add test for netconsole over bonded interfaces

2025-09-17 Thread Jakub Kicinski
On Wed, 17 Sep 2025 05:51:45 -0700 Breno Leitao wrote: > tools/testing/selftests/drivers/net/Makefile | 1 + > .../selftests/drivers/net/lib/sh/lib_netcons.sh| 167 > +++-- > .../selftests/drivers/net/netcons_over_bonding.sh | 76 ++ We need to add bonding to

[PATCH net v4 4/4] selftest: netcons: add test for netconsole over bonded interfaces

2025-09-17 Thread Breno Leitao
This patch adds a selftest that verifies netconsole functionality over bonded network interfaces using netdevsim. It sets up two bonded interfaces acting as transmit (TX) and receive (RX) ends, placed in separate network namespaces. The test sends kernel log messages and verifies that they are

Re: [PATCH] KVM: selftests: Fix typo in hyperv cpuid test message

2025-09-15 Thread Sean Christopherson
On Sun, 24 Aug 2025 11:16:40 -0700, Alok Tiwari wrote: > Fix a typo in hyperv_cpuid.c test assertion log: > replace "our of supported range" -> "out of supported range". Applied to kvm-x86 selftests, thanks! [1/1] KVM: selftests: Fix typo in hyperv cpuid test message

[PATCH v21 8/8] selftests/clone3: Test shadow stack support

2025-09-15 Thread Mark Brown
Add basic test coverage for specifying the shadow stack for a newly created thread via clone3(), including coverage of the newly extended argument structure. We check that a user specified shadow stack can be provided, and that invalid combinations of parameters are rejected. In order to

[PATCH 2/2] selftests: bonding: add ipsec offload test

2025-09-15 Thread Hangbin Liu
This introduces a test for IPSec offload over bonding, utilizing netdevsim for the testing process, as veth interfaces do not support IPSec offload. The test will ensure that the IPSec offload functionality remains operational even after a failover event occurs in the bonding configuration. Here

Re: [PATCH net 2/2] selftests: openvswitch: add a simple test for tunnel metadata

2025-09-13 Thread Aaron Conole
Ilya Maximets writes: > This test ensures that upon receiving decapsulated packets from a > tunnel interface in openvswitch, the tunnel metadata fields are > properly populated. This partially covers interoperability of the > kernel tunnel ports and openvswitch tunnels (LWT) and

Re: [PATCH] selftests/futex: Conditionally run futex_numa_mpol test

2025-09-12 Thread Sebastian Andrzej Siewior
On 2025-09-08 19:37:20 [+0800], Wake Liu wrote: > The futex_numa_mpol test requires libnuma, which is not available on > all platforms. When the test is not built, the run.sh script fails > because it unconditionally tries to execute the test binary. > > Check for the futex_numa_

Re: [PATCH 6.1 00/15] genetlink: Test Netlink subsystem of Linux v6.1

2025-09-12 Thread Jakub Kicinski
On Fri, 12 Sep 2025 22:53:23 +0300 Yana Bashlykova wrote: > This series adds comprehensive testing infrastructure for Netlink > and Generic Netlink > > The implementation includes both kernel module and userspace tests to > verify correct Generic Netlink and Netlink behaviors under > various condi

[PATCH 6.1 13/15] selftests: net: genetlink: add large family ID resolution test

2025-09-12 Thread Yana Bashlykova
Add test case for resolving family IDs of large Generic Netlink families (those with 199+ multicast groups): 1. Tests that standard genl_ctrl_resolve() may fail due to: - Response size exceeding single message limit - Implementation expecting single response 2. Verifies custom

[PATCH 6.1 10/15] selftests: net: genetlink: add packet capture test infrastructure

2025-09-12 Thread Yana Bashlykova
Add test cases for monitoring Netlink traffic during test execution Require CONFIG_NLMON. Signed-off-by: Yana Bashlykova --- tools/testing/selftests/net/Makefile| 6 + tools/testing/selftests/net/genetlink.c | 234 2 files changed, 240 insertions(+) create mode

[PATCH v3 0/3] Fix va_high_addr_switch.sh test failure

2025-09-11 Thread Chunyu Hu
The three patches fix the va_high_addr_switch.sh test failure on x86_64. Patch 1 fixes the hugepage setup issue that nr_hugepages is reset too early in run_vmtests.sh and break the later va_high_addr_switch testing. Patch 2 adds hugepage setup in va_high_addr_switch test, so that it can still

[PATCH v3 2/3] selftests/mm: alloc hugepages in va_high_addr_switch test

2025-09-11 Thread Chunyu Hu
Alloc hugepages in the test internally, so we don't fully rely on the run_vmtests.sh. If run_vmtests.sh does that great, free hugepages is enough for being used to run the test, leave it as it is, otherwise setup the hugepages in the test. Save the original nr_hugepages value and restore it

[PATCH v2 2/2] selftests/mm/uffd-stress: stricten constraint on free hugepages needed before the test

2025-09-09 Thread Dev Jain
The test requires at least 2 * (bytes/page_size) hugetlb memory, since we require identical number of hugepages for src and dst location. Fix this. Along with the above, as explained in patch "selftests/mm/uffd-stress: Make test operate on less hugetlb memory", the racy nature o

Re: [PATCH RFC net-next 3/5] selftests: drv-net: Test XDP head adjustment with bpf_dynptr

2025-09-09 Thread Martin KaFai Lau
dynptr_read() and then bpf_dynptr_write(), try to use bpf_dynptr_copy(). I think you have also noticed that Amery is also modifying xdp_native.bpf.c to test the linear access (i.e. data/data_end) with the bpf_xdp_pull_data addition. Not sure if xdp_native.bpf.c wants to keep testing both (data/da

[PATCH net v2 2/2] selftests: openvswitch: add a simple test for tunnel metadata

2025-09-09 Thread Ilya Maximets
This test ensures that upon receiving decapsulated packets from a tunnel interface in openvswitch, the tunnel metadata fields are properly populated. This partially covers interoperability of the kernel tunnel ports and openvswitch tunnels (LWT) and parsing and formatting of the tunnel metadata

[PATCH RFC net-next 3/5] selftests: drv-net: Test XDP head adjustment with bpf_dynptr

2025-09-09 Thread Nimrod Oren
Update xdp_adjst_head_shrnk_data to use bpf_dynptr_slice to read the data right after the headers, instead of bpf_xdp_load_bytes. This may avoid a copy by returning a direct pointer to the dynptr data. Also, use bpf_dynptr_read and bpf_dynptr_write to move the headers, instead of bpf_xdp_load_byt

[PATCH RFC net-next 2/5] selftests: drv-net: Test XDP tail adjustment with bpf_dynptr

2025-09-09 Thread Nimrod Oren
Update xdp_adjst_tail_shrnk_data to use bpf_dynptr_slice to read the data at the end of the packet, instead of bpf_xdp_load_bytes. This may avoid a copy by returning a direct pointer to the dynptr data. Note: since bpf_dynptr_slice() does not support variable lengths, we use MAX_ADJST_OFFSET as t

[PATCH RFC net-next 1/5] selftests: drv-net: Test XDP_TX with bpf_dynptr

2025-09-09 Thread Nimrod Oren
Update xdp_mode_tx_handler to use bpf_dynptr_slice_rdwr instead of accessing the packet data directly. This makes the test viable for drivers that do not store any packet data in the linear part when in multi-buffer mode. While here, remove the unused local min() helper. Signed-off-by: Nimrod

[PATCH v2 1/2] selftests/mm/uffd-stress: make test operate on less hugetlb memory

2025-09-08 Thread Dev Jain
particular case, the number of free hugepages from run_vmtests.sh will be 128, and the test will allocate 64 hugepages in the source location. The stress() function will start spawning threads which will operate on the destination location, triggering uffd-operations like UFFDIO_COPY from src to dst

[PATCH 5/5] KVM: selftests: Add nested VMX APIC cache invalidation test

2025-09-08 Thread Fred Griffoul
From: Fred Griffoul Introduce selftest to verify nested VMX APIC virtualization page cache invalidation and refresh mechanisms for pfncache implementation. The test exercises the nested VMX APIC cache invalidation path through: - L2 guest setup: creates a nested environment where L2 accesses

Re: [PATCH net v3 3/3] selftest: netcons: create a torture test

2025-09-08 Thread Simon Horman
On Fri, Sep 05, 2025 at 10:25:09AM -0700, Breno Leitao wrote: > Create a netconsole test that puts a lot of pressure on the netconsole > list manipulation. Do it by creating dynamic targets and deleting > targets while messages are being sent. Also put interface down while the > messag

Re: [PATCH v2] selftests: arm64: Fix -Waddress warning in tpidr2 test

2025-09-08 Thread Will Deacon
On Thu, 07 Aug 2025 17:12:29 +0530, Bala-Vignesh-Reddy wrote: > Resolve compiler warning about always true condition in ksft_test_result > in tpidr2, passing actual function. > > This silences -Waddress warning while maintaining test functionality. > > Fixes compiler warning

[PATCH v2 2/3] selftests/mm: alloc hugepages in va_high_addr_switch test

2025-09-08 Thread Chunyu Hu
Alloc hugepages in the test internally, so we don't fully rely on the run_vmtests.sh. If run_vmtests.sh does that great, free hugepages is enough for being used to run the test, leave it as it is, otherwise setup the hugepages in the test. Save the original nr_hugepages value and restore it

[PATCH v2 0/3] Fix va_high_addr_switch.sh test failure

2025-09-08 Thread Chunyu Hu
The three patches fix the va_high_addr_switch.sh test failure on x86_64. Patch 1 fixes the hugepage setup issue that nr_hugepages is reset too early in run_vmtests.sh and break the later va_high_addr_switch testing. Patch 2 adds hugepage setup in va_high_addr_switch test, so that it can still

[PATCH bpf-next v2 2/3] selftests/bpf: Add test for overwrite ring buffer

2025-09-07 Thread Xu Kuohai
From: Xu Kuohai Add test for overwiret mode ring buffer. The test creates a bpf ring buffer in overwrite mode, then repeatlly reserves and commits data to check if the ring buffer works as expected both before and after overwrite happens. Signed-off-by: Xu Kuohai --- tools/testing/selftests

Re: [PATCH net-next] selftest: netcons: create a torture test

2025-09-07 Thread Breno Leitao
selftest will be posted later" in the fix I thought > you meant days, not hours later :) It's better if the fix and test are > in one series. Oh, I remember I read somewhere that new tests usually go to net-next, and the fix goes to `net` That is why I split them. In fact, the t

[PATCH net v3 3/3] selftest: netcons: create a torture test

2025-09-07 Thread Breno Leitao
Create a netconsole test that puts a lot of pressure on the netconsole list manipulation. Do it by creating dynamic targets and deleting targets while messages are being sent. Also put interface down while the messages are being sent, as creating parallel targets. The code launches three

[PATCH bpf-next v3 04/14] selftests/bpf: test_xsk: Wrap test clean-up in functions

2025-09-05 Thread Bastien Curutchet (eBPF Foundation)
The clean-up done at the end of a test in __testapp_validate_traffic() isn't wrapped in a function. It isn't convenient if we want to use it somewhere else in the code. Wrap the clean-up in two new functions : the first deletes the sockets, the second releases the umem. Signed-off-b

[PATCH bpf-next 0/5] selftests/bpf: Extend sockmap_redir to test no-redir SK_DROP/SK_PASS

2025-09-05 Thread Michal Luczaj
sockmap_redir was introduced to comprehensively test the BPF redirection. This series strives to increase the tested sockmap/sockhash code coverage; adds support for skipping the actual redirect part, allowing to simply SK_DROP or SK_PASS the packet. BPF_MAP_TYPE_SOCKMAP BPF_MAP_TYPE_SOCKHASH

Re: [PATCH net-next v2 0/2] net: selftest: Introduce netconsole torture test

2025-09-05 Thread Breno Leitao
On Thu, Sep 04, 2025 at 02:59:25PM -0700, Jakub Kicinski wrote: > On Thu, 04 Sep 2025 11:00:39 -0700 Breno Leitao wrote: > > Create a netconsole test that puts a lot of pressure on the netconsole > > list manipulation. Do it by creating dynamic targets and deleting > > targe

[PATCH bpf-next 4/5] selftests/bpf: sockmap_redir: Let test specify skel's redirect_type

2025-09-05 Thread Michal Luczaj
Preparatory patch before adding SK_PASS/SK_DROP support: allow to dynamically switch BPF program's redirect_type. This way, after setting up for a redirection, test can make the BPF program skip the actual bpf_{sk,msg}_redirect_{map,hash} part and return a specified verdict. Signed-off-by: M

[PATCH net 2/2] selftests: openvswitch: add a simple test for tunnel metadata

2025-09-05 Thread Ilya Maximets
This test ensures that upon receiving decapsulated packets from a tunnel interface in openvswitch, the tunnel metadata fields are properly populated. This partially covers interoperability of the kernel tunnel ports and openvswitch tunnels (LWT) and parsing and formatting of the tunnel metadata

Re: [PATCH net-next v2 2/2] selftest: netcons: create a torture test

2025-09-05 Thread Andre Carvalho
On Thu, Sep 04, 2025 at 11:00:41AM -0700, Breno Leitao wrote: > +# This test aims verify the robustness of netconsole under dynamic > +# configurations and concurrent operations. Just a small nit: "aims to verify" or simply "verifies". Reviewed-by: Andre Carvalho

Re: [PATCH net-next v2 0/2] net: selftest: Introduce netconsole torture test

2025-09-04 Thread Jakub Kicinski
On Thu, 04 Sep 2025 11:00:39 -0700 Breno Leitao wrote: > Create a netconsole test that puts a lot of pressure on the netconsole > list manipulation. Do it by creating dynamic targets and deleting > targets while messages are being sent. Also put interface down while the > > In

[PATCH net-next v2 0/2] net: selftest: Introduce netconsole torture test

2025-09-04 Thread Breno Leitao
Create a netconsole test that puts a lot of pressure on the netconsole list manipulation. Do it by creating dynamic targets and deleting targets while messages are being sent. Also put interface down while the In order to do it, refactor create_dynamic_target(), so it can be used to create random

[PATCH net-next v2 2/2] selftest: netcons: create a torture test

2025-09-04 Thread Breno Leitao
Create a netconsole test that puts a lot of pressure on the netconsole list manipulation. Do it by creating dynamic targets and deleting targets while messages are being sent. Also put interface down while the messages are being sent, as creating parallel targets. The code launches three

[PATCH v10 21/21] KVM: selftests: Add TDX lifecycle test

2025-09-04 Thread Sagi Shahar
Adding a test to verify TDX lifecycle by creating a simple TD. Signed-off-by: Sagi Shahar --- tools/testing/selftests/kvm/Makefile.kvm | 1 + .../selftests/kvm/include/x86/tdx/tdx_util.h | 10 ++ .../selftests/kvm/lib/x86/tdx/tdx_util.c | 18 +++ tools/testing/selftests

Re: [PATCH net-next] selftest: netcons: create a torture test

2025-09-04 Thread Jakub Kicinski
On Tue, 02 Sep 2025 09:33:33 -0700 Breno Leitao wrote: > Create a netconsole test that puts a lot of pressure on the netconsole > list manipulation. Do it by creating dynamic targets and deleting > targets while messages are being sent. Also put interface down while the > messages ar

Re: [PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases

2025-09-04 Thread Dong Yang
On Tue, Sep 02, 2025 at 10:36:10AM -0500, Andrew Jones wrote: > On Mon, Sep 01, 2025 at 03:35:48PM +0800, dayss1...@gmail.com wrote: > > From: Dong Yang > > > > Add supported KVM test cases and fix the compilation dependencies. > > --- > > Changes in v3: &

[PATCH net-next v6] selftests: net: add test for ipv6 fragmentation

2025-09-03 Thread Brett A C Sheffield
bytes sent correctly on a working kernel, and returns -1 + * (EMSGSIZE) when the regression is present. + * + * The regression was not present in the mainline kernel, but add this test to + * catch similar breakage in future. + */ + +#define _GNU_SOURCE + +#include +#include +#include +#includ

Re: [PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases

2025-09-03 Thread Anup Patel
On Mon, Sep 1, 2025 at 1:06 PM wrote: > > From: Dong Yang > > Add supported KVM test cases and fix the compilation dependencies. > --- > Changes in v3: > - Reorder patches to fix build dependencies > - Sort common supported test cases alphabetically > - Move ucall_c

Re: [PATCH net-next v5] selftests: net: add test for ipv6 fragmentation

2025-09-03 Thread Willem de Bruijn
ut some prerequisite commits. > + * > + * This caused a regression when sending IPv6 UDP packets by preventing > + * fragmentation and instead returning -1 (EMSGSIZE). > + * > + * This selftest demonstrates the issue by sending an IPv6 UDP packet to > + * localhost (::1) o

[PATCH v2 2/2] selftests/mm: split_huge_page_test: cleanups for split_pte_mapped_thp test

2025-09-03 Thread David Hildenbrand
There is room for improvement, so let's clean up a bit: (1) Define "4" as a constant. (2) SKIP if we fail to allocate all THPs (e.g., fragmented) and add recovery code for all other failure cases: no need to exit the test. (3) Rename "len" to thp_area_size, and &quo

[PATCH bpf-next v2 2/2] selftests/bpf: Test kfunc bpf_strcasecmp

2025-09-03 Thread Rong Tao
From: Rong Tao Add testsuites for kfunc bpf_strcasecmp. Signed-off-by: Rong Tao --- tools/testing/selftests/bpf/progs/string_kfuncs_failure1.c | 6 ++ tools/testing/selftests/bpf/progs/string_kfuncs_failure2.c | 1 + tools/testing/selftests/bpf/progs/string_kfuncs_success.c | 5 + 3 f

Re: [External] Re: [PATCH 4/8] mshare: selftests: Add test case shared memory

2025-09-03 Thread Yongting Lin
On Fri, Aug 29, 2025 at 9:00 AM Anthony Yznaga wrote: > > Hi Yongting, > > Thank you for doing this. This is a great start for testing mshare. > I do have some comments below. > > On 8/25/25 7:57 AM, Yongting Lin wrote: > > This test case aims to verify the basi

[PATCH bpf-next v3 2/2] selftests/bpf: Test kfunc bpf_strcasecmp

2025-09-03 Thread Rong Tao
From: Rong Tao Add testsuites for kfunc bpf_strcasecmp. Signed-off-by: Rong Tao --- tools/testing/selftests/bpf/prog_tests/string_kfuncs.c | 1 + tools/testing/selftests/bpf/progs/string_kfuncs_failure1.c | 6 ++ tools/testing/selftests/bpf/progs/string_kfuncs_failure2.c | 1 + tools/t

[PATCH v2 2/2] selftests/mm: split_huge_page_test: cleanups for split_pte_mapped_thp test

2025-09-03 Thread David Hildenbrand
There is room for improvement, so let's clean up a bit: (1) Define "4" as a constant. (2) SKIP if we fail to allocate all THPs (e.g., fragmented) and add recovery code for all other failure cases: no need to exit the test. (3) Rename "len" to thp_area_size, and &quo

[PATCH bpf-next v2 04/14] selftests/bpf: test_xsk: Wrap test clean-up in functions

2025-09-02 Thread Bastien Curutchet (eBPF Foundation)
The clean-up done at the end of a test in __testapp_validate_traffic() isn't wrapped in a function. It isn't convenient if we want to use it somewhere else in the code. Wrap the clean-up in two new functions : the first deletes the sockets, the second releases the umem. Signed-off-b

Re: [PATCH bpf-next v2 2/2] selftests/bpf: Test kfunc bpf_strcasecmp

2025-09-02 Thread Viktor Malik
n bpf_strchrnul(invalid_kern_ptr, 'a'); } > SEC("syscall") __retval(-EFAULT) int test_strnchr_pagefault(void *ctx) { > return bpf_strnchr(invalid_kern_ptr, 1, 'a'); } > diff --git a/tools/testing/selftests/bpf/progs/string_kfuncs_failure2.c > b/tools/t

Re: [PATCH v3] selftests/tty: add TIOCSTI test suite

2025-09-02 Thread Abhinav Saxena
t;> — a/tools/testing/selftests/tty/Makefile >> +++ b/tools/testing/selftests/tty/Makefile >> @@ -1,5 +1,9 @@ >> # SPDX-License-Identifier: GPL-2.0 >> CFLAGS = -O2 -Wall >> -TEST_GEN_PROGS := tty_tstamp_update >> +TEST_GEN_PROGS := tty_tstamp_up

[PATCH bpf-next v4 2/2] selftests/bpf: Test kfunc bpf_strcasecmp

2025-09-02 Thread Rong Tao
From: Rong Tao Add testsuites for kfunc bpf_strcasecmp. Signed-off-by: Rong Tao --- tools/testing/selftests/bpf/prog_tests/string_kfuncs.c | 1 + tools/testing/selftests/bpf/progs/string_kfuncs_failure1.c | 6 ++ tools/testing/selftests/bpf/progs/string_kfuncs_failure2.c | 1 + tools/t

Re: [External] Re: [PATCH 4/8] mshare: selftests: Add test case shared memory

2025-09-02 Thread Anthony Yznaga
On 9/1/25 5:50 AM, Yongting Lin wrote: On Fri, Aug 29, 2025 at 9:00 AM Anthony Yznaga wrote: Hi Yongting, Thank you for doing this. This is a great start for testing mshare. I do have some comments below. On 8/25/25 7:57 AM, Yongting Lin wrote: This test case aims to verify the basic

Re: [PATCH v2 2/2] selftests/mm: split_huge_page_test: cleanups for split_pte_mapped_thp test

2025-09-02 Thread Wei Yang
ailure cases: no need to exit the test. > >(3) Rename "len" to thp_area_size, and "one_page" to "thp_area". > >(4) Allocate a new area "page_area" into which we will mremap the >pages; add "page_area_size". Now we can easily merge t

[PATCH net-next] selftest: netcons: create a torture test

2025-09-02 Thread Breno Leitao
Create a netconsole test that puts a lot of pressure on the netconsole list manipulation. Do it by creating dynamic targets and deleting targets while messages are being sent. Also put interface down while the messages are being sent, as creating parallel targets. The code launches three

[PATCH net-next v5] selftests: net: add test for ipv6 fragmentation

2025-09-02 Thread Brett A C Sheffield
ion and instead returning -1 (EMSGSIZE). + * + * This selftest demonstrates the issue by sending an IPv6 UDP packet to + * localhost (::1) on the loopback interface from the autoconfigured link-local + * address. + * + * sendmsg(2) returns bytes sent correctly on a working kernel, and returns -1 + *

Re: [PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases

2025-09-02 Thread Andrew Jones
On Mon, Sep 01, 2025 at 03:35:48PM +0800, dayss1...@gmail.com wrote: > From: Dong Yang > > Add supported KVM test cases and fix the compilation dependencies. > --- > Changes in v3: > - Reorder patches to fix build dependencies > - Sort common supported test cases al

[PATCH v20 8/8] selftests/clone3: Test shadow stack support

2025-09-02 Thread Mark Brown
Add basic test coverage for specifying the shadow stack for a newly created thread via clone3(), including coverage of the newly extended argument structure. We check that a user specified shadow stack can be provided, and that invalid combinations of parameters are rejected. In order to

Re: [PATCH bpf-next v2 2/2] selftests/bpf: Test kfunc bpf_strcasecmp

2025-09-02 Thread Rong Tao
b/tools/testing/selftests/bpf/progs/string_kfuncs_failure2.c index 89fb4669b0e9..e41cc5601994 100644 --- a/tools/testing/selftests/bpf/progs/string_kfuncs_failure2.c +++ b/tools/testing/selftests/bpf/progs/string_kfuncs_failure2.c @@ -7,6 +7,7 @@ char long_str[XATTR_SIZE_MAX + 1]; SEC(&quo

Re: [PATCH bpf-next 2/2] selftests/bpf: Test kfunc bpf_strcasecmp

2025-09-02 Thread Viktor Malik
bpf_strcmp(str, "hello > world"); } > __test(1) int test_strcmp_neq(void *ctx) { return bpf_strcmp(str, "hello"); } > +__test(0) int test_strcasecmp_eq1(void *ctx) { return bpf_strcasecmp(str, > "hello world"); } > +__test(0) int test_strcasecmp_eq2(void *ctx) { return bpf_strcasecmp(str, > "HELLO WORLD"); } > +__test(0) int test_strcasecmp_eq3(void *ctx) { return bpf_strcasecmp(str, > "HELLO world"); } > +__test(1) int test_strcasecmp_neq1(void *ctx) { return bpf_strcasecmp(str, > "hello"); } > +__test(1) int test_strcasecmp_neq2(void *ctx) { return bpf_strcasecmp(str, > "HELLO"); } > __test(1) int test_strchr_found(void *ctx) { return bpf_strchr(str, 'e'); } > __test(11) int test_strchr_null(void *ctx) { return bpf_strchr(str, '\0'); } > __test(-ENOENT) int test_strchr_notfound(void *ctx) { return bpf_strchr(str, > 'x'); } Missing a test for returning -E2BIG in tools/testing/selftests/bpf/progs/string_kfuncs_failure2.c. Viktor

[PATCH bpf-next 2/2] selftests/bpf: Test kfunc bpf_strcasecmp

2025-09-01 Thread Rong Tao
From: Rong Tao Add testsuites for kfunc bpf_strcasecmp. Signed-off-by: Rong Tao --- tools/testing/selftests/bpf/progs/string_kfuncs_failure1.c | 6 ++ tools/testing/selftests/bpf/progs/string_kfuncs_success.c | 5 + 2 files changed, 11 insertions(+) diff --git a/tools/testing/selftes

Re: [PATCH net-next v4] selftests: net: add test for ipv6 fragmentation

2025-09-01 Thread Willem de Bruijn
Brett A C Sheffield wrote: > Add selftest for the IPv6 fragmentation regression which affected > several stable kernels. > > Commit a18dfa9925b9 ("ipv6: save dontfrag in cork") was backported to > stable without some prerequisite commits. This caused a regression when > sending IPv6 UDP packets b

Re: [PATCH net-next v4] selftests: net: add test for ipv6 fragmentation

2025-09-01 Thread Jakub Kicinski
On Mon, 1 Sep 2025 12:37:14 + Brett A C Sheffield wrote: > +static int setup(void) > +{ > + struct ifreq ifr = { > + .ifr_name = "lo" > + }; > + int fd = -1; > + int ctl; > + > + /* we need to set MTU, so do this in a namespace to play nicely */ > + if (unsh

[PATCH net-next v4] selftests: net: add test for ipv6 fragmentation

2025-09-01 Thread Brett A C Sheffield
GSIZE) when the regression is present. + * + * The regression was not present in the mainline kernel, but add this test to + * catch similar breakage in future. + */ + +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#includ

[PATCH net-next v3] selftests: net: add test for ipv6 fragmentation

2025-09-01 Thread Brett A C Sheffield
s not present in the mainline kernel, but add this test to + * catch similar breakage in future. + */ + +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../kselftest.h" + +#de

[PATCH v3 3/3] KVM: riscv: selftests: Add common supported test cases

2025-09-01 Thread dayss1224
From: Quan Zhou Some common KVM test cases are supported on riscv now as following: access_tracking_perf_test dirty_log_perf_test memslot_modification_stress_test memslot_perf_test mmu_stress_test rseq_test Signed-off-by: Quan Zhou Signed-off-by: Dong Yang --- tools

[PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases

2025-09-01 Thread dayss1224
From: Dong Yang Add supported KVM test cases and fix the compilation dependencies. --- Changes in v3: - Reorder patches to fix build dependencies - Sort common supported test cases alphabetically - Move ucall_common.h include from common header to specific source files Changes in v2: - Delete

Re: [PATCH net-next v2] selftests: net: add test for ipv6 fragmentation

2025-08-31 Thread Willem de Bruijn
is selftest demonstrates the issue by sending an IPv6 UDP packet from > + * the autoconfigured link-local address to an arbritrary multicast group. > + * > + * sendmsg(2) returns bytes sent correctly on a working kernel, and returns > -1 > + * (EMSGSIZE) when the regression is present

Re: [PATCH net-next] selftests: net: add test for ipv6 fragmentation

2025-08-31 Thread Willem de Bruijn
preventing > + * fragmentation and instead returning -1 (EMSGSIZE). > + * > + * This selftest demonstrates the issue. sendmsg returns correctly (8192) > + * on a working kernel, and returns -1 (EMSGSIZE) when the regression is > + * present. > + * > + * The regression was not p

[PATCH net-next v2] selftests: net: add test for ipv6 fragmentation

2025-08-31 Thread Brett A C Sheffield
the regression is present. + * + * The regression was not present in the mainline kernel, but add this test to + * catch similar breakage in future. + */ + +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#inclu

Re: [PATCH net-next v2] vsock/test: Remove redundant semicolons

2025-08-29 Thread patchwork-bot+netdevbpf
s the summary with links: - [net-next,v2] vsock/test: Remove redundant semicolons https://git.kernel.org/netdev/net-next/c/2a63607bfda9 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html

Re: [PATCH 1/2] selftests/mm/uffd-stress: Make test operate on less hugetlb memory

2025-08-29 Thread Dev Jain
-common.c:617) [FAIL] not ok 18 uffd-stress hugetlb-private 128 32 # exit=1 For this particular case, the number of free hugepages from run_vmtests.sh will be 128, and the test will allocate 64 hugepages in the source location. The stress() function will start spawning threads which will operate on the

Re: [PATCH 8/8] mshare: selftests: Add test case to demostrate that mshare doesn't support THP

2025-08-28 Thread Anthony Yznaga
On 8/25/25 7:57 AM, Yongting Lin wrote: This case is quit simple by using madvise(MADV_HUGEPAGE), but for verifying the size of THP memory, we need to setup the memcg and attach test process to this memcg before perform the test. Because mshare doesn't support THP feature, the size o

Re: [PATCH 4/8] mshare: selftests: Add test case shared memory

2025-08-28 Thread Anthony Yznaga
Hi Yongting, Thank you for doing this. This is a great start for testing mshare. I do have some comments below. On 8/25/25 7:57 AM, Yongting Lin wrote: This test case aims to verify the basic functionalities of mshare. Create a mshare file and use ioctl to create mapping for host mm with

Re: [PATCH 1/2] selftests/mm/uffd-stress: Make test operate on less hugetlb memory

2025-08-28 Thread Ryan Roberts
] > not ok 18 uffd-stress hugetlb-private 128 32 # exit=1 > > For this particular case, the number of free hugepages from run_vmtests.sh > will be 128, and the test will allocate 64 hugepages in the source > location. The stress() function will start spawning threads which will >

[PATCH] selftests/filesystems: Skip file_stressor test on NFS root

2025-08-28 Thread Anders Roxell
The file_stressor test creates directories in the root filesystem and performs mount namespace operations that can fail on NFS root filesystems due to network filesystem restrictions and permission limitations. Add NFS root filesystem detection using statfs() to check for NFS_SUPER_MAGIC and skip

Re: [PATCH net-next v2] vsock/test: Remove redundant semicolons

2025-08-28 Thread Stefano Garzarella
On Thu, Aug 28, 2025 at 04:39:38PM +0800, Liao Yuanhong wrote: Remove unnecessary semicolons. Signed-off-by: Liao Yuanhong --- Changes in v2: - Remove fixes tag. --- tools/testing/vsock/util.c | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Stefano Garzarella Thanks, Stefano dif

[PATCH net-next v2] vsock/test: Remove redundant semicolons

2025-08-28 Thread Liao Yuanhong
Remove unnecessary semicolons. Signed-off-by: Liao Yuanhong --- Changes in v2: - Remove fixes tag. --- tools/testing/vsock/util.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/vsock/util.c b/tools/testing/vsock/util.c index 7b861a8e997a..d843643ced6b 100644 --- a/tools

[PATCH] selftests/seccomp: Change the syscall used in KILL_THREAD test to getppid

2025-08-28 Thread Ryuichiro Chiba
pthread_create provided by the bionic libc uses getpid internally. Therefore using getpid as the filter target may cause the test to fail. This hasn't been a problem because bionic caches the pid and doesn't call the actual syscall. However we are planning to stop the pid caching and it

  1   2   3   4   5   6   7   8   9   10   >