From 5f769b3e57f3f21c4af549ee19bc094ff86e4f8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20M=C3=A4rdian?= Date: Thu, 18 Aug 2022 15:34:31 +0200 Subject: Revert "d/p/autopkgtest-fixes: Drop test quirks (PR#276)" This reverts commit 6bf132b5bce536165b37746c9cb22ed408c8f394. --- debian/patches/autopkgtest-fixes.patch | 38 ++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 39 insertions(+) create mode 100644 debian/patches/autopkgtest-fixes.patch create mode 100644 debian/patches/series diff --git a/debian/patches/autopkgtest-fixes.patch b/debian/patches/autopkgtest-fixes.patch new file mode 100644 index 0000000..b61a214 --- /dev/null +++ b/debian/patches/autopkgtest-fixes.patch @@ -0,0 +1,38 @@ +diff --git a/tests/integration/base.py b/tests/integration/base.py +index 5042bf4..93ee722 100644 +--- a/tests/integration/base.py ++++ b/tests/integration/base.py +@@ -75,7 +75,7 @@ class IntegrationTestsBase(unittest.TestCase): + + os.makedirs('/etc/NetworkManager/conf.d', exist_ok=True) + with open('/etc/NetworkManager/conf.d/99-test-ignore.conf', 'w') as f: +- f.write('[keyfile]\nunmanaged-devices+=interface-name:eth0,interface-name:en*,interface-name:veth42,interface-name:veth43') ++ f.write('[keyfile]\nunmanaged-devices+=interface-name:en*,eth0,veth42,veth43,nptestsrv') + subprocess.check_call(['netplan', 'apply']) + subprocess.call(['/lib/systemd/systemd-networkd-wait-online', '--quiet', '--timeout=30']) + +@@ -144,12 +144,6 @@ class IntegrationTestsBase(unittest.TestCase): + universal_newlines=True) + klass.dev_e2_client_mac = out.split()[2] + +- os.makedirs('/run/NetworkManager/conf.d', exist_ok=True) +- +- # work around https://launchpad.net/bugs/1615044 +- with open('/run/NetworkManager/conf.d/11-globally-managed-devices.conf', 'w') as f: +- f.write('[keyfile]\nunmanaged-devices=') +- + @classmethod + def shutdown_devices(klass): + '''Remove test devices''' +@@ -440,9 +434,10 @@ class IntegrationTestsWifi(IntegrationTestsBase): + klass.dev_w_ap = devs[0] + klass.dev_w_client = devs[1] + ++ os.makedirs('/run/NetworkManager/conf.d', exist_ok=True) + # don't let NM trample over our fake AP + with open('/run/NetworkManager/conf.d/test-blacklist.conf', 'w') as f: +- f.write('[main]\nplugins=keyfile\n[keyfile]\nunmanaged-devices+=nptestsrv,%s\n' % klass.dev_w_ap) ++ f.write('[main]\nplugins=keyfile\n[keyfile]\nunmanaged-devices+=%s\n' % klass.dev_w_ap) + + @classmethod + def shutdown_devices(klass): diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..464cc4d --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +autopkgtest-fixes.patch -- cgit v1.2.3