test-network: try to flip interface state frequently
This commit is contained in:
@@ -12,6 +12,7 @@ import itertools
|
||||
import json
|
||||
import os
|
||||
import pathlib
|
||||
import random
|
||||
import re
|
||||
import shutil
|
||||
import signal
|
||||
@@ -5109,9 +5110,7 @@ class NetworkdRATests(unittest.TestCase, Utilities):
|
||||
|
||||
self.teardown_nftset('addr6', 'network6', 'ifindex')
|
||||
|
||||
def test_ipv6_token_static(self):
|
||||
copy_network_unit('25-veth.netdev', '25-ipv6-prefix.network', '25-ipv6-prefix-veth-token-static.network')
|
||||
start_networkd()
|
||||
def check_ipv6_token_static(self):
|
||||
self.wait_online(['veth99:routable', 'veth-peer:degraded'])
|
||||
|
||||
output = networkctl_status('veth99')
|
||||
@@ -5121,6 +5120,26 @@ class NetworkdRATests(unittest.TestCase, Utilities):
|
||||
self.assertRegex(output, '2002:da8:2:0:1a:2b:3c:4d')
|
||||
self.assertRegex(output, '2002:da8:2:0:fa:de:ca:fe')
|
||||
|
||||
def test_ipv6_token_static(self):
|
||||
copy_network_unit('25-veth.netdev', '25-ipv6-prefix.network', '25-ipv6-prefix-veth-token-static.network')
|
||||
start_networkd()
|
||||
|
||||
self.check_ipv6_token_static()
|
||||
|
||||
for _ in range(20):
|
||||
check_output('ip link set veth99 down')
|
||||
check_output('ip link set veth99 up')
|
||||
|
||||
self.check_ipv6_token_static()
|
||||
|
||||
for _ in range(20):
|
||||
check_output('ip link set veth99 down')
|
||||
time.sleep(random.uniform(0, 0.1))
|
||||
check_output('ip link set veth99 up')
|
||||
time.sleep(random.uniform(0, 0.1))
|
||||
|
||||
self.check_ipv6_token_static()
|
||||
|
||||
def test_ipv6_token_prefixstable(self):
|
||||
copy_network_unit('25-veth.netdev', '25-ipv6-prefix.network', '25-ipv6-prefix-veth-token-prefixstable.network')
|
||||
start_networkd()
|
||||
|
||||
Reference in New Issue
Block a user