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
Unknown Object (File)
Sun, May 17, 6:20 PM
Unknown Object (File)
Sun, May 17, 6:14 PM
Unknown Object (File)
Tue, May 12, 1:16 AM
Unknown Object (File)
Mon, May 11, 10:40 PM
Unknown Object (File)
Mon, May 11, 10:40 PM
Unknown Object (File)
Mon, May 11, 10:01 PM
Unknown Object (File)
Mon, May 11, 3:03 AM
Unknown Object (File)
Mon, May 11, 3:00 AM

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.Mon, Apr 27, 7:21 PM
This revision was automatically updated to reflect the committed changes.