From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson To: passt-dev@passt.top Subject: [PATCH 16/18] tests: No need to retrieve host ifname in ndp/pasta Date: Fri, 15 Jul 2022 15:21:39 +1000 Message-ID: <20220715052141.890703-17-david@gibson.dropbear.id.au> In-Reply-To: <20220715052141.890703-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8888040751612978671==" --===============8888040751612978671== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable With pasta, the namespace interface name is generally the same as the host interface name. We already rely on this in the dhcp/pasta tests, but for no clear reason ndp/pasta separately determines the host interface name. Remove this unnecessary step. Signed-off-by: David Gibson --- test/ndp/pasta | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/ndp/pasta b/test/ndp/pasta index 2a2dd1a..28fdd72 100644 --- a/test/ndp/pasta +++ b/test/ndp/pasta @@ -16,15 +16,14 @@ htools ip jq sipcalc grep cut =20 test Interface name nsout IFNAME ip -j link show | jq -rM '.[] | select(.link_type =3D=3D "ether= ").ifname' +check [ -n "__IFNAME__" ] ns ip link set dev __IFNAME__ up sleep 2 -hout HOST_IFNAME ip -j -4 route show|jq -rM '.[] | select(.dst =3D=3D "defau= lt").dev' -check [ -n "__IFNAME__" ] =20 test SLAAC: prefix nsout ADDR6 ip -j -6 addr show|jq -rM '.[] | select(.ifname =3D=3D "__IFNAME= __").addr_info[] | select(.scope =3D=3D "global" and .prefixlen =3D=3D 64).lo= cal' nsout PREFIX6 sipcalc __ADDR6__/64 | grep prefix | cut -d' ' -f4 -hout HOST_ADDR6 ip -j -6 addr show|jq -rM '.[] | select(.ifname =3D=3D "__HO= ST_IFNAME__").addr_info[] | select(.scope =3D=3D "global").local' +hout HOST_ADDR6 ip -j -6 addr show|jq -rM '.[] | select(.ifname =3D=3D "__IF= NAME__").addr_info[] | select(.scope =3D=3D "global").local' hout HOST_PREFIX6 sipcalc __HOST_ADDR6__/64 | grep prefix | cut -d' ' -f4 check [ "__PREFIX6__" =3D "__HOST_PREFIX6__" ] =20 --=20 2.36.1 --===============8888040751612978671==--