From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id E12055A061A; Mon, 25 Nov 2024 11:37:19 +0100 (CET) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH] test/passt/ndp: Add delay in SLAAC prefix test before looking for kernel_ra address Date: Mon, 25 Nov 2024 11:37:19 +0100 Message-ID: <20241125103719.154760-1-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: A4GMZVO3UARBTCLU2HYVGUMQUCNIX4N6 X-Message-ID-Hash: A4GMZVO3UARBTCLU2HYVGUMQUCNIX4N6 X-MailFrom: sbrivio@passt.top 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: David Gibson 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: 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. 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. Fixes: 9a0e544f05bf ("test: Improve test for NDP assigned prefix") Signed-off-by: Stefano Brivio --- test/passt/ndp | 1 + 1 file changed, 1 insertion(+) 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 '[.[] | select(.dst == "default").d check [ -n "__IFNAME__" ] test SLAAC: prefix +sleep 2 gout ADDR6 ip -j -6 addr show|jq -rM '[.[] | select(.ifname == "__IFNAME__").addr_info[] | select(.scope == "global" and .protocol == "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 == "__HOST_IFNAME6__").addr_info[] | select(.scope == "global" and .deprecated != true).local] | .[0]' -- 2.43.0