[PATCH] kunit: Device wrappers should also manage driver name

2024-07-31 Thread David Gow
kunit_driver_create() accepts a name for the driver, but does not copy it, so if that name is either on the stack, or otherwise freed, we end up with a use-after-free when the driver is cleaned up. Instead, strdup() the name, and manage it as another KUnit allocation. As there was no existing kuni

Re: [PATCH v2] selftests: lib: remove strscpy test

2024-07-31 Thread Muhammad Usama Anjum
On 7/31/24 3:37 AM, Shuah Khan wrote: > On 7/25/24 06:11, Muhammad Usama Anjum wrote: >> The strscpy test loads test_strscpy module for testing. But test_strscpy >> was converted to Kunit (see fixes). Hence remove strscpy. >> >> Fixes: 41eefc46a3a4 ("string: Convert strscpy() self-test to KUnit") >

Re: [PATCH] kunit: Device wrappers should also manage driver name

2024-07-31 Thread Maxime Ripard
On Wed, 31 Jul 2024 15:02:06 +0800, David Gow wrote: > kunit_driver_create() accepts a name for the driver, but does not copy > it, so if that name is either on the stack, or otherwise freed, we end > up with a use-after-free when the driver is cleaned up. > > Instead, strdup() the name, and manag

Re: [RFC PATCH 1/1] kselftests: Add test to detect boot event slowdowns

2024-07-31 Thread Laura Nao
Hi Shuah, On 7/25/24 17:50, Shuah Khan wrote: > On 7/25/24 05:06, Laura Nao wrote: >> Introduce a new kselftest to identify slowdowns in key boot events. >> The test uses ftrace to track timings for specific boot events. >> The kprobe_timestamps_to_yaml.py script can be run once to generate a >> Y

[PATCH bpf-next v2 5/6] selftests/bpf: Exercise SOCK_STREAM unix_inet_redir_to_connected()

2024-07-31 Thread Michal Luczaj
Constants got switched reducing the test's coverage. Replace SOCK_DGRAM with SOCK_STREAM in one of unix_inet_skb_redir_to_connected() tests. Fixes: 51354f700d40 ("bpf, sockmap: Add af_unix test with both sockets in map") Suggested-by: Jakub Sitnicki Signed-off-by: Michal Luczaj --- tools/testin

[PATCH bpf-next v2 0/6] selftests/bpf: Various sockmap-related fixes

2024-07-31 Thread Michal Luczaj
Series takes care of few bugs and missing features with the aim to improve the test coverage of sockmap/sockhash. Last patch is a create_pair() rewrite making use of __attribute__((cleanup)) to handle socket fd lifetime. Signed-off-by: Michal Luczaj --- Changes in v2: - Rebase on bpf-next (Jakub

[PATCH bpf-next v2 2/6] selftests/bpf: Socket pair creation, cleanups

2024-07-31 Thread Michal Luczaj
Following create_pair() changes, remove unused function argument in create_socket_pairs() and adapt its callers, i.e. drop the open-coded loopback socket creation. Suggested-by: Jakub Sitnicki Signed-off-by: Michal Luczaj --- .../selftests/bpf/prog_tests/sockmap_basic.c | 9 +++- ...

[PATCH bpf-next v2 4/6] selftests/bpf: Honour the sotype of af_unix redir tests

2024-07-31 Thread Michal Luczaj
Do actually test the sotype as specified by the caller. This picks up after commit 75e0e27db6cf ("selftest/bpf: Change udp to inet in some function names"). Suggested-by: Jakub Sitnicki Signed-off-by: Michal Luczaj --- tools/testing/selftests/bpf/prog_tests/sockmap_listen.c | 6 +++--- 1 file

[PATCH bpf-next v2 3/6] selftests/bpf: Simplify inet_socketpair() and vsock_socketpair_connectible()

2024-07-31 Thread Michal Luczaj
Replace implementation with a call to a generic function. Signed-off-by: Michal Luczaj --- .../selftests/bpf/prog_tests/sockmap_listen.c | 83 +- 1 file changed, 2 insertions(+), 81 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c b/too

[PATCH bpf-next v2 6/6] selftests/bpf: Introduce __attribute__((cleanup)) in create_pair()

2024-07-31 Thread Michal Luczaj
Rewrite function to have (unneeded) socket descriptors automatically close()d when leaving the scope. Make sure the "ownership" of fds is correctly passed via take_fd(); i.e. descriptor returned to caller will remain valid. Suggested-by: Jakub Sitnicki Signed-off-by: Michal Luczaj --- .../selft

[PATCH bpf-next v2 1/6] selftests/bpf: Support more socket types in create_pair()

2024-07-31 Thread Michal Luczaj
Extend the function to allow creating socket pairs of SOCK_STREAM, SOCK_DGRAM and SOCK_SEQPACKET. Adapt direct callers and leave further cleanups for the following patch. Suggested-by: Jakub Sitnicki Signed-off-by: Michal Luczaj --- .../selftests/bpf/prog_tests/sockmap_basic.c | 19 +--

Re: [PATCH bpf 1/6] selftest/bpf: Support more socket types in create_pair()

2024-07-31 Thread Michal Luczaj
s > clear enough after squashing it. Use your best judgement. > > It's certainly fine with me to review the steps that were taken to > massage the code. That's what I've assumed, thanks. So here's the bpf-next based respin: https://lore.kernel.org/bpf/20240731-selftest-sockmap-fixes-v2-0-08a0c73ab...@rbox.co

[PATCH bpf-next 0/4] selftests/bpf: convert three other cgroup tests to test_progs

2024-07-31 Thread eBPF Foundation
Hello, this series brings a new set of test converted to the test_progs framework. Since the tests are quite small, I chose to group three tests conversion in the same series, but feel free to let me know if I should keep one series per test. The series focuses on cgroup testing and converts the fo

[PATCH bpf-next 1/4] selftests/bpf: convert get_current_cgroup_id_user to test_progs

2024-07-31 Thread eBPF Foundation
get_current_cgroup_id_user allows testing for bpf_get_current_cgroup_id() bpf API but is not integrated into test_progs, and so is not tested automatically in CI. Convert it to the test_progs framework to allow running it automatically. The most notable differences with the old test are the follow

[PATCH bpf-next 2/4] selftests/bpf: convert test_cgroup_storage to test_progs

2024-07-31 Thread eBPF Foundation
test_cgroup_storage is currently a standalone program which is not run when executing test_progs. Convert it to the test_progs framework so it can be automatically executed in CI. The conversion led to the following changes: - converted the raw bpf program in the userspace test file into a dedicat

[PATCH bpf-next 3/4] selftests/bpf: add proper section name to bpf prog and rename it

2024-07-31 Thread eBPF Foundation
test_skb_cgroup_id_kern.c is currently involved in a manual test. In its current form, it can not be used with the auto-generated skeleton APIs, because the section name is not valid to allow libbpf to deduce the program type. Update section name to allow skeleton APIs usage. Also rename the progr

[PATCH bpf-next 4/4] selftests/bpf: convert test_skb_cgroup_id_user to test_progs

2024-07-31 Thread eBPF Foundation
test_skb_cgroup_id_user allows testing skb cgroup id retrieval at different levels, but is not integrated in test_progs, so it is not run automatically in CI. The test overlaps a bit with cgroup_skb_sk_lookup_kern, which is integrated in test_progs and test extensively skb cgroup helpers, but there

[PATCH net 1/7] mptcp: fully established after ADD_ADDR echo on MPJ

2024-07-31 Thread Matthieu Baerts (NGI0)
Before this patch, receiving an ADD_ADDR echo on the just connected MP_JOIN subflow -- initiator side, after the MP_JOIN 3WHS -- was resulting in an MP_RESET. That's because only ACKs with a DSS or ADD_ADDRs without the echo bit were allowed. Not allowing the ADD_ADDR echo after an MP_CAPABLE 3WHS

[PATCH net 0/7] mptcp: fix endpoints with 'signal' and 'subflow' flags

2024-07-31 Thread Matthieu Baerts (NGI0)
+--- 3 files changed, 73 insertions(+), 32 deletions(-) --- base-commit: 0bf50cead4c4710d9f704778c32ab8af47ddf070 change-id: 20240731-upstream-net-20240731-mptcp-endp-subflow-signal-181d640cf5e8 Best regards, -- Matthieu Baerts (NGI0)

[PATCH net 3/7] mptcp: pm: reduce indentation blocks

2024-07-31 Thread Matthieu Baerts (NGI0)
That will simplify the following commits. No functional changes intended. Suggested-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- net/mptcp/pm_netlink.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/net/mptcp/pm

[PATCH net 2/7] mptcp: pm: deny endp with signal + subflow + port

2024-07-31 Thread Matthieu Baerts (NGI0)
As mentioned in the 'Fixes' commit, the port flag is only supported by the 'signal' flag, and not by the 'subflow' one. Then if both the 'signal' and 'subflow' flags are set, the problem is the same: the feature cannot work with the 'subflow' flag. Technically, if both the 'signal' and 'subflow' f

[PATCH net 5/7] mptcp: pm: do not ignore 'subflow' if 'signal' flag is also set

2024-07-31 Thread Matthieu Baerts (NGI0)
Up to the 'Fixes' commit, having an endpoint with both the 'signal' and 'subflow' flags, resulted in the creation of a subflow and an address announcement using the address linked to this endpoint. After this commit, only the address announcement was done, ignoring the 'subflow' flag. That's becau

[PATCH net 6/7] selftests: mptcp: join: ability to invert ADD_ADDR check

2024-07-31 Thread Matthieu Baerts (NGI0)
In the following commit, the client will initiate the ADD_ADDR, instead of the server. We need to way to verify the ADD_ADDR have been correctly sent. Note: the default expected counters for when the port number is given are never changed by the caller, no need to accept them as parameter then. T

[PATCH net 4/7] mptcp: pm: don't try to create sf if alloc failed

2024-07-31 Thread Matthieu Baerts (NGI0)
It sounds better to avoid wasting cycles and / or put extreme memory pressure on the system by trying to create new subflows if it was not possible to add a new item in the announce list. While at it, a warning is now printed if the entry was already in the list as it should not happen with the in

[PATCH net 7/7] selftests: mptcp: join: test both signal & subflow

2024-07-31 Thread Matthieu Baerts (NGI0)
It should be quite uncommon to set both the subflow and the signal flags: the initiator of the connection is typically the one creating new subflows, not the other peer, then no need to announce additional local addresses, and use it to create subflows. But some people might be confused about the

Re: [PATCH net-next v2 1/2] selftests: net-drv: exercise queue stats when the device is down

2024-07-31 Thread Petr Machata
Stanislav Fomichev writes: > Verify that total device stats don't decrease after it has been turned down. > Also make sure the device doesn't crash when we access per-queue stats > when it's down (in case it tries to access some pointers that are NULL). > > KTAP version 1 > 1..5 > ok 1 st

[PATCH RFT v7 0/9] fork: Support shadow stacks in clone3()

2024-07-31 Thread Mark Brown
The kernel has recently added support for shadow stacks, currently x86 only using their CET feature but both arm64 and RISC-V have equivalent features (GCS and Zicfiss respectively), I am actively working on GCS[1]. With shadow stacks the hardware maintains an additional stack containing only the

[PATCH RFT v7 1/9] Documentation: userspace-api: Add shadow stack API documentation

2024-07-31 Thread Mark Brown
There are a number of architectures with shadow stack features which we are presenting to userspace with as consistent an API as we can (though there are some architecture specifics). Especially given that there are some important considerations for userspace code interacting directly with the feat

[PATCH RFT v7 2/9] selftests: Provide helper header for shadow stack testing

2024-07-31 Thread Mark Brown
While almost all users of shadow stacks should be relying on the dynamic linker and libc to enable the feature there are several low level test programs where it is useful to enable without any libc support, allowing testing without full system enablement. This low level testing is helpful during b

[PATCH RFT v7 3/9] mm: Introduce ARCH_HAS_USER_SHADOW_STACK

2024-07-31 Thread Mark Brown
Since multiple architectures have support for shadow stacks and we need to select support for this feature in several places in the generic code provide a generic config option that the architectures can select. Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Reviewed-by: Deepak Gupt

[PATCH RFT v7 4/9] fork: Add shadow stack support to clone3()

2024-07-31 Thread Mark Brown
Unlike with the normal stack there is no API for configuring the the shadow stack for a new thread, instead the kernel will dynamically allocate a new shadow stack with the same size as the normal stack. This appears to be due to the shadow stack series having been in development since before the m

[PATCH RFT v7 5/9] selftests/clone3: Remove redundant flushes of output streams

2024-07-31 Thread Mark Brown
Since there were widespread issues with output not being flushed the kselftest framework was modified to explicitly set the output streams unbuffered in commit 58e2847ad2e6 ("selftests: line buffer test program's stdout") so there is no need to explicitly flush in the clone3 tests. Signed-off-by:

[PATCH RFT v7 6/9] selftests/clone3: Factor more of main loop into test_clone3()

2024-07-31 Thread Mark Brown
In order to make it easier to add more configuration for the tests and more support for runtime detection of when tests can be run pass the structure describing the tests into test_clone3() rather than picking the arguments out of it and have that function do all the per-test work. No functional c

[PATCH RFT v7 7/9] selftests/clone3: Explicitly handle child exits due to signals

2024-07-31 Thread Mark Brown
In order to improve diagnostics and allow tests to explicitly look for signals check to see if the child exited due to a signal and if it did print the code and return it as a positive value, distinct from the negative errnos currently returned. Signed-off-by: Mark Brown --- tools/testing/selfte

[PATCH RFT v7 8/9] selftests/clone3: Allow tests to flag if -E2BIG is a valid error code

2024-07-31 Thread Mark Brown
The clone_args structure is extensible, with the syscall passing in the length of the structure. Inside the kernel we use copy_struct_from_user() to read the struct but this has the unfortunate side effect of silently accepting some overrun in the structure size providing the extra data is all zero

[PATCH RFT v7 9/9] selftests/clone3: Test shadow stack support

2024-07-31 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 facilita

Re: [PATCH net-next v2 2/2] selftests: net: ksft: support marking tests as disruptive

2024-07-31 Thread Petr Machata
Stanislav Fomichev writes: > Add new @ksft_disruptive decorator to mark the tests that might > be disruptive to the system. Depending on how well the previous > test works in the CI we might want to disable disruptive tests > by default and only let the developers run them manually. > > KSFT fr

Re: [PATCH v2] selftests: ksft: Fix finished() helper exit code on skipped tests

2024-07-31 Thread Muhammad Usama Anjum
On 7/30/24 3:29 PM, Laura Nao wrote: > The Python finished() helper currently exits with KSFT_FAIL when there > are only passed and skipped tests. Fix the logic to exit with KSFT_PASS > instead, making it consistent with its C and bash counterparts > (ksft_finished() and ktap_finished() respectivel

[PATCH v2] selftests: openat2: don't print total number of tests and then skip

2024-07-31 Thread Muhammad Usama Anjum
Don't print that 88 sub-tests are going to be executed, but then skip. This is against TAP compliance. Instead check pre-requisites first before printing total number of tests. Old non-tap compliant output: TAP version 13 1..88 ok 2 # SKIP all tests require euid == 0 # Planned tests != run

Re: [PATCH] selftests: tpm2: redirect python unittest logs to stdout

2024-07-31 Thread Muhammad Usama Anjum
Reminder On 7/10/24 1:15 PM, Muhammad Usama Anjum wrote: > The python unittest module writes all its output to stderr, even when > the run is clean. Redirect its output logs to stdout. > > Cc: Jarkko Sakkinen > Signed-off-by: Muhammad Usama Anjum > --- > tools/testing/selftests/tpm2/test_async

Re: [PATCH] MAINTAINERS: Add selftests/x86 entry

2024-07-31 Thread Muhammad Usama Anjum
Kind reminder On 7/2/24 3:17 PM, Muhammad Usama Anjum wrote: > Kind reminder > > On 6/10/24 10:28 AM, Muhammad Usama Anjum wrote: >> There are no maintainers specified for tools/testing/selftests/x86. >> Shuah has mentioned [1] that the patches should go through x86 tree or >> in special cases di

Re: [PATCH v3 06/10] selftests: kvm: s390: Add VM run test case

2024-07-31 Thread Janosch Frank
On 7/30/24 9:24 AM, Christoph Schlameuss wrote: Add test case running code interacting with registers within a ucontrol VM. * Add uc_gprs test case The test uses the same VM setup using the fixture and debug macros introduced in earlier patches in this series. Signed-off-by: Christoph Schlameu

Re: [PATCH v2] selftests: openat2: don't print total number of tests and then skip

2024-07-31 Thread Aleksa Sarai
On 2024-07-31, Muhammad Usama Anjum wrote: > Don't print that 88 sub-tests are going to be executed, but then skip. > This is against TAP compliance. Instead check pre-requisites first > before printing total number of tests. > > Old non-tap compliant output: > TAP version 13 > 1..88 > ok 2

[PATCH] KVM: selftests: arm64: Correct feature test for S1PIE in get-reg-list

2024-07-31 Thread Mark Brown
ase-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b change-id: 20240731-kvm-arm64-fix-s1pie-test-a40b6be58d7b Best regards, -- Mark Brown

Re: [PATCH 0/3] bitmap: Convert test_bitmap to kunit test

2024-07-31 Thread Shuah Khan
On 7/30/24 21:06, David Gow wrote: On Tue, 30 Jul 2024 at 23:49, Shuah Khan wrote: On 7/29/24 02:29, Muhammad Usama Anjum wrote: On 7/27/24 12:26 AM, Shuah Khan wrote: On 7/26/24 05:06, Muhammad Usama Anjum wrote: In this series, test_bitmap is being converted to kunit test. Multiple patche

Re: [PATCH v2] selftests: openat2: don't print total number of tests and then skip

2024-07-31 Thread Shuah Khan
On 7/31/24 07:39, Muhammad Usama Anjum wrote: Don't print that 88 sub-tests are going to be executed, but then skip. This is against TAP compliance. Instead check pre-requisites first before printing total number of tests. Does TAP clearly mention this? Old non-tap compliant output: TAP v

Re: [PATCH bpf-next 1/4] selftests/bpf: convert get_current_cgroup_id_user to test_progs

2024-07-31 Thread Alan Maguire
On 31/07/2024 11:38, Alexis Lothoré (eBPF Foundation) wrote: > get_current_cgroup_id_user allows testing for bpf_get_current_cgroup_id() > bpf API but is not integrated into test_progs, and so is not tested > automatically in CI. > > Convert it to the test_progs framework to allow running it autom

Re: [PATCH] selftests/exec: Fix grammar in an error message.

2024-07-31 Thread Shuah Khan
On 7/23/24 22:21, Chang Yu wrote: Replace "not ... nor" in the error message with "neither ... nor". Signed-off-by: Chang Yu --- tools/testing/selftests/exec/execveat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/exec/execveat.c b/tools/testin

Re: [PATCH] selftests: tpm2: redirect python unittest logs to stdout

2024-07-31 Thread Shuah Khan
On 7/31/24 07:42, Muhammad Usama Anjum wrote: Reminder top post??? On 7/10/24 1:15 PM, Muhammad Usama Anjum wrote: The python unittest module writes all its output to stderr, even when the run is clean. Redirect its output logs to stdout. Cc: Jarkko Sakkinen Signed-off-by: Muhammad Usama

Re: [PATCH v2] selftests: ksft: Fix finished() helper exit code on skipped tests

2024-07-31 Thread Shuah Khan
On 7/31/24 07:05, Muhammad Usama Anjum wrote: On 7/30/24 3:29 PM, Laura Nao wrote: The Python finished() helper currently exits with KSFT_FAIL when there are only passed and skipped tests. Fix the logic to exit with KSFT_PASS instead, making it consistent with its C and bash counterparts (ksft_f

[PATCH] selftests: tc-testing: Fixed Typo error

2024-07-31 Thread Karan Sanghavi
Corrected the typographical of the word "different" in the "name" field of the JSON object with ID "4319". Signed-off-by: Karan Sanghavi --- tools/testing/selftests/tc-testing/tc-tests/filters/cgroup.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftest

[PATCH] selftests: tc-testing: Fixed Typo error

2024-07-31 Thread Karan Sanghavi
Corrected the typographical of the word "multiple" in the "name" field of the JSON object with ID "4341". Signed-off-by: Karan Sanghavi --- tools/testing/selftests/tc-testing/tc-tests/filters/flow.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/t

Re: [PATCH] selftests: user: remove user suite

2024-07-31 Thread Shuah Khan
On 7/30/24 23:13, Muhammad Usama Anjum wrote: On 7/31/24 7:33 AM, Kees Cook wrote: On July 30, 2024 3:36:11 PM PDT, Shuah Khan wrote: On 7/25/24 08:44, Shuah Khan wrote: On 7/25/24 05:08, Muhammad Usama Anjum wrote: The user test suite has only one test, test_user_copy which loads test_use

Re: [PATCH v2] selftests: lib: remove strscpy test

2024-07-31 Thread Shuah Khan
On 7/31/24 02:32, Muhammad Usama Anjum wrote: On 7/31/24 3:37 AM, Shuah Khan wrote: On 7/25/24 06:11, Muhammad Usama Anjum wrote: The strscpy test loads test_strscpy module for testing. But test_strscpy was converted to Kunit (see fixes). Hence remove strscpy. Fixes: 41eefc46a3a4 ("string: Con

Re: [PATCH] MAINTAINERS: Add selftests/x86 entry

2024-07-31 Thread Shuah Khan
On 7/31/24 07:42, Muhammad Usama Anjum wrote: Kind reminder On 7/2/24 3:17 PM, Muhammad Usama Anjum wrote: Kind reminder Top post ??? On 6/10/24 10:28 AM, Muhammad Usama Anjum wrote: There are no maintainers specified for tools/testing/selftests/x86. Shuah has mentioned [1] that the patch

[PATCH 0/2] tools/nolibc: add support for [v]sscanf()

2024-07-31 Thread Thomas Weißschuh
The implementation is limited and only supports numeric arguments. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (2): tools/nolibc: add support for [v]sscanf() Revert "selftests: kselftest: Fix build failure with NOLIBC" tools/include/nolibc/stdio.h | 93 +

[PATCH 2/2] Revert "selftests: kselftest: Fix build failure with NOLIBC"

2024-07-31 Thread Thomas Weißschuh
This reverts commit 16767502aa990cca2cb7d1372b31d328c4c85b40. Nolibc gained support for uname(2) and sscanf(3) which are the dependencies of ksft_min_kernel_version(). So re-enable support for ksft_min_kernel_version() under nolibc. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/k

[PATCH 1/2] tools/nolibc: add support for [v]sscanf()

2024-07-31 Thread Thomas Weißschuh
The implementation is limited and only supports numeric arguments. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/stdio.h | 93 tools/testing/selftests/nolibc/nolibc-test.c | 59 ++ 2 files changed, 152 insertions(+) diff --

Re: [PATCH bpf-next v4 0/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-31 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Martin KaFai Lau : On Wed, 31 Jul 2024 08:37:24 +0200 you wrote: > Hello, > this small series aims to integrate test_dev_cgroup in test_progs so it > could be run automatically in CI. The new version brings a few differences > with th

Re: [PATCH bpf-next 1/4] selftests/bpf: convert get_current_cgroup_id_user to test_progs

2024-07-31 Thread Alexis Lothoré
Hello Alan, On 7/31/24 19:23, Alan Maguire wrote: > On 31/07/2024 11:38, Alexis Lothoré (eBPF Foundation) wrote: [...] >> +pid = getpid(); >> +if (!ASSERT_OK(bpf_map__update_elem(skel->maps.pidmap, &key, >> +sizeof(key), &pid, sizeof(pid), 0), >> +

Re: [PATCH 1/1] selftest: drivers: Add support its msi hwirq checking

2024-07-31 Thread Bjorn Helgaas
[+cc Thomas] On Wed, May 29, 2024 at 06:27:27PM -0700, Joseph Jang wrote: > Validate there are no duplicate ITS-MSI hwirqs from the > /sys/kernel/irq/*/hwirq. > > One example log show 2 duplicated MSI entries in the /proc/interrupts. > > 150: 0 ... ITS-MSI 3355443200 Edge pciehp > 152: 0 ..

Re: [PATCH bpf-next v4 0/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-31 Thread Alexis Lothoré
On 7/31/24 20:40, patchwork-bot+netdev...@kernel.org wrote: > Hello: > > This series was applied to bpf/bpf-next.git (master) > by Martin KaFai Lau : > > On Wed, 31 Jul 2024 08:37:24 +0200 you wrote: >> Hello, >> this small series aims to integrate test_dev_cgroup in test_progs so it >> could be

[PATCH v2] kunit: add test duration attribute

2024-07-31 Thread Rae Moar
Add a new test duration attribute to print the duration of a test run. Example: KTAP version 1 # Subtest: memcpy # module: memcpy_kunit 1..4 # memcpy_large_test.speed: slow # memcpy_large_test.duration: 1.134787584s ok 1 memcpy_large_test ... This attribute is printed

Re: [PATCH 1/1] selftest: drivers: Add support its msi hwirq checking

2024-07-31 Thread Thomas Gleixner
On Wed, Jul 31 2024 at 14:24, Bjorn Helgaas wrote: > On Wed, May 29, 2024 at 06:27:27PM -0700, Joseph Jang wrote: >> Validate there are no duplicate ITS-MSI hwirqs from the >> /sys/kernel/irq/*/hwirq. >> >> One example log show 2 duplicated MSI entries in the /proc/interrupts. >> >> 150: 0 ... IT

Re: [PATCH net-next v2 2/2] selftests: net: ksft: support marking tests as disruptive

2024-07-31 Thread Stanislav Fomichev
On 07/31, Petr Machata wrote: > > Stanislav Fomichev writes: > > > Add new @ksft_disruptive decorator to mark the tests that might > > be disruptive to the system. Depending on how well the previous > > test works in the CI we might want to disable disruptive tests > > by default and only let th

Re: [PATCH net-next v17 01/14] netdev: add netdev_rx_queue_restart()

2024-07-31 Thread Mina Almasry
On Tue, Jul 30, 2024 at 4:17 AM Xuan Zhuo wrote: > > On Tue, 30 Jul 2024 02:26:05 +, Mina Almasry > wrote: > > Add netdev_rx_queue_restart() function to netdev_rx_queue.h > > > Can you say more? As far as I understand, we just release the buffer > submitted to the rx ring and get a new page

kselftest/next build: 6 builds: 2 failed, 4 passed, 1 warning (v6.11-rc1-6-g38cde27f74d8)

2024-07-31 Thread kernelci.org bot
kselftest/next build: 6 builds: 2 failed, 4 passed, 1 warning (v6.11-rc1-6-g38cde27f74d8) Full Build Summary: https://kernelci.org/build/kselftest/branch/next/kernel/v6.11-rc1-6-g38cde27f74d8/ Tree: kselftest Branch: next Git Describe: v6.11-rc1-6-g38cde27f74d8 Git Commit: 38cde27f74d8bbe2f705f

Re: [PATCH] MAINTAINERS: Add selftests/x86 entry

2024-07-31 Thread Peter Zijlstra
On Wed, Jul 31, 2024 at 12:14:16PM -0600, Shuah Khan wrote: > On 7/31/24 07:42, Muhammad Usama Anjum wrote: > > Kind reminder > > > > On 7/2/24 3:17 PM, Muhammad Usama Anjum wrote: > > > Kind reminder > > Top post ??? > > > > > > > On 6/10/24 10:28 AM, Muhammad Usama Anjum wrote: > > > > There

kselftest/fixes build: 7 builds: 2 failed, 5 passed, 1 warning (v6.11-rc1-1-g170c966cbe27)

2024-07-31 Thread kernelci.org bot
kselftest/fixes build: 7 builds: 2 failed, 5 passed, 1 warning (v6.11-rc1-1-g170c966cbe27) Full Build Summary: https://kernelci.org/build/kselftest/branch/fixes/kernel/v6.11-rc1-1-g170c966cbe27/ Tree: kselftest Branch: fixes Git Describe: v6.11-rc1-1-g170c966cbe27 Git Commit: 170c966cbe274e6642

Re: [PATCH] selftests: tc-testing: Fixed Typo error

2024-07-31 Thread Victor Nogueira
On 31/07/2024 15:07, Karan Sanghavi wrote: > Corrected the typographical of the word "different" > in the "name" field of the JSON object with ID "4319". > > Signed-off-by: Karan Sanghavi Thank you for the patch. I'd suggest you transform this patch and the other one you sent, which has the same

Re: [PATCH net-next v8 2/3] sock: add MSG_ZEROCOPY notification mechanism based on msg_control

2024-07-31 Thread Willem de Bruijn
zijianzhang@ wrote: > From: Zijian Zhang > > The MSG_ZEROCOPY flag enables copy avoidance for socket send calls. > However, zerocopy is not a free lunch. Apart from the management of user > pages, the combination of poll + recvmsg to receive notifications incurs > unignorable overhead in the appl

kselftest/next kselftest-seccomp: 1 runs, 1 regressions (v6.11-rc1-6-g38cde27f74d8)

2024-07-31 Thread kernelci.org bot
kselftest/next kselftest-seccomp: 1 runs, 1 regressions (v6.11-rc1-6-g38cde27f74d8) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +--+-+--+-

kselftest/next kselftest-lkdtm: 1 runs, 1 regressions (v6.11-rc1-6-g38cde27f74d8)

2024-07-31 Thread kernelci.org bot
kselftest/next kselftest-lkdtm: 1 runs, 1 regressions (v6.11-rc1-6-g38cde27f74d8) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +--+-+--+---

kselftest/next kselftest-lib: 1 runs, 1 regressions (v6.11-rc1-6-g38cde27f74d8)

2024-07-31 Thread kernelci.org bot
kselftest/next kselftest-lib: 1 runs, 1 regressions (v6.11-rc1-6-g38cde27f74d8) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions +--+-+--+--

Re: [PATCH net-next v8 3/3] selftests: add MSG_ZEROCOPY msg_control notification test

2024-07-31 Thread Willem de Bruijn
zijianzhang@ wrote: > From: Zijian Zhang > > We update selftests/net/msg_zerocopy.c to accommodate the new mechanism, Please make commit messages stand on their own. If someone does a git blame, make the message self explanatory. Replace "the new mechanism" with sendmsg SCM_ZC_NOTIFICATION. In

Re: kselftest/next kselftest-lib: 1 runs, 1 regressions (v6.11-rc1-6-g38cde27f74d8)

2024-07-31 Thread Shuah Khan
On 7/31/24 16:21, kernelci.org bot wrote: kselftest/next kselftest-lib: 1 runs, 1 regressions (v6.11-rc1-6-g38cde27f74d8) Regressions Summary --- platform| arch | lab | compiler | defconfig | regressions ---

Re: [PATCH 0/2] tools/nolibc: add support for [v]sscanf()

2024-07-31 Thread Shuah Khan
On 7/31/24 12:32, Thomas Weißschuh wrote: The implementation is limited and only supports numeric arguments. It would help to add more details on why this is needed especially in the commit log. Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (2): tools/nolibc: add support for [

Re: [PATCH 1/2] tools/nolibc: add support for [v]sscanf()

2024-07-31 Thread Shuah Khan
On 7/31/24 12:32, Thomas Weißschuh wrote: The implementation is limited and only supports numeric arguments. I would like to see more information in here. Why is this needed etc. etc. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/stdio.h | 93 +++

Re: [PATCH] selftests: ksft: Track skipped tests when finishing the test suite

2024-07-31 Thread Shuah Khan
On 7/30/24 04:35, Laura Nao wrote: On 7/29/24 22:06, Shuah Khan wrote: On 7/29/24 08:52, Laura Nao wrote: Hi Shuah, On 7/23/24 18:17, Shuah Khan wrote: On 7/22/24 09:43, Laura Nao wrote: Consider skipped tests in addition to passed tests when evaluating the overall result of the test suite i

Re: [PATCH 1/1] selftest: drivers: Add support its msi hwirq checking

2024-07-31 Thread Thomas Gleixner
On Wed, Jul 31 2024 at 22:42, Thomas Gleixner wrote: > Aside of that the proposed parser does not even work anymore on 6.11 > because we switched ARM[64] over to per device domains during the merge > window. > > So if we want a selftest for the correctness of the hardware interrupt > numbers then i

Re: [PATCH RFC] kselftest: devices: Add test to detect missing devices

2024-07-31 Thread Shuah Khan
On 7/24/24 15:40, Nícolas F. R. A. Prado wrote: 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

Re: [PATCH v3] selftest: acct: Add selftest for the acct() syscall

2024-07-31 Thread Shuah Khan
On 7/23/24 04:28, Abdulrasaq Lawani wrote: The acct() system call enables or disables process accounting. If accounting is turned on, records for each terminating process are appended to a specified filename as it terminates. An argument of NULL causes accounting to be turned off. This patch wil

Re: [PATCH net-next v2 1/2] selftests: net-drv: exercise queue stats when the device is down

2024-07-31 Thread Jakub Kicinski
On Wed, 31 Jul 2024 13:34:58 +0200 Petr Machata wrote: > > +qstat = netfam.qstats_get({"ifindex": cfg.ifindex}, dump=True) > > +except NlError as e: > > +if e.error == 95: > > Could you do this as if e.error == errno.ENOTSUP? just to be clear EOPNOTSUPP ..

Re: [PATCH net-next v2 1/2] selftests: net-drv: exercise queue stats when the device is down

2024-07-31 Thread Stanislav Fomichev
On 07/31, Jakub Kicinski wrote: > On Wed, 31 Jul 2024 13:34:58 +0200 Petr Machata wrote: > > > +qstat = netfam.qstats_get({"ifindex": cfg.ifindex}, dump=True) > > > +except NlError as e: > > > +if e.error == 95: > > > > Could you do this as if e.error == errno.ENOTSUP? > > j

Re: [PATCH net-next v8 2/3] sock: add MSG_ZEROCOPY notification mechanism based on msg_control

2024-07-31 Thread Jakub Kicinski
On Wed, 31 Jul 2024 18:20:35 -0400 Willem de Bruijn wrote: > Btw patchwork shows red for patch 1/3 due to a new error or warning. > Not sure if it's a false positive, but take a look. Patchwork is not for contributors, I keep repeating this :| Were you not in the room at netdev when I was talking