[libvirt] [PATCH tck] 210-no-mac-spoofing.t: Catch network is unreachable error

Some environments (openSUSE 13.1) can report the network is unreachable during this test. Trap that condition as well. --- scripts/nwfilter/210-no-mac-spoofing.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/nwfilter/210-no-mac-spoofing.t b/scripts/nwfilter/210-no-mac-spoofing.t index d7c57e6..7e80216 100644 --- a/scripts/nwfilter/210-no-mac-spoofing.t +++ b/scripts/nwfilter/210-no-mac-spoofing.t @@ -92,7 +92,7 @@ echo "DEV=`ip link | head -3 | tail -1 | awk '{print \\\$2}' | sed -e 's/://'` /sbin/ip link set \\\$DEV address ${macfalse} /sbin/ip link set \\\$DEV up /sbin/ip addr show dev \\\$DEV -/bin/ping -c 10 ${gateway} +/bin/ping -c 10 ${gateway} 2>&1 /sbin/ip link set \\\$DEV down /sbin/ip link set \\\$DEV address ${mac} /sbin/ip link set \\\$DEV up @@ -119,7 +119,7 @@ diag $exit; diag $stdout; diag $stderr; diag $exit; -ok($stdout =~ "100% packet loss", "packet loss expected"); +ok($stdout =~ /100% packet loss|Network is unreachable/, "packet loss expected"); shutdown_vm_gracefully($dom); -- 1.8.4.5

On Tue, Apr 01, 2014 at 05:24:19PM -0600, Mike Latimer wrote:
Some environments (openSUSE 13.1) can report the network is unreachable during this test. Trap that condition as well.
--- scripts/nwfilter/210-no-mac-spoofing.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (2)
-
Daniel P. Berrange
-
Mike Latimer