Hi,
This RFC is a preview of the progress we made in the KUnit hackathon[0].
This patch, made by Maíra and Arthur, converts the damage helper test
from the original DRM selftest framework to use the KUnit framework.
[0] https://groups.google.com/g/kunit-dev/c/YqFR1q2uZvk/m/IbvItSfHBAAJ
The IGT part of this work can be found here:
https://gitlab.freedesktop.org/isinyaaa/igt-gpu-tools/-/tree/introduce-kunit
We also have patches in progress converting the following tests:
framebuffer, cmdline_parser, dp_mst_helper, rect and dma-buf. As soon as
we sort out if this is the right way to proceed in both kernel and IGT
side, the hackathon participants will submit them.
Below, a dmesg output followed by the IGT output of the damage helper
test.
Thanks!
[ 32.502165] [IGT] kms_kunit: executing
[ 32.896062] # Subtest: drm_damage_helper_tests
[ 32.896115] 1..21
[ 32.906500] ok 1 - igt_damage_iter_no_damage
[ 32.907957] ok 2 - igt_damage_iter_no_damage_fractional_src
[ 32.922087] ok 3 - igt_damage_iter_no_damage_src_moved
[ 32.926174] ok 4 - igt_damage_iter_no_damage_fractional_src_moved
[ 32.931746] ok 5 - igt_damage_iter_no_damage_not_visible
[ 32.935329] ok 6 - igt_damage_iter_no_damage_no_crtc
[ 32.939826] ok 7 - igt_damage_iter_no_damage_no_fb
[ 32.942118] ok 8 - igt_damage_iter_simple_damage
[ 32.944158] ok 9 - igt_damage_iter_single_damage
[ 32.945583] ok 10 - igt_damage_iter_single_damage_intersect_src
[ 32.946565] ok 11 - igt_damage_iter_single_damage_outside_src
[ 32.949206] ok 12 - igt_damage_iter_single_damage_fractional_src
[ 32.952464] ok 13 - igt_damage_iter_single_damage_intersect_fractional_src
[ 32.954321] ok 14 - igt_damage_iter_single_damage_outside_fractional_src
[ 32.957147] ok 15 - igt_damage_iter_single_damage_src_moved
[ 32.959162] ok 16 - igt_damage_iter_single_damage_fractional_src_moved
[ 32.961100] ok 17 - igt_damage_iter_damage
[ 32.963609] ok 18 - igt_damage_iter_damage_one_intersect
[ 32.964913] ok 19 - igt_damage_iter_damage_one_outside
[ 32.966389] ok 20 - igt_damage_iter_damage_src_moved
[ 32.968279] ok 21 - igt_damage_iter_damage_not_visible
[ 32.971710] # drm_damage_helper_tests: pass:21 fail:0 skip:0 total:21
[ 32.973887] # Totals: pass:21 fail:0 skip:0 total:21
[ 32.975511] ok 1 - drm_damage_helper_tests
[ 33.051033] [IGT] kms_kunit: exiting, ret=0
IGT-Version: 1.26-g71e8eceb (x86_64) (Linux: 5.15.0-rc7amd-fix+ x86_64)
[IGT] running 21 tests...
[IGT] SUBTEST ok 1 - igt_damage_iter_no_damage
[IGT] SUBTEST ok 2 - igt_damage_iter_no_damage_fractional_src
[IGT] SUBTEST ok 3 - igt_damage_iter_no_damage_src_moved
[IGT] SUBTEST ok 4 - igt_damage_iter_no_damage_fractional_src_moved
[IGT] SUBTEST ok 5 - igt_damage_iter_no_damage_not_visible
[IGT] SUBTEST ok 6 - igt_damage_iter_no_damage_no_crtc
[IGT] SUBTEST ok 7 - igt_damage_iter_no_damage_no_fb
[IGT] SUBTEST ok 8 - igt_damage_iter_simple_damage
[IGT] SUBTEST ok 9 - igt_damage_iter_single_damage
[IGT] SUBTEST ok 10 - igt_damage_iter_single_damage_intersect_src
[IGT] SUBTEST ok 11 - igt_damage_iter_single_damage_outside_src
[IGT] SUBTEST ok 12 - igt_damage_iter_single_damage_fractional_src
[IGT] SUBTEST ok 13 - igt_damage_iter_single_damage_intersect_fractional_src
[IGT] SUBTEST ok 14 - igt_damage_iter_single_damage_outside_fractional_src
[IGT] SUBTEST ok 15 - igt_damage_iter_single_damage_src_moved
[IGT] SUBTEST ok 16 - igt_damage_iter_single_damage_fractional_src_moved
[IGT] SUBTEST ok 17 - igt_damage_iter_damage
[IGT] SUBTEST ok 18 - igt_damage_iter_damage_one_intersect
[IGT] SUBTEST ok 19 - igt_damage_iter_damage_one_outside
[IGT] SUBTEST ok 20 - igt_damage_iter_damage_src_moved
[IGT] SUBTEST ok 21 - igt_damage_iter_damage_not_visible
[IGT] TEST SUCCEEDED ok 1 - drm_damage_helper_tests
SUCCESS (0.465s)
Maíra Canal (1):
drm: selftest: convert drm_damage_helper selftest to KUnit
drivers/gpu/drm/Kconfig | 13 ++
drivers/gpu/drm/Makefile | 2 +-
drivers/gpu/drm/selftests/Makefile | 5 +-
.../gpu/drm/selftests/drm_modeset_selftests.h | 21 --
.../drm/selftests/test-drm_damage_helper.c | 215 +++++++++---------
5 files changed, 127 insertions(+), 129 deletions(-)
--
2.33.1
It looks like test_vxlan_under_vrf.sh is always failing to verify the
connectivity test during the ping between the two simulated VMs.
This is due to the fact that veth-hv in each VM should have a distinct
MAC address.
Fix by setting a unique MAC address on each simulated VM interface.
Without this fix:
$ sudo ./tools/testing/selftests/net/test_vxlan_under_vrf.sh
Checking HV connectivity [ OK ]
Check VM connectivity through VXLAN (underlay in the default VRF) [FAIL]
With this fix applied:
$ sudo ./tools/testing/selftests/net/test_vxlan_under_vrf.sh
Checking HV connectivity [ OK ]
Check VM connectivity through VXLAN (underlay in the default VRF) [ OK ]
Check VM connectivity through VXLAN (underlay in a VRF) [FAIL]
NOTE: the connectivity test with the underlay VRF is still failing; it
seems that ARP requests are blocked at the simulated hypervisor level,
probably due to some missing ARP forwarding rules. This requires more
investigation (in the meantime we may consider to set that test as
expected failure - XFAIL).
Signed-off-by: Andrea Righi <andrea.righi(a)canonical.com>
---
tools/testing/selftests/net/test_vxlan_under_vrf.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/net/test_vxlan_under_vrf.sh b/tools/testing/selftests/net/test_vxlan_under_vrf.sh
index 534c8b7699ab..ea5a7a808f12 100755
--- a/tools/testing/selftests/net/test_vxlan_under_vrf.sh
+++ b/tools/testing/selftests/net/test_vxlan_under_vrf.sh
@@ -101,6 +101,8 @@ setup-vm() {
ip -netns hv-$id link set veth-tap master br0
ip -netns hv-$id link set veth-tap up
+ ip link set veth-hv address 02:1d:8d:dd:0c:6$id
+
ip link set veth-hv netns vm-$id
ip -netns vm-$id addr add 10.0.0.$id/24 dev veth-hv
ip -netns vm-$id link set veth-hv up
--
2.32.0
This is a series of improvements to nettest and fcnal-test.sh from
tools/testing/selftests/net which make tests run faster. For me this
reduces the runtime from ~40minutes to ~5minutes and makes the tcp
tests very fast.
Some of the early commits are outright bugfixes.
The tests DO NOT pass perfectly for me on latest net-next/master but I
verified that the failures also happen without my changes. Here is the
list of failures:
TEST: ping local, VRF bind - VRF IP [FAIL]
TEST: Raw socket bind to local address - VRF IP [FAIL]
TEST: ping out, VRF bind - ns-B IPv6 LLA [FAIL]
TEST: ping out, VRF bind - multicast IP [FAIL]
TEST: TCP socket bind to out of scope local address - ns-A loopback IPv6 [FAIL]
TEST: TCP socket bind to VRF address with device bind - VRF IPv6 [FAIL]
Three of those were not tested by default before my changes, only with
explicit -t 'bind bind6'
This is related to my work on TCP-AO but there are no patch
dependencies
Link: https://lore.kernel.org/netdev/cover.1632240523.git.cdleonard@gmail.com/
Leonard Crestez (11):
selftests: net/fcnal: Fix {ipv4,ipv6}_bind not run by default
selftests: net/fcnal: Mark unknown -t or TESTS value as error
selftests: net/fcnal: Non-zero exit on failures
selftests: net/fcnal: Use accept_dad=0 to avoid setup sleep
selftests: net/fcnal: kill_procs via spin instead of sleep
selftests: net/fcnal: Do not capture do_run_cmd in verbose mode
selftests: nettest: Implement -k to fork after bind or listen
selftests: net/fcnal: Replace sleep after server start with -k
selftests: nettest: Convert timeout to miliseconds
selftests: nettest: Add NETTEST_CLIENT,SERVER}_TIMEOUT envvars
selftests: net/fcnal: Reduce client timeout
tools/testing/selftests/net/fcnal-test.sh | 710 ++++++++--------------
tools/testing/selftests/net/nettest.c | 134 +++-
2 files changed, 378 insertions(+), 466 deletions(-)
base-commit: 0693b27644f04852e46f7f034e3143992b658869
--
2.25.1