blob: 55eee35ab10fce8cbeddebc34abbf29c79dfc0cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
Author: Martin Belanger <martin.belanger@dell.com>
Description: test: Fix test-udev with dummy interfaces
https://github.com/linux-nvme/nvme-stas/issues/407
https://github.com/linux-nvme/nvme-stas/commit/371c1e875a9a660adca241265e4cd460ee7e5e5c
diff -Naurp nvme-stas.orig/test/test-udev.py nvme-stas/test/test-udev.py
--- nvme-stas.orig/test/test-udev.py
+++ nvme-stas/test/test-udev.py
@@ -295,6 +295,11 @@ class Test(unittest.TestCase):
def test__cid_matches_tid(self):
ifaces = iputil.net_if_addrs()
for ifname, addrs in self.ifaces.items():
+ # <ifaces> contains a subset of the interfaces found in <self.ifaces>.
+ # So, let's make sure that we only test with the interfaces found in both.
+ if ifname not in ifaces:
+ continue
+
##############################################
# IPV4
|