* [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* Re: [PATCH] test/pasta/ndp: Fix NDP test for --config-net pasta setup
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
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2026-06-21 2:43 UTC (permalink / raw)
To: Jon Maloy; +Cc: sbrivio, passt-dev
[-- Attachment #1: Type: text/plain, Size: 2199 bytes --]
On Sat, Jun 20, 2026 at 09:28:32PM -0400, Jon Maloy wrote:
> --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>
This will make the test pass, but it's no longer actually testing what
it's supposed to.
> ---
> 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
>
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ 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).