Page MenuHomeFreeBSD

pytest: Add an IPv4 loopback address
ClosedPublic

Authored by jlduran on Jan 11 2023, 8:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 18, 10:04 AM
Unknown Object (File)
Oct 2 2024, 4:24 AM
Unknown Object (File)
Sep 27 2024, 2:33 PM
Unknown Object (File)
Sep 24 2024, 8:38 AM
Unknown Object (File)
Sep 17 2024, 1:14 PM
Unknown Object (File)
Sep 17 2024, 6:08 AM
Unknown Object (File)
Sep 17 2024, 12:45 AM
Unknown Object (File)
Sep 8 2024, 7:04 AM

Details

Summary

Add an IPv4 loopback address of 127.0.0.1/8 to the lo0 interface by default when creating VNETSs using pytest.

Test Plan

PROPOSAL

Pytest jails are VNET jails, and are created with a loopback interface already "UP", but ifconfig lo0 up only adds the ::1/128 IPv6 loopback address.
Some tests asume that lo0 already has 127.0.0.1/8, especially if not using jails. If the tests are using VNET jails, then jexec <jail> ifconfig lo0 127.0.0.1/8 up must be invoked.
Why not add it by default to the pytest VNET template?
If not, what could be the best way to create it? subprocess.run("ifconfig lo0 inet 127.0.0.1".split())?
Other suggestions welcomed!

Diff Detail

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