Skip to content

nldump lister test fails when the kernel adds a neighbor mid-test #1179

Closed

Description

@privateip

TestLister_ListsTheHandlesNamespace fails intermittently in the Unit Tests (root) job. On #1174, whose change touches no Go code, it failed on a re-run and passed on the next:

nldump_test.go:196: package NeighList = [{2 10 128 1 0 0 fd00:2::2 02:00:00:00:00:02 <nil> 0 0 0 0 0 0} {2 10 64 5 0 0 ff02::2 33:33:00:00:00:02 <nil> 0 0 0 6000 0 0}], %!w(<nil>); want 1 entries
--- FAIL: TestLister_ListsTheHandlesNamespace (0.00s)

The test brings a dummy link up, adds a permanent neighbor, lists neighbors once through the handle, and later lists them again through the package-level NeighList and requires the same count. Bringing the link up makes the kernel send IPv6 router solicitations in the background, which adds a NUD_NOARP entry for ff02::2 (state 64 in the output). When that entry appears between the two dumps, the second dump has two entries and the first has one.

The listing code is correct. The test compares two snapshots of state the kernel changes on its own.

Expected: the comparison ignores entries the kernel adds on its own.

Possible fixes: compare only NUD_PERMANENT entries, check that the second dump holds the test's neighbor rather than comparing counts, or turn off router solicitations on the test link (net.ipv6.conf.<link>.router_solicitations=0) before bringing it up.

Activity

  1. changed the title [-]TestLister_ListsTheHandlesNamespace fails when the kernel adds an ff02::2 neighbor between dumps[/-] [+]nldump lister test fails when the kernel adds a neighbor mid-test[/+] on Oct 28, 2026
  2. added theissue type on Oct 28, 2026
  3. privateip commented on Oct 30, 2026

    @privateip
    CollaboratorAuthor

    Thanks for the detailed report. This is fixed on main by #1177 (6715d8a), which merged shortly after this was filed. The package-level NeighList, RuleList and RouteList checks in TestLister_ListsTheHandlesNamespace now check that each result holds the neighbor, rule and route the test created, instead of comparing counts against the handle's earlier dump. A kernel-added ff02::2 entry can no longer fail the test.

    Verification on main (72325e4), running the compiled test as root:

    • At the parent of 6715d8a: -test.run TestLister_ListsTheHandlesNamespace -test.count=300 failed 3 of 300 runs with the reported package NeighList = [...]; want 1 entries, and the extra entry was the NUD_NOARP ff02::2 neighbor each time.
    • On main: the same run passed 300 of 300.

    The fix is unreleased and only on main so far. It touches only the test. Please reopen if you still see the flake on a run that includes 6715d8a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions