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)
Wed, Jun 10, 10:15 PM
Unknown Object (File)
Thu, Jun 4, 12:10 PM
Unknown Object (File)
Thu, Jun 4, 12:09 PM
Unknown Object (File)
Thu, Jun 4, 12:09 PM
Unknown Object (File)
Sun, May 17, 6:20 PM
Unknown Object (File)
Sun, May 17, 6:14 PM
Unknown Object (File)
May 12 2026, 1:16 AM
Unknown Object (File)
May 11 2026, 10:40 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 Skipped
Unit
Tests Skipped

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.