From: YAMAMOTO Takashi Date: Mon, 24 Feb 2014 02:46:22 +0000 (+0900) Subject: ofproto-dpif: Fix "sFlow packet sampling" tests on BSDs X-Git-Tag: sliver-openvswitch-2.2.90-1~9^2~36 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9a9808d7955b4cf50b6aac34101a68d76b173d63;p=sliver-openvswitch.git ofproto-dpif: Fix "sFlow packet sampling" tests on BSDs The name of loopback interface is "lo0" on BSDs. Signed-off-by: YAMAMOTO Takashi Signed-off-by: Ben Pfaff --- diff --git a/tests/atlocal.in b/tests/atlocal.in index 5c0db2a78..06e738434 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -68,3 +68,13 @@ FreeBSD) esac export MALLOC_CONF esac + +# The name of loopback interface +case `uname` in +Linux) + LOOPBACK_INTERFACE=lo + ;; +FreeBSD|NetBSD) + LOOPBACK_INTERFACE=lo0 + ;; +esac diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 97953d09e..8e21d11f7 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -2366,7 +2366,7 @@ m4_define([CHECK_SFLOW_SAMPLING_PACKET], set Interface p2 options:ifindex=1003 -- \ set Bridge br0 sflow=@sf -- \ --id=@sf create sflow targets=\"$1:$SFLOW_PORT\" \ - header=128 sampling=1 polling=1 agent=lo + header=128 sampling=1 polling=1 agent=$LOOPBACK_INTERFACE dnl open with ARP packets to seed the bridge-learning. The output dnl ifIndex numbers should be reported predictably after that.