Re: [PATCH] selftests/rseq: take large C-state exit latency into consideration

2024-04-05 Thread Sean Christopherson
On Fri, Mar 22, 2024, Zide Chen wrote: > Currently, the migration worker delays 1-10 us, assuming that one > KVM_RUN iteration only takes a few microseconds. But if C-state exit > latencies are large enough, for example, hundreds or even thousands > of microseconds on server CPUs, it may happen

kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.9-rc2-16-g3f4d0fa96430)

2024-04-05 Thread kernelci.org bot
kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.9-rc2-16-g3f4d0fa96430) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions

kselftest/next kselftest-lkdtm: 1 runs, 1 regressions (v6.9-rc2-16-g3f4d0fa96430)

2024-04-05 Thread kernelci.org bot
kselftest/next kselftest-lkdtm: 1 runs, 1 regressions (v6.9-rc2-16-g3f4d0fa96430) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions

Re: [PATCH 0/2] selftests: Replace "Bail out" with "Error" in ksft_exit_fail_msg()

2024-04-05 Thread Shuah Khan
On 4/5/24 14:38, Muhammad Usama Anjum wrote: Hi Tim, On 4/6/24 12:36 AM, Bird, Tim wrote: Sorry I didn't catch this on the original submission. -Original Message- From: Shuah Khan On 4/5/24 07: 17, Muhammad Usama Anjum wrote: > "Bail out! " is not descriptive. It rather should be:

kselftest/next build: 2 builds: 0 failed, 2 passed (v6.9-rc2-16-g3f4d0fa96430)

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

Re: [PATCH 0/2] selftests: Replace "Bail out" with "Error" in ksft_exit_fail_msg()

2024-04-05 Thread Muhammad Usama Anjum
Hi Tim, On 4/6/24 12:36 AM, Bird, Tim wrote: > Sorry I didn't catch this on the original submission. > >> -Original Message- >> From: Shuah Khan >> >> On 4/5/24 07: 17, Muhammad Usama Anjum wrote: > "Bail out! " is not >> descriptive. It rather should be: "Failed: " and > then this

Re: [PATCH 1/3] io_uring: Add REQ_F_CQE_SKIP support for io_uring zerocopy

2024-04-05 Thread Oliver Crumrine
Pavel Begunkov wrote: > On 4/4/24 23:17, Oliver Crumrine wrote: > > In his patch to enable zerocopy networking for io_uring, Pavel Begunkov > > specifically disabled REQ_F_CQE_SKIP, as (at least from my > > understanding) the userspace program wouldn't receive the > > IORING_CQE_F_MORE flag in the

RE: [PATCH 0/2] selftests: Replace "Bail out" with "Error" in ksft_exit_fail_msg()

2024-04-05 Thread Bird, Tim
Sorry I didn't catch this on the original submission. > -Original Message- > From: Shuah Khan > > On 4/5/24 07: 17, Muhammad Usama Anjum wrote: > "Bail out! " is not > descriptive. It rather should be: "Failed: " and > then this added prefix > doesn't need to be added everywhere.

Re: [PATCH 0/2] selftests: Replace "Bail out" with "Error" in ksft_exit_fail_msg()

2024-04-05 Thread Shuah Khan
On 4/5/24 09:32, Kees Cook wrote: On Fri, Apr 05, 2024 at 08:56:31AM -0600, Shuah Khan wrote: On 4/5/24 07:17, Muhammad Usama Anjum wrote: "Bail out! " is not descriptive. It rather should be: "Failed: " and then this added prefix doesn't need to be added everywhere. Usually in the logs, we

Re: [PATCH v3 13/15] sh: Move defines needed for suppressing warning backtraces

2024-04-05 Thread Simon Horman
On Wed, Apr 03, 2024 at 06:19:34AM -0700, Guenter Roeck wrote: > Declaring the defines needed for suppressing warning inside > '#ifdef CONFIG_DEBUG_BUGVERBOSE' results in a kerneldoc warning. > > .../bug.h:29: warning: expecting prototype for _EMIT_BUG_ENTRY(). > Prototype was for

Re: [PATCH 0/4] A new selftests/ directory for arm compatibility testing

2024-04-05 Thread Mark Brown
On Fri, Apr 05, 2024 at 02:14:06PM +0530, Dev Jain wrote: > This series introduces the selftests/arm directory, which tests 32 and 64-bit > kernel compatibility with 32-bit ELFs running on the Aarch platform. > The need for this bucket of tests is that 32 bit applications built on legacy > ARM

Re: [PATCH 0/5] Add parsing for Zimop ISA extension

2024-04-05 Thread Deepak Gupta
On Fri, Apr 5, 2024 at 8:26 AM Andrew Jones wrote: > > On Thu, Apr 04, 2024 at 12:32:46PM +0200, Clément Léger wrote: > > The Zimop ISA extension was ratified recently. This series adds support > > for parsing it from riscv,isa, hwprobe export and kvm support for > > Guest/VM. > > I'm not sure we

[RFC PATCH v3 5/9] selftests: cgroup: Lexicographic order in Makefile

2024-04-05 Thread Michal Koutný
This will reduce number of conflicts when modifying the lists. Signed-off-by: Michal Koutný --- tools/testing/selftests/cgroup/Makefile | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/tools/testing/selftests/cgroup/Makefile

[RFC PATCH v3 4/9] cgroup/pids: Add pids.events.local

2024-04-05 Thread Michal Koutný
Hierarchical counting of events is not practical for watching when a particular pids.max is being hit. Therefore introduce .local flavor of events file (akin to memory controller) that collects only events relevant to given cgroup. Signed-off-by: Michal Koutný --- kernel/cgroup/pids.c | 41

[RFC PATCH v3 0/9] pids controller events rework and migration charging

2024-04-05 Thread Michal Koutný
The series consists of two parts: - pids.events rework (originally v2, patches 1-6, - migration charging, patches 7-9. The changes are independent in principle, I stacked them for (my) convenience and because they both deserve RFC: 1) Changed semantics of v2 pids.events - similar change was

[RFC PATCH v3 9/9] selftests: cgroup: Add tests pids controller

2024-04-05 Thread Michal Koutný
This adds a couple of tests to check enforcing of limits in pids controller upon migration. When the new option does not exist, the test is skipped. Signed-off-by: Michal Koutný --- tools/testing/selftests/cgroup/test_pids.c | 117 - 1 file changed, 116 insertions(+), 1

[RFC PATCH v3 8/9] cgroup/pids: Enforce pids.max on task migrations

2024-04-05 Thread Michal Koutný
While pids controller is designed with only forks in mind, it leads to situations where limit is apparently ineffective. A manager daemon is in /src and it spawns tasks into /dst. The administrator sets up a limit dst/pids.max while src/pids.max is unlimited. The manager daemon can spawn more than

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

2024-04-05 Thread Michal Koutný
This commit adds (and wires in) new test program for checking basic pids controller functionality -- restricting tasks in a cgroup and correct event counting. Signed-off-by: Michal Koutný --- tools/testing/selftests/cgroup/Makefile| 2 + tools/testing/selftests/cgroup/test_pids.c | 187

[RFC PATCH v3 3/9] cgroup/pids: Make event counters hierarchical

2024-04-05 Thread Michal Koutný
The pids.events file should honor the hierarchy, so make the events propagate from their origin up to the root on the unified hierarchy. The v1 behavior remains non-hierarchical. Signed-off-by: Michal Koutný --- Documentation/admin-guide/cgroup-v2.rst | 4 ++- kernel/cgroup/pids.c

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

2024-04-05 Thread Michal Koutný
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 decouples the limit and the notification caused by the limit making it hard to detect when the actual limit was effected. Let's introduce new events:

[RFC PATCH v3 7/9] cgroup/pids: Replace uncharge/charge pair with a single function

2024-04-05 Thread Michal Koutný
No functional change intended. This rework reduces modifications of pids counters only to a minimal subtree of uncharged/charged cgroups. Signed-off-by: Michal Koutný --- kernel/cgroup/pids.c | 80 ++-- 1 file changed, 47 insertions(+), 33 deletions(-)

[RFC PATCH v3 1/9] cgroup/pids: Remove superfluous zeroing

2024-04-05 Thread Michal Koutný
Atomic counters are in kzalloc'd struct. They are zeroed already and atomic64_t does not need special initialization (cf kernel/trace/trace_clock.c:trace_counter). Signed-off-by: Michal Koutný --- kernel/cgroup/pids.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/cgroup/pids.c

Re: [PATCH bpf-next v5 1/6] bpf/helpers: introduce sleepable bpf_timers

2024-04-05 Thread Alexei Starovoitov
On Fri, Apr 5, 2024 at 8:46 AM Benjamin Tissoires wrote: > > Alright, as of today (and I'm about to be AFK for the weekend), I got > your changes in and working (I think). I'll review the series on > Monday and send it back so we have a baseline to compare it to with > bpf_wq. Nice! Looking

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

2024-04-05 Thread Andrew Jones
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 to the missing CSRs, which will cause > > illegal instructions. > > >

Re: [PATCH bpf-next v5 1/6] bpf/helpers: introduce sleepable bpf_timers

2024-04-05 Thread Benjamin Tissoires
On Thu, Apr 4, 2024 at 8:29 PM Alexei Starovoitov wrote: > > On Thu, Apr 4, 2024 at 10:56 AM Benjamin Tissoires > wrote: > > > > On Thu, Apr 4, 2024 at 6:41 PM Alexei Starovoitov > > wrote: > > > > > > On Thu, Apr 4, 2024 at 8:27 AM Benjamin Tissoires > > > wrote: > > > > > > > > > > > > > > >

Re: [PATCH 2/2] selftests: Remove Error/Failed prefix from ksft_exit_fail*() usages

2024-04-05 Thread Kees Cook
On Fri, Apr 05, 2024 at 06:17:48PM +0500, Muhammad Usama Anjum wrote: > Remove Error/Failed prefix from ksft_exit_fail*() usages as prefix is > already present in the ksft_exit_fail*(). > > Signed-off-by: Muhammad Usama Anjum Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH 1/2] selftests: Replace "Bail out" with "Error"

2024-04-05 Thread Kees Cook
On Fri, Apr 05, 2024 at 06:17:47PM +0500, Muhammad Usama Anjum wrote: > "Bail out! " is not descriptive. It rather should be: "Failed: " and > then that added prefix doesn't need to be added everywhere. Usually in > the logs, we are searching for "Failed" or "Error" instead of "Bail > out". > >

Re: [PATCH 0/2] selftests: Replace "Bail out" with "Error" in ksft_exit_fail_msg()

2024-04-05 Thread Kees Cook
On Fri, Apr 05, 2024 at 08:56:31AM -0600, Shuah Khan wrote: > On 4/5/24 07:17, Muhammad Usama Anjum wrote: > > "Bail out! " is not descriptive. It rather should be: "Failed: " and > > then this added prefix doesn't need to be added everywhere. Usually in > > the logs, we are searching for "Failed"

Re: [PATCH 0/5] Add parsing for Zimop ISA extension

2024-04-05 Thread Andrew Jones
On Thu, Apr 04, 2024 at 12:32:46PM +0200, Clément Léger wrote: > The Zimop ISA extension was ratified recently. This series adds support > for parsing it from riscv,isa, hwprobe export and kvm support for > Guest/VM. I'm not sure we need this. Zimop by itself isn't useful, so I don't know if we

Re: [PATCH 0/2] selftests: Replace "Bail out" with "Error" in ksft_exit_fail_msg()

2024-04-05 Thread Shuah Khan
On 4/5/24 07:17, Muhammad Usama Anjum wrote: "Bail out! " is not descriptive. It rather should be: "Failed: " and then this added prefix doesn't need to be added everywhere. Usually in the logs, we are searching for "Failed" or "Error" instead of "Bail out" so it must be replace. Remove

Re: [PATCH net-next 1/2] mptcp: add last time fields in mptcp_info

2024-04-05 Thread Matthieu Baerts
Hi Eric, Thank you for the review! On 05/04/2024 15:29, Eric Dumazet wrote: > On Fri, Apr 5, 2024 at 3:06 PM Matthieu Baerts (NGI0) > wrote: >> >> From: Geliang Tang >> >> This patch adds "last time" fields last_data_sent, last_data_recv and >> last_ack_recv in struct mptcp_sock to record the

Re: [PATCH net-next 1/2] mptcp: add last time fields in mptcp_info

2024-04-05 Thread Eric Dumazet
On Fri, Apr 5, 2024 at 3:06 PM Matthieu Baerts (NGI0) wrote: > > From: Geliang Tang > > This patch adds "last time" fields last_data_sent, last_data_recv and > last_ack_recv in struct mptcp_sock to record the last time data_sent, > data_recv and ack_recv happened. They all are initialized as >

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

2024-04-05 Thread Andrew Jones
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 the platform. > There are no ISA

[PATCH 2/2] selftests: Remove Error/Failed prefix from ksft_exit_fail*() usages

2024-04-05 Thread Muhammad Usama Anjum
Remove Error/Failed prefix from ksft_exit_fail*() usages as prefix is already present in the ksft_exit_fail*(). Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/exec/load_address.c | 8 +- .../testing/selftests/exec/recursion-depth.c | 10 +-

[PATCH 1/2] selftests: Replace "Bail out" with "Error"

2024-04-05 Thread Muhammad Usama Anjum
"Bail out! " is not descriptive. It rather should be: "Failed: " and then that added prefix doesn't need to be added everywhere. Usually in the logs, we are searching for "Failed" or "Error" instead of "Bail out". Suggested-by: Kees Cook Signed-off-by: Muhammad Usama Anjum ---

[PATCH 0/2] selftests: Replace "Bail out" with "Error" in ksft_exit_fail_msg()

2024-04-05 Thread Muhammad Usama Anjum
"Bail out! " is not descriptive. It rather should be: "Failed: " and then this added prefix doesn't need to be added everywhere. Usually in the logs, we are searching for "Failed" or "Error" instead of "Bail out" so it must be replace. Remove Error/Failed prefixes from all usages as well.

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

2024-04-05 Thread Andrew Jones
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 Patra > --- >

[PATCH net-next 2/2] selftests: mptcp: test last time mptcp_info

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang This patch adds a new helper chk_msk_info() to show the counters in mptcp_info of the given info, and check that the timestamps move forward. Use it to show newly added last_data_sent, last_data_recv and last_ack_recv in mptcp_info in chk_last_time_info(). Signed-off-by:

[PATCH net-next 1/2] mptcp: add last time fields in mptcp_info

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang This patch adds "last time" fields last_data_sent, last_data_recv and last_ack_recv in struct mptcp_sock to record the last time data_sent, data_recv and ack_recv happened. They all are initialized as tcp_jiffies32 in __mptcp_init_sock(), and updated as tcp_jiffies32 too when

[PATCH net-next 0/2] mptcp: add last time fields in mptcp_info

2024-04-05 Thread Matthieu Baerts (NGI0)
ftests/net/mptcp/diag.sh | 53 +++ 6 files changed, 72 insertions(+) --- base-commit: d76c740b2eaaddc5fc3a8b21eaec5b6b11e8c3f5 change-id: 20240405-upstream-net-next-20240405-mptcp-last-time-info-9b03618e08f1 Best regards, -- Matthieu Baerts (NGI0)

Re: [PATCH 1/3] io_uring: Add REQ_F_CQE_SKIP support for io_uring zerocopy

2024-04-05 Thread Pavel Begunkov
On 4/4/24 23:17, Oliver Crumrine wrote: In his patch to enable zerocopy networking for io_uring, Pavel Begunkov specifically disabled REQ_F_CQE_SKIP, as (at least from my understanding) the userspace program wouldn't receive the IORING_CQE_F_MORE flag in the result value. No. IORING_CQE_F_MORE

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

2024-04-05 Thread Andrew Jones
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 ret; > + int num_counters = 0, i; > + union sbi_pmu_ctr_info ctrinfo; > + > + probe =

Re: [PATCH v4 13/15] KVM: riscv: selftests: Add SBI PMU selftest

2024-04-05 Thread Andrew Jones
On Tue, Apr 02, 2024 at 01:34:54AM -0700, Atish Patra wrote: ... > > > +static void guest_illegal_exception_handler(struct ex_regs *regs) > > > +{ > > > + __GUEST_ASSERT(regs->cause == EXC_INST_ILLEGAL, > > > +"Unexpected exception handler %lx\n", regs->cause); > > > >

Re: [PATCH v5 19/22] KVM: riscv: selftests: Add SBI PMU extension definitions

2024-04-05 Thread Andrew Jones
On Wed, Apr 03, 2024 at 01:04:48AM -0700, Atish Patra wrote: > The SBI PMU extension definition is required for upcoming SBI PMU > selftests. > > Reviewed-by: Anup Patel > Signed-off-by: Atish Patra > --- > .../testing/selftests/kvm/include/riscv/sbi.h | 66 +++ > 1 file

Re: [PATCH v5 17/22] KVM: riscv: selftests: Add helper functions for extension checks

2024-04-05 Thread Andrew Jones
On Wed, Apr 03, 2024 at 01:04:46AM -0700, Atish Patra wrote: > __vcpu_has_ext can check both SBI and ISA extensions when the first > argument is properly converted to SBI/ISA extension IDs. Introduce > two helper functions to make life easier for developers so they > don't have to worry about the

Re: [PATCH v5 16/22] KVM: riscv: selftests: Move sbi definitions to its own header file

2024-04-05 Thread Andrew Jones
On Wed, Apr 03, 2024 at 01:04:45AM -0700, Atish Patra wrote: > The SBI definitions will continue to grow. Move the sbi related > definitions to its own header file from processor.h > > Suggested-by: Andrew Jones > Signed-off-by: Atish Patra > --- > .../selftests/kvm/include/riscv/processor.h

Re: [PATCH v5 15/22] RISC-V: KVM: Improve firmware counter read function

2024-04-05 Thread Andrew Jones
On Wed, Apr 03, 2024 at 01:04:44AM -0700, Atish Patra wrote: > Rename the function to indicate that it is meant for firmware > counter read. While at it, add a range sanity check for it as > well. > > Signed-off-by: Atish Patra > --- > arch/riscv/include/asm/kvm_vcpu_pmu.h | 2 +- >

Re: [PATCH v5 14/22] RISC-V: KVM: Support 64 bit firmware counters on RV32

2024-04-05 Thread Andrew Jones
On Wed, Apr 03, 2024 at 01:04:43AM -0700, Atish Patra wrote: > The SBI v2.0 introduced a fw_read_hi function to read 64 bit firmware > counters for RV32 based systems. > > Add infrastructure to support that. > > Reviewed-by: Anup Patel > Signed-off-by: Atish Patra > --- >

Re: [PATCH 0/3] Add REQ_F_CQE_SKIP support to io_uring zerocopy

2024-04-05 Thread Pavel Begunkov
On 4/4/24 23:16, Oliver Crumrine wrote: This patchset allows for io_uring zerocopy to support REQ_F_CQE_SKIP, skipping the normal completion notification, but not the zerocopy buffer release notification. It's an io_uring internal change not altering how it operates with the net layer, you

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

2024-04-05 Thread Andrew Jones
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 ISA instead. Maybe > > it's

Re: [PATCH v5 13/22] RISC-V: KVM: Add perf sampling support for guests

2024-04-05 Thread Andrew Jones
On Wed, Apr 03, 2024 at 01:04:42AM -0700, Atish Patra wrote: > KVM enables perf for guest via counter virtualization. However, the > sampling can not be supported as there is no mechanism to enabled > trap/emulate scountovf in ISA yet. Rely on the SBI PMU snapshot > to provide the counter overflow

Re: [PATCH v5 12/22] RISC-V: KVM: Implement SBI PMU Snapshot feature

2024-04-05 Thread Andrew Jones
On Wed, Apr 03, 2024 at 01:04:41AM -0700, Atish Patra wrote: > PMU Snapshot function allows to minimize the number of traps when the > guest access configures/access the hpmcounters. If the snapshot feature > is enabled, the hypervisor updates the shared memory with counter > data and state of

[PATCH net-next 11/11] selftests: mptcp: netlink: drop disable=SC2086

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang Now there are only a few of variables are not using double quotes. Modifying them, then "shellcheck disable=SC2086" can be dropped. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) ---

[PATCH net-next 10/11] selftests: mptcp: ip_mptcp option for more scripts

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang This patch adds '-i' option for mptcp_sockopt.sh, pm_netlink.sh, and simult_flows.sh, to use 'ip mptcp' command in the tests instead of 'pm_nl_ctl'. Update usage() correspondingly. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu

[PATCH net-next 09/11] selftests: mptcp: use pm_nl endpoint ops

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang Use those newly added pm_nl endpoint ops helpers to replace all 'pm_nl_ctl' commands with 'limits', 'add', 'del', 'flush', 'show' and 'set' arguments in scripts mptcp_sockopt.sh and simult_flows.sh. In pm_netlink.sh, add wrappers of there helpers to make the function names

[PATCH net-next 08/11] selftests: mptcp: export pm_nl endpoint ops

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang This patch exports six endpoint operation helpers with pm_nl_ prefix, pm_nl_set_limits(), pm_nl_add_endpoint(), pm_nl_del_endpoint(), pm_nl_flush_endpoint(), pm_nl_show_endpoints() and pm_nl_change_endpoint() into mptcp_lib.sh as public functions, and renamed each of them with

[PATCH net-next 07/11] selftests: mptcp: join: update endpoint ops

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang This patch uses 'case' statements to simplify pm_nl_add_endpoint() and pm_nl_check_endpoint(). And simplify pm_nl_check_endpoint() with check_output() helper. Also update pm_nl_del_endpoint() to avoid the 'double quote' shellcheck warning. Signed-off-by: Geliang Tang

[PATCH net-next 06/11] selftests: mptcp: netlink: add change_address helper

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang The output formats of 'ip mptcp' commands are much different from that of 'pm_nl_ctl' commands. A new 'change_address' helper is added here, to change the flag of an address. This is a bit similar to mptcp_join.sh's pm_nl_change_endpoint(). Usage: Address ID -

[PATCH net-next 05/11] selftests: mptcp: add {get,format}_endpoint(s) helpers

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang The output formats of 'ip mptcp' commands are much different from that of 'pm_nl_ctl' commands. This patch adds a new helper format_endpoints() to format the outputs of 'ip mptcp' and 'pm_nl_ctl' with 'endpoints' arguments to hide these differences. A new helper named

[PATCH net-next 04/11] selftests: mptcp: netlink: add 'limits' helpers

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang The output format of 'ip mptcp limits' command is much different from that of 'pm_nl_ctl limits' command. This patch adds format_limits() helper to format the outputs of these two commands to hide the difference. get_limits() has been added to show the limits. Use these two

[PATCH net-next 03/11] selftests: mptcp: export ip_mptcp to mptcp_lib

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang This patch exports ip_mptcp into mptcp_lib.sh as a public variable, named MPTCP_LIB_IP_MPTCP. Add a helper mptcp_lib_set_ip_mptcp() to set it, and a helper mptcp_lib_is_ip_mptcp() to test whether it is set. Use these two helpers in mptcp_join.sh. This patch is prepared for

[PATCH net-next 02/11] selftests: mptcp: add ms units for tc-netem delay

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang 'delay 1' in tc-netem is confusing, not sure if it's a delay of 1 second or 1 millisecond. This patch explicitly adds millisecond units to make these commands clearer. Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) ---

[PATCH net-next 01/11] selftests: mptcp: add tc check for check_tools

2024-04-05 Thread Matthieu Baerts (NGI0)
From: Geliang Tang tc are used in some test scripts: mptcp_connect.sh, mptcp_join.sh and simult_flows.sh. It makes sense to check if tc is installed before running these scripts, just like other tools. So this patch add 'tc' check for mptcp_lib_check_tools(), and check it in these test scripts.

[PATCH net-next 00/11] selftests: mptcp: cleanups and 'ip mptcp' support

2024-04-05 Thread Matthieu Baerts (NGI0)
+ tools/testing/selftests/net/mptcp/simult_flows.sh | 20 +- 6 files changed, 375 insertions(+), 252 deletions(-) --- base-commit: d76c740b2eaaddc5fc3a8b21eaec5b6b11e8c3f5 change-id: 20240405-upstream-net-next-20240405-mptcp-selftests-refactoring-f5ed9780df8e Best regards, -- Matthieu

[PATCH 4/4] selftests: Add build infrastructure along with README

2024-04-05 Thread Dev Jain
Add arm target, individual Makefile targets, and instructions to build the tests. Signed-off-by: Dev Jain --- tools/testing/selftests/Makefile| 1 + tools/testing/selftests/arm/Makefile| 57 + tools/testing/selftests/arm/README | 31 +++

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

2024-04-05 Thread Dev Jain
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: Dev Jain --- tools/testing/selftests/arm/elf/parse_elf.c | 75 +

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

2024-04-05 Thread Dev Jain
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 ucontext structure to the signal handler, is mangled with. The kernel must spot this

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

2024-04-05 Thread Dev Jain
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 exhausted; mmap must fail beyond 4GB. This is asserted against the VA mappings found in

[PATCH 0/4] A new selftests/ directory for arm compatibility testing

2024-04-05 Thread Dev Jain
This series introduces the selftests/arm directory, which tests 32 and 64-bit kernel compatibility with 32-bit ELFs running on the Aarch platform. The need for this bucket of tests is that 32 bit applications built on legacy ARM architecture must not break on the new Aarch64 platforms and the