Hi Palmer,
On Mon, Apr 22, 2024 at 3:29 PM Anup Patel wrote:
>
> On Sat, Apr 20, 2024 at 5:17 AM Atish Patra wrote:
> >
> > This series implements SBI PMU improvements done in SBI v2.0[1] i.e. PMU
> > snapshot
> > and fw_read_hi() functions.
> >
> > SBI v2.0 introduced PMU snapshot feature whic
On 4/30/2024 6:18 AM, Eduard Zingerman wrote:
On Mon, 2024-04-29 at 13:58 -0700, Andrii Nakryiko wrote:
[...]
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 8f0f2e21699e..b69c89bc5cfc 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -13478,6 +13478,28 @@ stat
On 4/30/2024 4:58 AM, Andrii Nakryiko wrote:
On Sun, Apr 28, 2024 at 8:15 AM Xu Kuohai wrote:
On 4/27/2024 4:36 AM, Andrii Nakryiko wrote:
On Tue, Apr 23, 2024 at 7:26 PM Xu Kuohai wrote:
On 4/24/2024 5:55 AM, Yonghong Song wrote:
On 4/20/24 1:33 AM, Xu Kuohai wrote:
On 4/20/2024 7:00 A
There are two selftest scenarios for ARRAY BIST(Board Integrated System
Test) tests:
1. Perform IFS ARRAY BIST tests once on each CPU.
2. Perform IFS ARRAY BIST tests on a random CPU with 3 rounds.
These are not meant to be exhaustive, but are some minimal tests for
for checking IFS ARRAY BIST.
Two selftests are added to verify IFS scan test feature:
1. Perform IFS scan test once on each CPU using all the available image
files.
2. Perform IFS scan test with the default image on a random cpu for 3
rounds.
Reviewed-by: Jithu Joseph
Co-developed-by: Ashok Raj
Signed-off-by: Ashok R
Scan test image files have to be loaded before starting IFS test.
Verify that In Field scan driver is able to load valid test image files.
Also check if loading an invalid test image file fails.
Reviewed-by: Jithu Joseph
Co-developed-by: Ashok Raj
Signed-off-by: Ashok Raj
Signed-off-by: Pengf
IFS (In Field Scan) driver exposes its functionality via sysfs interfaces.
Applications prepare and exercise the tests by interacting with the
aforementioned sysfs files.
Verify that the necessary sysfs entries are created after loading the IFS
driver.
Initialize test variables needed for buildin
To verify IFS (In Field Scan [1]) driver functionality, add the following 6
test cases:
1. Verify that IFS sysfs entries are created after loading the IFS module
2. Check if loading an invalid IFS test image fails and loading a valid
one succeeds
3. Perform IFS scan test on each CPU usin
>index ee61d2c25cb0..f622fb90a098 100644
>--- a/arch/x86/kvm/vmx/vmx.c
>+++ b/arch/x86/kvm/vmx/vmx.c
>@@ -1871,9 +1871,29 @@ static void vmx_inject_exception(struct kvm_vcpu *vcpu)
>vmcs_write32(VM_ENTRY_INSTRUCTION_LEN,
> vmx->vcpu.arch.event_exit_inst_l
Hello,
kernel test robot noticed "kernel-selftests.sgx.make.fail" on:
commit: 8092162335554c8ef5e7f50eff68aa9cfbdbf865 ("selftests/harness: remove
use of LINE_MAX")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
[test failed on linus/master 98369dccd2f8e16bf4c6621053a
From: Mark Brown
[ Upstream commit 907f33028871fa7c9a3db1efd467b78ef82cce20 ]
The standard library perror() function provides a convenient way to print
an error message based on the current errno but this doesn't play nicely
with KTAP output. Provide a helper which does an equivalent thing in a
Sorry, will resend this; I forgot to prefix that it was intended for
the 6.6.y branch.
On Mon, Apr 29, 2024 at 5:49 PM Edward Liaw wrote:
>
> From: Mark Brown
>
> [ Upstream commit 907f33028871fa7c9a3db1efd467b78ef82cce20 ]
>
> The standard library perror() function provides a convenient way to
From: Mark Brown
[ Upstream commit 907f33028871fa7c9a3db1efd467b78ef82cce20 ]
The standard library perror() function provides a convenient way to print
an error message based on the current errno but this doesn't play nicely
with KTAP output. Provide a helper which does an equivalent thing in a
On Mon, Apr 29, 2024 at 08:34:36PM +, Edward Liaw wrote:
> Fixes clang compiler warnings by adding parentheses:
>
> parse_vdso.c:65:9: warning: using the result of an assignment as a condition
> without parentheses [-Wparentheses]
> if (g = h & 0xf000)
>
Android bionic warns that open modes are ignored if O_CREAT or O_TMPFILE
aren't specified. The permissions for the file are set above:
fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644);
Fixes: d97b46a64674 ("syscalls, x86: add __NR_kcmp syscall")
Signed-off-by: Edward Liaw
---
tools/
Currently, the migration worker delays 1-10 us, assuming that one
KVM_RUN iteration only takes a few microseconds. But if the CPU low
power wakeup latency is large enough, for example, hundreds or even
thousands of microseconds deep C-state exit latencies on x86 server
CPUs, it may happen that it'
Hello:
This series was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko :
On Mon, 29 Apr 2024 15:07:32 +0800 you wrote:
> From: Geliang Tang
>
> Two fixes to free strdup memory in selftests to avoid memory leaks.
>
> Geliang Tang (2):
> selftests/bpf: Free strdup memory in test_sockma
On 4/29/2024 12:39 PM, Sean Christopherson wrote:
>> Signed-off-by: Zide Chen
>> Signed-off-by: donsheng
>
> Why does this have Donghsheng's SoB? Is this a Co-developed-by situation?
Yes, Co-developed-by is more suitable.
>>
>
> Put per-patch notes that aren't intended for the final chang
On Mon, 2024-04-29 at 13:58 -0700, Andrii Nakryiko wrote:
[...]
> > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> > index 8f0f2e21699e..b69c89bc5cfc 100644
> > --- a/kernel/bpf/verifier.c
> > +++ b/kernel/bpf/verifier.c
> > @@ -13478,6 +13478,28 @@ static void scalar32_min_max_and(
On Mon, Apr 29, 2024 at 05:04:55PM +0200, Clément Léger wrote:
> Since a few extensions (Zicbom/Zicboz) already needs validation and
> future ones will need it as well (Zc*) add a validate() callback to
> struct riscv_isa_ext_data. This require to rework the way extensions are
> parsed and split it
On Sun, 2024-04-28 at 23:15 +0800, Xu Kuohai wrote:
[...]
> diff --git a/kernel/bpf/tnum.c b/kernel/bpf/tnum.c
> index 9dbc31b25e3d..9d4480a683ca 100644
> --- a/kernel/bpf/tnum.c
> +++ b/kernel/bpf/tnum.c
> @@ -150,6 +150,29 @@ struct tnum tnum_intersect(struct tnum a, struct tnum b)
> r
> For the tests that moved to sock_addr.c, please also remove them from
> test_sock_addr.c.
Done in v3
(https://lore.kernel.org/bpf/20240429214529.2644801-1-jr...@google.com/T/#m560606260cda41652a7f305a0acff7fc8975d10a).
-Jordan
This patch creates two sets of sock_ops that call out to the SYSCALL
hooks in the sock_addr_kern BPF program and uses them to construct
test cases for the range of supported operations (kernel_connect(),
kernel_bind(), kernel_sendms(), sock_sendmsg(), kernel_getsockname(),
kenel_getpeername()). Thi
In order to reuse the same test code for both socket system calls (e.g.
connect(), bind(), etc.) and kernel socket functions (e.g.
kernel_connect(), kernel_bind(), etc.), this patch introduces the "ops"
field to sock_addr_test. This field allows each test cases to configure
the set of functions use
This patch lays the groundwork for testing IPv4 and IPv6 sockaddr hooks
and their interaction with both socket syscalls and kernel functions
(e.g. kernel_connect, kernel_bind, etc.). It moves some of the test
cases from the old-style bpf/test_sock_addr.c self test into the
sock_addr prog_test in a
This patch lays out a set of SYSCALL programs that can be used to invoke
the socket operation kfuncs in bpf_testmod, allowing a test program to
manipulate kernel socket operations from userspace.
Signed-off-by: Jordan Rife
---
.../selftests/bpf/progs/sock_addr_kern.c | 65 ++
This patch adds a set of kfuncs to bpf_testmod that can be used to
manipulate a socket from kernel space.
Signed-off-by: Jordan Rife
---
.../selftests/bpf/bpf_testmod/bpf_testmod.c | 255 ++
.../bpf/bpf_testmod/bpf_testmod_kfunc.h | 27 ++
2 files changed, 282 insertions
Without this fix, the bind4 and bind6 programs will reject bind attempts
on big endian systems. This patch ensures that CI tests pass for the
s390x architecture.
Signed-off-by: Jordan Rife
---
.../testing/selftests/bpf/progs/bind4_prog.c | 18 ++
.../testing/selftests/bpf/progs/
This patch series adds test coverage for BPF sockaddr hooks and their
interactions with kernel socket functions (i.e. kernel_bind(),
kernel_connect(), kernel_sendmsg(), sock_sendmsg(),
kernel_getpeername(), and kernel_getsockname()) while also rounding out
IPv4 and IPv6 sockaddr hook coverage in pr
On Sat, Apr 27, 2024 at 6:04 PM Ivan Orlov wrote:
>
> There are multiple assertion formatting functions in the `assert.c`
> file, which are not covered with tests yet. Implement the KUnit test
> for these functions.
>
> The test consists of 11 test cases for the following functions:
>
> 1) 'is_lit
Fixes clang compilation warnings by adding explicit unsigned conversion:
parse_vdso.c:206:22: warning: passing 'const char *' to parameter of type
'const unsigned char *' converts between pointers to integer types where one is
of the unique plain 'char' type and the other is not [-Wpointer-sign]
On Thu, 11 Apr 2024 14:02:37 -0700, Zide Chen wrote:
> If this feature is not supported or is disabled by IA32_MISC_ENABLE on
> the host, executing MONITOR or MWAIT instruction from the guest doesn't
> cause monitor/mwait VM exits, but a #UD.
>
> So, we need to skip this test if CPUID.01H:ECX[3] i
On Sun, Apr 28, 2024 at 8:15 AM Xu Kuohai wrote:
>
> On 4/27/2024 4:36 AM, Andrii Nakryiko wrote:
> > On Tue, Apr 23, 2024 at 7:26 PM Xu Kuohai wrote:
> >>
> >> On 4/24/2024 5:55 AM, Yonghong Song wrote:
> >>>
> >>> On 4/20/24 1:33 AM, Xu Kuohai wrote:
> On 4/20/2024 7:00 AM, Eduard Zingerma
On Mon, 15 Apr 2024 14:43:54 +, Brendan Jackman wrote:
> I ran into a failure running this test on a minimal rootfs.
>
> Can be fixed by just skipping the "sudo" in case we are already root.
Applied to kvm-x86 selftests, thanks!
[1/1] KVM: selftests: Avoid assuming "sudo" exists
https:
On Fri, 15 Mar 2024 09:36:29 +, Colin Ian King wrote:
> There is a statement with two semicolons. Remove the second one, it
> is redundant.
Applied to kvm-x86 selftests, thanks!
[1/1] KVM: selftests: Remove second semicolon
https://github.com/kvm-x86/linux/commit/d85465f2773d
--
https:
Fixes clang compilation warnings by adding explicit unsigned conversion:
parse_vdso.c:206:22: warning: passing 'const char *' to parameter of type
'const unsigned char *' converts between pointers to integer types where one is
of the unique plain 'char' type and the other is not [-Wpointer-sign]
Fixes clang compiler warnings by adding parentheses:
parse_vdso.c:65:9: warning: using the result of an assignment as a condition
without parentheses [-Wparentheses]
if (g = h & 0xf000)
~~^~~~
parse_vdso.c:65:9: note: place parentheses around th
On Tue, Apr 23, 2024 at 06:26 PM +08, Geliang Tang wrote:
> From: Geliang Tang
>
> The values of recv and recvp in msg_loop may be negative, so it's necessary
> to check if they are positive before using them.
>
> Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
> Fixes: 753fb2ee0934 ("bpf: soc
Geliang Tang wrote:
> From: Geliang Tang
>
> The strdup() function returns a pointer to a new string which is a
> duplicate of the string "input". Memory for the new string is obtained
> with malloc(), and need to be freed with free().
>
> This patch adds these missing "free(input)" in parse_sta
Geliang Tang wrote:
> From: Geliang Tang
>
> The strdup() function returns a pointer to a new string which is a
> duplicate of the string "ptr". Memory for the new string is obtained
> with malloc(), and need to be freed with free().
>
> This patch adds these missing "free(ptr)" in check_whiteli
On Tue, Apr 16, 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 the CPU low
> power wakeup latency is large enough, for example, hundreds or even
> thousands of microseconds deep C-state exit laten
According to the test environment, the mount point of the test's working
directory may be shared or not, which changes the visibility of the
nested "tmp" mount point for the test's parent process calling
umount("tmp").
This was spotted while running tests in containers [1], where mount
points are
Do not allocate self->dir_path in the test process because this would
not be visible in the FIXTURE_TEARDOWN() process when relying on
fork()/clone3() instead of vfork().
This change is required for a following commit removing vfork() call to
not break the layout3_fs.* test cases.
Cc: Günther Noa
Setting the time namespace with CLONE_NEWTIME returns -EUSERS if the
calling thread shares memory with another thread (because of the shared
vDSO), which is the case when it is created with vfork().
Fix pidfd_setns_test by replacing test harness's vfork() call with a
clone3() call with CLONE_VFORK
Make sure fixture teardowns are run when test cases failed, including
when _metadata->teardown_parent is set to true.
Make sure only one fixture teardown is run per test case, handling the
case where the test child forks.
Cc: Jakub Kicinski
Cc: Shengyu Li
Cc: Shuah Khan
Fixes: 72d7cb5c190b ("s
Unconditionally share _metadata between all forked processes, which
enables to actually catch errors which were previously ignored.
This is required for a following commit replacing vfork() with clone3()
and CLONE_VFORK (i.e. not sharing the full memory) . It should also be
useful to share _metad
Replace a wrong EXPECT_GT(self->child_pid_exited, 0) with EXPECT_GE(),
which will be actually tested on the parent and child sides with a
following commit.
Cc: Christian Brauner
Cc: Shuah Khan
Reviewed-by: Kees Cook
Signed-off-by: Mickaël Salaün
Link: https://lore.kernel.org/r/20240429191911.2
FIXTURE_VARIANT_ADD() types are passed as const pointers to
FIXTURE_TEARDOWN(). Make that explicit by constifying the variants
declarations.
Cc: Shuah Khan
Cc: Will Drewry
Reviewed-by: Kees Cook
Signed-off-by: Mickaël Salaün
Link: https://lore.kernel.org/r/20240429191911.2552580-7-...@digikod
Required by switch_timens() to open /proc/self/ns/time_for_children.
CONFIG_GENERIC_VDSO_TIME_NS is not available on UML, so pidfd_setns_test
cannot be run successfully on this architecture.
Cc: Christian Brauner
Cc: Shuah Khan
Fixes: 2b40c5db73e2 ("selftests/pidfd: add pidfd setns tests")
Revi
Fix a race condition when running several FIXTURE_TEARDOWN() managing
the same resource. This fixes a race condition in the Landlock file
system tests when creating or unmounting the same directory.
Using clone3() with CLONE_VFORK guarantees that the child and grandchild
test processes are sequen
Hi,
As reported by Kernel Test Robot [1], some pidfd tests fail. This is
due to the use of vfork() which introduced some side effects.
Similarly, while making it more generic, a previous commit made some
Landlock file system tests flaky, and subject to the host's file system
mount configuration.
On Mon, Apr 29, 2024 at 10:16:47AM -0700, Jakub Kicinski wrote:
> On Mon, 29 Apr 2024 08:52:36 -0700 Kees Cook wrote:
> > > +/* Wait for the child process to end but without sharing memory mapping.
> > > */
> > > +static pid_t __attribute__((__unused__)) clone3_vfork(void)
> >
> > Why "unused"?
On 4/28/24 10:47 AM, Jordan Rife wrote:
Also, all this setup (and test) has to be done in a new netns. Anything blocking
the kfunc in patch 2 using the current task netns instead of the init_net?
Add nodad to the "ip -6 addr add...". just in case it may add unnecessary delay.
This interface/addre
On Mon, 29 Apr 2024 08:52:36 -0700 Kees Cook wrote:
> > +/* Wait for the child process to end but without sharing memory mapping. */
> > +static pid_t __attribute__((__unused__)) clone3_vfork(void)
>
> Why "unused"?
Right, static inline is enough
Add extra colon to mark command in the next paragraph as codeblock
Signed-off-by: Yo-Jung (Leo) Lin <0xf...@gmail.com>
---
Documentation/dev-tools/kselftest.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/dev-tools/kselftest.rst
b/Documentation/dev-tools/kse
On Mon, 29 Apr 2024 11:02:51 -0400 Willem de Bruijn wrote:
> The only interesting points so far are the use of deploy (which I
> assume you have on some internal patch already)
Yup, they need a touch more cleaning up but the PSP tests use it.
> and that with bkg would not fail the test if the bac
On Mon, 29 Apr 2024 17:01:55 +0200 Andrew Lunn wrote:
> > I'm not super happy with the traffic generation using iperf3,
> > my initial approach was to use mausezahn. But it turned out to be
> > 5x slower in terms of PPS. Hopefully this is good enough for now.
>
> How important is PPS? In order t
On Mon, 29 Apr 2024 17:12:29 +0200 Andrew Lunn wrote:
> > # ./drivers/net/hw/pp_alloc_fail.py
> > KTAP version 1
> > 1..1
> > # ethtool -G change retval: success
> > ok 1 pp_alloc_fail.test_pp_alloc
> > # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0
>
> If i'm reading the tra
On Mon, Apr 29, 2024 at 03:09:31PM +0200, Mickaël Salaün wrote:
> Setting the time namespace with CLONE_NEWTIME returns -EUSERS if the
> calling thread shares memory with another thread (because of the shared
> vDSO), which is the case when it is created with vfork().
>
> Fix pidfd_setns_test by r
On Mon, Apr 29, 2024 at 03:09:30PM +0200, Mickaël Salaün wrote:
> Unconditionally share _metadata between all forked processes, which
> enables to actually catch errors which were previously ignored.
>
> This is required for a following commit replacing vfork() with clone3()
> and CLONE_VFORK (i.e
On Mon, Apr 29, 2024 at 03:09:29PM +0200, Mickaël Salaün wrote:
> Replace a wrong EXPECT_GT(self->child_pid_exited, 0) with EXPECT_GE(),
> which will be actually tested on the parent and child sides with a
> following commit.
>
> Cc: Christian Brauner
> Cc: Kees Cook
> Cc: Shuah Khan
> Signed-o
On 4/29/24 12:07 AM, Geliang Tang wrote:
From: Geliang Tang
The strdup() function returns a pointer to a new string which is a
duplicate of the string "input". Memory for the new string is obtained
with malloc(), and need to be freed with free().
This patch adds these missing "free(input)" i
On 4/29/24 12:07 AM, Geliang Tang wrote:
From: Geliang Tang
The strdup() function returns a pointer to a new string which is a
duplicate of the string "ptr". Memory for the new string is obtained
with malloc(), and need to be freed with free().
This patch adds these missing "free(ptr)" in ch
On Mon, Apr 29, 2024 at 03:09:28PM +0200, Mickaël Salaün wrote:
> FIXTURE_VARIANT_ADD() types are passed as const pointers to
> FIXTURE_TEARDOWN(). Make that explicit by constifying the variants
> declarations.
>
> Cc: Kees Cook
> Cc: Shuah Khan
> Cc: Will Drewry
> Signed-off-by: Mickaël Salaü
On Mon, Apr 29, 2024 at 03:09:27PM +0200, Mickaël Salaün wrote:
> Do not allocate self->dir_path in the test process because this would
> not be visible in the FIXTURE_TEARDOWN() process when relying on
> fork()/clone3() instead of vfork().
>
> This change is required for a following commit removi
On Mon, Apr 29, 2024 at 03:09:26PM +0200, Mickaël Salaün wrote:
> Fix a race condition when running several FIXTURE_TEARDOWN() managing
> the same resource. This fixes a race condition in the Landlock file
> system tests when creating or unmounting the same directory.
>
> Using clone3() with CLON
On Fri, Apr 26, 2024 at 04:23:59PM -0700, Jakub Kicinski wrote:
> Bugs in memory allocation failure paths are quite common.
> Add a test exercising those paths based on qstat and page pool
> failure hook.
>
> Running on bnxt:
>
> # ./drivers/net/hw/pp_alloc_fail.py
> KTAP version 1
> 1..1
>
Export Zcmop ISA extension through hwprobe.
Signed-off-by: Clément Léger
---
Documentation/arch/riscv/hwprobe.rst | 4
arch/riscv/include/uapi/asm/hwprobe.h | 1 +
arch/riscv/kernel/sys_hwprobe.c | 1 +
3 files changed, 6 insertions(+)
diff --git a/Documentation/arch/riscv/hwprobe.r
The KVM RISC-V allows Zcmop extension for Guest/VM so add this
extension to get-reg-list test.
Signed-off-by: Clément Léger
Reviewed-by: Anup Patel
Acked-by: Anup Patel
---
tools/testing/selftests/kvm/riscv/get-reg-list.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/testing/se
Extend the KVM ISA extension ONE_REG interface to allow KVM user space
to detect and enable Zcmop extension for Guest/VM.
Signed-off-by: Clément Léger
Reviewed-by: Anup Patel
Acked-by: Anup Patel
---
arch/riscv/include/uapi/asm/kvm.h | 1 +
arch/riscv/kvm/vcpu_onereg.c | 2 ++
2 files cha
Add parsing for Zcmop ISA extension which was ratified in commit
b854a709c00 ("Zcmop is ratified/1.0") of the riscv-isa-manual.
Signed-off-by: Clément Léger
---
arch/riscv/include/asm/hwcap.h | 1 +
arch/riscv/kernel/cpufeature.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/riscv/i
Add description for the Zcmop (Compressed May-Be-Operations) ISA
extension which was ratified in commit c732a4f39a4 ("Zcmop is
ratified/1.0") of the riscv-isa-manual.
Signed-off-by: Clément Léger
Acked-by: Conor Dooley
---
.../devicetree/bindings/riscv/extensions.yaml| 12
The KVM RISC-V allows Zca, Zcf, Zcd and Zcb extensions for Guest/VM so
add these extensions to get-reg-list test.
Signed-off-by: Clément Léger
Reviewed-by: Anup Patel
Acked-by: Anup Patel
---
tools/testing/selftests/kvm/riscv/get-reg-list.c | 16
1 file changed, 16 insertions(
Extend the KVM ISA extension ONE_REG interface to allow KVM user space
to detect and enable Zca, Zcf, Zcd and Zcb extensions for Guest/VM.
Signed-off-by: Clément Léger
Reviewed-by: Anup Patel
Acked-by: Anup Patel
---
arch/riscv/include/uapi/asm/kvm.h | 4
arch/riscv/kvm/vcpu_onereg.c
Export Zca, Zcf, Zcd and Zcb ISA extension through hwprobe.
Signed-off-by: Clément Léger
---
Documentation/arch/riscv/hwprobe.rst | 20
arch/riscv/include/uapi/asm/hwprobe.h | 4
arch/riscv/kernel/sys_hwprobe.c | 4
3 files changed, 28 insertions(+)
diff
The Zc* standard extension for code reduction introduces new extensions.
This patch adds support for Zca, Zcf, Zcd and Zcb. Zce, Zcmt and Zcmp
are left out of this patch since they are targeting microcontrollers/
embedded CPUs instead of application processors.
Signed-off-by: Clément Léger
---
a
Since a few extensions (Zicbom/Zicboz) already needs validation and
future ones will need it as well (Zc*) add a validate() callback to
struct riscv_isa_ext_data. This require to rework the way extensions are
parsed and split it in two phases. First phase is isa string or isa
extension list parsing
Add description for Zca, Zcf, Zcd and Zcb extensions which are part the
Zc* standard extensions for code size reduction. Additional validation
rules are added since Zcb depends on Zca, Zcf, depends on Zca and F, Zcd
depends on Zca and D and finally, Zcf can not be present on rv64.
Signed-off-by: C
Add support for (yet again) more RVA23U64 missing extensions. Add
support for Zcmop, Zca, Zcf, Zcd and Zcb extensions isa string parsing,
hwprobe and kvm support. Zce, Zcmt and Zcmp extensions have been left
out since they target microcontrollers/embedded CPUs and are not needed
by RVA23U64.
Since
Jakub Kicinski wrote:
> On Sat, 27 Apr 2024 09:49:28 -0400 Willem de Bruijn wrote:
> > Eventually probably want a more generic fault injection class.
> >
> > And for both fault injection and background traffic the with object
> > construct to ensure cleanup in all cases.
> >
> > Maybe even the sa
> I'm not super happy with the traffic generation using iperf3,
> my initial approach was to use mausezahn. But it turned out to be
> 5x slower in terms of PPS. Hopefully this is good enough for now.
How important is PPS? In order to get 'Maintained' status, automotive
vendors are going to want to
On Sat, 27 Apr 2024 09:49:28 -0400 Willem de Bruijn wrote:
> Eventually probably want a more generic fault injection class.
>
> And for both fault injection and background traffic the with object
> construct to ensure cleanup in all cases.
>
> Maybe even the same for ethtool, as ip and ethtool co
Bugs in memory allocation failure paths are quite common.
Add a test exercising those paths based on qstat and page pool
failure hook.
Running on bnxt:
# ./drivers/net/hw/pp_alloc_fail.py
KTAP version 1
1..1
# ethtool -G change retval: success
ok 1 pp_alloc_fail.test_pp_alloc
# Totals
While we are not very interested in testing performance
it's useful to be able to generate a lot of traffic.
iperf is the simplest way of getting relatively high PPS.
Reviewed-by: Willem de Bruijn
Signed-off-by: Jakub Kicinski
---
v2:
- fix import order in __init__.py
---
.../selftests/drivers
When picking TCP ports to use, avoid all below 10k.
This should lower the chance of collision or running
afoul whatever random policies may be on the host.
Reviewed-by: Willem de Bruijn
Signed-off-by: Jakub Kicinski
---
tools/testing/selftests/net/lib/py/utils.py | 2 +-
1 file changed, 1 inser
The main use of the ip() wrapper over cmd() is that it can parse JSON.
cmd("ip -j link show") will return stdout as a string, and test has
to call json.loads(). With ip("link show", json=True) the return value
will be already parsed.
More tools (ethtool, bpftool etc.) support the --json switch.
To
We created a separate directory for HW-only tests, recently.
Glue in the Python test library there, Python is a bit annoying
when it comes to using library code located "lower"
in the directory structure.
Reuse the Env class, but let tests require non-nsim setup.
Reviewed-by: Willem de Bruijn
Si
Because of caching / recycling using the general page allocation
failures to induce errors in page pool allocation is very hard.
Add direct error injection support to page_pool_alloc_pages().
Reviewed-by: Willem de Bruijn
Signed-off-by: Jakub Kicinski
---
CC: h...@kernel.org
CC: ilias.apalodi...
Add a test for exercising driver memory allocation failure paths.
page pool is a bit tricky to inject errors into at the page allocator
level because of the bulk alloc and recycling, so add explicit error
injection support "in front" of the caches.
Add a test to exercise that using only the standa
On Sat, 27 Apr 2024 09:51:01 -0400 Willem de Bruijn wrote:
> > +def ip(args, json=None, ns=None, host=None):
> > +if ns:
> > +args = '-netns ' + ns + " " + args
>
> Minor: inconsistent use of single and double comma strings. Maybe
> there's a reasoning that I'm just missing.
I also
Madhavan Srinivasan writes:
> When running `make -C powerpc/pmu run_tests` from top level selftests
> directory, currently this error is being reported
>
> make: Entering directory
> '/home/maddy/linux/tools/testing/selftests/powerpc/pmu'
> Makefile:40: warning: overriding recipe for target 'emit
Required by switch_timens() to open /proc/self/ns/time_for_children.
CONFIG_GENERIC_VDSO_TIME_NS is not available on UML, so pidfd_setns_test
cannot be run successfully on this architecture.
Cc: Christian Brauner
Cc: Shuah Khan
Fixes: 2b40c5db73e2 ("selftests/pidfd: add pidfd setns tests")
Revi
Setting the time namespace with CLONE_NEWTIME returns -EUSERS if the
calling thread shares memory with another thread (because of the shared
vDSO), which is the case when it is created with vfork().
Fix pidfd_setns_test by replacing test harness's vfork() call with a
clone3() call with CLONE_VFORK
FIXTURE_VARIANT_ADD() types are passed as const pointers to
FIXTURE_TEARDOWN(). Make that explicit by constifying the variants
declarations.
Cc: Kees Cook
Cc: Shuah Khan
Cc: Will Drewry
Signed-off-by: Mickaël Salaün
Link: https://lore.kernel.org/r/20240429130931.2394118-7-...@digikod.net
---
Fix a race condition when running several FIXTURE_TEARDOWN() managing
the same resource. This fixes a race condition in the Landlock file
system tests when creating or unmounting the same directory.
Using clone3() with CLONE_VFORK guarantees that the child and grandchild
test processes are sequen
Replace a wrong EXPECT_GT(self->child_pid_exited, 0) with EXPECT_GE(),
which will be actually tested on the parent and child sides with a
following commit.
Cc: Christian Brauner
Cc: Kees Cook
Cc: Shuah Khan
Signed-off-by: Mickaël Salaün
Link: https://lore.kernel.org/r/20240429130931.2394118-8-
Do not allocate self->dir_path in the test process because this would
not be visible in the FIXTURE_TEARDOWN() process when relying on
fork()/clone3() instead of vfork().
This change is required for a following commit removing vfork() call to
not break the layout3_fs.* test cases.
Cc: Günther Noa
Unconditionally share _metadata between all forked processes, which
enables to actually catch errors which were previously ignored.
This is required for a following commit replacing vfork() with clone3()
and CLONE_VFORK (i.e. not sharing the full memory) . It should also be
useful to share _metad
Make sure fixture teardowns are run when test cases failed, including
when _metadata->teardown_parent is set to true.
Make sure only one fixture teardown is run per test case, handling the
case where the test child forks.
Cc: Jakub Kicinski
Cc: Shengyu Li
Cc: Shuah Khan
Fixes: 72d7cb5c190b ("s
According to the test environment, the mount point of the test's working
directory may be shared or not, which changes the visibility of the
nested "tmp" mount point for the test's parent process calling
umount("tmp").
This was spotted while running tests in containers [1], where mount
points are
1 - 100 of 108 matches
Mail list logo