Re: [PATCH v4 2/5] KVM: selftests: aarch64: Move pmu helper functions into vpmu.h

2024-02-01 Thread Oliver Upton
On Thu, Feb 01, 2024 at 09:56:51PM -0500, Shaoqin Huang wrote: > -static uint64_t get_pmcr_n(uint64_t pmcr) > -{ > - return FIELD_GET(ARMV8_PMU_PMCR_N, pmcr); > -} > - > -static void set_pmcr_n(uint64_t *pmcr, uint64_t pmcr_n) > -{ > - u64p_replace_bits((__u64 *) pmcr, pmcr_n,

Re: [PATCH v4 1/5] KVM: selftests: aarch64: Make the [create|destroy]_vpmu_vm() public

2024-02-01 Thread Oliver Upton
On Thu, Feb 01, 2024 at 09:56:50PM -0500, Shaoqin Huang wrote: [...] > diff --git a/tools/testing/selftests/kvm/include/aarch64/vpmu.h > b/tools/testing/selftests/kvm/include/aarch64/vpmu.h > new file mode 100644 > index ..0a56183644ee > --- /dev/null > +++

[PATCH v3] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-01 Thread Shaoqin Huang
When execute the dirty_log_test on some aarch64 machine, it sometimes trigger the ASSERT: Test Assertion Failure dirty_log_test.c:384: dirty_ring_vcpu_ring_full pid=14854 tid=14854 errno=22 - Invalid argument 1 0x004033eb: dirty_ring_collect_dirty_pages at

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Theo de Raadt
Jeff Xu wrote: > Even without free. > I personally do not like the heap getting sealed like that. > > Component A. > p=malloc(4096); > writing something to p. > > Component B: > mprotect(p,4096, RO) > mseal(p,4096) > > This will split the heap VMA, and prevent the heap from shrinking, if >

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Jeff Xu
On Thu, Feb 1, 2024 at 8:05 PM Theo de Raadt wrote: > > Jeff Xu wrote: > > > To me, the most important thing is to deliver a feature that's easy to > > use and works well. I don't want users to mess things up, so if I'm > > the one giving them the tools, I'm going to make sure they have all > >

Re: [PATCH v8 2/4] mseal: add mseal syscall

2024-02-01 Thread Jeff Xu
On Thu, Feb 1, 2024 at 8:10 PM Theo de Raadt wrote: > > Jeff Xu wrote: > > > On Thu, Feb 1, 2024 at 7:54 PM Theo de Raadt wrote: > > > > > > Jeff Xu wrote: > > > > > > > On Thu, Feb 1, 2024 at 3:11 PM Eric Biggers wrote: > > > > > > > > > > On Wed, Jan 31, 2024 at 05:50:24PM +,

[PATCH v7 4/4] KVM: selftests: Add test cases for LoongArch

2024-02-01 Thread Bibo Mao
From: Tianrui Zhao Some common KVM testcases are supported on LoongArch now as following: demand_paging_test dirty_log_perf_test dirty_log_test guest_print_test hardware_disable_test kvm_binary_stats_test kvm_create_max_vcpus

[PATCH v7 2/4] KVM: selftests: Add core KVM selftests support for LoongArch

2024-02-01 Thread Bibo Mao
From: Tianrui Zhao Add core KVM selftests support for LoongArch, it includes exception handler, mmu page table setup and vcpu startup entry supporting etc. Signed-off-by: Tianrui Zhao Signed-off-by: Bibo Mao --- .../selftests/kvm/lib/loongarch/exception.S | 59

[PATCH v7 3/4] KVM: selftests: Add ucall test support for LoongArch

2024-02-01 Thread Bibo Mao
From: Tianrui Zhao Add ucall test support for LoongArch, ucall method on LoongArch uses undefined mmio area. It will cause causes vcpu exits to hypervisor so that hypervisor can communicate with vcpu. Signed-off-by: Tianrui Zhao Signed-off-by: Bibo Mao ---

[PATCH v7 1/4] KVM: selftests: Add KVM selftests header files for LoongArch

2024-02-01 Thread Bibo Mao
Add KVM selftests header files for LoongArch, including processor.h and kvm_util_base.h. It mainly contains LoongArch CSR register definition and page table entry definition. Signed-off-by: Tianrui Zhao Signed-off-by: Bibo Mao --- .../selftests/kvm/include/kvm_util_base.h | 5 +

[PATCH v7 0/4] KVM: selftests: Add LoongArch support

2024-02-01 Thread Bibo Mao
This patchset adds KVM selftests for LoongArch system, currently only some common test cases are supported and pass to run. These testcase are listed as following: demand_paging_test dirty_log_perf_test dirty_log_test guest_print_test hardware_disable_test

Re: [PATCH v8 2/4] mseal: add mseal syscall

2024-02-01 Thread Theo de Raadt
Jeff Xu wrote: > On Thu, Feb 1, 2024 at 7:54 PM Theo de Raadt wrote: > > > > Jeff Xu wrote: > > > > > On Thu, Feb 1, 2024 at 3:11 PM Eric Biggers wrote: > > > > > > > > On Wed, Jan 31, 2024 at 05:50:24PM +, jef...@chromium.org wrote: > > > > > [PATCH v8 2/4] mseal: add mseal syscall > > >

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Theo de Raadt
Jeff Xu wrote: > To me, the most important thing is to deliver a feature that's easy to > use and works well. I don't want users to mess things up, so if I'm > the one giving them the tools, I'm going to make sure they have all > the information they need and that there are safeguards in place.

Re: [PATCH v8 2/4] mseal: add mseal syscall

2024-02-01 Thread Jeff Xu
On Thu, Feb 1, 2024 at 7:54 PM Theo de Raadt wrote: > > Jeff Xu wrote: > > > On Thu, Feb 1, 2024 at 3:11 PM Eric Biggers wrote: > > > > > > On Wed, Jan 31, 2024 at 05:50:24PM +, jef...@chromium.org wrote: > > > > [PATCH v8 2/4] mseal: add mseal syscall > > > [...] > > > > +/* > > > > + *

Re: [PATCH v8 2/4] mseal: add mseal syscall

2024-02-01 Thread Theo de Raadt
Jeff Xu wrote: > On Thu, Feb 1, 2024 at 3:11 PM Eric Biggers wrote: > > > > On Wed, Jan 31, 2024 at 05:50:24PM +, jef...@chromium.org wrote: > > > [PATCH v8 2/4] mseal: add mseal syscall > > [...] > > > +/* > > > + * The PROT_SEAL defines memory sealing in the prot argument of mmap(). > > >

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Jeff Xu
On Thu, Feb 1, 2024 at 7:29 PM Linus Torvalds wrote: > > On Thu, 1 Feb 2024 at 19:24, Jeff Xu wrote: > > > > The patch Stephan developed was based on V1 of the patch, IIRC, which > > is really ancient, and it is not based on MAP_SEALABLE, which is a > > more recent development entirely from me.

Re: [PATCH v8 2/4] mseal: add mseal syscall

2024-02-01 Thread Jeff Xu
On Thu, Feb 1, 2024 at 3:11 PM Eric Biggers wrote: > > On Wed, Jan 31, 2024 at 05:50:24PM +, jef...@chromium.org wrote: > > [PATCH v8 2/4] mseal: add mseal syscall > [...] > > +/* > > + * The PROT_SEAL defines memory sealing in the prot argument of mmap(). > > + */ > > +#define PROT_SEAL

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Linus Torvalds
On Thu, 1 Feb 2024 at 19:24, Jeff Xu wrote: > > The patch Stephan developed was based on V1 of the patch, IIRC, which > is really ancient, and it is not based on MAP_SEALABLE, which is a > more recent development entirely from me. So the problem with this whole patch series from the very

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Jeff Xu
On Thu, Feb 1, 2024 at 5:06 PM Greg KH wrote: > > On Thu, Feb 01, 2024 at 03:24:40PM -0700, Theo de Raadt wrote: > > As an outsider, Linux development is really strange: > > > > Two sub-features are being pushed very hard, and the primary developer > > doesn't have code which uses either of them.

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Jeff Xu
On Thu, Feb 1, 2024 at 3:15 PM Linus Torvalds wrote: > > On Thu, 1 Feb 2024 at 14:54, Theo de Raadt wrote: > > > > Linus, you are in for a shock when the proposal doesn't work for glibc > > and all the applications! > > Heh. I've enjoyed seeing your argumentative style that made you so > famous

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Jeff Xu
On Thu, Feb 1, 2024 at 12:45 PM Liam R. Howlett wrote: > > * Jeff Xu [240131 20:27]: > > On Wed, Jan 31, 2024 at 11:34 AM Liam R. Howlett > > wrote: > > > > > Having to opt-in to allowing mseal will probably not work well. I'm leaving the opt-in discussion in Linus's thread. > Initial library

Re: [PATCH v2 0/3] selftests/net: A couple of typos fixes in key-management/rst tests

2024-02-01 Thread Jakub Kicinski
On Fri, 2 Feb 2024 02:30:52 + Dmitry Safonov wrote: > > Actually, I think there may be an easier fix: > > > > 4. Make sure that client close()s TCP-AO first, making it twsk. > >And also make sure that net-ns counters read post server's close(). > > > > Will do this, let's see if this

[PATCH v4 5/5] KVM: selftests: aarch64: Add invalid filter test in pmu_event_filter_test

2024-02-01 Thread Shaoqin Huang
Add the invalid filter test includes sets the filter beyond the event space and sets the invalid action to double check if the KVM_ARM_VCPU_PMU_V3_FILTER will return the expected error. Signed-off-by: Shaoqin Huang --- .../kvm/aarch64/pmu_event_filter_test.c | 36 +++ 1

[PATCH v4 4/5] KVM: selftests: aarch64: Introduce pmu_event_filter_test

2024-02-01 Thread Shaoqin Huang
Introduce pmu_event_filter_test for arm64 platforms. The test configures PMUv3 for a vCPU, and sets different pmu event filters for the vCPU, and check if the guest can see those events which user allow and can't use those events which use deny. This test refactor the create_vpmu_vm() and make it

[PATCH v4 3/5] KVM: selftests: aarch64: Fix the buggy [enable|disable]_counter

2024-02-01 Thread Shaoqin Huang
In general, the set/clr registers should always be used in their write form, never in a RMW form (imagine an interrupt disabling a counter between the read and the write...). The current implementation of [enable|disable]_counter both use the RMW form, fix them by directly write to the set/clr

[PATCH v4 1/5] KVM: selftests: aarch64: Make the [create|destroy]_vpmu_vm() public

2024-02-01 Thread Shaoqin Huang
Move the implementation of [create|destroy]_vpmu_vm() into lib/aarch64/pmu.c and export their declaration in a header so they can be reused by other tests. The sync exception handler install is test specific so we move it out of the helper function. No functional change intended. Reviewed-by:

[PATCH v4 2/5] KVM: selftests: aarch64: Move pmu helper functions into vpmu.h

2024-02-01 Thread Shaoqin Huang
Move those pmu helper functions into include/aarch64/vpmu.h, thus it can be used by other pmu test. No functional change intended. Reviewed-by: Eric Auger Signed-off-by: Shaoqin Huang --- .../kvm/aarch64/vpmu_counter_access.c | 117 -

[PATCH v4 0/5] KVM: selftests: aarch64: Introduce pmu_event_filter_test

2024-02-01 Thread Shaoqin Huang
The test is inspired by the pmu_event_filter_test which implemented by x86. On the arm64 platform, there is the same ability to set the pmu_event_filter through the KVM_ARM_VCPU_PMU_V3_FILTER attribute. So add the test for arm64. The series first move some pmu common code from vpmu_counter_access

Re: [PATCH v2 0/3] selftests/net: A couple of typos fixes in key-management/rst tests

2024-02-01 Thread Dmitry Safonov
On 2/1/24 23:37, Dmitry Safonov wrote: > On 2/1/24 22:25, Dmitry Safonov wrote: >> Hi Jakub, >> >> On 2/1/24 21:21, Jakub Kicinski wrote: >>> On Thu, 1 Feb 2024 00:50:46 + Dmitry Safonov wrote: Please, let me know if there will be other issues with tcp-ao tests :) Going to work

Re: [PATCH v3 1/3] riscv: mm: Use hint address in mmap if available

2024-02-01 Thread Charlie Jenkins
On Wed, Jan 31, 2024 at 11:59:43PM +0800, Yangyu Chen wrote: > On Wed, 2024-01-31 at 22:41 +0800, Yangyu Chen wrote: > > On Tue, 2024-01-30 at 17:07 -0800, Charlie Jenkins wrote: > > > On riscv it is guaranteed that the address returned by mmap is less > > > than > > > the hint address. Allow mmap

[PATCH] selftests/net: Amend per-netns counter checks

2024-02-01 Thread Dmitry Safonov
Selftests here check not only that connect()/accept() for TCP-AO/TCP-MD5/non-signed-TCP combinations do/don't establish connections, but also counters: those are per-AO-key, per-socket and per-netns. The counters are checked on the server's side, as the server listener has TCP-AO/TCP-MD5/no keys

Re: [PATCH v2 net 0/4] selftests: net: more fixes

2024-02-01 Thread David Ahern
On 2/1/24 11:42 AM, Paolo Abeni wrote: > Another small bunch of fixes, addressing issues outlined by the > netdev CI. > > The first 2 patches are just rebased. > > The following 2 are new fixes, for even more problems that surfaced > meanwhile. > > Paolo Abeni (4): > selftests: net: cut more

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Greg KH
On Thu, Feb 01, 2024 at 03:24:40PM -0700, Theo de Raadt wrote: > As an outsider, Linux development is really strange: > > Two sub-features are being pushed very hard, and the primary developer > doesn't have code which uses either of them. And once it goes in, it > cannot be changed. > > It's

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Theo de Raadt
Linus Torvalds wrote: > and using PROT_SEAL at mmap() time is similarly the same obvious > notion of "map this, and then seal that mapping". The usual way is: ptr = mmap(NULL, len PROT_READ|PROT_WRITE, ...) initialize region between ptr, ptr+len mprotect(ptr, len, PROT_READ)

[PATCH net-next] selftests: netdevsim: stop using ifconfig

2024-02-01 Thread Jakub Kicinski
Paolo points out that ifconfig is legacy and we should not use it. Signed-off-by: Jakub Kicinski --- CC: sh...@kernel.org CC: ho...@kernel.org CC: linux-kselftest@vger.kernel.org --- .../drivers/net/netdevsim/udp_tunnel_nic.sh | 40 +-- 1 file changed, 20 insertions(+), 20

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Theo de Raadt
Linus Torvalds wrote: > So yes, to my mind > > mprotect(addr, len, PROT_READ); > mseal(addr, len, 0); > > should basically give identical results to > > mprotect(addr, len, PROT_READ | PROT_SEAL); > > and using PROT_SEAL at mmap() time is similarly the same obvious > notion of

Re: [PATCH v2 0/3] selftests/net: A couple of typos fixes in key-management/rst tests

2024-02-01 Thread Dmitry Safonov
On 2/1/24 22:25, Dmitry Safonov wrote: > Hi Jakub, > > On 2/1/24 21:21, Jakub Kicinski wrote: >> On Thu, 1 Feb 2024 00:50:46 + Dmitry Safonov wrote: >>> Please, let me know if there will be other issues with tcp-ao tests :) >>> >>> Going to work on tracepoints and some other TCP-AO stuff for

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Linus Torvalds
On Thu, 1 Feb 2024 at 14:54, Theo de Raadt wrote: > > Linus, you are in for a shock when the proposal doesn't work for glibc > and all the applications! Heh. I've enjoyed seeing your argumentative style that made you so famous back in the days. Maybe it's always been there, but I haven't seen

Re: [PATCH v8 2/4] mseal: add mseal syscall

2024-02-01 Thread Eric Biggers
On Wed, Jan 31, 2024 at 05:50:24PM +, jef...@chromium.org wrote: > [PATCH v8 2/4] mseal: add mseal syscall [...] > +/* > + * The PROT_SEAL defines memory sealing in the prot argument of mmap(). > + */ > +#define PROT_SEAL0x0400 /* _BITUL(26) */ > + > /* 0x01 - 0x03 are defined in

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Theo de Raadt
> To me, this means Linus is OK with the general signatures of the APIs. Linus, you are in for a shock when the proposal doesn't work for glibc and all the applications!

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Jeff Xu
On Thu, Feb 1, 2024 at 12:45 PM Liam R. Howlett wrote: > > > > I would love to hear more from Linux developers on this. > > Linus said it was really important to get the semantics correct, but you > took his (unfinished) list and kept going. I think there are some > unanswered questions and

Re: [PATCH v2 0/3] selftests/net: A couple of typos fixes in key-management/rst tests

2024-02-01 Thread Dmitry Safonov
Hi Jakub, On 2/1/24 21:21, Jakub Kicinski wrote: > On Thu, 1 Feb 2024 00:50:46 + Dmitry Safonov wrote: >> Please, let me know if there will be other issues with tcp-ao tests :) >> >> Going to work on tracepoints and some other TCP-AO stuff for net-next. > > Since you're being nice and

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Theo de Raadt
There is another problem with adding PROT_SEAL to the mprotect() call. What are the precise semantics? If one reviews how mprotect() behaves, it is quickly clear that it is very sloppy specification. We spent quite a bit of effort making our manual page as clear as possible to the most it

Re: [PATCH v2 0/3] selftests/net: A couple of typos fixes in key-management/rst tests

2024-02-01 Thread Jakub Kicinski
On Thu, 1 Feb 2024 00:50:46 + Dmitry Safonov wrote: > Please, let me know if there will be other issues with tcp-ao tests :) > > Going to work on tracepoints and some other TCP-AO stuff for net-next. Since you're being nice and helpful I figured I'll try testing TCP-AO with debug options

Re: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Liam R. Howlett
* Jeff Xu [240131 20:27]: > On Wed, Jan 31, 2024 at 11:34 AM Liam R. Howlett > wrote: > > > > Please add me to the Cc list of these patches. > Ok. > > > > * jef...@chromium.org [240131 12:50]: > > > From: Jeff Xu > > > > > > This patchset proposes a new mseal() syscall for the Linux kernel. >

Re: [PATCH v3 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-01 Thread Reinette Chatre
Hi Maciej, On 1/31/2024 4:55 AM, Maciej Wieczor-Retman wrote: > On 2024-01-26 at 13:10:18 -0800, Reinette Chatre wrote: >> On 1/25/2024 3:13 AM, Maciej Wieczor-Retman wrote: >>> Add tests for both L2 and L3 CAT to verify the return values >>> generated by writing non-contiguous CBMs don't

[PATCH v2 net 4/4] selftests: net: avoid just another constant wait

2024-02-01 Thread Paolo Abeni
Using hard-coded constant timeout to wait for some expected event is deemed to fail sooner or later, especially in slow env. Our CI has spotted another of such race: # TEST: ipv6: cleanup of cached exceptions - nexthop objects [FAIL] # can't delete veth device in a timely manner,

[PATCH v2 net 3/4] selftests: net: fix tcp listener handling in pmtu.sh

2024-02-01 Thread Paolo Abeni
The pmtu.sh test uses a few TCP listener in a problematic way: It hard-codes a constant timeout to wait for the listener starting-up in background. That introduces unneeded latency and on very slow and busy host it can fail. Additionally the test starts again the same listener in the same

[PATCH v2 net 2/4] selftests: net: fix setup_ns usage in rtnetlink.sh

2024-02-01 Thread Paolo Abeni
The setup_ns helper marks the testns global variable as readonly. Later attempts to set such variable are unsuccessful, causing a couple test failures. Avoid completely the variable re-initialization and let the function access the global value. Fixes: ("selftests: rtnetlink: use setup_ns in

[PATCH v2 net 1/4] selftests: net: cut more slack for gro fwd tests.

2024-02-01 Thread Paolo Abeni
The udpgro_fwd.sh self-tests are somewhat unstable. There are a few timing constraints the we struggle to meet on very slow environments. Instead of skipping the whole tests in such envs, increase the test resilience WRT very slow hosts: increase the inter-packets timeouts, avoid resetting the

[PATCH v2 net 0/4] selftests: net: more fixes

2024-02-01 Thread Paolo Abeni
Another small bunch of fixes, addressing issues outlined by the netdev CI. The first 2 patches are just rebased. The following 2 are new fixes, for even more problems that surfaced meanwhile. Paolo Abeni (4): selftests: net: cut more slack for gro fwd tests. selftests: net: fix setup_ns

Re: [PATCH v2] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-01 Thread Sean Christopherson
On Thu, Feb 01, 2024, Shaoqin Huang wrote: > > > /* > > >* We reserve page table for 2 times of extra dirty mem which > > >* will definitely cover the original (1G+) test range. Here > > > @@ -825,6 +832,13 @@ static void run_test(enum vm_guest_mode mode, void >

Re: [PATCH net 0/9] mptcp: fixes for recent issues reported by CI's

2024-02-01 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Jakub Kicinski : On Wed, 31 Jan 2024 22:49:45 +0100 you wrote: > This series of 9 patches fixes issues mostly identified by CI's not > managed by the MPTCP maintainers. Thank you Linero (LKFT) and Netdev > maintainers (NIPA) for running

RE: [PATCH v8 0/4] Introduce mseal

2024-02-01 Thread Bird, Tim
> -Original Message- > From: Theo de Raadt > > I would love to hear more from Linux developers on this. > > I'm not sure you are capable of listening. > Theo, It is possible to make your technical points, and even to express frustration that it has been difficult to get them

Re: [PATCH net 0/3] selftests: net: more fixes

2024-02-01 Thread Jakub Kicinski
On Wed, 31 Jan 2024 18:52:26 +0100 Paolo Abeni wrote: > Another small bunch of fixes, addressing issues outlined by the > netdev CI. > > Paolo Abeni (3): > selftests: net: cut more slack for gro fwd tests. > selftests: net: fix setup_ns usage in rtnetlink.sh > selftests: net: enable some

Re: [PATCH net 0/5] selftests: net: More small fixes

2024-02-01 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Jakub Kicinski : On Wed, 31 Jan 2024 09:08:43 -0500 you wrote: > Some small fixes for net selftests which follow from these recent commits: > dd2d40acdbb2 ("selftests: bonding: Add more missing config options") > 49078c1b80b6

Re: [PATCH net] selftests: net: add missing config for NF_TARGET_TTL

2024-02-01 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski : On Wed, 31 Jan 2024 08:56:05 -0800 you wrote: > amt test uses the TTL iptables module: > > ip netns exec "${RELAY}" iptables -t mangle -I PREROUTING \ > -d 239.0.0.1 -j TTL --ttl-set 2 > > Fixes: c08e8baea78e

[PATCH net-next] selftests/net: ignore timing errors in so_txtime if KSFT_MACHINE_SLOW

2024-02-01 Thread Willem de Bruijn
From: Willem de Bruijn This test is time sensitive. It may fail on virtual machines and for debug builds. Continue to run in these environments to get code coverage. But optionally suppress failure for timing errors (only). This is controlled with environment variable KSFT_MACHINE_SLOW. The

[PATCH v2 2/2] selftests/mm: run_vmtests: Use correct flag in the code

2024-02-01 Thread Muhammad Usama Anjum
Use correct -d flag as mentioned in comments for destructive tests. Rename variable and update comment for some clarification. Fixes: cc7b9955344c ("selftests/mm: run_vmtests.sh: add missing tests") Signed-off-by: Muhammad Usama Anjum --- Please fold this patch in the Fixes patch if needed. ---

[PATCH v2 1/2] selftests/mm: on-fault-limit: run test without root privileges otherwise skip

2024-02-01 Thread Muhammad Usama Anjum
The mmap() respects rlimit only for normal users. This test should be run as normal user, without root privileges. Also add back the sudo -u nobody as run_vmtests.sh is run as root most of the times. Skip the test instead if sudo isn't present to lower the privileges. Fixes: b6221771d468

Re: [PATCH v3 2/5] selftests/mm: run_vmtests: remove sudo and conform to tap

2024-02-01 Thread Ryan Roberts
On 01/02/2024 12:24, Muhammad Usama Anjum wrote: > On 2/1/24 5:04 PM, Ryan Roberts wrote: >> On 25/01/2024 15:46, Muhammad Usama Anjum wrote: >>> Remove sudo as some test running environments may not have sudo >>> available. Instead skip the test if root privileges aren't available in >>> the

Re: [PATCH net-next] selftests: net: Fix bridge backup port test flakiness

2024-02-01 Thread Paolo Abeni
On Thu, 2024-02-01 at 13:16 +0200, Ido Schimmel wrote: > On Thu, Feb 01, 2024 at 10:34:52AM +0100, Paolo Abeni wrote: > > What about adding an helper alike wait_local_port_listen(), checking > > for bridge link status in short intervals, to likely reduce the overall > > wait time? > > What about

Re: [PATCH] selftests/mm: on-fault-limit: run test without root privileges otherwise skip

2024-02-01 Thread Muhammad Usama Anjum
Please disregard this patch. I'll send another patch to fix another thing. On 2/1/24 12:13 PM, Muhammad Usama Anjum wrote: > The mmap() respects rlimit only for normal users. This test should be > run as normal user, without root privileges. > > Fixes: b6221771d468 ("selftests/mm: run_vmtests:

Re: [PATCH v3 5/5] selftests/mm: run_vmtests.sh: add missing tests

2024-02-01 Thread Muhammad Usama Anjum
On 2/1/24 5:11 PM, Ryan Roberts wrote: > On 25/01/2024 15:46, Muhammad Usama Anjum wrote: >> Add missing tests to run_vmtests.sh. The mm kselftests are run through >> run_vmtests.sh. If a test isn't present in this script, it'll not run >> with run_tests or `make -C tools/testing/selftests/mm

Re: [PATCH v3 2/5] selftests/mm: run_vmtests: remove sudo and conform to tap

2024-02-01 Thread Muhammad Usama Anjum
On 2/1/24 5:04 PM, Ryan Roberts wrote: > On 25/01/2024 15:46, Muhammad Usama Anjum wrote: >> Remove sudo as some test running environments may not have sudo >> available. Instead skip the test if root privileges aren't available in >> the test. >> >> Signed-off-by: Muhammad Usama Anjum >> --- >>

Re: [PATCH v3 5/5] selftests/mm: run_vmtests.sh: add missing tests

2024-02-01 Thread Ryan Roberts
On 25/01/2024 15:46, Muhammad Usama Anjum wrote: > Add missing tests to run_vmtests.sh. The mm kselftests are run through > run_vmtests.sh. If a test isn't present in this script, it'll not run > with run_tests or `make -C tools/testing/selftests/mm run_tests`. > > Cc: Ryan Roberts >

Re: [PATCH v3 2/5] selftests/mm: run_vmtests: remove sudo and conform to tap

2024-02-01 Thread Ryan Roberts
On 25/01/2024 15:46, Muhammad Usama Anjum wrote: > Remove sudo as some test running environments may not have sudo > available. Instead skip the test if root privileges aren't available in > the test. > > Signed-off-by: Muhammad Usama Anjum > --- > Changes since v1: > - Added this patch in v2 >

Re: [PATCH net-next] selftests: net: Fix bridge backup port test flakiness

2024-02-01 Thread Ido Schimmel
On Thu, Feb 01, 2024 at 10:34:52AM +0100, Paolo Abeni wrote: > What about adding an helper alike wait_local_port_listen(), checking > for bridge link status in short intervals, to likely reduce the overall > wait time? What about the below? diff --git

Re: [PATCH] selftests: ftrace: fix typo in test report

2024-02-01 Thread Kousik Sanagavarapu
Hi, Ali Zahraee wrote: > This is just another trivial typo fix. The typo shows up in the final > report after tests are done. > > Signed-off-by: Ali Zahraee I sent a patch regarding this already which has been acked,

Re: [PATCH net-next] selftests: net: Fix bridge backup port test flakiness

2024-02-01 Thread Paolo Abeni
On Thu, 2024-02-01 at 10:05 +0200, Ido Schimmel wrote: > The test toggles the carrier of a bridge port in order to test the > bridge backup port feature. > > Due to the linkwatch delayed work the carrier change is not always > reflected fast enough to the bridge driver and packets are not

Re: [PATCH v2 3/3] selftests: add zswapin and no zswap tests

2024-02-01 Thread Yosry Ahmed
Hey Nhat, I have a few more comments, sorry for not catching everything the first time around. Adding Roman to CC. On Wed, Jan 31, 2024 at 07:27:18PM -0800, Nhat Pham wrote: > Add a selftest to cover the zswapin code path, allocating more memory > than the cgroup limit to trigger

Re: [PATCH v2] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-01 Thread Shaoqin Huang
Hi Sean, Thanks for your reviewing. On 1/27/24 04:25, Sean Christopherson wrote: +Peter On Fri, Nov 17, 2023, Shaoqin Huang wrote: When execute the dirty_log_test on some aarch64 machine, it sometimes trigger the ASSERT: Test Assertion Failure dirty_log_test.c:384:

[PATCH] selftests: ftrace: fix typo in test report

2024-02-01 Thread Ali Zahraee
This is just another trivial typo fix. The typo shows up in the final report after tests are done. Signed-off-by: Ali Zahraee --- tools/testing/selftests/ftrace/ftracetest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/ftrace/ftracetest

[PATCH net-next] selftests: net: Fix bridge backup port test flakiness

2024-02-01 Thread Ido Schimmel
The test toggles the carrier of a bridge port in order to test the bridge backup port feature. Due to the linkwatch delayed work the carrier change is not always reflected fast enough to the bridge driver and packets are not forwarded as the test expects, resulting in failures [1]. Fix by adding