summaryrefslogtreecommitdiffstats
path: root/debian/patches/networkd-test-ignore-failures-of-test_route_only_dns-in-c.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:25:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:25:51 +0000
commitac8399db6ce846597966360732ce6d39a247bdd2 (patch)
tree046a28d2cbd02afa147291e8f69e9bb5dc29f1aa /debian/patches/networkd-test-ignore-failures-of-test_route_only_dns-in-c.patch
parentAdding upstream version 241. (diff)
downloadsystemd-ac8399db6ce846597966360732ce6d39a247bdd2.tar.xz
systemd-ac8399db6ce846597966360732ce6d39a247bdd2.zip
Adding debian version 241-7~deb10u8.debian/241-7_deb10u8
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/networkd-test-ignore-failures-of-test_route_only_dns-in-c.patch')
-rw-r--r--debian/patches/networkd-test-ignore-failures-of-test_route_only_dns-in-c.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/debian/patches/networkd-test-ignore-failures-of-test_route_only_dns-in-c.patch b/debian/patches/networkd-test-ignore-failures-of-test_route_only_dns-in-c.patch
new file mode 100644
index 0000000..72e5042
--- /dev/null
+++ b/debian/patches/networkd-test-ignore-failures-of-test_route_only_dns-in-c.patch
@@ -0,0 +1,61 @@
+From: Martin Pitt <martin@piware.de>
+Date: Wed, 27 Feb 2019 23:15:31 +0100
+Subject: networkd-test: ignore failures of test_route_only_dns* in containers
+
+This test exposes a race condition when running in LXC, see issue #11848
+for details. Until that is understood and fixed, skip the test as it's
+not a recent regression.
+
+(cherry picked from commit 09b8826ea371e027c76a573a226bfd8f8c5652a2)
+---
+ test/networkd-test.py | 23 +++++++++++++++++++----
+ 1 file changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/test/networkd-test.py b/test/networkd-test.py
+index 9487910..6efeef9 100755
+--- a/test/networkd-test.py
++++ b/test/networkd-test.py
+@@ -29,6 +29,7 @@ import time
+ import unittest
+
+ HAVE_DNSMASQ = shutil.which('dnsmasq') is not None
++IS_CONTAINER = subprocess.call(['systemd-detect-virt', '--quiet', '--container']) == 0
+
+ NETWORK_UNITDIR = '/run/systemd/network'
+
+@@ -476,8 +477,15 @@ Address=192.168.42.100
+ DNS=192.168.42.1
+ Domains= ~company''')
+
+- self.do_test(coldplug=True, ipv6=False,
+- extra_opts='IPv6AcceptRouterAdvertisements=False')
++ try:
++ self.do_test(coldplug=True, ipv6=False,
++ extra_opts='IPv6AcceptRouterAdvertisements=False')
++ except subprocess.CalledProcessError as e:
++ # networkd often fails to start in LXC: https://github.com/systemd/systemd/issues/11848
++ if IS_CONTAINER and e.cmd == ['systemctl', 'start', 'systemd-networkd']:
++ raise unittest.SkipTest('https://github.com/systemd/systemd/issues/11848')
++ else:
++ raise
+
+ with open(RESOLV_CONF) as f:
+ contents = f.read()
+@@ -500,8 +508,15 @@ Address=192.168.42.100
+ DNS=192.168.42.1
+ Domains= ~company ~.''')
+
+- self.do_test(coldplug=True, ipv6=False,
+- extra_opts='IPv6AcceptRouterAdvertisements=False')
++ try:
++ self.do_test(coldplug=True, ipv6=False,
++ extra_opts='IPv6AcceptRouterAdvertisements=False')
++ except subprocess.CalledProcessError as e:
++ # networkd often fails to start in LXC: https://github.com/systemd/systemd/issues/11848
++ if IS_CONTAINER and e.cmd == ['systemctl', 'start', 'systemd-networkd']:
++ raise unittest.SkipTest('https://github.com/systemd/systemd/issues/11848')
++ else:
++ raise
+
+ with open(RESOLV_CONF) as f:
+ contents = f.read()