network/tests
Rich Megginson 14f9044bfc test: improve method for finding secondary interface
In some cases, the interface given in MAC_ADDR_MATCH_INTERFACE can be an
alias or altname.  The test cannot use the altname, it must use the "real"
interface name.

For example, on some systems, if `MAC_ADDR_MATCH_INTERFACE=enX1`, the test
will fail because it is an altname for `ens4`:

```
+ ip addr show enX1
3: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:12:34:57 brd ff:ff:ff:ff:ff:ff
    altname enp0s4
    altname enx525400123457
    altname enX1
```

The test will now parse the output of `ip addr show $name` to get the real interface name.

Also, improve the fallback method to look for common secondary interface names
such as eth1 and ens4 in case MAC_ADDR_MATCH_INTERFACE is not one of these.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2025-06-25 07:38:25 -06:00
..
files Add support for domain-suffix-match 802.1x option 2020-05-04 13:01:41 +02:00
integration Clean up connection profile after running pytest 2022-03-14 18:27:02 +01:00
playbooks test: improve method for finding secondary interface 2025-06-25 07:38:25 -06:00
roles/linux-system-roles.network System Roles should consistently use ansible_managed in configuration files it manages 2022-02-25 06:10:42 +08:00
tasks test: exclude qemu interfaces from dhcp 2025-04-22 07:04:49 -06:00
unit refactor: fix python black formatting 2025-01-31 08:02:52 -07:00
vars refactor: Use vars/RedHat_N.yml symlink for CentOS, Rocky, Alma wherever possible 2024-10-25 12:06:55 -06:00
.gitignore Move tests to /tests directory and rename to new naming scheme 2018-05-16 19:48:23 +02:00
ansible.cfg bump timeout to 8 minutes for mac80211_hwsim kernel modules 2025-04-22 07:04:49 -06:00
covstats refactor: get_ostree_data.sh use env shebang - remove from .sanity* 2023-12-07 07:25:47 -07:00
ensure_provider_tests.py test: skip initscript related tests on Fedora 41 and later 2025-04-22 15:38:17 -06:00
get_coverage.sh refactor: get_ostree_data.sh use env shebang - remove from .sanity* 2023-12-07 07:25:47 -07:00
get_coverage.yml ansible-lint: Fix name[missing] and name[play] failures 2023-04-10 17:49:07 +02:00
get_total_coverage.sh refactor: get_ostree_data.sh use env shebang - remove from .sanity* 2023-12-07 07:25:47 -07:00
git-post-commit.sh refactor: get_ostree_data.sh use env shebang - remove from .sanity* 2023-12-07 07:25:47 -07:00
git-pre-commit.sh refactor: get_ostree_data.sh use env shebang - remove from .sanity* 2023-12-07 07:25:47 -07:00
merge_coverage.sh refactor: get_ostree_data.sh use env shebang - remove from .sanity* 2023-12-07 07:25:47 -07:00
module_utils Integration tests: Fix coverage collection 2020-04-15 22:12:22 +02:00
modules Integration tests: Fix coverage collection 2020-04-15 22:12:22 +02:00
provision.fmf test: add another network interface device for qemu tests 2025-04-10 14:03:36 -06:00
setup-snapshot.yml style: ansible-lint - fix missing YAML document start 2023-04-28 09:15:50 -06:00
tests_802_1x_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_802_1x_updated_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_auto_gateway_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_auto_gateway_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bond_cloned_mac_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bond_cloned_mac_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bond_deprecated_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bond_deprecated_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bond_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bond_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bond_options_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bond_port_match_by_mac_nm.yml fix: Refine MAC validation using interface name 2025-03-31 22:25:32 -04:00
tests_bond_removal_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bond_removal_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bridge_cloned_mac_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bridge_cloned_mac_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bridge_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_bridge_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_change_indication_on_repeat_run.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_default.yml ansible-lint: Fix name[missing] and name[play] failures 2023-04-10 17:49:07 +02:00
tests_default_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_default_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_dummy_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_eth_dns_support_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_eth_pci_address_match_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_ethernet_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_ethernet_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_ethtool_coalesce_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_ethtool_coalesce_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_ethtool_features_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_ethtool_features_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_ethtool_ring_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_ethtool_ring_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_helpers_and_asserts.yml ansible-lint: Fix name[missing] and name[play] failures 2023-04-10 17:49:07 +02:00
tests_ignore_auto_dns_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_infiniband_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_integration_pytest.yml test: skip integration pytest on fedora 39 and later 2024-08-15 09:26:54 -06:00
tests_ipv6_disabled_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_ipv6_dns_search_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_ipv6_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_ipv6_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_mac_address_match_nm.yml fix: Remove MAC address matching from SysUtil.link_info_find() 2025-03-31 22:21:18 -04:00
tests_network_state_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_provider_nm.yml test: skip initscript related tests on Fedora 41 and later 2025-04-22 15:38:17 -06:00
tests_reapply_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_regression_nm.yml test: skip initscript related tests on Fedora 41 and later 2025-04-22 15:38:17 -06:00
tests_route_device_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_route_device_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_route_table_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_route_type_nm.yml feat: Support blackhole, prohibit and unreachable route types 2024-01-12 14:14:50 -07:00
tests_routing_rules_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_states_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_states_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_switch_provider.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_team_nm.yml fix: add support for EL10 2024-07-02 09:09:05 -06:00
tests_team_plugin_installation_nm.yml fix: add support for EL10 2024-07-02 09:09:05 -06:00
tests_unit.yml test: Add DNS, routes and network connectivity checks during cleanup 2024-02-14 20:20:49 -07:00
tests_vlan_mtu_initscripts.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_vlan_mtu_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_wireless_and_network_restart_nm.yml test: improve name text for skipped ostree tests 2024-03-25 17:30:00 -06:00
tests_wireless_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_wireless_plugin_installation_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_wireless_wpa3_owe_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00
tests_wireless_wpa3_sae_nm.yml ci: Use supported ansible-lint action; run ansible-lint against the collection 2024-01-05 17:36:07 -07:00