Page MenuHomeFreeBSD

tests/net/if_clone_test: Add a test for races between if_detach() and if_vmove_reclaim()
ClosedPublic

Authored by zlei on Apr 23 2026, 6:55 PM.
Tags
None
Referenced Files
F171427789: D56606.id176664.diff
Fri, Sep 11, 2:17 AM
F171410134: D56606.id176284.diff
Thu, Sep 10, 11:40 PM
F171383812: D56606.id176284.diff
Thu, Sep 10, 8:18 PM
Unknown Object (File)
Tue, Sep 8, 11:21 AM
Unknown Object (File)
Sun, Sep 6, 2:00 PM
Unknown Object (File)
Sun, Sep 6, 12:07 AM
Unknown Object (File)
Sat, Sep 5, 2:19 PM
Unknown Object (File)
Sat, Sep 5, 1:03 PM

Details

Summary

Ideally we shall have tests for all possible races, that is races
between if_detach(), if_vmove_loan(), if_vmove_reclaim() and
vnet_if_return(). But that requires too many tests and it appears to
be less valuable to have them all. So focus on recent fixes [1] and [2].

[1] ee9456ce3753 ifnet: Fix races in if_vmove_reclaim()
[2] D56374 ifnet: if_detach(): Fix races with if_vmove()

MFC after: 5 days

Test Plan

Current requires extra effort du to virtualization of bpf. Run against stable/15 or stable/14 instead.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Apr 23 2026, 6:55 PM
zlei added inline comments.
tests/sys/net/if_clone_test.sh
125

This test will surely cleanup the clone created epair interfaces by it self. Seems no need for cleanup_ifaces. Please correct me if wrong.

This revision was not accepted when it landed; it landed in state Needs Review.Apr 27 2026, 7:21 PM
This revision was automatically updated to reflect the committed changes.