kselftest/next build: 4 builds: 0 failed, 4 passed, 1 warning (v6.9-rc2-16-gf8a3e7c8a5aa2)

2024-04-09 Thread kernelci.org bot
kselftest/next build: 4 builds: 0 failed, 4 passed, 1 warning (v6.9-rc2-16-gf8a3e7c8a5aa2) Full Build Summary: https://kernelci.org/build/kselftest/branch/next/kernel/v6.9-rc2-16-gf8a3e7c8a5aa2/ Tree: kselftest Branch: next Git Describe: v6.9-rc2-16-gf8a3e7c8a5aa2 Git Commit:

Re: [PATCH 2/4] selftests/arm: Add signal tests

2024-04-09 Thread Dev Jain
On 4/7/24 02:58, Muhammad Usama Anjum wrote: On 4/5/24 1:44 PM, Dev Jain wrote: This patch introduces two signal tests, and generic test wrappers similar to selftests/arm64/signal directory, along with the mangling testcases found therein. arm_cpsr, dumped by the kernel to user space in the

Re: [PATCH 1/4] selftests/arm: Add mm test

2024-04-09 Thread Dev Jain
On 4/7/24 02:53, Muhammad Usama Anjum wrote: On 4/5/24 1:44 PM, Dev Jain wrote: This patch tests the 4GB VA restriction for 32-bit processes; it is required to test the compat layer, whether the kernel knows that it is running a 32-bit process or not. Chunks are allocated until the VA gets

Re: [PATCH 3/4] selftests/arm: Add elf test

2024-04-09 Thread Dev Jain
On 4/7/24 03:00, Muhammad Usama Anjum wrote: On 4/5/24 1:44 PM, Dev Jain wrote: This patch introduces an ELF parsing test; the 5th byte of the ELF header must be 0x01 for a 32-bit process. A basic sanity check is required to ensure that we are actually testing a 32-bit build. Signed-off-by:

Re: [PATCH bpf-next v3 3/4] selftests/bpf: Export send_recv_data helper

2024-04-09 Thread Geliang Tang
On Tue, 2024-04-09 at 18:57 +0800, Geliang Tang wrote: > From: Geliang Tang > > This patch extracts the code to send and receive data into a new > helper named send_recv_data() in network_helpers.c and export it > in network_helpers.h. > > This helper will be used for MPTCP BPF selftests. > >

Re: [PATCH] KVM: selftests: Use TAP in the steal_time test

2024-04-09 Thread Sean Christopherson
On Thu, 19 Oct 2023 11:59:00 +0200, Thomas Huth wrote: > For easier use of the tests in automation and for having some > status information for the user while the test is running, let's > provide some TAP output in this test. Applied to kvm-x86 selftests, though I was mildly tempted to see how

Re: [PATCH] selftests: kselftest_harness: Print empty string, not empty fmt on PASS/FAIL

2024-04-09 Thread Sean Christopherson
On Tue, Apr 09, 2024, Jakub Kicinski wrote: > On Tue, 9 Apr 2024 15:42:56 -0700 Sean Christopherson wrote: > > - ksft_test_result_code(t->exit_code, test_name, > > - diagnostic ? "%s" : "", diagnostic); > > + ksft_test_result_code(t->exit_code, test_name, "%s",

Re: [PATCH v4 09/15] RISC-V: KVM: Add perf sampling support for guests

2024-04-09 Thread Atish Patra
On 4/5/24 05:05, Andrew Jones wrote: On Tue, Apr 02, 2024 at 01:33:10AM -0700, Atish Patra wrote: ... but it should be possible for the VMM to disable this extension in the guest. We just need to change all the checks in KVM of the host's ISA for RISCV_ISA_EXT_SSCOFPMF to checking the guest's

Re: [PATCH] selftests: kselftest_harness: Print empty string, not empty fmt on PASS/FAIL

2024-04-09 Thread Jakub Kicinski
On Tue, 9 Apr 2024 16:46:40 -0700 Kees Cook wrote: > ksft_test_result_code(t->exit_code, test_name, "%s", > diagnostic ?: ""); Could work, but we need to change the callee to extract the first arg after format from va_arg, which I wasn't sufficiently familiar

Re: [PATCH v5 22/22] KVM: riscv: selftests: Add a test for counter overflow

2024-04-09 Thread Atish Patra
On 4/5/24 06:23, Andrew Jones wrote: On Wed, Apr 03, 2024 at 01:04:51AM -0700, Atish Patra wrote: Add a test for verifying overflow interrupt. Currently, it relies on overflow support on cycle/instret events. This test works for cycle/ instret events which support sampling via hpmcounters on

Re: [PATCH] selftests: kselftest_harness: Print empty string, not empty fmt on PASS/FAIL

2024-04-09 Thread Kees Cook
On Tue, Apr 09, 2024 at 04:09:20PM -0700, Jakub Kicinski wrote: > On Tue, 9 Apr 2024 15:42:56 -0700 Sean Christopherson wrote: > > - ksft_test_result_code(t->exit_code, test_name, > > - diagnostic ? "%s" : "", diagnostic); > > + ksft_test_result_code(t->exit_code,

Re: [PATCH] selftests: kselftest_harness: Print empty string, not empty fmt on PASS/FAIL

2024-04-09 Thread Jakub Kicinski
On Tue, 9 Apr 2024 15:42:56 -0700 Sean Christopherson wrote: > - ksft_test_result_code(t->exit_code, test_name, > - diagnostic ? "%s" : "", diagnostic); > + ksft_test_result_code(t->exit_code, test_name, "%s", diagnostic); Have you tested that to make sure it

Re: [PATCH v5 21/22] KVM: riscv: selftests: Add a test for PMU snapshot functionality

2024-04-09 Thread Atish Patra
On 4/5/24 06:11, Andrew Jones wrote: On Wed, Apr 03, 2024 at 01:04:50AM -0700, Atish Patra wrote: Verify PMU snapshot functionality by setting up the shared memory correctly and reading the counter values from the shared memory instead of the CSR. Reviewed-by: Anup Patel Signed-off-by: Atish

[PATCH] selftests: kselftest_harness: Print empty string, not empty fmt on PASS/FAIL

2024-04-09 Thread Sean Christopherson
When printing nothing for the diagnostic on PASS/FAIL, use a string format with an empty string, not an empty format with a NULL parameter. Clang complains about the empty format string, which in turn breaks building with -Werror. ../kselftest_harness.h:1205:30: error: format string is empty

Re: [RFC PATCH v3 1/8] mm: multi-gen LRU: ignore non-leaf pmd_young for force_scan=true

2024-04-09 Thread Yuanchu Xie
On Mon, Apr 8, 2024 at 11:52 PM Huang, Ying wrote: > > Yuanchu Xie writes: > > > When non-leaf pmd accessed bits are available, MGLRU page table walks > > can clear the accessed bit and promptly ignore the accessed bit on the > > pte because it's on a different node, so the walk does not update

[PATCH] selftests/clone3: Fix compiler warning

2024-04-09 Thread Mark Brown
5f239c84b0d790218fda change-id: 20240409-clone3-warning-fix-89a363c6899e Best regards, -- Mark Brown

Re: [PATCH v5 20/22] KVM: riscv: selftests: Add SBI PMU selftest

2024-04-09 Thread Atish Kumar Patra
On Tue, Apr 9, 2024 at 1:01 AM Andrew Jones wrote: > > On Mon, Apr 08, 2024 at 05:37:19PM -0700, Atish Patra wrote: > > On 4/5/24 05:50, Andrew Jones wrote: > > > On Wed, Apr 03, 2024 at 01:04:49AM -0700, Atish Patra wrote: > > > ... > > > > +static void test_pmu_basic_sanity(void) > > > > +{ > >

Re: [PATCH net-next 0/4] selftests: move bpf-offload test from bpf to net

2024-04-09 Thread Jakub Kicinski
On Tue, 9 Apr 2024 09:19:08 -0700 Jakub Kicinski wrote: > > Far too often I've seen this test broken because it's not in the CI :-( > > Hope you can put it in the netdev one so we get a better signal. > > We use kselftest infra directly, so they got auto-included. > But I gotta investigate

[PATCH] selftests/clone3: Correct log message for waitpid() failures

2024-04-09 Thread Mark Brown
When logging an error from calling waitpid() on the child we print a misleading error message saying that the error we report was returned by the chilld. Fix this to say the error is from waitpid(). Signed-off-by: Mark Brown --- tools/testing/selftests/clone3/clone3.c | 2 +- 1 file changed, 1

[PATCH] selftests/clone3: Check that the child exited cleanly

2024-04-09 Thread Mark Brown
When the child exits during the clone3() selftest we use WEXITSTATUS() to get the exit status from the process without first checking WIFEXITED() to see if the result will be valid. This can lead to incorrect results, for example if the child exits due to signal. Add a WIFEXTED() check and report

[PATCH] selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior

2024-04-09 Thread John Stultz
So, the struct adjtimex freq field takes a signed value who's units are in shifted (<<16) parts-per-million. Unfortunately for negative adjustments, the straightforward use of: freq = ppm<<16 will trip undefined behavior warnings with clang: valid-adjtimex.c:66:6: warning: shifting a

Re: [PATCH net-next 0/4] selftests: move bpf-offload test from bpf to net

2024-04-09 Thread Martin KaFai Lau
On 4/8/24 8:15 PM, Jakub Kicinski wrote: The test_offload.py test fits in networking and bpf equally well. We started adding more Python tests in networking and some of the code in test_offload.py can be reused, so move it to networking. Looks like it bit rotted over time and some fixes are

Re: [PATCH v3 03/15] kunit: Add test cases for backtrace warning suppression

2024-04-09 Thread Guenter Roeck
On Tue, Apr 09, 2024 at 04:29:42PM +0800, David Gow wrote: > > +ifeq ($(CCONFIG_KUNIT_SUPPRESS_BACKTRACE),y) > > s/CCONFIG_/CONFIG_/ ? > > Odd, I know I tested this (and it still works ;-). The additional "C" must have slipped in at some point. Thanks for noticing! Guenter

Re: [PATCH net-next 3/4] selftests: net: declare section names for bpf_offload

2024-04-09 Thread Alexei Starovoitov
On Mon, Apr 8, 2024 at 8:17 PM Jakub Kicinski wrote: > > Non-ancient ip (iproute2-5.15.0, libbpf 0.7.0) refuses to load > the sample with maps because we don't generate BTF: > >libbpf: BTF is required, but is missing or corrupted. >ERROR: opening BPF object file failed > > Enable BTF by

Re: [PATCH v4 RESEND 0/7] Handle faults in KUnit tests

2024-04-09 Thread Shuah Khan
On 4/8/24 01:46, Mickaël Salaün wrote: Hi, This patch series teaches KUnit to handle kthread faults as errors, and it brings a few related fixes and improvements. Shuah, everything should be OK now, could you please merge this series? All these tests pass (on top of v6.8):

Re: [PATCH net-next 0/4] selftests: move bpf-offload test from bpf to net

2024-04-09 Thread Jakub Kicinski
On Tue, 9 Apr 2024 09:10:04 -0700 Stanislav Fomichev wrote: > Acked-by: Stanislav Fomichev Thanks! > Far too often I've seen this test broken because it's not in the CI :-( > Hope you can put it in the netdev one so we get a better signal. We use kselftest infra directly, so they got

Re: [PATCH net-next 0/4] selftests: move bpf-offload test from bpf to net

2024-04-09 Thread Stanislav Fomichev
On 04/08, Jakub Kicinski wrote: > The test_offload.py test fits in networking and bpf equally > well. We started adding more Python tests in networking > and some of the code in test_offload.py can be reused, > so move it to networking. Looks like it bit rotted over > time and some fixes are

Re: [RFC PATCH v3 2/9] cgroup/pids: Separate semantics of pids.events related to pids.max

2024-04-09 Thread Johannes Weiner
On Mon, Apr 08, 2024 at 07:55:38AM -1000, Tejun Heo wrote: > Hello, > > On Fri, Apr 05, 2024 at 07:05:41PM +0200, Michal Koutný wrote: > > Currently, when pids.max limit is breached in the hierarchy, the event > > is counted and reported in the cgroup where the forking task resides. > > > > This

Re: Re: [RFC PATCH bpf-next 0/3] bpf: freeze a task cgroup from bpf

2024-04-09 Thread Michal Koutný
Hi. On Tue, Apr 02, 2024 at 07:20:45PM +0100, Djalal Harouni wrote: > Thanks yes, I would expect freeze to behave like signal, and if one > wants to block immediately there is the LSM override return. The > selftest attached tries to do exactly that. Are you refering to this part: int

Re: [PATCH RFC 02/11] dt-bindings: riscv: Add Sdtrig optional CSRs existence on DT

2024-04-09 Thread Conor Dooley
On Fri, Apr 05, 2024 at 05:59:41PM +0200, Andrew Jones wrote: > On Fri, Mar 29, 2024 at 10:31:10AM +, Conor Dooley wrote: > > On Fri, Mar 29, 2024 at 05:26:18PM +0800, Max Hsu wrote: > > > The mcontext/hcontext/scontext CSRs are optional in the Sdtrig extension, > > > to prevent RW operations

Re: [PATCH net-next v5 4/6] net: gro: add {inner_}network_offset to napi_gro_cb

2024-04-09 Thread Willem de Bruijn
Richard Gobert wrote: > This patch adds network_offset and inner_network_offset to napi_gro_cb, and > makes sure both are set correctly. In the common path there's only one > write (skb_gro_reset_offset). > > Signed-off-by: Richard Gobert > --- > include/net/gro.h | 18 -- >

Re: [PATCH 1/5] dt-bindings: riscv: add Zimop ISA extension description

2024-04-09 Thread Conor Dooley
On Thu, Apr 04, 2024 at 12:32:47PM +0200, Clément Léger wrote: > 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 Acked-by: Conor Dooley signature.asc Description: PGP

[PATCH 6/6] Add ability for SEV-ES guests to use ucalls via GHCB

2024-04-09 Thread Peter Gonda
Modifies ucall handling for SEV-ES VMs. Instead of using an out instruction and storing the ucall pointer in RDI, SEV-ES guests use a outsb VMGEXIT to move the ucall pointer as the data. Allows for SEV-ES to use ucalls instead of relying the SEV-ES MSR based termination protocol. Cc: Vishal

[PATCH 4/6] Add GHCB allocations and helpers

2024-04-09 Thread Peter Gonda
Add GHCB management functionality similar to the ucall management. Allows for selftest vCPUs to acquire GHCBs for their usage. Cc: Vishal Annapurve Cc: Ackerley Tng Cc: Paolo Bonzini Cc: Claudio Imbrenda Cc: Sean Christopherson Cc: Carlos Bilbao Cc: Tom Lendacky Cc: Michael Roth Cc:

[PATCH 3/6] Add vm_vaddr_alloc_pages_shared()

2024-04-09 Thread Peter Gonda
Add a shared page allocation. To be used for SEV-ES GHCBs. Cc: Vishal Annapurve Cc: Ackerley Tng Cc: Paolo Bonzini Cc: Claudio Imbrenda Cc: Sean Christopherson Cc: Carlos Bilbao Cc: Tom Lendacky Cc: Michael Roth Cc: k...@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Signed-off-by:

[PATCH 2/6] Add arch specific additional guest pages

2024-04-09 Thread Peter Gonda
SEV-ES guests need additional pages allocated for their GHCBs. Add arch specific function definition with __weak to allow for overriding for X86 specific SEV-ES functionality. Cc: Vishal Annapurve Cc: Ackerley Tng Cc: Paolo Bonzini Cc: Claudio Imbrenda Cc: Sean Christopherson Cc: Carlos

[PATCH 1/6] Add GHCB with setters and getters

2024-04-09 Thread Peter Gonda
Move the GHCB definitions from svm.h to the tools/ copy. This allows the SEV-ES selftest to use GHCBs which are required for non-trival VMs to paravirtualize NonAutomaticExits (NAEs) when SEV-ES is enabled. GHCB getters/setters have a warning with address-of-packed-member, so removed this using

[PATCH 0/6] Add initial GHCB support for SEV-ES selftests

2024-04-09 Thread Peter Gonda
Adding GHCB support for selftests. Very similar code to the ucall functionality, I didn't refactor anything common out since I was unsure with just two instances that is required. If pulling out common code between those two is preferred please let me know. The series only adds a single usage of

[PATCH v2] selftests/timers/posix_timers: reimplement check_timer_distribution()

2024-04-09 Thread Oleg Nesterov
Thomas says: The signal distribution test has a tendency to hang for a long time as the signal delivery is not really evenly distributed. In fact it might never be distributed across all threads ever in the way it is written. To me even the This primarily

Re: [RFC PATCH v3 6/9] selftests: cgroup: Add basic tests for pids controller

2024-04-09 Thread Muhammad Usama Anjum
On 4/9/24 5:12 AM, Waiman Long wrote: > > On 4/8/24 08:04, Muhammad Usama Anjum wrote: >> On 4/8/24 5:01 PM, Michal Koutný wrote: >>> On Mon, Apr 08, 2024 at 04:53:11PM +0500, Muhammad Usama Anjum >>> wrote: ksft_test_result_report(tests[i].fn(root), tests[i].name) >>> $ git grep

Re: [PATCH] selftests/timers/posix_timers: reimplement check_timer_distribution()

2024-04-09 Thread Thomas Gleixner
On Tue, Apr 09 2024 at 13:10, Oleg Nesterov wrote: > On 04/09, Thomas Gleixner wrote: > It seems that this is because in your tree check_timer_distribution() does > > if (timer_delete(id)) { > ksft_perror("Can't delete timer"); > return 0; > } > > while in

Re: [PATCH] selftests/timers/posix_timers: reimplement check_timer_distribution()

2024-04-09 Thread Dmitry Vyukov
On Tue, 9 Apr 2024 at 13:12, Oleg Nesterov wrote: > > On 04/09, Thomas Gleixner wrote: > > > > The discussion started about running new tests on older kernels. As this > > is a feature and not a bug fix that obviously fails on older kernels. > > OK, I see... please see below. > > > So something

Re: [PATCH] selftests/timers/posix_timers: reimplement check_timer_distribution()

2024-04-09 Thread Oleg Nesterov
On 04/09, Thomas Gleixner wrote: > > The discussion started about running new tests on older kernels. As this > is a feature and not a bug fix that obviously fails on older kernels. OK, I see... please see below. > So something like the uncompiled below should work. Hmm... this patch doesn't

[PATCH bpf-next v3 4/4] selftests/bpf: Support nonblock for send_recv_data

2024-04-09 Thread Geliang Tang
From: Geliang Tang Some tests, such as the MPTCP bpf tests, require send_recv_data helper to run in nonblock mode. This patch adds nonblock support for send_recv_data(). Check if it is currently in nonblock mode, and if so, ignore EWOULDBLOCK to continue sending and receiving. Signed-off-by:

[PATCH bpf-next v3 3/4] selftests/bpf: Export send_recv_data helper

2024-04-09 Thread Geliang Tang
From: Geliang Tang This patch extracts the code to send and receive data into a new helper named send_recv_data() in network_helpers.c and export it in network_helpers.h. This helper will be used for MPTCP BPF selftests. Signed-off-by: Geliang Tang ---

[PATCH bpf-next v3 2/4] selftests/bpf: Add struct send_recv_arg

2024-04-09 Thread Geliang Tang
From: Geliang Tang Avoid setting total_bytes and stop as global variables, this patch adds a new struct named send_recv_arg to pass arguments between threads. Put these two variables together with fd into this struct and pass it to server thread, so that server thread can access these two

[PATCH bpf-next v3 1/4] selftests/bpf: Use log_err in network_helpers

2024-04-09 Thread Geliang Tang
From: Geliang Tang The helpers ASSERT_OK/GE/OK_PTR should avoid using in public functions. This patch uses log_err() to replace them in network_helpers.c. And drop '#include "test_progs.h"' in it, include and instead. Signed-off-by: Geliang Tang ---

[PATCH bpf-next v3 0/4] export send_recv_data

2024-04-09 Thread Geliang Tang
From: Geliang Tang v3: - add two more patches. - use log_err instead of ASSERT in v3. - let send_recv_data return int as Martin suggested. v2: Address Martin's comments for v1 (thanks.) - drop patch 1, "export send_byte helper". - drop "WRITE_ONCE(arg.stop, 0)". - rebased.

Re: [PATCH v3 04/15] kunit: Add documentation for warning backtrace suppression API

2024-04-09 Thread David Gow
On Wed, 3 Apr 2024 at 21:19, Guenter Roeck wrote: > > Document API functions for suppressing warning backtraces. > > Tested-by: Linux Kernel Functional Testing > Acked-by: Dan Carpenter > Reviewed-by: Kees Cook > Signed-off-by: Guenter Roeck > --- This looks good to me: thanks for adding the

Re: [PATCH v3 03/15] kunit: Add test cases for backtrace warning suppression

2024-04-09 Thread David Gow
On Wed, 3 Apr 2024 at 21:19, Guenter Roeck wrote: > > Add unit tests to verify that warning backtrace suppression works. > > If backtrace suppression does _not_ work, the unit tests will likely > trigger unsuppressed backtraces, which should actually help to get > the affected architectures /

Re: [PATCH v3 02/15] kunit: bug: Count suppressed warning backtraces

2024-04-09 Thread David Gow
On Wed, 3 Apr 2024 at 21:19, Guenter Roeck wrote: > > Count suppressed warning backtraces to enable code which suppresses > warning backtraces to check if the expected backtrace(s) have been > observed. > > Using atomics for the backtrace count resulted in build errors on some > architectures due

Re: [PATCH v3 01/15] bug/kunit: Core support for suppressing warning backtraces

2024-04-09 Thread David Gow
On Wed, 3 Apr 2024 at 21:19, Guenter Roeck wrote: > > Some unit tests intentionally trigger warning backtraces by passing > bad parameters to API functions. Such unit tests typically check the > return value from those calls, not the existence of the warning backtrace. > > Such intentionally

Re: [PATCH v5 20/22] KVM: riscv: selftests: Add SBI PMU selftest

2024-04-09 Thread Andrew Jones
On Mon, Apr 08, 2024 at 05:37:19PM -0700, Atish Patra wrote: > On 4/5/24 05:50, Andrew Jones wrote: > > On Wed, Apr 03, 2024 at 01:04:49AM -0700, Atish Patra wrote: > > ... > > > +static void test_pmu_basic_sanity(void) > > > +{ > > > + long out_val = 0; > > > + bool probe; > > > + struct sbiret

Re: [RFC PATCH v3 2/8] mm: aggregate working set information into histograms

2024-04-09 Thread Huang, Ying
Yuanchu Xie writes: > Hierarchically aggregate all memcgs' MGLRU generations and their > page counts into working set page age histograms. > The histograms break down the system's working set per-node, > per-anon/file. > > The sysfs interfaces are as follows: >

Re: [RFC PATCH v3 1/8] mm: multi-gen LRU: ignore non-leaf pmd_young for force_scan=true

2024-04-09 Thread Huang, Ying
Yuanchu Xie writes: > When non-leaf pmd accessed bits are available, MGLRU page table walks > can clear the accessed bit and promptly ignore the accessed bit on the > pte because it's on a different node, so the walk does not update the > generation of said page. When the next scan comes around