Skip to content

Commit

Permalink
tests:ethernets: avoid flaky test_ip6_eui64 results, when statefull D…
Browse files Browse the repository at this point in the history
…HCPv6 is quicker than stateless EUI-64 address generation

Also use a 'ra-stateless' configuration option to dnsmasq, to avoid providing stateful DHCP addresses to the client.
  • Loading branch information
slyon committed Sep 3, 2024
1 parent 150090a commit a0a53a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/integration/ethernets.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def test_ip6_token(self):
self.assert_iface_up(self.dev_e_client, ['inet6 2600::42/64'])

def test_ip6_stable_privacy(self):
self.setup_eth('ra-only')
self.setup_eth('ra-stateless')
with open(self.config, 'w') as f:
f.write('''network:
version: 2
Expand All @@ -240,7 +240,7 @@ def test_ip6_stable_privacy(self):
self.assert_iface_up(self.dev_e_client, ['inet6 2600::'], [f'inet6 {eui_addr.compressed}/64'])

def test_ip6_eui64(self):
self.setup_eth('ra-only')
self.setup_eth('ra-stateless')
with open(self.config, 'w') as f:
f.write('''network:
version: 2
Expand All @@ -250,9 +250,9 @@ def test_ip6_eui64(self):
dhcp6: yes
accept-ra: yes
ipv6-address-generation: eui64''' % {'r': self.backend, 'ec': self.dev_e_client})
self.generate_and_settle([self.state_dhcp6(self.dev_e_client)])
# Compare to EUI-64 address, to make sure it matches the one generated.
eui_addr = mac_to_eui64(self.dev_e_client_mac)
self.generate_and_settle([self.state(self.dev_e_client, eui_addr.compressed)])
self.assert_iface_up(self.dev_e_client, [f'inet6 {eui_addr.compressed}/64'])

def test_link_local_all(self):
Expand Down

0 comments on commit a0a53a5

Please sign in to comment.