You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split the remote address configuration into two separate addresses to
properly test different network scenarios:
1. remote_addr (-r): Non-routable address for bind failure tests
(e.g., 74.190.183.38 or fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)
Used in tcp_bind.ti_2 and udp_bind.ti_2 to verify EADDRNOTAVAIL
2. remote_routable_addr (-g): Routable address for connect tests
(dynamically detected default gateway or manually specified)
Used in tcp_event.ti_2, udp_connect.ti_2 to test actual routing
Remove the def_gw_exists flag and sys_gateway() C++ function, moving
gateway detection to the shell script layer using do_get_gateway().
This bash function mirrors the original C++ logic using route command
to detect default gateway for both IPv4 and IPv6.
Update gtest.sh to dynamically detect system default,
making tests more portable across different network environments.
Gateway detection happens at test invocation time rather than during
test execution.
Remove SKIP_TRUE(def_gw_exists) checks from tests as gateway detection
is now handled by the shell script which passes the appropriate address
via command-line arguments. Tests requiring routable addresses will
receive the actual gateway IP, while bind failure tests continue using
non-routable dummy addresses.
Changes:
- Add remote_routable_addr to gtest_configure_t structure
- Add -g/--remote-routable command-line option to gtest
- Implement do_get_gateway() bash function in gtest.sh
- Update tcp_event and udp_connect tests to use remote_routable_addr
- Remove sys_gateway() function from common/sys.cc
- Remove def_gw_exists flag from test_base class
- Remove gateway detection skip logic from individual tests
Signed-off-by: Tomer Cabouly <[email protected]>
0 commit comments