Linux-Only Interface, Marking, and IP Unit Tests #488
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit introduces three unit tests focused on interface binding, packet marking, and IP source address spoofing/selection. Each of these tests builds upon the original
MtrPacketTest
base class. To evaluate these network-dependent features, the tests utilize an emulated network environment. To enable this, a small network emulation library,netem
, has been developed specifically for this purpose.netem
allows for the creation of arbitrary network configurations for testing and can reliably set up and clean up virtual network environments on Linux systems. The only dependencies areiproute2
andlibc
, which are generally pre-installed on most Linux hosts.The commit adds three tests that are expected to fail (see #485):
mtr-packet
to bind to a specific interface.mtr-packet
to apply a Linux networking mark (fwmark).mtr-packet
's ability to spoof or bind to a specified source address.