From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202410 header.b=Cq+iEnzz; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 283BE5A004C for ; Tue, 26 Nov 2024 03:28:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1732588100; bh=8JUwVJMrVMyGLWo5VGMU+vKOGhMKy/uw7p/0gP4n4eU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Cq+iEnzzrhUDvMg4MHYfmbquF1S8Nu1rIJKjP3VdLK+i0MfXOYo/7YDnl8fdL5Q2Z J/qfUMKLqRuW9hUbvEO4rGyM9gnLEm9mwU0e0MJc3R7UZO/kvJezjzWOH0QmbnHS0X iFdLvdwQ6BdU/ZLMHFqz/IKdJNKv55xJ3dYjZULqtp1N4VLK5IW3LMtob6ltoC3OYt bFoX9K0wpc2JI9jQ+SUF6AEZvAv8d784PTgVJzXRh1pqH1R7yUDjh2+LJl/u76iHK7 Dj226tpaXFvE1Pn4TGrtZU0gf+Cv8/hlZ3qK5OntMZXuOWfdCU3X99SNXY4GcxepF1 9rwQzHmt0ffiQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Xy61w6dXlz4xfT; Tue, 26 Nov 2024 13:28:20 +1100 (AEDT) Date: Tue, 26 Nov 2024 13:28:22 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] test/passt/ndp: Add delay in SLAAC prefix test before looking for kernel_ra address Message-ID: References: <20241125103719.154760-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GU0LxAwFEiUuemgn" Content-Disposition: inline In-Reply-To: <20241125103719.154760-1-sbrivio@redhat.com> Message-ID-Hash: NHRZMY6KKL7SQRISUSYBCPDWB7YNICJO X-Message-ID-Hash: NHRZMY6KKL7SQRISUSYBCPDWB7YNICJO X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --GU0LxAwFEiUuemgn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 25, 2024 at 11:37:19AM +0100, Stefano Brivio wrote: > I'm not exactly sure why we need this delay, but commit 9a0e544f05bf > ("test: Improve test for NDP assigned prefix") broke the tests for me. >=20 > I think it's because the kernel (at least all the versions I'm testing > with) might not mark an address as 'kernel_ra' right away, so the jq > expression doesn't return any result when we check. >=20 > Fixes: 9a0e544f05bf ("test: Improve test for NDP assigned prefix") > Signed-off-by: Stefano Brivio This will do the job, but I think we can do better. There's logic above this to explicitly wait for DAD which doesn't seem to be working. Having another look at it, I think that's just because the conditions I used are a bit sloppy. I'm about to send a patch which improves them, which I hope will fix the problem you're seeing. > --- > test/passt/ndp | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/test/passt/ndp b/test/passt/ndp > index 56b385b..9a1c9a4 100644 > --- a/test/passt/ndp > +++ b/test/passt/ndp > @@ -23,6 +23,7 @@ hout HOST_IFNAME6 ip -j -6 route show|jq -rM '[.[] | se= lect(.dst =3D=3D "default").d > check [ -n "__IFNAME__" ] > =20 > test SLAAC: prefix > +sleep 2 > gout ADDR6 ip -j -6 addr show|jq -rM '[.[] | select(.ifname =3D=3D "__IF= NAME__").addr_info[] | select(.scope =3D=3D "global" and .protocol =3D=3D "= kernel_ra") | .local + "/" + (.prefixlen | tostring)] | .[0]' > gout PREFIX6 sipcalc __ADDR6__ | grep prefix | cut -d' ' -f4 > hout HOST_ADDR6 ip -j -6 addr show|jq -rM '[.[] | select(.ifname =3D=3D = "__HOST_IFNAME6__").addr_info[] | select(.scope =3D=3D "global" and .deprec= ated !=3D true).local] | .[0]' --=20 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 --GU0LxAwFEiUuemgn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmdFMkUACgkQzQJF27ox 2GfTNg//W8/hUgcIvC+5eYmuU5NjVJ/vjbx1c/QANgClOSRa+MN+bHJ0EJCAVck1 Kk0u5ufzKbMJ+1wbw1TOdgcr0uF0K/sAkoo/hOSfPN2dIat3U4y7AfDmCDSBaXUz cMX2KZGVGGfhST5//rkXNWrWKqBKwm5n8eTlR6qJCud6imnPekFtojSict0MnYFu bt8JimlUIjmY8MwHvSYovqId42UMLaF0ZbfUaN6tgMkmJgiwICICZ+NUuhJG2+Wa m2S7OyhjU9cZ5ynyCDmdZ/88gC/nps2py8W8PaLezesnG9UIM0uw7LjaKPfnGSvb k/BKkatpooPoa75YWdU49AwBg3LBqRitLWIUKVsdGMLPGWmvJbalxBiuMktYWumJ DcnDjRcqkkQh/3m1TdTtMCg7QA85haLvVdD8BSn5JjF80pSLjdTCdBDnd4rK5BmK 8+JvocbRY1J6Bx2Bg5PrgplSZucvmQAyDsX3/zii4/LuSmZWzxOskGRWiFn+bWvT LdYKtqpXktl9iqRnwbt/Y70hVDA6KV+D+u3hjbpCJmMJjxbPwS9rL5p+TNQVV5eB irvy21C5CE0HKBGycQSaVgW3xtHjUbU4om2hzcNldS2FlYWL2tG6MhtNpXGL7AqJ 88T+W9Efu/ghF2Rx2B4ba0k3uhdNsvyXpv2B0XWD7Ouh20d5cqM= =Jg3q -----END PGP SIGNATURE----- --GU0LxAwFEiUuemgn--