From 4123b958669cf4217e27286d01ba955270cecd87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 24 Jun 2016 04:37:06 +0200 Subject: [PATCH] tests: make sure dnsmasq isn't already running On Debian when dnsmasq is installed, it is automatically started. Which prevents starting a second instance. --- tests/network.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/network.py b/tests/network.py index a2e64d34..eeab8053 100644 --- a/tests/network.py +++ b/tests/network.py @@ -88,6 +88,8 @@ class VmNetworkingMixin(qubes.tests.SystemTestsMixin): run_netvm_cmd("ip link set test0 up") run_netvm_cmd("ip addr add {}/24 dev test0".format(self.test_ip)) run_netvm_cmd("iptables -I INPUT -d {} -j ACCEPT".format(self.test_ip)) + # ignore failure + self.run_cmd(self.testnetvm, "killall --wait dnsmasq") run_netvm_cmd("dnsmasq -a {ip} -A /{name}/{ip} -i test0 -z".format( ip=self.test_ip, name=self.test_name)) run_netvm_cmd("echo nameserver {} > /etc/resolv.conf".format(