summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-10 10:33:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-10 10:33:16 +0000
commitf9804241f38e0ec382bfa36f8813123c1834a25f (patch)
treebc3906a975e34adf0b887a76544afe431fb18767
parentMerging upstream version 2.3.1: (diff)
downloadnvme-stas-f9804241f38e0ec382bfa36f8813123c1834a25f.tar.xz
nvme-stas-f9804241f38e0ec382bfa36f8813123c1834a25f.zip
Adding patch from upstream to fix udev tests with dummy interfaces, thanks to Olivier Gayot <olivier.gayot@canonical.com> (Closes: #1057530).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/upstream/0001-test-dummy-interfaces.patch20
2 files changed, 21 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8ceb28a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+upstream/0001-test-dummy-interfaces.patch
diff --git a/debian/patches/upstream/0001-test-dummy-interfaces.patch b/debian/patches/upstream/0001-test-dummy-interfaces.patch
new file mode 100644
index 0000000..55eee35
--- /dev/null
+++ b/debian/patches/upstream/0001-test-dummy-interfaces.patch
@@ -0,0 +1,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
+