From patchwork Tue Apr 23 07:41:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1926393 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=AmP6Bgsi; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.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 4VNvFn02Lrz1yZP for ; Tue, 23 Apr 2024 17:41:48 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 28B1260768; Tue, 23 Apr 2024 07:41:47 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 5G-lxTrOX9tR; Tue, 23 Apr 2024 07:41:44 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 32E7460630 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=AmP6Bgsi Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 32E7460630; Tue, 23 Apr 2024 07:41:44 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 11E55C007C; Tue, 23 Apr 2024 07:41:44 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id A2DCFC0037 for ; Tue, 23 Apr 2024 07:41:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9AC8D40453 for ; Tue, 23 Apr 2024 07:41:42 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id YDwPpkjLDcKB for ; Tue, 23 Apr 2024 07:41:41 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=amusil@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 3276B401E1 Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 3276B401E1 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=AmP6Bgsi Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 3276B401E1 for ; Tue, 23 Apr 2024 07:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713858099; 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=A9SFvq9H/clP7q+58eRR/rMPDjFMZebzslsP0K8iFUk=; b=AmP6BgsilLHxRnKdPcBCFxtgha6Y/8kZAKHnKxXAvlAeaBrWWofKOxvQLN9ft9MUkCGU2X 4Kqr41aKp91sWihsiZzt6NuKs3zddGiHFyH/l6LqTEcDhS/O8FW+BUuFWDWErFpEapXFwC zdfoD1JSt4Gdo1uYUVQihjFTHf+cYIQ= 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-152-oD3s-X8NPLyWFJAZpS8ndw-1; Tue, 23 Apr 2024 03:41:38 -0400 X-MC-Unique: oD3s-X8NPLyWFJAZpS8ndw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 E6AB6800CA2; Tue, 23 Apr 2024 07:41:37 +0000 (UTC) Received: from amusil.brq.redhat.com (unknown [10.43.17.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A45740C140B; Tue, 23 Apr 2024 07:41:37 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Tue, 23 Apr 2024 09:41:36 +0200 Message-ID: <20240423074136.392737-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: dceara@redhat.com Subject: [ovs-dev] [PATCH ovn] tests: Fix netcat 7.94 issues. 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 netcat 7.94 allows multiple connections over udp (-k/--keep-open) [0], without this option the connection can be closed "unexpctedly". This to keep the test backward compatible make new servers for every UDP connection. The second issue is that netcat is attempting to listen on IPv4 when the there isn't any server address specified and fails to do so. Add -6 flag to indicate that this is pure IPv6 connection. [0] https://github.com/nmap/nmap/commit/4e6c8feb153c0c9ff8a68cd841669d650319ab45 Fixes: 40136a2f2c84 ("northd: Fix direct access to SNAT network.") Signed-off-by: Ales Musil --- tests/system-ovn.at | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/system-ovn.at b/tests/system-ovn.at index 41c051c1e..6dcdb45d1 100644 --- a/tests/system-ovn.at +++ b/tests/system-ovn.at @@ -3582,7 +3582,6 @@ test_connectivity_from_ext() { local ip=$1; shift # Start listening daemons for UDP and TCP connections - NETNS_DAEMONIZE($vm, [nc -l -u 1234], [nc-$vm-$ip-udp.pid]) NETNS_DAEMONIZE($vm, [nc -l -k 1235], [nc-$vm-$ip-tcp.pid]) # Ensure that vm can be pinged on the specified IP @@ -3592,8 +3591,13 @@ test_connectivity_from_ext() { ]) # Perform two consecutive UDP connections to the specified IP + NETNS_DAEMONIZE($vm, [nc -l -u 1234], [nc-$vm-$ip-udp.pid]) NS_CHECK_EXEC([alice1], [nc -u $ip 1234 -p 2000 -z]) + kill $(cat nc-$vm-$ip-udp.pid) + + NETNS_DAEMONIZE($vm, [nc -l -u 1234], [nc-$vm-$ip-udp.pid]) NS_CHECK_EXEC([alice1], [nc -u $ip 1234 -p 2000 -z]) + kill $(cat nc-$vm-$ip-udp.pid) # Send data over TCP connection to the specified IP NS_CHECK_EXEC([alice1], [echo "TCP test" | nc --send-only $ip 1235]) @@ -3781,8 +3785,7 @@ test_connectivity_from_ext() { local ip=$1; shift # Start listening daemons for UDP and TCP connections - NETNS_DAEMONIZE($vm, [nc -l -u 1234], [nc-$vm-$ip-udp.pid]) - NETNS_DAEMONIZE($vm, [nc -l -k 1235], [nc-$vm-$ip-tcp.pid]) + NETNS_DAEMONIZE($vm, [nc -6 -l -k 1235], [nc-$vm-$ip-tcp.pid]) # Ensure that vm can be pinged on the specified IP NS_CHECK_EXEC([alice1], [ping -q -c 3 -i 0.3 -w 2 $ip | FORMAT_PING], \ @@ -3791,8 +3794,13 @@ test_connectivity_from_ext() { ]) # Perform two consecutive UDP connections to the specified IP + NETNS_DAEMONIZE($vm, [nc -6 -l -u 1234], [nc-$vm-$ip-udp.pid]) NS_CHECK_EXEC([alice1], [nc -u $ip 1234 -p 2000 -z]) + kill $(cat nc-$vm-$ip-udp.pid) + + NETNS_DAEMONIZE($vm, [nc -6 -l -u 1234], [nc-$vm-$ip-udp.pid]) NS_CHECK_EXEC([alice1], [nc -u $ip 1234 -p 2000 -z]) + kill $(cat nc-$vm-$ip-udp.pid) # Send data over TCP connection to the specified IP NS_CHECK_EXEC([alice1], [echo "TCP test" | nc --send-only $ip 1235])