tests: ethernets: Add ipv6-address-generation integration tests#509
tests: ethernets: Add ipv6-address-generation integration tests#509slyon merged 3 commits intocanonical:mainfrom
Conversation
|
The CI caught an issue I hadn't thought of: It generated a MAC address with a leading zero and that resulted in the test failing. I'll fix it. |
These tests validate the Stable Privacy and Modified EUI-64 IPv6 address generation methods under both NetworkManager and systemd-networkd.
a92a3d5 to
2eb0866
Compare
slyon
left a comment
There was a problem hiding this comment.
Thank you, this is a very valuable contribution!
I left some small nitpicks as inline-comments. Otherwise, LGTM and the tests are green in the CI, too!
There was a problem hiding this comment.
@tatokis I took the freedom to sparkle it with some comments and also move the EUI-64 calculation method into integration/base.py, so it can be used from both test methods, without code duplication. So this should now be good for merging (after CI passes again).
Interestingly, while testing locally inside an Ubuntu Oracular (devel) container, the test_ip6_eui64 test failed for the systemd-networkd backend. Do you have any explanation for that? (It might as well have been my local test environment being bonkers.)
======================================================================
FAIL: test_ip6_eui64 (__main__.TestNetworkd.test_ip6_eui64)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/autopkgtest.t7IWGx/build.0JU/real-tree/tests/integration/ethernets.py", line 256, in test_ip6_eui64
self.assert_iface_up(self.dev_e_client, [f'inet6 {eui_addr.compressed}/64'])
File "/tmp/autopkgtest.t7IWGx/build.0JU/real-tree/tests/integration/base.py", line 337, in assert_iface_up
out = self.assert_iface(iface, expected_ip_a, unexpected_ip_a)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/autopkgtest.t7IWGx/build.0JU/real-tree/tests/integration/base.py", line 327, in assert_iface
self.assertRegex(out, r, out)
AssertionError: Regex didn't match: 'inet6 2600::28ae:72ff:fe0a:5fe/64' not found in '84: eth42@veth42: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000\n link/ether 2a:ae:72:0a:05:fe brd ff:ff:ff:ff:ff:ff promiscuity 0 allmulti 0 minmtu 68 maxmtu 65535 \n veth numtxqueues 8 numrxqueues 8 gso_max_size 65536 gso_max_segs 65535 tso_max_size 524280 tso_max_segs 65535 gro_max_size 65536 gso_ipv4_max_size 65536 gro_ipv4_max_size 65536 \n inet6 2600::13/128 scope global dynamic noprefixroute \n valid_lft 86395sec preferred_lft 86395sec\n inet6 fe80::28ae:72ff:fe0a:5fe/64 scope link proto kernel_ll \n valid_lft forever preferred_lft forever\n' : 84: eth42@veth42: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 2a:ae:72:0a:05:fe brd ff:ff:ff:ff:ff:ff promiscuity 0 allmulti 0 minmtu 68 maxmtu 65535
veth numtxqueues 8 numrxqueues 8 gso_max_size 65536 gso_max_segs 65535 tso_max_size 524280 tso_max_segs 65535 gro_max_size 65536 gso_ipv4_max_size 65536 gro_ipv4_max_size 65536
inet6 2600::13/128 scope global dynamic noprefixroute
valid_lft 86395sec preferred_lft 86395sec
inet6 fe80::28ae:72ff:fe0a:5fe/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
Edit: CI passed on Debian testing (using systemd v256, like Oracular). So the issue seems to be more specific to Oracular or my local environment.
|
@slyon Apologies for the extremely late reply. I'm glad you got it figured out. Thank you for taking the time to do the cleanups and fix it. |
Description
These tests validate the Stable Privacy and Modified EUI-64 IPv6 address generation methods under both NetworkManager and systemd-networkd.
Checklist
make checksuccessfully.make check-coverage).