This is a test bug, not a kernel bug. Fix already exists upstream
v6.17-rc1.

commit 948670361c0c189556f3d97c5b2e6ed7ae198da9
Author: Hangbin Liu <[email protected]>
Date:   Tue Jun 17 10:51:00 2025 +0000

    selftests: net: use slowwait to make sure IPv6 setup finished

    Sometimes the vxlan vnifiltering test failed on slow machines due to
    network setup not finished. e.g.

      TEST: VM connectivity over vnifiltering vxlan (ipv4 default rdst)   [ OK ]
      TEST: VM connectivity over vnifiltering vxlan (ipv6 default rdst)   [FAIL]

    Let's use slowwait to make sure the connection is finished.

    Signed-off-by: Hangbin Liu <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>

** Also affects: linux (Ubuntu)
   Importance: Undecided
       Status: New

** No longer affects: ubuntu-kernel-tests

** Also affects: linux (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Changed in: linux (Ubuntu Noble)
       Status: New => In Progress

** Changed in: linux (Ubuntu Noble)
     Assignee: (unassigned) => AceLan Kao (acelankao)

** Changed in: linux (Ubuntu)
       Status: New => Invalid

** Description changed:

+ [Impact]
+ The ubuntu_kselftests_net test test_vxlan_vnifiltering.sh fails on and off.
+ One subtest fails while the other 26 pass:
+ 
+ TEST: VM connectivity over vnifiltering vxlan (ipv4 default rdst)  [ OK ]
+ TEST: VM connectivity over vnifiltering vxlan (ipv6 default rdst)  [ OK ]
+ TEST: VM connectivity over vnifiltering vxlan pervni remote (ipv4 default 
rdst)  [ OK ]
+ TEST: VM connectivity over vnifiltering vxlan pervni remote (ipv6 default 
rdst)  [FAIL]
+ #
+ Tests passed: 26
+ Tests failed: 1
+ not ok 1 selftests: net: test_vxlan_vnifiltering.sh # exit=1
+ 
+ Only the subtests that use an IPv6 underlay remote fail. Every IPv4 subtest
+ passes in the same run.
+ 
+ The test sends one ping with a 1 second deadline right after it sets up the
+ network. The IPv6 underlay addresses are still doing Duplicate Address
+ Detection at that point, so the address cannot be used as a tunnel source
+ yet. The single packet is dropped and the test gives up.
+ 
+ Slow machines lose this race more often. Seen on arm64 64k, lowlatency,
+ lowlatency 64k, nvidia-lowlatency, azure and gcp instances. Also seen on
+ amd64 gcp instances, so this is not arm64 only.
+ 
+ This is a test bug. The VXLAN driver is fine.
+ 
+ [Fix]
+ Replace the single ping with slowwait, which retries every 100ms for up to
+ 5 seconds. Also drop a pointless fixed "sleep 1".
+ 
+ 948670361c0c1 selftests: net: use slowwait to make sure IPv6 setup
+ finished
+ 
+ Upstream in v6.17.
+ 
+ slowwait() already exists in tools/testing/selftests/net/lib.sh on the
+ target branches, so no other patch is needed first.
+ 
+ [Test Plan]
+ Run the test on a slow or loaded machine, arm64 or a small cloud instance:
+ 
+ $ cd tools/testing/selftests/net
+ $ sudo ./test_vxlan_vnifiltering.sh
+ 
+ Repeat 20 times, the failure does not happen every run:
+ 
+ $ for i in $(seq 20); do sudo ./test_vxlan_vnifiltering.sh | tail -3;
+ done
+ 
+ Without patch: "VM connectivity over vnifiltering vxlan pervni remote
+ (ipv6 default rdst) [FAIL]" shows up in some runs, Tests failed: 1
+ 
+ With patch: all runs report Tests passed: 27, Tests failed: 0
+ 
+ [Where problems could occur]
+ Could break test_vxlan_vnifiltering.sh itself. Nothing outside the test
+ tree is touched, so no kernel code is at risk.
+ 
+ slowwait retries until the command succeeds. If a real VXLAN datapath bug
+ shows up later, this test now waits 5 seconds per ping before reporting it,
+ so a broken run takes longer to finish. In the worst case, a full failure
+ goes from a few seconds to about 50 seconds.
+ 
+ If slowwait is missing from lib.sh on a branch, the test would abort with
+ "slowwait: command not found" and every connectivity subtest would fail.
+ Check lib.sh has slowwait() before applying.
+ 
+ [Other Info]
+ Test only change, no kernel code changes.
+ 
+ Already in noble hwe-6.17 and hwe-7.0. Missing from noble 6.8 (master) 
+ which is the only branch still hitting this.
+ 
+ ==============================================
+ 
  Test complains about:
  TAP version 13
  1..1
  # timeout set to 0
  # selftests: net: test_vxlan_vnifiltering.sh
  #     TEST: Create traditional vxlan device                               [ 
OK ]
  #     TEST: Cannot create vnifilter device without external flag          [ 
OK ]
  #     TEST: Creating external vxlan device with vnifilter flag            [ 
OK ]
  #     TEST: Cannot set in-use vni id on vnifiltering device               [ 
OK ]
  #     TEST: Set new vni id on vnifiltering device                         [ 
OK ]
  #     TEST: Create second external vxlan device with vnifilter flag       [ 
OK ]
  #     TEST: Cannot set in-use vni id on vnifiltering device               [ 
OK ]
  #     TEST: Set new vni id on vnifiltering device                         [ 
OK ]
  #     TEST: Update vni id on vnifiltering device                          [ 
OK ]
  #     TEST: Add new vni id on vnifiltering device                         [ 
OK ]
  #     TEST: Set multicast group on existing vni                           [ 
OK ]
  #     TEST: Set multicast group on existing vni                           [ 
OK ]
  #     TEST: Cannot set vnifilter flag on a device                         [ 
OK ]
  #     TEST: Cannot unset vnifilter flag on a device                       [ 
OK ]
  #     TEST: VM connectivity over vnifiltering vxlan (ipv4 default rdst)   [ 
OK ]
  #     TEST: VM connectivity over vnifiltering vxlan (ipv6 default rdst)   [ 
OK ]
  #     TEST: VM connectivity over vnifiltering vxlan pervni remote (ipv4 
default rdst)  [ OK ]
  #     TEST: VM connectivity over vnifiltering vxlan pervni remote (ipv6 
default rdst)  [FAIL]
  #     TEST: VM connectivity over vnifiltering vxlan mgroup (ipv4 default 
rdst)  [ OK ]
  #     TEST: VM connectivity over vnifiltering vxlan mgroup (ipv6 default 
rdst)  [ OK ]
  #     TEST: VM connectivity over vnifiltering vxlan pervni mgroup (ipv4 
default rdst)  [ OK ]
  #     TEST: VM connectivity over vnifiltering vxlan pervni mgroup (ipv6 
default rdst)  [ OK ]
  #     TEST: VM connectivity over vnifiltering vxlan pervni remote mix (ipv4 
default rdst)  [ OK ]
  #     TEST: VM connectivity over vnifiltering vxlan pervni remote mix (ipv6 
default rdst)  [ OK ]
  #     TEST: VM connectivity over traditional vxlan (ipv4 default rdst)    [ 
OK ]
  #     TEST: VM connectivity over traditional vxlan (ipv6 default rdst)    [ 
OK ]
  #     TEST: VM connectivity over metadata nonfiltering vxlan (ipv4 default 
rdst)  [ OK ]
- # 
+ #
  # Tests passed:  26
  # Tests failed:   1
  not ok 1 selftests: net: test_vxlan_vnifiltering.sh # exit=1

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2071590

Title:
  test_vxlan_vnifiltering.sh from ubuntu_kselftests_net failed on linux-
  oem-6.8 (with ipv6 default rdst)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2071590/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to