aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-07-15 15:21:39 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-07-22 19:42:18 +0200
commitee5685c772974ebf027e08cfc83f60c3018618af (patch)
treecdb422090d5bf44045f7b19f5dc2ce7f9cbda393
parent4094cec7f7bdf068c04c6d33e87a1174e8fdbf4e (diff)
downloadpasst-ee5685c772974ebf027e08cfc83f60c3018618af.tar
passt-ee5685c772974ebf027e08cfc83f60c3018618af.tar.gz
passt-ee5685c772974ebf027e08cfc83f60c3018618af.tar.bz2
passt-ee5685c772974ebf027e08cfc83f60c3018618af.tar.lz
passt-ee5685c772974ebf027e08cfc83f60c3018618af.tar.xz
passt-ee5685c772974ebf027e08cfc83f60c3018618af.tar.zst
passt-ee5685c772974ebf027e08cfc83f60c3018618af.zip
tests: No need to retrieve host ifname in ndp/pasta
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 <david@gibson.dropbear.id.au>
-rw-r--r--test/ndp/pasta5
1 files 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
test Interface name
nsout IFNAME ip -j link show | jq -rM '.[] | select(.link_type == "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 == "default").dev'
-check [ -n "__IFNAME__" ]
test SLAAC: prefix
nsout ADDR6 ip -j -6 addr show|jq -rM '.[] | select(.ifname == "__IFNAME__").addr_info[] | select(.scope == "global" and .prefixlen == 64).local'
nsout PREFIX6 sipcalc __ADDR6__/64 | grep prefix | cut -d' ' -f4
-hout HOST_ADDR6 ip -j -6 addr show|jq -rM '.[] | select(.ifname == "__HOST_IFNAME__").addr_info[] | select(.scope == "global").local'
+hout HOST_ADDR6 ip -j -6 addr show|jq -rM '.[] | select(.ifname == "__IFNAME__").addr_info[] | select(.scope == "global").local'
hout HOST_PREFIX6 sipcalc __HOST_ADDR6__/64 | grep prefix | cut -d' ' -f4
check [ "__PREFIX6__" = "__HOST_PREFIX6__" ]