[PATCH net-next] selftests/net: calibrate fq_band_pktlimit

2024-01-26 Thread Willem de Bruijn
From: Willem de Bruijn This test validates per-band packet limits in FQ. Packets are dropped rather than enqueued if the limit for their band is reached. This test is timing sensitive. It queues packets in FQ with a future delivery time to fill the qdisc. The test failed in a virtual environmen

[PATCH net-next] selftests/net: calibrate txtimestamp

2024-01-26 Thread Willem de Bruijn
From: Willem de Bruijn The test sends packets and compares enqueue, transmit and Ack timestamps with expected values. It installs netem delays to increase latency between these points. The test proves flaky in virtual environment (vng). Increase the delays to reduce variance. Scale measurement t

Re: [PATCH net-next v2 2/6] selftests: bonding: Add net/forwarding/lib.sh to TEST_INCLUDES

2024-01-26 Thread Jay Vosburgh
Benjamin Poirier wrote: >In order to avoid duplicated files when both the bonding and forwarding >tests are exported together, add net/forwarding/lib.sh to TEST_INCLUDES and >include it via its relative path. > >Reviewed-by: Petr Machata >Tested-by: Petr Machata >Reviewed-by: Hangbin Liu >Sign

[PATCH net-next v2 6/6] selftests: forwarding: Remove duplicated lib.sh content

2024-01-26 Thread Benjamin Poirier
From: Petr Machata commit 25ae948b4478 ("selftests/net: add lib.sh") added net/lib.sh to contain code shared by tests under net/ and net/forwarding/. However, this caused issues with selftests from directories other than net/forwarding/, in particular those under drivers/net/. Those issues were a

[PATCH net-next v2 5/6] selftests: forwarding: Redefine relative_path variable

2024-01-26 Thread Benjamin Poirier
The following code which is part of lib.sh: relative_path="${BASH_SOURCE%/*}" if [[ "$relative_path" == "${BASH_SOURCE}" ]]; then relative_path="." fi reimplements functionality that is part of `dirname`: $ dirname "" . To avoid this duplication, replace "relative_path" by "net_forwarding_

[PATCH net-next v2 4/6] selftests: dsa: Replace test symlinks by wrapper script

2024-01-26 Thread Benjamin Poirier
The dsa tests which are symlinks of tests from net/forwarding/ (like tc_actions.sh) become regular files after export (because `rsync --copy-unsafe-links` is used) and expect to source lib.sh (net/forwarding/lib.sh) from the same directory. In the last patch of this series, net/forwarding/lib.sh w

[PATCH net-next v2 3/6] selftests: team: Add shared library scripts to TEST_INCLUDES

2024-01-26 Thread Benjamin Poirier
In order to avoid duplicated files when both the team and bonding tests are exported together, add lag_lib.sh to TEST_INCLUDES. Do likewise for net/forwarding/lib.sh regarding team and forwarding tests. Reviewed-by: Petr Machata Tested-by: Petr Machata Reviewed-by: Hangbin Liu Signed-off-by: B

[PATCH net-next v2 2/6] selftests: bonding: Add net/forwarding/lib.sh to TEST_INCLUDES

2024-01-26 Thread Benjamin Poirier
In order to avoid duplicated files when both the bonding and forwarding tests are exported together, add net/forwarding/lib.sh to TEST_INCLUDES and include it via its relative path. Reviewed-by: Petr Machata Tested-by: Petr Machata Reviewed-by: Hangbin Liu Signed-off-by: Benjamin Poirier ---

[PATCH net-next v2 1/6] selftests: Introduce Makefile variable to list shared bash scripts

2024-01-26 Thread Benjamin Poirier
Some tests written in bash source other files in a parent directory. For example, drivers/net/bonding/dev_addr_lists.sh sources net/forwarding/lib.sh. If a subset of tests is exported and run outside the source tree (for example by using `make -C tools/testing/selftests gen_tar TARGETS="drivers/net

[PATCH net-next v2 0/6] selftests: Add TEST_INCLUDES directive and adjust tests to use it

2024-01-26 Thread Benjamin Poirier
After commit 25ae948b4478 ("selftests/net: add lib.sh") but before commit 2114e83381d3 ("selftests: forwarding: Avoid failures to source net/lib.sh"), some net selftests encountered errors when they were being exported and run. This was because the new net/lib.sh was not exported along with the tes

Re: [PATCH bpf-next v2] selftests/bpf: Include runner extras for install target

2024-01-26 Thread Andrii Nakryiko
On Thu, Jan 25, 2024 at 8:05 AM Björn Töpel wrote: > > From: Björn Töpel > > When using the "install" or targets depending on install, e.g. > "gen_tar", the "runner extras" weren't included for the BPF machine > flavors. > > Make sure the necessary helper scripts/tools are added to > correspondin

Re: [PATCH net] selftests: net: give more time for GRO aggregation

2024-01-26 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski : On Thu, 25 Jan 2024 19:09:06 +0100 you wrote: > The gro.sh test-case relay on the gro_flush_timeout to ensure > that all the segments belonging to any given batch are properly > aggregated. > > The other end, the sender i

[KTAP V2 PATCH v2] ktap_v2: add test metadata

2024-01-26 Thread Rae Moar
Add specification for test metadata to the KTAP v2 spec. KTAP v1 only specifies the output format of very basic test information: test result and test name. Any additional test information either gets added to general diagnostic data or is not included in the output at all. The purpose of KTAP me

Re: [PATCH net] selftests: net: add missing required classifier

2024-01-26 Thread Jakub Kicinski
On Thu, 25 Jan 2024 09:22:50 +0100 Paolo Abeni wrote: > the udpgro_fraglist self-test uses the BPF classifiers, but the > current net self-test configuration does not include it, causing > CI failures: Ah, that's what the other patch was on top of :) Applied (also slightly reordered), thank you! -

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

2024-01-26 Thread Reinette Chatre
Hi Maciej, 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 contradict the > reported non-contiguous support information. > > Use a logical XOR to confirm return value of write_schema

Re: [PATCH v3 4/5] selftests/resctrl: Add resource_info_file_exists()

2024-01-26 Thread Reinette Chatre
Hi Maciej, On 1/25/2024 3:12 AM, Maciej Wieczor-Retman wrote: > Feature checking done by resctrl_mon_feature_exists() covers features > represented by the feature name presence inside the 'mon_features' file > in /sys/fs/resctrl/info/L3_MON directory. There exists a different way > to represent fe

Re: [PATCH v3 2/5] selftests/resctrl: Add helpers for the non-contiguous test

2024-01-26 Thread Reinette Chatre
Hi Maciej, On 1/25/2024 3:10 AM, Maciej Wieczor-Retman wrote: > The CAT non-contiguous selftests have to read the file responsible for > reporting support of non-contiguous CBMs in kernel (resctrl). Then the > test compares if that information matches what is reported by CPUID > output. > > Add a

Re: [PATCH v6 0/4] VM: selftests: Add LoongArch support

2024-01-26 Thread Sean Christopherson
On Thu, Jan 25, 2024, Bibo Mao wrote: > --- > Tianrui Zhao (4): > KVM: selftests: Add KVM selftests header files for LoongArch > KVM: selftests: Add core KVM selftests support for LoongArch > KVM: selftests: Add ucall test support for LoongArch > KVM: selftests: Add test cases for LoongArch

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

2024-01-26 Thread Sean Christopherson
On Thu, Jan 25, 2024, Bibo Mao wrote: > diff --git a/tools/testing/selftests/kvm/set_memory_region_test.c > b/tools/testing/selftests/kvm/set_memory_region_test.c > index 075b80dbe237..7b09e59296be 100644 > --- a/tools/testing/selftests/kvm/set_memory_region_test.c > +++ b/tools/testing/selftests/

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

2024-01-26 Thread Sean Christopherson
+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: dirty_ring_vcpu_ring_full > pid=14854 tid=14854 errno=22 - Invalid argument > 1 0x

[PATCH net] selftests: net: add missing config for nftables-backed iptables

2024-01-26 Thread Jakub Kicinski
Modern OSes use iptables implementation with nf_tables as a backend, e.g.: $ iptables -V iptables v1.8.8 (nf_tables) Pablo points out that we need CONFIG_NFT_COMPAT to make that work, otherwise we see a lot of: Warning: Extension DNAT revision 0 not supported, missing kernel module? with DNAT

Re: [PATCH net] selftests: net: add missing config for big tcp tests

2024-01-26 Thread Jakub Kicinski
On Fri, 26 Jan 2024 16:32:36 +0100 Paolo Abeni wrote: > The big_tcp test-case requires a few kernel knobs currently > not specified in the net selftests config, causing the > following failure: > > # selftests: net: big_tcp.sh > # Error: Failed to load TC action module. > # We have an error

Re: [PATCH v2 7/7] KVM: selftests: x86: Use TAP interface in the userspace_msr_exit test

2024-01-26 Thread Sean Christopherson
On Thu, Oct 05, 2023, Thomas Huth wrote: > Use the kselftest_harness.h interface in this test to get TAP > output, so that it is easier for the user to see what the test > is doing. > > Note: We're not using the KVM_ONE_VCPU_TEST() macro here (but the > generic TEST() macro from kselftest_harness.

Re: [PATCH v3 2/5] selftests/resctrl: Add helpers for the non-contiguous test

2024-01-26 Thread Reinette Chatre
On 1/25/2024 4:14 AM, Ilpo Järvinen wrote: > On Thu, 25 Jan 2024, Maciej Wieczor-Retman wrote: >> +fp = fopen(file_path, "r"); >> +if (!fp) { >> +snprintf(reason, sizeof(reason), "Error in opening %s file\n", >> filename); >> +ksft_perror(reason); > > Was this

Re: [PATCH net] selftests: net: add missing config for big tcp tests

2024-01-26 Thread Paolo Abeni
On Fri, 2024-01-26 at 11:18 -0500, Aaron Conole wrote: > Paolo Abeni writes: > > > The big_tcp test-case requires a few kernel knobs currently > > not specified in the net selftests config, causing the > > following failure: > > > > # selftests: net: big_tcp.sh > > # Error: Failed to load TC

Re: [PATCH net] selftests: net: add missing config for big tcp tests

2024-01-26 Thread Xin Long
On Fri, Jan 26, 2024 at 10:32 AM Paolo Abeni wrote: > > The big_tcp test-case requires a few kernel knobs currently > not specified in the net selftests config, causing the > following failure: > > # selftests: net: big_tcp.sh > # Error: Failed to load TC action module. > # We have an error

Re: [PATCH net] selftests: net: add missing config for big tcp tests

2024-01-26 Thread Aaron Conole
Paolo Abeni writes: > The big_tcp test-case requires a few kernel knobs currently > not specified in the net selftests config, causing the > following failure: > > # selftests: net: big_tcp.sh > # Error: Failed to load TC action module. > # We have an error talking to the kernel > ... > #

[PATCH net] selftests: net: add missing config for big tcp tests

2024-01-26 Thread Paolo Abeni
The big_tcp test-case requires a few kernel knobs currently not specified in the net selftests config, causing the following failure: # selftests: net: big_tcp.sh # Error: Failed to load TC action module. # We have an error talking to the kernel ... # Testing for BIG TCP: # CLI GSO | GW

Re: [PATCH v4] kunit: run test suites only after module initialization completes

2024-01-26 Thread Geert Uytterhoeven
Hi Marco, On Wed, Jan 10, 2024 at 5:01 PM Marco Pagani wrote: > Commit 2810c1e99867 ("kunit: Fix wild-memory-access bug in > kunit_free_suite_set()") fixed a wild-memory-access bug that could have > happened during the loading phase of test suites built and executed as > loadable modules. However

[PATCH v4 1/7] selftests/mm: hugepage-shm: conform test to TAP format output

2024-01-26 Thread Muhammad Usama Anjum
Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. The "." was being printed inside for loop to indicate the writes progress. This was extraneous and hence removed in the patch. Signed-off-by: Muhammad Usama Anj

[PATCH v4 5/7] selftests/mm: hugetlb-read-hwpoison: conform test to TAP format output

2024-01-26 Thread Muhammad Usama Anjum
Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Reviewed-by: Jiaqi Yan Signed-off-by: Muhammad Usama Anjum --- Changes since v3: - Rebased on top of next-20240125 - Added reviewed-by tag - Tested this on top

[PATCH v4 7/7] selftests/mm: config: add missing configs

2024-01-26 Thread Muhammad Usama Anjum
Add configurations which are needed for - hugetlb-read-hwpoison - ksm_functional_test and ksm_test Signed-off-by: Muhammad Usama Anjum --- Changes since v3: - Rebased on top of next-20240125 --- tools/testing/selftests/mm/config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testin

[PATCH v4 6/7] selftests/mm: ksm_tests: conform test to TAP format output

2024-01-26 Thread Muhammad Usama Anjum
Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Signed-off-by: Muhammad Usama Anjum --- Changes since v3: - Rebased on top of next-20240125 - Resolves minor conflict --- tools/testing/selftests/mm/ksm_tests.

[PATCH v4 4/7] selftests/mm: khugepaged: conform test to TAP format output

2024-01-26 Thread Muhammad Usama Anjum
Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Skip test if root privileges aren't provided. Signed-off-by: Muhammad Usama Anjum --- Changes since v3: - Rebased on top of next-20240125 - Skip test if root p

[PATCH v4 3/7] selftests/mm: hugetlb-madvise: conform test to TAP format output

2024-01-26 Thread Muhammad Usama Anjum
Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Signed-off-by: Muhammad Usama Anjum --- Changes since v3: - Rebased on top of next-20240125 --- tools/testing/selftests/mm/hugetlb-madvise.c | 207 +++-

[PATCH v4 2/7] selftests/mm: hugepage-vmemmap: conform test to TAP format output

2024-01-26 Thread Muhammad Usama Anjum
Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Signed-off-by: Muhammad Usama Anjum --- Changes since v3: - Rebase to next-20240125 - Update newly updated code --- tools/testing/selftests/mm/hugepage-vmemmap

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

2024-01-26 Thread Eric Auger
Hi Shaoqin, On 1/16/24 07:01, Shaoqin Huang wrote: > 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 se

Re: [PATCH 0/4] selftests: add missing gitignore files and include generated objects

2024-01-26 Thread Javier Carrasco
On 01.01.24 01:41, Javier Carrasco wrote: > This series aims to keep the git status clean after building the > selftests by adding some missing .gitignore files and object inclusion > in existing .gitignore files. This is one of the requirements listed in > the selftests documentation for new tests

Re: [PATCH] selftests: Add missing gitignore entries

2024-01-26 Thread SeongJae Park
Hi Bernd, On Fri, 26 Jan 2024 06:24:34 +0100 Bernd Edlinger wrote: > Prevent them from polluting git status after building selftests. > > Signed-off-by: Bernd Edlinger > --- > tools/testing/selftests/damon/.gitignore | 1 + > tools/testing/selftests/thermal/intel/power_