Skip to content

Commit e1207de

Browse files
committed
tests: use net.ifnames=0 for karg network tests
In order to allow the tests to work on both x86_64/BIOS, x86_64/UEFI and aarch64/UEFI we use net.ifnames=0 so we can use eth1 in all instances and it just works. Otherwise on x86_64/BIOS we get ens5 and on UEFI we get enp0s4. Fixes coreos/fedora-coreos-tracker#1060
1 parent a1f7320 commit e1207de

File tree

4 files changed

+24
-22
lines changed

4 files changed

+24
-22
lines changed

tests/kola/networking/force-persist-ip/config.bu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ variant: fcos
22
version: 1.4.0
33
storage:
44
files:
5-
- path: /etc/NetworkManager/system-connections/ens5.nmconnection
5+
- path: /etc/NetworkManager/system-connections/eth1.nmconnection
66
mode: 0600
77
contents:
88
inline: |
99
[connection]
10-
id=ens5
10+
id=eth1
1111
type=ethernet
12-
interface-name=ens5
12+
interface-name=eth1
1313
[ipv4]
1414
dns-search=
1515
may-fail=false

tests/kola/networking/force-persist-ip/test.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22
set -xeuo pipefail
33

44
# Setup configuration for a single NIC with two different ways:
5-
# - kargs provide static network config for ens5 and also coreos.force_persist_ip
6-
# - ignition provides dhcp network config for ens5
5+
# - kargs provide static network config for eth1 and also coreos.force_persist_ip
6+
# - ignition provides dhcp network config for eth1
77
# Expected result:
88
# - with coreos.force_persist_ip ip=kargs win, verify that
9-
# ens5 has the static IP address via kargs
9+
# eth1 has the static IP address via kargs
1010

1111
# https://bugzilla.redhat.com/show_bug.cgi?id=1958930#c29
12-
# These tests fail on aarch64. Limit to x86_64 for now:
13-
# - https://github.com/coreos/fedora-coreos-tracker/issues/1060
14-
# kola: { "platforms": "qemu", "additionalNics": 1, "appendKernelArgs": "ip=10.10.10.10::10.10.10.1:255.255.255.0:myhostname:ens5:none:8.8.8.8 coreos.force_persist_ip", "architectures": "x86_64"}
12+
# - We use net.ifnames=0 to disable consistent network naming here because on
13+
# different firmwares (BIOS vs UEFI) the NIC names are different.
14+
# See https://github.com/coreos/fedora-coreos-tracker/issues/1060
15+
# kola: { "platforms": "qemu", "additionalNics": 1, "appendKernelArgs": "ip=10.10.10.10::10.10.10.1:255.255.255.0:myhostname:eth1:none:8.8.8.8 net.ifnames=0 coreos.force_persist_ip" }
1516

1617
. $KOLA_EXT_DATA/commonlib.sh
1718

18-
# Verify ens5 get staic ip via kargs
19-
nic_name="ens5"
19+
# Verify eth1 gets staic ip via kargs
20+
nic_name="eth1"
2021
nic_ip=$(get_ipv4_for_nic ${nic_name})
2122
if [ ${nic_ip} != "10.10.10.10" ]; then
2223
fatal "Error: get ${nic_name} ip = ${nic_ip}, expected is 10.10.10.10"

tests/kola/networking/prefer-ignition-networking/config.bu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ variant: fcos
22
version: 1.4.0
33
storage:
44
files:
5-
- path: /etc/NetworkManager/system-connections/ens5.nmconnection
5+
- path: /etc/NetworkManager/system-connections/eth1.nmconnection
66
mode: 0600
77
contents:
88
inline: |
99
[connection]
10-
id=ens5
10+
id=eth1
1111
type=ethernet
12-
interface-name=ens5
12+
interface-name=eth1
1313
[ipv4]
1414
dns-search=
1515
may-fail=false

tests/kola/networking/prefer-ignition-networking/test.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22
set -xeuo pipefail
33

44
# Setup configuration for a single NIC with two different ways:
5-
# - kargs provide static network config for ens5 without coreos.force_persist_ip
6-
# - ignition provides dhcp network config for ens5
5+
# - kargs provide static network config for eth1 without coreos.force_persist_ip
6+
# - ignition provides dhcp network config for eth1
77
# Expected result:
88
# - without coreos.force_persist_ip Ignition networking
9-
# configuration wins, verify that ens5 gets ip via dhcp
9+
# configuration wins, verify that eth1 gets ip via dhcp
1010

1111
# https://bugzilla.redhat.com/show_bug.cgi?id=1958930#c29
12-
# These tests fail on aarch64. Limit to x86_64 for now:
13-
# - https://github.com/coreos/fedora-coreos-tracker/issues/1060
14-
# kola: { "platforms": "qemu", "additionalNics": 1, "appendKernelArgs": "ip=10.10.10.10::10.10.10.1:255.255.255.0:myhostname:ens5:none:8.8.8.8", "architectures": "x86_64"}
12+
# - We use net.ifnames=0 to disable consistent network naming here because on
13+
# different firmwares (BIOS vs UEFI) the NIC names are different.
14+
# See https://github.com/coreos/fedora-coreos-tracker/issues/1060
15+
# kola: { "platforms": "qemu", "additionalNics": 1, "appendKernelArgs": "ip=10.10.10.10::10.10.10.1:255.255.255.0:myhostname:eth1:none:8.8.8.8 net.ifnames=0" }
1516

1617
. $KOLA_EXT_DATA/commonlib.sh
1718

18-
# Verify ens5 get ip address via dhcp
19-
nic_name="ens5"
19+
# Verify eth1 gets ip address via dhcp
20+
nic_name="eth1"
2021
nic_ip=$(get_ipv4_for_nic ${nic_name})
2122
if [ ${nic_ip} != "10.0.2.31" ]; then
2223
fatal "Error: get ${nic_name} ip = ${nic_ip}, expected is 10.0.2.31"

0 commit comments

Comments
 (0)