[PATCH] selftests: livepatch: add test case of stack_order sysfs interface

2024-10-07 Thread Wardenjohn
Add test case of stack_order sysfs interface of livepatch. Signed-off-by: Wardenjohn --- .../testing/selftests/livepatch/test-sysfs.sh | 24 +++ 1 file changed, 24 insertions(+) diff --git a/tools/testing/selftests/livepatch/test-sysfs.sh b/tools/testing/selftests/livepatch

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

2024-10-05 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 net v5] selftests: net: no_forwarding: fix VID for $swp2 in one_bridge_two_pvids() test

2024-10-04 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski : On Wed, 2 Oct 2024 14:10:16 +0900 you wrote: > Currently, the second bridge command overwrites the first one. > Fix this by adding this VID to the interface behind $swp2. > > The one_bridge_two_pvids() tes

Re: [PATCH V2 13/13] selftests/resctrl: Keep results from first test run

2024-10-04 Thread Reinette Chatre
t;> avg_diff = (float)labs(avg_bw_resc - avg_bw_imc) / avg_bw_imc; >> avg_diff_per = (int)(avg_diff * 100); > > While the patch itself is fine, I notice the code has this magic number > gem too: > > unsigned long bw_imc[1024], bw_resc[1024]; That cou

[PATCH AUTOSEL 6.6 01/58] selftests/bpf: Fix ARG_PTR_TO_LONG {half-,}uninitialized test

2024-10-04 Thread Sasha Levin
From: Daniel Borkmann [ Upstream commit b8e188f023e07a733b47d5865311ade51878fe40 ] The assumption of 'in privileged mode reads from uninitialized stack locations are permitted' is not quite correct since the verifier was probing for read access rather than write access. Both tests need to be ann

[PATCH AUTOSEL 6.10 02/70] selftests/bpf: Fix ARG_PTR_TO_LONG {half-,}uninitialized test

2024-10-04 Thread Sasha Levin
From: Daniel Borkmann [ Upstream commit b8e188f023e07a733b47d5865311ade51878fe40 ] The assumption of 'in privileged mode reads from uninitialized stack locations are permitted' is not quite correct since the verifier was probing for read access rather than write access. Both tests need to be ann

[PATCH AUTOSEL 6.11 02/76] selftests/bpf: Fix ARG_PTR_TO_LONG {half-,}uninitialized test

2024-10-04 Thread Sasha Levin
From: Daniel Borkmann [ Upstream commit b8e188f023e07a733b47d5865311ade51878fe40 ] The assumption of 'in privileged mode reads from uninitialized stack locations are permitted' is not quite correct since the verifier was probing for read access rather than write access. Both tests need to be ann

Re: [PATCH V2 13/13] selftests/resctrl: Keep results from first test run

2024-10-04 Thread Ilpo Järvinen
On Thu, 12 Sep 2024, Reinette Chatre wrote: > The resctrl selftests drop the results from every first test run > to avoid (per comment) "inaccurate due to monitoring setup transition > phase" data. Previously inaccurate data resulted from workloads needing > some time to

Re: [PATCH net-next v8 24/24] testing/selftest: add test tool and scripts for ovpn module

2024-10-04 Thread Antonio Quartulli
Hi, On 03/10/2024 00:35, Shuah Khan wrote: On 10/2/24 03:02, Antonio Quartulli wrote: The ovpn-cli tool can be compiled and used as selftest for the ovpn kernel module. Does this test load ovpn module before running tests? If so does it unload the modules after tests are complete? The

Re: [PATCH v2] selftest: remoteproc: Add basic test for start/stop sequence

2024-10-03 Thread Wasim Nazir
On Sun, Sep 29, 2024 at 10:03:23PM -0500, Bjorn Andersson wrote: > On Fri, Sep 27, 2024 at 04:51:32PM GMT, Wasim Nazir wrote: > > This test includes: > > 1) Start/stop test for each rproc instance sequencially > > 2) Start/stop test for all rproc instances concurrently

Re: [PATCH] Revert "list: test: fix tests for list_cut_position()"

2024-10-02 Thread David Gow
On Thu, 3 Oct 2024 at 04:39, Shuah Khan wrote: > > On 9/30/24 17:18, Jacob Keller wrote: > > > > > > On 9/22/2024 8:05 AM, Guenter Roeck wrote: > >> This reverts commit e620799c414a035dea1208bcb51c869744931dbb. > >> > >> The commit introduc

Re: [RESEND PATCH v3] list: test: Mending tests for list_cut_position()

2024-10-02 Thread David Gow
On Tue, 1 Oct 2024 at 01:06, I Hsin Cheng wrote: > > Mending test for list_cut_position*() for the missing check of integer > "i" after the second loop. The variable should be checked for second > time to make sure both lists after the cut operation are formed as > expec

Re: [PATCH net-next v8 24/24] testing/selftest: add test tool and scripts for ovpn module

2024-10-02 Thread Shuah Khan
On 10/2/24 03:02, Antonio Quartulli wrote: The ovpn-cli tool can be compiled and used as selftest for the ovpn kernel module. Does this test load ovpn module before running tests? If so does it unload the modules after tests are complete? It implementes the netlink API and can thus be

Re: [PATCH] Revert "list: test: fix tests for list_cut_position()"

2024-10-02 Thread Shuah Khan
On 9/30/24 17:18, Jacob Keller wrote: On 9/22/2024 8:05 AM, Guenter Roeck wrote: This reverts commit e620799c414a035dea1208bcb51c869744931dbb. The commit introduces unit test failures. Expected cur == &entries[i], but cur == 037fffadfd80 &e

Re: [PATCH v4 3/3] selftests: livepatch: test livepatching a kprobed function

2024-10-02 Thread Miroslav Benes
Hi, On Mon, 30 Sep 2024, Michael Vetter wrote: > The test proves that a function that is being kprobed and uses a > post_handler cannot be livepatched. > > Only one ftrace_ops with FTRACE_OPS_FL_IPMODIFY set may be registered > to any given function at a time. > > Signed-o

Re: [PATCH slab hotfixes v2 2/2] slub/kunit: skip test_kfree_rcu when the slub kunit test is built-in

2024-10-02 Thread Vlastimil Babka
; test_leak_destroy()") cause a lockup on boot on several architectures >>> when the kunit tests are configured to be built-in and not modules. >>> >>> The test_kfree_rcu test invokes kfree_rcu() and boot sequence inspection >>> showed the runner for built

Re: [PATCH v4 0/3] selftests: livepatch: test livepatching a kprobed function

2024-10-02 Thread Marcos Paulo de Souza
/debug. > Be consistent with "" around variables. > Fix path in commit message to /sys/kernel/debug/kprobes/enabled. > > V3: > Save and restore kprobe state also when test fails, by integrating it > into setup_config() and cleanup(). > Rename SYSFS variables in

Re: [PATCH slab hotfixes v2 2/2] slub/kunit: skip test_kfree_rcu when the slub kunit test is built-in

2024-10-02 Thread Guenter Roeck
unit tests are configured to be built-in and not modules. The test_kfree_rcu test invokes kfree_rcu() and boot sequence inspection showed the runner for built-in kunit tests kunit_run_all_tests() is called before setting system_state to SYSTEM_RUNNING and calling rcu_end_inkernel_boot(), so this se

Re: [PATCH slab hotfixes v2 2/2] slub/kunit: skip test_kfree_rcu when the slub kunit test is built-in

2024-10-02 Thread Guenter Roeck
in and not modules. The test_kfree_rcu test invokes kfree_rcu() and boot sequence inspection showed the runner for built-in kunit tests kunit_run_all_tests() is called before setting system_state to SYSTEM_RUNNING and calling rcu_end_inkernel_boot(), so this seems like a likely cause. So while I was

Re: [PATCH slab hotfixes v2 2/2] slub/kunit: skip test_kfree_rcu when the slub kunit test is built-in

2024-10-02 Thread Vlastimil Babka
to be built-in and not modules. > > The test_kfree_rcu test invokes kfree_rcu() and boot sequence inspection > showed the runner for built-in kunit tests kunit_run_all_tests() is > called before setting system_state to SYSTEM_RUNNING and calling > rcu_end_inkernel_boot(), so this

[PATCH net-next v8 24/24] testing/selftest: add test tool and scripts for ovpn module

2024-10-02 Thread Antonio Quartulli
/net/ovpn/.gitignore |2 + tools/testing/selftests/net/ovpn/Makefile | 18 + tools/testing/selftests/net/ovpn/config |8 + tools/testing/selftests/net/ovpn/data-test-tcp.sh |9 + tools/testing/selftests/net/ovpn/data-test.sh | 153 ++ tools/testing/selftests

[PATCH net v5] selftests: net: no_forwarding: fix VID for $swp2 in one_bridge_two_pvids() test

2024-10-01 Thread Kacper Ludwinski
Currently, the second bridge command overwrites the first one. Fix this by adding this VID to the interface behind $swp2. The one_bridge_two_pvids() test intends to check that there is no leakage of traffic between bridge ports which have a single VLAN - the PVID VLAN. Because of a typo, port

[PATCH net-next v19 01/14] mm: page_frag: add a test module for page_frag

2024-10-01 Thread Yunsheng Lin
/testing/selftests/mm/page_frag/page_frag_test.c new file mode 100644 index ..eeb2b6bc681a --- /dev/null +++ b/tools/testing/selftests/mm/page_frag/page_frag_test.c @@ -0,0 +1,173 @@ +// SPDX-License-Identifier: GPL-2.0 + +/* + * Test module for page_frag cache + * + * Copyright (C) 2024

Re: [PATCH net v4] selftests: net: no_forwarding: fix VID for $swp2 in one_bridge_two_pvids() test

2024-10-01 Thread Vladimir Oltean
On Mon, Sep 30, 2024 at 03:35:43PM +0900, Kacper Ludwinski wrote: > This typo has an impact on results of the test results, > potentially leading to wrong conclusions regarding > the functionality of a network device. Did you test this? You are effectively introducing a new test.

[PATCH slab hotfixes v2 2/2] slub/kunit: skip test_kfree_rcu when the slub kunit test is built-in

2024-10-01 Thread Vlastimil Babka
Guenter Roeck reports that the new slub kunit tests added by commit 4e1c44b3db79 ("kunit, slub: add test_kfree_rcu() and test_leak_destroy()") cause a lockup on boot on several architectures when the kunit tests are configured to be built-in and not modules. The test_kfree_rcu te

Re: [PATCH v3 2/2] selftests/exec: add a test to enforce execveat()'s comm

2024-10-01 Thread Shuah Khan
On 10/1/24 07:49, Tycho Andersen wrote: From: Tycho Andersen We want to ensure that /proc/self/comm stays useful for execveat() callers. This commit message is vague? What does staying useful mean? Elaborate on the staying useful and the tests added to ensure. Add test results as well

[PATCH v3 2/2] selftests/exec: add a test to enforce execveat()'s comm

2024-10-01 Thread Tycho Andersen
From: Tycho Andersen We want to ensure that /proc/self/comm stays useful for execveat() callers. Signed-off-by: Tycho Andersen --- tools/testing/selftests/exec/execveat.c | 25 + 1 file changed, 25 insertions(+) diff --git a/tools/testing/selftests/exec/execveat.c b/t

[PATCH HID v3 7/9] selftests/hid: allow to parametrize bus/vid/pid/rdesc on the test device

2024-10-01 Thread Benjamin Tissoires
This will be useful to introduce variants in tests to test the interactions between HID-BPF and some kernel modules. Reviewed-by: Peter Hutterer Signed-off-by: Benjamin Tissoires --- no changes in v3 no changes in v2 --- tools/testing/selftests/hid/hid_bpf.c| 2 +- tools/testing

Re: [PATCH bpf-next v3 2/2] selftests/bpf: Setget_sockopt add a test for tcp over ipv4 via ipv6

2024-09-30 Thread Martin KaFai Lau
On 9/14/24 3:32 AM, Feng zhou wrote: From: Feng Zhou This patch adds a test for TCP over IPv4 via INET6 API. Signed-off-by: Feng Zhou --- .../selftests/bpf/prog_tests/setget_sockopt.c | 33 +++ .../selftests/bpf/progs/setget_sockopt.c | 13 ++-- 2 files changed

Re: [PATCH bpf-next v2 2/2] bpf, selftests: Add test case for cgroup skb to get net_cls classid helpers

2024-09-30 Thread Martin KaFai Lau
On 9/18/24 12:45 AM, Feng zhou wrote: From: Feng Zhou This patch adds a test for cgroup skb to get classid. Signed-off-by: Feng Zhou --- .../bpf/prog_tests/cg_skb_get_classid.c | 87 +++ .../selftests/bpf/progs/cg_skb_get_classid.c | 19 2 files changed, 106

Re: [PATCH] Revert "list: test: fix tests for list_cut_position()"

2024-09-30 Thread Jacob Keller
On 9/22/2024 8:05 AM, Guenter Roeck wrote: > This reverts commit e620799c414a035dea1208bcb51c869744931dbb. > > The commit introduces unit test failures. > > Expected cur == &entries[i], but > cur == 037fffadfd80 > &e

[RESEND PATCH v3] list: test: Mending tests for list_cut_position()

2024-09-30 Thread I Hsin Cheng
Mending test for list_cut_position*() for the missing check of integer "i" after the second loop. The variable should be checked for second time to make sure both lists after the cut operation are formed as expected. Signed-off-by: I Hsin Cheng --- lib/list-test.c | 4 1 file

Re: [PATCH v1 2/2] selftests/mm: hugetlb_fault_after_madv: improve test output

2024-09-30 Thread David Hildenbrand
On 30.09.24 12:05, Breno Leitao wrote: On Thu, Sep 26, 2024 at 05:20:44PM +0200, David Hildenbrand wrote: Let's improve the test output. For example, print the proper test result. Install a SIGBUS handler to catch any SIGBUS instead of crashing the test on failure. That is way bette

Re: [PATCH v1 2/2] selftests/mm: hugetlb_fault_after_madv: improve test output

2024-09-30 Thread Breno Leitao
On Thu, Sep 26, 2024 at 05:20:44PM +0200, David Hildenbrand wrote: > Let's improve the test output. For example, print the proper test > result. Install a SIGBUS handler to catch any SIGBUS instead of > crashing the test on failure. That is way better now. Thanks for improvi

[PATCH v4 3/3] selftests: livepatch: test livepatching a kprobed function

2024-09-30 Thread Michael Vetter
The test proves that a function that is being kprobed and uses a post_handler cannot be livepatched. Only one ftrace_ops with FTRACE_OPS_FL_IPMODIFY set may be registered to any given function at a time. Signed-off-by: Michael Vetter --- tools/testing/selftests/livepatch/Makefile| 3

[PATCH v4 0/3] selftests: livepatch: test livepatching a kprobed function

2024-09-30 Thread Michael Vetter
Thanks to Miroslav, Petr and Marcos for the reviews! V4: Use variable for /sys/kernel/debug. Be consistent with "" around variables. Fix path in commit message to /sys/kernel/debug/kprobes/enabled. V3: Save and restore kprobe state also when test fails, by integrating it into setup_co

[PATCH net v4] selftests: net: no_forwarding: fix VID for $swp2 in one_bridge_two_pvids() test

2024-09-29 Thread Kacper Ludwinski
Currently, the second bridge command overwrites the first one. Fix this by adding this VID to the interface behind $swp2. The one_bridge_two_pvids() test intends to check that there is no leakage of traffic between bridge ports which have a single VLAN - the PVID VLAN. Because of a typo, port

Re: [PATCH v2] selftest: remoteproc: Add basic test for start/stop sequence

2024-09-29 Thread Bjorn Andersson
On Fri, Sep 27, 2024 at 04:51:32PM GMT, Wasim Nazir wrote: > This test includes: > 1) Start/stop test for each rproc instance sequencially > 2) Start/stop test for all rproc instances concurrently > This fails to describe the purpose of the patch. Provide a proper commit

[PATCH v2] kselftest: devices: Add test to detect missing devices

2024-09-28 Thread Nícolas F . R . A . Prado
Introduce a new test to identify regressions causing devices to go missing on the system. For each bus and class on the system the test checks the number of devices present against a reference file, which needs to have been generated by the program at a previous point on a known-good kernel, and

[PATCH 3/3] selftests: KVM: Add test case for MMIO during event delivery

2024-09-27 Thread Ivan Orlov
Extend the 'set_memory_region_test' with a test case which covers the MMIO during event delivery error handling. The test case 1) Tries to set an IDT descriptor base to point to an MMIO address 2) Generates a #GP 3) Verifies that we got a correct exit reason (KVM_EXIT_INTERNAL_ERR

Re: [PATCH] selftests/mm: Fixed incorrect buffer->mirror size in hmm2 double_map test

2024-09-27 Thread Andrew Morton
On Fri, 27 Sep 2024 16:21:30 +0530 Donet Tom wrote: > >> Test Result with this patch > >> === > >> # RUN hmm2.hmm2_device_private.double_map ... > >> #OK hmm2.hmm2_device_private.double_map > >>

[PATCH v2 2/2] selftests/exec: add a test to enforce execveat()'s comm

2024-09-27 Thread Tycho Andersen
From: Tycho Andersen We want to ensure that /proc/self/comm stays useful for execveat() callers. Signed-off-by: Tycho Andersen --- tools/testing/selftests/exec/execveat.c | 25 + 1 file changed, 25 insertions(+) diff --git a/tools/testing/selftests/exec/execveat.c b/t

Re: [PATCH v3 3/3] selftests: livepatch: test livepatching a kprobed function

2024-09-27 Thread Miroslav Benes
Hi, On Fri, 20 Sep 2024, Michael Vetter wrote: > +# Kprobe a function and verify that we can't livepatch that same function > +# when it uses a post_handler since only one IPMODIFY maybe be registered > +# to any given function at a time. > + > +start_test "livepatch interaction with kprobed func

[PATCH v2] selftest: remoteproc: Add basic test for start/stop sequence

2024-09-27 Thread Wasim Nazir
This test includes: 1) Start/stop test for each rproc instance sequencially 2) Start/stop test for all rproc instances concurrently Changes in v2: - Update commit message - Addressed start/stop flow Signed-off-by: Wasim Nazir diff --git a/MAINTAINERS b/MAINTAINERS index a0cd96b8

Re: [PATCH] selftests/mm: Fixed incorrect buffer->mirror size in hmm2 double_map test

2024-09-27 Thread Donet Tom
On 9/27/24 12:48, Muhammad Usama Anjum wrote: On 9/27/24 10:07 AM, Donet Tom wrote: The hmm2 double_map test was failing due to an incorrect buffer->mirror size. The buffer->mirror size was 6, while buffer->ptr size was 6 * PAGE_SIZE. The test failed because the kernel's copy_to

Re: [PATCH] selftests/mm: Fixed incorrect buffer->mirror size in hmm2 double_map test

2024-09-27 Thread Muhammad Usama Anjum
On 9/27/24 10:07 AM, Donet Tom wrote: > The hmm2 double_map test was failing due to an incorrect > buffer->mirror size. The buffer->mirror size was 6, while buffer->ptr > size was 6 * PAGE_SIZE. The test failed because the kernel's > copy_to_user function was attempti

[PATCH] selftests/mm: Fixed incorrect buffer->mirror size in hmm2 double_map test

2024-09-26 Thread Donet Tom
The hmm2 double_map test was failing due to an incorrect buffer->mirror size. The buffer->mirror size was 6, while buffer->ptr size was 6 * PAGE_SIZE. The test failed because the kernel's copy_to_user function was attempting to copy a 6 * PAGE_SIZE buffer to buffer->mirror.

Re: [PATCH 0/2] timers test fix and duplicate defines cleanup

2024-09-26 Thread Thomas Gleixner
On Tue, Sep 24 2024 at 09:56, Shuah Khan wrote: > The first patch in this two patch fixes warn_unused_result compile > time warning in posix_timers test. > > The second patch removes local NSEC_PER_SEC and USEC_PER_SEC defines. > NSEC_PER_SEC and USEC_PER_SEC are defines in sever

[PATCH v1 2/2] selftests/mm: hugetlb_fault_after_madv: improve test output

2024-09-26 Thread David Hildenbrand
Let's improve the test output. For example, print the proper test result. Install a SIGBUS handler to catch any SIGBUS instead of crashing the test on failure. With unsuitable hugetlb page count: $ ./hugetlb_fault_after_madv TAP version 13 1..1 # [INFO] detected default hugetlb page

Re: [PATCH] selftest: remoteproc: Add basic test for start/stop sequence

2024-09-24 Thread Bjorn Andersson
On Fri, Sep 20, 2024 at 11:28:42PM GMT, Wasim Nazir wrote: > Add new basic remoteproc test that check start/stop > sequence of all subsystems available. > Please describe your test scenario more than just "check start/stop sequence". Signed-off-by... > diff --git a/MAI

[PATCH 0/2] timers test fix and duplicate defines cleanup

2024-09-24 Thread Shuah Khan
The first patch in this two patch fixes warn_unused_result compile time warning in posix_timers test. The second patch removes local NSEC_PER_SEC and USEC_PER_SEC defines. NSEC_PER_SEC and USEC_PER_SEC are defines in several timers tests. These defines are inconsistent with variations of ULL, LL

Re: [PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function

2024-09-24 Thread Petr Mladek
On Mon 2024-09-23 10:16:29, Shuah Khan wrote: > On 9/23/24 08:45, Marcos Paulo de Souza wrote: > > On Fri, 2024-09-20 at 13:56 +0200, Michael Vetter wrote: > > > This patchset adds a test for livepatching a kprobed function. > > > > > > Michael Vetter (3): &

Re: [PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function

2024-09-24 Thread Petr Mladek
On Fri 2024-09-20 13:56:28, Michael Vetter wrote: > This patchset adds a test for livepatching a kprobed function. > > Michael Vetter (3): > selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR > selftests: livepatch: save and restore kprobe state > selftest

Re: [PATCH v8 5/8] platform: Add test managed platform_device/driver APIs

2024-09-23 Thread Guenter Roeck
On Thu, Jul 18, 2024 at 02:05:04PM -0700, Stephen Boyd wrote: > Introduce KUnit resource wrappers around platform_driver_register(), > platform_device_alloc(), and platform_device_add() so that test authors > can register platform drivers/devices from their tests and have the > dri

Re: [PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function

2024-09-23 Thread Shuah Khan
On 9/23/24 08:45, Marcos Paulo de Souza wrote: On Fri, 2024-09-20 at 13:56 +0200, Michael Vetter wrote: This patchset adds a test for livepatching a kprobed function. Thanks to Petr and Marcos for the reviews! V3: Save and restore kprobe state also when test fails, by integrating it into

Re: [PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function

2024-09-23 Thread Marcos Paulo de Souza
On Fri, 2024-09-20 at 13:56 +0200, Michael Vetter wrote: > This patchset adds a test for livepatching a kprobed function. > > Thanks to Petr and Marcos for the reviews! > > V3: > Save and restore kprobe state also when test fails, by integrating it > into setup_config() an

[PATCH 4/4] selftests: KVM: Add new test for faulty mmio usage

2024-09-23 Thread Ivan Orlov
Implement the test which covers "weird" mmio usage. The test has 4 test cases: 1) Guest sets IDT/GDT base to point to an MMIO region. Triple fault and shutdown are expected there. 2) Guest jumps to MMIO address. Fetches from MMIO are not permitted, so UD is expected there. 3) Guest s

[PATCH] Revert "list: test: fix tests for list_cut_position()"

2024-09-22 Thread Guenter Roeck
This reverts commit e620799c414a035dea1208bcb51c869744931dbb. The commit introduces unit test failures. Expected cur == &entries[i], but cur == 037fffadfd80 &entries[i] == 037fffadfd60 # list_test_list_cut_position: pass:0 fail:1 skip:0 total:1 n

[PATCH] selftest: remoteproc: Add basic test for start/stop sequence

2024-09-20 Thread Wasim Nazir
Add new basic remoteproc test that check start/stop sequence of all subsystems available. diff --git a/MAINTAINERS b/MAINTAINERS index e062b5328341..aff76edc4242 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18225,6 +18225,7 @@ F: Documentation/staging/remoteproc.rst F: drivers

[RFC PATCH v2 3/3] bpf: Add sk_lookup test to use ORIGDSTADDR cmsg.

2024-09-20 Thread Tiago Lam
/testing/selftests/bpf/prog_tests/sk_lookup.c index ae87c00867ba..df780624c16c 100644 --- a/tools/testing/selftests/bpf/prog_tests/sk_lookup.c +++ b/tools/testing/selftests/bpf/prog_tests/sk_lookup.c @@ -75,6 +75,7 @@ struct test { struct inet_addr listen_at; enum server accept_on

[PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function

2024-09-20 Thread Michael Vetter
This patchset adds a test for livepatching a kprobed function. Thanks to Petr and Marcos for the reviews! V3: Save and restore kprobe state also when test fails, by integrating it into setup_config() and cleanup(). Rename SYSFS variables in a more logical way. Sort test modules in alphabetical

[PATCH v3 3/3] selftests: livepatch: test livepatching a kprobed function

2024-09-20 Thread Michael Vetter
The test proves that a function that is being kprobed and uses a post_handler cannot be livepatched. Only one ftrace_ops with FTRACE_OPS_FL_IPMODIFY set may be registered to any given function at a time. Signed-off-by: Michael Vetter --- tools/testing/selftests/livepatch/Makefile| 3

[PATCH v2 5/6] KVM: x86: selftests: Test core events

2024-09-18 Thread Colton Lewis
Test events on core counters by iterating through every combination of events in amd_pmu_zen_events with every core counter. For each combination, calculate the appropriate register addresses for the event selection/control register and the counter register. The base addresses and layout schemes

[PATCH v2 6/6] KVM: x86: selftests: Test PerfMonV2

2024-09-18 Thread Colton Lewis
Test PerfMonV2, which defines global registers to enable multiple performance counters with a single MSR write, in its own function. If the feature is available, ensure the global control register has the ability to start and stop the performance counters and the global status register correctly

[PATCH v2 4/6] KVM: x86: selftests: Test read/write core counters

2024-09-18 Thread Colton Lewis
Run a basic test to ensure we can write an arbitrary value to the core counters and read it back. Signed-off-by: Colton Lewis --- .../selftests/kvm/x86_64/pmu_counters_test.c | 54 +++ 1 file changed, 54 insertions(+) diff --git a/tools/testing/selftests/kvm/x86_64

[PATCH bpf-next v2 2/2] bpf, selftests: Add test case for cgroup skb to get net_cls classid helpers

2024-09-18 Thread Feng zhou
From: Feng Zhou This patch adds a test for cgroup skb to get classid. Signed-off-by: Feng Zhou --- .../bpf/prog_tests/cg_skb_get_classid.c | 87 +++ .../selftests/bpf/progs/cg_skb_get_classid.c | 19 2 files changed, 106 insertions(+) create mode 100644 tools

Re: [RESEND PATCH v2] list: test: Mending tests for list_cut_position()

2024-09-18 Thread David Gow
On Tue, 10 Sept 2024 at 12:35, I Hsin Cheng wrote: > > Mending test for list_cut_position*() for the missing check of integer > "i" after the second loop. The variable should be checked for second > time to make sure both lists after the cut operation are formed as > ex

Re: [PATCH] selftests: riscv: Allow mmap test to compile on 32-bit

2024-09-17 Thread patchwork-bot+linux-riscv
Hello: This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt : On Thu, 08 Aug 2024 11:41:40 -0700 you wrote: > Macros needed for 32-bit compilations were hidden behind 64-bit riscv > ifdefs. Fix the 32-bit compilations by moving macros to allow the > memory_layout test

Re: [RFC PATCH 3/3] bpf: Add sk_lookup test to use ORIGDSTADDR cmsg.

2024-09-17 Thread Tiago Lam
sk_lookup.c > > index ae87c00867ba..b99aff2e3976 100644 > > --- a/tools/testing/selftests/bpf/prog_tests/sk_lookup.c > > +++ b/tools/testing/selftests/bpf/prog_tests/sk_lookup.c > > @@ -75,6 +75,7 @@ struct test { > > struct inet_addr listen_at; > > enum serv

[RFC PATCH 4/4] WIP: hazptr: Add hazptr test sample

2024-09-17 Thread Boqun Feng
;i = 43; + + if (!dummy || !other) { + printk("allocation failed, skip test\n"); + return; + } + + init_hazptr_context(&ctx); + hptr = hazptr_alloc(&ctx); + BUG_ON(!hptr); + + // Get a second hptr. + hptr2 = hazptr_alloc(&c

[PATCH net-next] selftests: net: add pmtu_bad.sh regression test

2024-09-16 Thread mitchell . augustin
From: Mitchell Augustin Introduce a regression test that reproduces a bug in pmtu_ipv6_ipv6_exception which causes veth_A-R1's reference counter to remain > 0 after cleanup should have already completed. On affected kernels/platforms, running this test will result in the followi

Re: [PATCH 2/2] kselftests: mm: Fail the test if userfaultfd syscall isn't found

2024-09-15 Thread Muhammad Usama Anjum
hrow error >>> and not just skip. This would have helped us catch the test breakage. >> >> Please elaborate on this to help understand the what breakage was >> missed. >> >> Also this commit log doesn't look right to me. syscall() could >> fail for

[RFC 4/6] percpu-refcount-torture: Extend test with runtime mode switches

2024-09-15 Thread Neeraj Upadhyay
Extend the test to exercise runtime switching from managed mode to other reinitable active modes. Signed-off-by: Neeraj Upadhyay --- lib/percpu-refcount-torture.c | 41 +-- lib/percpu-refcount.c | 12 +- 2 files changed, 50 insertions(+), 3

[RFC 2/6] percpu-refcount: Add torture test for percpu refcount

2024-09-15 Thread Neeraj Upadhyay
Add torture test to verify percpu managed mode operations, verifying that a percpu ref does not have non-zero count when all users have dropped their reference and that there is no early release of the ref while users hold references to it. Signed-off-by: Neeraj Upadhyay --- .../admin-guide

[PATCH bpf-next v3 2/2] selftests/bpf: Setget_sockopt add a test for tcp over ipv4 via ipv6

2024-09-14 Thread Feng zhou
From: Feng Zhou This patch adds a test for TCP over IPv4 via INET6 API. Signed-off-by: Feng Zhou --- .../selftests/bpf/prog_tests/setget_sockopt.c | 33 +++ .../selftests/bpf/progs/setget_sockopt.c | 13 ++-- 2 files changed, 43 insertions(+), 3 deletions(-) diff

Re: [RFC PATCH 3/3] bpf: Add sk_lookup test to use ORIGDSTADDR cmsg.

2024-09-13 Thread Philo Lu
/testing/selftests/bpf/prog_tests/sk_lookup.c b/tools/testing/selftests/bpf/prog_tests/sk_lookup.c index ae87c00867ba..b99aff2e3976 100644 --- a/tools/testing/selftests/bpf/prog_tests/sk_lookup.c +++ b/tools/testing/selftests/bpf/prog_tests/sk_lookup.c @@ -75,6 +75,7 @@ struct test { struct

[RFC PATCH 3/3] bpf: Add sk_lookup test to use ORIGDSTADDR cmsg.

2024-09-13 Thread Tiago Lam
/testing/selftests/bpf/prog_tests/sk_lookup.c index ae87c00867ba..b99aff2e3976 100644 --- a/tools/testing/selftests/bpf/prog_tests/sk_lookup.c +++ b/tools/testing/selftests/bpf/prog_tests/sk_lookup.c @@ -75,6 +75,7 @@ struct test { struct inet_addr listen_at; enum server accept_on

[PATCH V2 13/13] selftests/resctrl: Keep results from first test run

2024-09-12 Thread Reinette Chatre
The resctrl selftests drop the results from every first test run to avoid (per comment) "inaccurate due to monitoring setup transition phase" data. Previously inaccurate data resulted from workloads needing some time to "settle" and also the measurements themselves to

Re: [PATCH 2/2] kselftests: mm: Fail the test if userfaultfd syscall isn't found

2024-09-12 Thread Shuah Khan
On 9/12/24 10:10, Shuah Khan wrote: On 9/12/24 04:31, Muhammad Usama Anjum wrote: The userfaultfd is enabled in the config fragment of mm selftest suite. It must always be present. If it isn't present, we should throw error and not just skip. This would have helped us catch the test bre

Re: [PATCH 2/2] kselftests: mm: Fail the test if userfaultfd syscall isn't found

2024-09-12 Thread Shuah Khan
On 9/12/24 04:31, Muhammad Usama Anjum wrote: The userfaultfd is enabled in the config fragment of mm selftest suite. It must always be present. If it isn't present, we should throw error and not just skip. This would have helped us catch the test breakage. Please elaborate on this to

Re: [PATCH 13/13] media: i2c: imx214: Add test pattern control

2024-09-12 Thread Ricardo Ribalda Delgado
+181,23 @@ > > #define IMX214_REG_ATR_FAST_MOVE CCI_REG8(0x9300) > > +/* Test Pattern Control */ > +#define IMX214_REG_TEST_PATTERNCCI_REG16(0x0600) > +#define IMX214_TEST_PATTERN_DISABLE0 > +#define IMX214_TEST_PATTERN_SOLID_

[PATCH 2/2] kselftests: mm: Fail the test if userfaultfd syscall isn't found

2024-09-12 Thread Muhammad Usama Anjum
The userfaultfd is enabled in the config fragment of mm selftest suite. It must always be present. If it isn't present, we should throw error and not just skip. This would have helped us catch the test breakage. Adding this now to catch the future breakages. Signed-off-by: Muhammad Usama

Re: [PATCH net-next] page_pool: add a test module for page_pool

2024-09-11 Thread Yunsheng Lin
gt;>> My preference here (for the performance part) is to upstream the >>> out-of-tree tests that Jesper (and probably others) are using, rather >>> than adding a new performance test that is not as battle-hardened. >> >> I looked through the out-of-tree tests agai

[RFC PATCH 35/39] KVM: selftests: Test that pinned pages block KVM from setting memory attributes to PRIVATE

2024-09-10 Thread Ackerley Tng
CONFIG_GUP_TEST provides userspace with an ioctl to invoke pin_user_pages(), and this test uses the ioctl to pin pages, to check that memory attributes cannot be set to private if shared pages are pinned. Signed-off-by: Ackerley Tng --- tools/testing/selftests/kvm/Makefile | 1

[RFC PATCH 33/39] KVM: selftests: Test guest_memfd memory sharing between guest and host

2024-09-10 Thread Ackerley Tng
Minimal test for guest_memfd to test that when memory is marked shared in a VM, the host can read and write to it via an mmap()ed address, and the guest can also read and write to it. Signed-off-by: Ackerley Tng --- tools/testing/selftests/kvm/Makefile | 1 + .../selftests/kvm

[RFC PATCH 32/39] KVM: selftests: Test using guest_memfd memory from userspace

2024-09-10 Thread Ackerley Tng
Test using guest_memfd from userspace, since guest_memfd now has mmap() support. Tests: 1. mmap() should now always return a valid address 2. Test that madvise() doesn't give any issues when pages are not faulted in. 3. Test that pages should not be faultable before association w

[RFC PATCH 21/39] KVM: selftests: Test that guest_memfd usage is reported via hugetlb

2024-09-10 Thread Ackerley Tng
Using HugeTLB as the huge page allocator for guest_memfd allows reuse of HugeTLB's reporting mechanism. Signed-off-by: Ackerley Tng --- tools/testing/selftests/kvm/Makefile | 1 + .../kvm/guest_memfd_hugetlb_reporting_test.c | 222 ++ 2 files changed, 223 insertions(+

[RFC PATCH 19/39] KVM: selftests: Update test for various private memory backing source types

2024-09-10 Thread Ackerley Tng
Update private_mem_conversions_test for various private memory backing source types. Signed-off-by: Ackerley Tng --- .../kvm/x86_64/private_mem_conversions_test.c | 28 ++- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/kvm/x86_64/private_m

[PATCH HID v2 11/11] selftests/hid: add test to disable hid-input

2024-09-10 Thread Benjamin Tissoires
Add a test for the newly enabled feature to control the connect_mask of hid-generic. Signed-off-by: Benjamin Tissoires --- changes in v2: - amended for the new API --- tools/testing/selftests/hid/hid_bpf.c | 60 +- tools/testing/selftests/hid/progs/hid.c

[PATCH HID v2 09/11] selftests/hid: add test for assigning a given device to hid-generic

2024-09-10 Thread Benjamin Tissoires
We use a well known VID/PID on a driver that doesn't need to talk to the device, ensures we created the device against the target driver, then load our program and ensure we have unbound to this driver and use hid-generic instead. Signed-off-by: Benjamin Tissoires --- changes in v2: - amended f

[PATCH HID v2 07/11] selftests/hid: allow to parametrize bus/vid/pid/rdesc on the test device

2024-09-10 Thread Benjamin Tissoires
This will be useful to introduce variants in tests to test the interactions between HID-BPF and some kernel modules. Signed-off-by: Benjamin Tissoires --- no changes in v2 --- tools/testing/selftests/hid/hid_bpf.c| 2 +- tools/testing/selftests/hid/hid_common.h | 46

Re: [PATCH net-next] page_pool: add a test module for page_pool

2024-09-10 Thread Jesper Dangaard Brouer
cpu, and a kthread/napi binded to a specified cpu will pop the page from the ptr_ring and free it back to the page_pool. Signed-off-by: Yunsheng Lin It seems this test is has a correctness part and a performance part. For the performance test, Jesper has out of tree tests for the page_pool

Re: [PATCH net-next] page_pool: add a test module for page_pool

2024-09-10 Thread Yunsheng Lin
nd a kthread/napi >> binded to a specified cpu will pop the page from the ptr_ring >> and free it back to the page_pool. >> >> Signed-off-by: Yunsheng Lin > > It seems this test is has a correctness part and a performance part. > For the performance test, Jesper has

[RESEND PATCH v2] list: test: Mending tests for list_cut_position()

2024-09-09 Thread I Hsin Cheng
Mending test for list_cut_position*() for the missing check of integer "i" after the second loop. The variable should be checked for second time to make sure both lists after the cut operation are formed as expected. Signed-off-by: I Hsin Cheng --- lib/list-test.c | 6 ++ 1 file

[PATCH] list: test: Mending tests for list_cut_position()

2024-09-09 Thread I Hsin Cheng
Mending test for list_cut_position*() for the missing check of integer "i" after the second loop. The variable should be checked for second time to make sure both lists after the cut operation are formed as expected. Signed-off-by: I Hsin Cheng --- lib/list-test.c | 6 ++ 1 file

[PATCH] list: test: Increasing coverage of list_test_list_replace*()

2024-09-09 Thread I Hsin Cheng
Increase the test coverage of list_test_list_replace*() by adding the checks to compare the pointer of "a_new.next" and "a_new.prev" to make sure a perfect circular doubly linked list is formed after the replacement. Signed-off-by: I Hsin Cheng --- lib/list-test.c | 4 +++

[PATCH RFC 3/3] selftest: gpio: Add a new set-get config test

2024-09-09 Thread Nícolas F . R . A . Prado
retrieved from userspace. The test reads the test plan from a YAML file, which includes the chips and pin settings to set and validate. Signed-off-by: Nícolas F. R. A. Prado --- tools/testing/selftests/gpio/Makefile | 2 +- .../gpio-set-get-config-example-test-plan.yaml | 15

[PATCH RFC 0/3] Verify bias functionality for pinctrl_paris driver through new gpio test

2024-09-09 Thread Nícolas F . R . A . Prado
This series was motivated by the regression fixed by 166bf8af9122 ("pinctrl: mediatek: common-v2: Fix broken bias-disable for PULL_PU_PD_RSEL_TYPE"). A bug was introduced in the pinctrl_paris driver which prevented certain pins from having their bias configured. Running this test on

Re: [PATCH net-next] page_pool: add a test module for page_pool

2024-09-09 Thread Mina Almasry
e page from the ptr_ring > and free it back to the page_pool. > > Signed-off-by: Yunsheng Lin It seems this test is has a correctness part and a performance part. For the performance test, Jesper has out of tree tests for the page_pool: https://github.com/netoptimizer/prototype-kerne

[PATCH net-next] page_pool: add a test module for page_pool

2024-09-09 Thread Yunsheng Lin
/testing/selftests/net/page_pool/page_pool_test.c new file mode 100644 index ..475b64f21b78 --- /dev/null +++ b/tools/testing/selftests/net/page_pool/page_pool_test.c @@ -0,0 +1,433 @@ +// SPDX-License-Identifier: GPL-2.0 + +/* + * Test module for page_pool + * + * Copyright (C) 2024

  1   2   3   4   5   6   7   8   9   10   >