mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-13 12:58:20 +03:00
test-network: check existence of kernel bug
This adds checks for the kernel bug caused by
3ddc2231c8
,
it will be fixed by
https://patchwork.kernel.org/project/netdevbpf/patch/20240510072932.2678952-1-edumazet@google.com/
(cherry picked from commit d22f2fb912da492a905f30fef84d1a23fdff3e55)
(cherry picked from commit 90fda85349c945ef1fa13337cc15d45977f8bf1a)
(cherry picked from commit 4e69c369abc35681eeb03e52b0f856fe714f7bd2)
This commit is contained in:
parent
b36228bcd9
commit
afc0572075
@ -250,6 +250,22 @@ def expectedFailureIfNetdevsimWithSRIOVIsNotAvailable():
|
||||
|
||||
return f
|
||||
|
||||
def expectedFailureIfKernelReturnsInvalidFlags():
|
||||
'''
|
||||
This checks the kernel bug caused by 3ddc2231c8108302a8229d3c5849ee792a63230d.
|
||||
It will be fixed by the following patch:
|
||||
https://patchwork.kernel.org/project/netdevbpf/patch/20240510072932.2678952-1-edumazet@google.com/
|
||||
'''
|
||||
def f(func):
|
||||
call_quiet('ip link add dummy98 type dummy')
|
||||
call_quiet('ip link set up dev dummy98')
|
||||
call_quiet('ip address add 192.0.2.1/24 dev dummy98 noprefixroute')
|
||||
output = check_output('ip address show dev dummy98')
|
||||
remove_link('dummy98')
|
||||
return func if 'noprefixroute' in output else unittest.expectedFailure(func)
|
||||
|
||||
return f
|
||||
|
||||
# pylint: disable=C0415
|
||||
def compare_kernel_version(min_kernel_version):
|
||||
try:
|
||||
@ -4581,6 +4597,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
|
||||
self.assertIn('DHCPREPLY(veth-peer)', output)
|
||||
self.assertNotIn('rapid-commit', output)
|
||||
|
||||
@expectedFailureIfKernelReturnsInvalidFlags()
|
||||
def test_dhcp_client_ipv4_only(self):
|
||||
copy_network_unit('25-veth.netdev', '25-dhcp-server-veth-peer.network', '25-dhcp-client-ipv4-only.network')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user