From patchwork Fri Mar 1 06:42:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1906556 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Q2OxexbP; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TmJRt3Hvqz23fC for ; Fri, 1 Mar 2024 17:42:32 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 46FEA60F2E; Fri, 1 Mar 2024 06:42:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QNfd9NMo1otH; Fri, 1 Mar 2024 06:42:25 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org DBDF160786 Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Q2OxexbP Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id DBDF160786; Fri, 1 Mar 2024 06:42:24 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 84E08C0072; Fri, 1 Mar 2024 06:42:24 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 895FEC0037 for ; Fri, 1 Mar 2024 06:42:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 988E26079A for ; Fri, 1 Mar 2024 06:42:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SHwglKydly-J for ; Fri, 1 Mar 2024 06:42:21 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=amusil@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 098F560786 Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 098F560786 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 098F560786 for ; Fri, 1 Mar 2024 06:42:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709275339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CkTfSpy3S/exYGB7NTAsI48N5+rb+T1tKQfROPBQ3hw=; b=Q2OxexbPI7CLY9o0AOpDrV6BlTW4uTEaVO+tsXPXMv5IhZ+Q87Xgx2Z4iMoJvbbq4tBMU7 cOsM2ijN7b4JgZQkXNhmwWfB9iLltLQkoDl+LQ3WysM6/reLCfUd5LdEDSJC+AY3iudxz5 ZUY2bD8VTuOxllIq5SjfDP+VgjK8488= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-483-_KpRMxoWMnSGUUZQWzkZCA-1; Fri, 01 Mar 2024 01:42:17 -0500 X-MC-Unique: _KpRMxoWMnSGUUZQWzkZCA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 354B1832CA0 for ; Fri, 1 Mar 2024 06:42:17 +0000 (UTC) Received: from amusil.redhat.com (unknown [10.45.224.108]) by smtp.corp.redhat.com (Postfix) with ESMTP id 392292166B31; Fri, 1 Mar 2024 06:42:15 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Fri, 1 Mar 2024 07:42:14 +0100 Message-ID: <20240301064214.411403-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: dceara@redhat.com Subject: [ovs-dev] [PATCH ovn] tests: Fix IPv6 prefix delegation test. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" The IPv6 prefix delegation test was failing from time to time, because the tcpdump stderr "leaked" into the test stderr. Make sure the stderr for every tcpdump is redirected into file and while at it properly wait for the tcpdump to fully start. Signed-off-by: Ales Musil --- tests/system-common-macros.at | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at index 177178067..d6c4e090e 100644 --- a/tests/system-common-macros.at +++ b/tests/system-common-macros.at @@ -438,7 +438,8 @@ chown root:dhcpd /var/lib/dhcp /var/lib/dhcp/dhcpd6.leases chmod 775 /var/lib/dhcp chmod 664 /var/lib/dhcp/dhcpd6.leases -NS_CHECK_EXEC([server], [tcpdump -nni s1 > pkt.pcap &]) +NETNS_DAEMONIZE([server], [tcpdump -nni s1 > pkt.pcap 2>server-tcpdump.stderr], [server-tcpdump.pid]) +OVS_WAIT_UNTIL([grep "listening" server-tcpdump.stderr]) NETNS_DAEMONIZE([server], [dhcpd -6 -f s1 > dhcpd.log 2>&1], [dhcpd.pid]) ovn-nbctl --wait=hv sync @@ -462,9 +463,11 @@ ovn-nbctl list logical_router_port rp-public > /tmp/rp-public ovn-nbctl set logical_router_port rp-sw0 options:prefix=false ovn-nbctl set logical_router_port rp-sw1 options:prefix=false # Renew message -NS_CHECK_EXEC([server], [tcpdump -c 1 -nni s1 ip6[[48:1]]=0x05 and ip6[[113:4]]=0x${prefix} > renew.pcap &]) +NETNS_DAEMONIZE([server], [tcpdump -c 1 -nni s1 ip6[[48:1]]=0x05 and ip6[[113:4]]=0x${prefix} > renew.pcap 2>renew-tcpdump.stderr], [renew-tcpdump.pid]) +OVS_WAIT_UNTIL([grep "listening" renew-tcpdump.stderr]) # Reply message with Status OK -NS_CHECK_EXEC([server], [tcpdump -c 1 -nni s1 ip6[[48:1]]=0x07 and ip6[[81:4]]=0x${prefix} > reply.pcap &]) +NETNS_DAEMONIZE([server], [tcpdump -c 1 -nni s1 ip6[[48:1]]=0x07 and ip6[[81:4]]=0x${prefix} > reply.pcap 2>reply-tcpdump.stderr], [reply-tcpdump.pid]) +OVS_WAIT_UNTIL([grep "listening" reply-tcpdump.stderr]) OVS_WAIT_UNTIL([ total_pkts=$(cat renew.pcap | wc -l) @@ -476,8 +479,6 @@ OVS_WAIT_UNTIL([ test "${total_pkts}" = "1" ]) -kill $(pidof tcpdump) - ovn-nbctl set logical_router_port rp-sw0 options:prefix=false ovn-nbctl clear logical_router_port rp-sw0 ipv6_prefix OVS_WAIT_WHILE([test "$(ovn-nbctl get logical_router_port rp-sw0 ipv6_prefix | cut -c3-16)" = "[2001:1db8:3333]"])