Skip to content

Commit 9c641ae

Browse files
committed
Switching to an unused tap device
It appears that if we use a tap device that has already been configured by another test, then we cannot effectively change the configuration of that device. Because for this test we need to rename the device, make sure that we use an unallocated tap device. Signed-off-by: Andrew Laucius <[email protected]>
1 parent c42de07 commit 9c641ae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/integration_tests/functional/test_snapshot_basic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,10 +606,11 @@ def test_snapshot_rename_interface(uvm_nano, microvm_factory):
606606
Test that we can restore a snapshot and point its interface to a
607607
different host interface.
608608
"""
609-
base_iface = net_tools.NetIfaceConfig.with_id(0)
609+
# We start at an unused tap index to avoid conflicts with other tests.
610+
base_iface = net_tools.NetIfaceConfig.with_id(7)
610611

611612
vm = uvm_nano
612-
iface1 = dataclasses.replace(base_iface, tap_name="tap1")
613+
iface1 = dataclasses.replace(base_iface, tap_name="tap8")
613614
vm.add_net_iface(iface=iface1)
614615
# Create an interface but don't attach it to the device
615616
vm.start()

0 commit comments

Comments
 (0)