tests: use pkill instead of killall

killall isn't installed by default
This commit is contained in:
Marek Marczykowski-Górecki 2019-04-13 16:42:37 +02:00
parent 56ec271606
commit 66de41ac26
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -107,7 +107,7 @@ class VmNetworkingMixin(object):
run_netvm_cmd("iptables -I INPUT -d {} -j ACCEPT --wait".format( run_netvm_cmd("iptables -I INPUT -d {} -j ACCEPT --wait".format(
self.test_ip)) self.test_ip))
# ignore failure # ignore failure
self.run_cmd(self.testnetvm, "killall --wait dnsmasq") self.run_cmd(self.testnetvm, "pkill dnsmasq")
run_netvm_cmd("dnsmasq -a {ip} -A /{name}/{ip} -i test0 -z".format( run_netvm_cmd("dnsmasq -a {ip} -A /{name}/{ip} -i test0 -z".format(
ip=self.test_ip, name=self.test_name)) ip=self.test_ip, name=self.test_name))
run_netvm_cmd("echo nameserver {} > /etc/resolv.conf".format( run_netvm_cmd("echo nameserver {} > /etc/resolv.conf".format(
@ -786,7 +786,7 @@ class VmIPv6NetworkingMixin(VmNetworkingMixin):
run_netvm_cmd( run_netvm_cmd(
"ip6tables -I INPUT -d {} -j ACCEPT".format(self.test_ip6)) "ip6tables -I INPUT -d {} -j ACCEPT".format(self.test_ip6))
# ignore failure # ignore failure
self.run_cmd(self.testnetvm, "killall --wait dnsmasq") self.run_cmd(self.testnetvm, "pkill dnsmasq")
run_netvm_cmd( run_netvm_cmd(
"dnsmasq -a {ip} -A /{name}/{ip} -A /{name}/{ip6} -i test0 -z". "dnsmasq -a {ip} -A /{name}/{ip} -A /{name}/{ip6} -i test0 -z".
format(ip=self.test_ip, ip6=self.test_ip6, name=self.test_name)) format(ip=self.test_ip, ip6=self.test_ip6, name=self.test_name))