Page MenuHomeFreeBSD

pytest: Add an IPv4 loopback address
ClosedPublic

Authored by jlduran_gmail.com on Jan 11 2023, 8:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 12 2024, 3:00 PM
Unknown Object (File)
Dec 23 2023, 11:17 AM
Unknown Object (File)
Jul 9 2023, 2:12 AM
Unknown Object (File)
Jul 9 2023, 2:11 AM
Unknown Object (File)
Jul 9 2023, 2:03 AM
Unknown Object (File)
May 19 2023, 2:25 AM
Unknown Object (File)
May 19 2023, 2:17 AM
Unknown Object (File)
May 13 2023, 1:55 PM

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 Skipped
Unit
Tests Skipped