Skip to content

Commit

Permalink
tests:integration: Adopt for systemd v254
Browse files Browse the repository at this point in the history
systemd-networkd v245 seems to be more picky about moving an interface from "configuring" to "configured" state.
It waits for an IPv6 RA to be received. So we need to define "accept-ra: false" in Netplan tests to ignore that,
or make our test environment (dnsmasq) to actually provide RAs. I went with the latter.

We still see weird error messages from 'networkctl', which seems new, but they do not fail tests. E.g.:
Failed to query link bit rates: Invalid argument
Failed to query link DHCP leases: Invalid argument

I have the impression that those error messages are thrown while the interface is still in "configuring" state,
i.e. while waiting for the RA to be received/processed. We're calling 'networkctl status IFACE' in a loop and
the error message vanishes when calling the command after a few seconds.
  • Loading branch information
slyon committed Jul 20, 2023
1 parent 806e764 commit 5851195
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/integration/ethernets.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def test_link_local_ipv4(self):

# TODO: implement link-local handling in NetworkManager backend and move this test into CommonTests()
def test_link_local_ipv6(self):
self.setup_eth(None)
self.setup_eth('ra-only')
with open(self.config, 'w') as f:
f.write('''network:
renderer: %(r)s
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
class _CommonTests():

def test_mix_bridge_on_bond(self):
self.setup_eth(None)
self.setup_eth('ra-only')
self.addCleanup(subprocess.call, ['ip', 'link', 'delete', 'bond0'], stderr=subprocess.DEVNULL)
self.addCleanup(subprocess.call, ['ip', 'link', 'delete', 'br0'], stderr=subprocess.DEVNULL)
with open(self.config, 'w') as f:
Expand Down Expand Up @@ -65,7 +65,7 @@ def test_mix_bridge_on_bond(self):
self.assertIn(self.dev_e2_client, result)

def test_mix_vlan_on_bridge_on_bond(self):
self.setup_eth(None, False)
self.setup_eth('ra-only')
self.addCleanup(subprocess.call, ['ip', 'link', 'delete', 'bond0'], stderr=subprocess.DEVNULL)
self.addCleanup(subprocess.call, ['ip', 'link', 'delete', 'br0'], stderr=subprocess.DEVNULL)
self.addCleanup(subprocess.call, ['ip', 'link', 'delete', 'br1'], stderr=subprocess.DEVNULL)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/vlans.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_vlan(self):
subprocess.check_output(['ip', 'route', 'show', 'dev', 'nptesttwo']))

def test_vlan_mac_address(self):
self.setup_eth(None)
self.setup_eth('ra-only')
self.addCleanup(subprocess.call, ['ip', 'link', 'delete', 'myvlan'], stderr=subprocess.DEVNULL)
with open(self.config, 'w') as f:
f.write('''network:
Expand Down

0 comments on commit 5851195

Please sign in to comment.