public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH] test/pasta/ndp: Fix NDP test for --config-net pasta setup
@ 2026-06-21  1:28 Jon Maloy
  2026-06-21  2:43 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Maloy @ 2026-06-21  1:28 UTC (permalink / raw)
  To: sbrivio, david, jmaloy, passt-dev

--config-net sets IPv6 addresses directly via netlink rather than
relying on kernel SLAAC, so addresses won't have the "kernel_ra"
protocol tag. Match global-scope addresses instead, which works for
both --config-net and SLAAC configurations.

Signed-off-by: Jon Maloy <jmaloy@redhat.com>
---
 test/pasta/ndp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/pasta/ndp b/test/pasta/ndp
index 1d385c73..7169f57a 100644
--- a/test/pasta/ndp
+++ b/test/pasta/ndp
@@ -18,11 +18,11 @@ 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
-# Wait for SLAAC & DAD to complete
-ns	while ! ip -j -6 addr show dev __IFNAME__ | jq -e '.[].addr_info.[] | select(.protocol == "kernel_ra")'; do sleep 0.1; done
+# Wait for global IPv6 address to appear (via --config-net or SLAAC)
+ns	while ! ip -j -6 addr show dev __IFNAME__ | jq -e '.[].addr_info[] | select(.scope == "global")'; do sleep 0.1; done
 
 test	SLAAC: prefix
-nsout	ADDR6 ip -j -6 addr show|jq -rM '[.[] | select(.ifname == "__IFNAME__").addr_info[] | select(.protocol == "kernel_ra") | .local + "/" + (.prefixlen | tostring)] | .[0]'
+nsout	ADDR6 ip -j -6 addr show|jq -rM '[.[] | select(.ifname == "__IFNAME__").addr_info[] | select(.scope == "global") | .local + "/" + (.prefixlen | tostring)] | .[0]'
 nsout	PREFIX6 sipcalc __ADDR6__ | grep prefix | cut -d' ' -f4
 hout	HOST_ADDR6 ip -j -6 addr show|jq -rM ['.[] | select(.ifname == "__IFNAME__").addr_info[] | select(.scope != "host" and .scope != "link" and .deprecated != true).local]| join("/64 ")'
 hout	HOST_PREFIX6 sipcalc __HOST_ADDR6__/64 | grep prefix | cut -d' ' -f4 | tr '\n' ' '
-- 
2.52.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-21  2:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-21  1:28 [PATCH] test/pasta/ndp: Fix NDP test for --config-net pasta setup Jon Maloy
2026-06-21  2:43 ` David Gibson

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).