From patchwork Mon Aug 24 18:03:47 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5274 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:4306:b0:87d:ab56:3700 with SMTP id q6csp4757193mae; Mon, 24 Aug 2026 11:04:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AHgh+Rpa8OW/itpTSkWI2QANCy3gCKBXNj8YyRZo799WcWJ9jT4JjQiVN89sRjP9lZ7sA8zoipYmHekCFNo=@openvpn.net X-Received: by 2002:a05:6820:a294:10b0:6a3:c6f8:4caa with SMTP id 006d021491bc7-6b1591d5600mr19896700eaf.2.1787594653566; Mon, 24 Aug 2026 11:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1787594653; cv=none; d=google.com; s=arc-20260327; b=KDHJnJqcg0M0lNlgsJhhgdHji2hRrArmbb62imao+9AII/NGsXbBDG4JYLlR8QhaMF vtlQTwOhwUGInph4YjxAfwfzk3ZmB3o8DGUpYxQ9Nu89ATb4LU6nJfoPyzzw/d1E8wzd 0pO5XwjbUOB7YXZRQ1Icu4lmV7KqpU/ea+0uKIp1kfyGBX39c3zP3huWh2in+fXhLKD9 OMkApaOs9NQdO1HEZ6bObW8TH4hfIFvJB53kpyQ/CJpQZlktzKfj9I16M7Fi1pArSNG8 Z/+sb28gSquaWfLptR1Ex5mFeP9uwGyJU6sDhKyyRgxl0rfw15nzyMTYKz+oehiI3q17 VAtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=sohn757pKl1WcXHDAMhInVHxnEvei17f65/rgihh73k=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=a5y7Q260zhq/rQOkl+M9JNXkAiddfDsuV1Jw3gHUPFGX21zb8ILL+QOaQaCUGEKe/+ DzJ8vtUaD+OcR5GBIZwNcYEa7bVLs3cIrsVA7XVK+Q91RwkdkjEkfHSBexhDR+4aFY73 YUIY2ju2X72XEpkLfzAf29oaHdwyFC+eT/8vGM3wQlPssfg+hoZKfkVQIjdfteaFMiWl swEd8r1wfoI0wAXB1B2vzFlBkcmFdrPFqLoFFzMzfDSQbfJiaSHYfIyNMsnL9r6YFDnr LcS71mDdetYVvq8VIUQpZIhrutfEaf7ASLJwf+RDnBu84LYy6y3n0vFsk6PIHe0LqrNQ Bw0Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=EOme++2+; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=bXnLyiUV; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=beKnXBXN; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 586e51a60fabf-46383561a84si9825990fac.120.2026.08.24.11.04.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Aug 2026 11:04:13 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=EOme++2+; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=bXnLyiUV; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=beKnXBXN; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sohn757pKl1WcXHDAMhInVHxnEvei17f65/rgihh73k=; b=EOme++2+1R60mHozsz5mSyyg6L B5xMm5JsgTM2/W7RFxo6QVeNXli5M+RRqj6Ekpvqr+jYzVOmHu7hC9hYmFXkoiwkGOlRr5a+xHuCd q1HeMwLraIy0xaO12rEn8d8m6oUjGTN0T1LyjXF0X3gJ/JStOguRtXU3Tc9Z0WgOjbo8=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wyZ1l-0004yp-K3; Mon, 24 Aug 2026 18:04:07 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wyZ1j-0004yj-V6 for openvpn-devel@lists.sourceforge.net; Mon, 24 Aug 2026 18:04:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=c5F/IKv50IDWuBpnyOalNOukiG+/fDQQRz+1le+QFg4=; b=bXnLyiUV6ocMp8HIyZcMMZwvGm Hb4iH+kH9K+6Cd9pKVKVzJfqa7+7bQajdqSAZCzCzMFbCRJ0BXY6KVAtqtQIbF5iSOK+Y6/jadgW1 8GcBsLg0EhKlYGSYJMxgFdw17bEgItyFD5QPCT/CsFzSMUNRmWA/W+YvjQeKH7yh2PBw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=c5F/IKv50IDWuBpnyOalNOukiG+/fDQQRz+1le+QFg4=; b=beKnXBXNCGEwAdhKP7BOWeimAx bgssX7ADDMsaOTnssoqtiDiE2rvb+APSaVxlqja2Mj3E+cpuWnGYvW35MmG1wSU2/kDrZ6VUfUnO8 p/ZJvZ9Q/H4NkHQtYPg6YjnzRmntxcHjasJje9r8POV5tCnRwBeJTWncwy40E2BYH47c=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1wyZ1f-00060t-D2 for openvpn-devel@lists.sourceforge.net; Mon, 24 Aug 2026 18:04:05 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 67OI3ukD012100 for ; Mon, 24 Aug 2026 20:03:56 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 67OI3u1E012099 for openvpn-devel@lists.sourceforge.net; Mon, 24 Aug 2026 20:03:56 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 24 Aug 2026 20:03:47 +0200 Message-ID: <20260824180353.12076-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Frank Lichtenheld Makes it easier to use t_client.sh in other contexts. This is based on work by Gert Doering for the t_server test infrastructure. Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1wyZ1f-00060t-D2 Subject: [Openvpn-devel] [PATCH v5] t_client.sh.in: Allow to override the location of t_client_ips.rc X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: 1874240670264390489 X-GMAIL-MSGID: 1874428851230203292 From: Frank Lichtenheld Makes it easier to use t_client.sh in other contexts. This is based on work by Gert Doering for the t_server test infrastructure. Change-Id: Ia4a9a6bafb6bcb3fe331a92cfbb64be78f6aa33a Signed-off-by: Frank Lichtenheld Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1756 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1756 This mail reflects revision 5 of this Change. Acked-by according to Gerrit (reflected above): Razvan Cojocaru diff --git a/tests/t_client.rc-sample b/tests/t_client.rc-sample index 04714ef..4c87436 100644 --- a/tests/t_client.rc-sample +++ b/tests/t_client.rc-sample @@ -18,8 +18,8 @@ #FPING_EXTRA_ARGS="-t 1000" # Load EXPECT_IFCONFIG* parameters from cache -if [ -r "${top_builddir}/t_client_ips.rc" ]; then - . "${top_builddir}/t_client_ips.rc" +if [ -r "${t_client_ips_rc}" ]; then + . "${t_client_ips_rc}" else echo "NOTICE: missing t_client_ips.rc will be auto-generated" fi @@ -67,6 +67,12 @@ # PING6_HOSTS_x = "these hosts musts ping when openvpn is up (IPv6 fping6)" # EXPECT_FAIL_x = "instead of waiting for connection wait for this error message" # +# Note that the EXPECT_IFCONFIG{4,6} options are not generally required, the +# tests will remember the ip address they got on the first run in t_client_ips.rc +# and will expect to get the same address again. But it can be useful to hard-code +# the IP when the server is expected to send a very specific address, e.g. when +# using ccd on the server-side or in a P2P scenario. +# # hook test options: # # FPING_ARGS_x = "arguments to append to the fping command line" diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in index dd7f743..7c23020 100755 --- a/tests/t_client.sh.in +++ b/tests/t_client.sh.in @@ -19,6 +19,9 @@ srcdir="${srcdir:-.}" top_builddir="${top_builddir:-..}" openvpn="${openvpn:-${top_builddir}/src/openvpn/openvpn}" +t_client_ips_rc="${t_client_ips_rc:-${top_builddir}/t_client_ips.rc}" +update_t_client_ips="${update_t_client_ips:-${srcdir}/update_t_client_ips.sh}" + if [ -r "${top_builddir}"/t_client.rc ]; then . "${top_builddir}"/t_client.rc elif [ -r "${srcdir}"/t_client.rc ]; then @@ -327,7 +330,7 @@ # If EXCEPT_IFCONFIG* variables for this test are missing, run an --up # script to generate them dynamically. if [ -z "$expect_ifconfig4" ] || [ -z "$expect_ifconfig6" ]; then - up="--setenv TESTNUM $SUF --setenv TOP_BUILDDIR ${top_builddir} --script-security 2 --up ${srcdir}/update_t_client_ips.sh" + up="--setenv TESTNUM $SUF --setenv RC ${t_client_ips_rc} --script-security 2 --up ${update_t_client_ips}" else up="" fi diff --git a/tests/update_t_client_ips.sh b/tests/update_t_client_ips.sh index 777a286..f02dc7f 100755 --- a/tests/update_t_client_ips.sh +++ b/tests/update_t_client_ips.sh @@ -3,8 +3,6 @@ # This --up script caches the IPs handed out by the test VPN server to a file # for later use. -RC="$TOP_BUILDDIR/t_client_ips.rc" - grep EXPECT_IFCONFIG4_$TESTNUM= $RC >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "EXPECT_IFCONFIG4_$TESTNUM=$ifconfig_local" >>$RC