The 100-apply-verify-host.t can fail 3 tests due to multiple instances of the
'dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/tck-testnet.conf' process being
returned in a process listing. This is due to libvirt launching one dnsmasq
process as root, and that process spawning a second instance of the same
process owned by the dnsmasq user. This patch resolves the problem by adding
`uniq` to the command generating the process list.
Signed-off-by: Mike Latimer <mlatimer(a)suse.com>
---
scripts/networks/networkxml2hostout/tck-testnet-1.dat | 2 +-
scripts/networks/networkxml2hostout/tck-testnet-2.dat | 2 +-
scripts/networks/networkxml2hostout/tck-testnet-3.dat | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/networks/networkxml2hostout/tck-testnet-1.dat
b/scripts/networks/networkxml2hostout/tck-testnet-1.dat
index fff6ca3..56aa37c 100644
--- a/scripts/networks/networkxml2hostout/tck-testnet-1.dat
+++ b/scripts/networks/networkxml2hostout/tck-testnet-1.dat
@@ -9,7 +9,7 @@ ACCEPT all -- 0.0.0.0/0 10.1.2.0/24 state
RELATED,ESTAB
ACCEPT all -- 10.1.2.0/24 0.0.0.0/0
#ip -o route show dev tck-testbr | gawk '{print $1" "$7}'
10.1.2.0/24 10.1.2.1
-#ps aux | sed -n '/dnsmasq .*tck-testnet/
s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p'
+#ps aux | sed -n '/dnsmasq .*tck-testnet/
s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' | uniq
/dnsmasq/tck-testnet.conf
#grep bind-dynamic `ps aux | sed -n '0,/dnsmasq .*tck-testnet/
s|.*--conf-file=\(.*tck-testnet.conf\).*|\1|p'`
bind-dynamic
diff --git a/scripts/networks/networkxml2hostout/tck-testnet-2.dat
b/scripts/networks/networkxml2hostout/tck-testnet-2.dat
index 7f8c86c..cc812be 100644
--- a/scripts/networks/networkxml2hostout/tck-testnet-2.dat
+++ b/scripts/networks/networkxml2hostout/tck-testnet-2.dat
@@ -4,7 +4,7 @@ ACCEPT all -- 10.1.2.0/24 0.0.0.0/0
#iptables -t nat -L -n | grep ' 10\.1\.2\.'
#ip -o route show dev tck-testbr | gawk '{print $1" "$7}'
10.1.2.0/24 10.1.2.1
-#ps aux | sed -n '/dnsmasq .*tck-testnet/
s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p'
+#ps aux | sed -n '/dnsmasq .*tck-testnet/
s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' | uniq
/dnsmasq/tck-testnet.conf
#grep bind-dynamic `ps aux | sed -n '0,/dnsmasq .*tck-testnet/
s|.*--conf-file=\(.*tck-testnet.conf\).*|\1|p'`
bind-dynamic
diff --git a/scripts/networks/networkxml2hostout/tck-testnet-3.dat
b/scripts/networks/networkxml2hostout/tck-testnet-3.dat
index 5fbf742..67745d3 100644
--- a/scripts/networks/networkxml2hostout/tck-testnet-3.dat
+++ b/scripts/networks/networkxml2hostout/tck-testnet-3.dat
@@ -12,7 +12,7 @@ ACCEPT all ::/0 2001:db8:ac10:fd01::/64
ACCEPT all 2001:db8:ac10:fd01::/64 ::/0
ACCEPT all ::/0 2001:db8:ac10:fe01::/64
ACCEPT all 2001:db8:ac10:fe01::/64 ::/0
-#ps aux | sed -n '/dnsmasq .*tck-testnet/
s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p'
+#ps aux | sed -n '/dnsmasq .*tck-testnet/
s|.*\(\/dnsmasq\/tck-testnet.conf\).*|\1|p' | uniq
/dnsmasq/tck-testnet.conf
#grep bind-dynamic `ps aux | sed -n '0,/dnsmasq .*tck-testnet/
s|.*--conf-file=\(.*tck-testnet.conf\).*|\1|p'`
bind-dynamic
--
1.8.4.5