From patchwork Sat Aug 22 16:12:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5265 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:4306:b0:87d:ab56:3700 with SMTP id q6csp2523492mae; Sat, 22 Aug 2026 09:13:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AHgh+RqqmEcht//o7KRxV3tnraSaUgVMn9ZP0ZUx3Eel5vPVI1gwpGqpB1lvSb8PS5fSJVWVnFQ8r+0JlIM=@openvpn.net X-Received: by 2002:a4a:ec4b:0:b0:69d:e4c8:86f6 with SMTP id 006d021491bc7-6b1592b8c96mr16529505eaf.15.1787415189835; Sat, 22 Aug 2026 09:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1787415189; cv=none; d=google.com; s=arc-20260327; b=ZRbkbEznw+zyle+ptW9rKGsnq+wNLg54A3xglf5wKrtya/8oHCeDoUiu7PSa2+Ex2J UehsF1lZeQG3e7C89cdDbnbId9vJZaOUHkshzxpKq8KrOjN/QAEzH2soOPEnwFOlpPKQ YDn4+b3hh2eR7pIwh7TuT0fURl9VK8YxixC1FDr2eFH0jPRV1yYT360kQIPHk+iEsgKM vrgpKsgsjA6MU7rHoQ9RBwO8P2v9aVMKzXXD+VEonblqsImzr8kuYT66dQferBIyhxwo zapjbIXnhOKgcXLWB1BjLiFg766BGJu5psquoFC9szrXCDkEPVZV5H3Ki/nmPlegkYgb t7YA== 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=fl+P8FLRJXdo0k5ngVDdIablu0Sn/2IQFZpdamqsN/0=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=l6011knKHuWMzZ5TKOH1IB4RN468OyEpS992ZQR/x52vnWmOdyWMKTNodo4R0yJqhl fsICp5A1LNZfc51Ns4fvD+REZIR8Z39rQQDBpLCf4ljhK9kTsINcLCtUc+wj+CGUsFSc ukwwh4QPm3sctEbWcls/b3Y2/7e0SwyvYNT9ReHlmJMsTnnh/1MqCsGOEWiVoSRDo205 ntEvxwzkpUus5fOhULDbUtsr4r5b2ZNd17OaCfcrSwADbDZsWSasFUKY8XTFwo1wFysq stBhXbdfBlvRxkC22f+FpH3ECC2qW+cuPyG3ML3J9witFjLpNzPZV+e265zXS7vS7tUL W0+Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Yc5zHPmw; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=WW6mjpe3; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=XAmBKnTF; 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-4638355fccbsi3965401fac.154.2026.08.22.09.13.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Aug 2026 09:13:09 -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=Yc5zHPmw; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=WW6mjpe3; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=XAmBKnTF; 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=fl+P8FLRJXdo0k5ngVDdIablu0Sn/2IQFZpdamqsN/0=; b=Yc5zHPmwNPDeJw1sLOqu0eQJdU scBFd+QjbBH4ODsiRWzhujuTFgWkgnsgxptXMVDCGxhM14pJBrJJ0ptMjTVhaz6MYYSkzurFMeSZJ dOI4mW3KRki2TkK8AW2FdP0bHuy6FjYSKP8kkASaU6y3HKkcp8mTMZoWptWM/7S1Su5Q=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wxoLB-00061b-AU; Sat, 22 Aug 2026 16:13:05 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wxoKr-00060x-1k for openvpn-devel@lists.sourceforge.net; Sat, 22 Aug 2026 16:12:45 +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=ddyAWNPM+bKMi/whb6eDZzB/NPIDCuJz0QEXpv5a1VQ=; b=WW6mjpe3UOBQSFvKppGencBsVe qTQs9Avf/TU9T4zf4G8xyUNMdPYP7MTl9krdpqDH/K3FvwSyhd9QeXrRD3uJMj+EkvUPj+lheVUG2 wDykMBN4E1RgMwCtRhJDHkxAa5G35xeNbty3EVGAk84orUXnJZQbd6KzIvapYtCIWvfM=; 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=ddyAWNPM+bKMi/whb6eDZzB/NPIDCuJz0QEXpv5a1VQ=; b=XAmBKnTFIErnMsPQCtt/cUXmta PbppPIik3ZhLZNUVjQsetfBUSKimF5rPNoy222FmSZILNQkDz6xLTM/cRcbQwC7USZiWSSd2U+Elg ewLq1uoQ751uvK6Pg33w8IEZhv0MrkOpcD1UKopqkUxRUZcOUBjp7JRI9kc7UQDnA3ac=; 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 1wxoKa-0003xR-5U for openvpn-devel@lists.sourceforge.net; Sat, 22 Aug 2026 16:12:29 +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 67MGCLOs004172 for ; Sat, 22 Aug 2026 18:12:21 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 67MGCLGE004162 for openvpn-devel@lists.sourceforge.net; Sat, 22 Aug 2026 18:12:21 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sat, 22 Aug 2026 18:12:15 +0200 Message-ID: <20260822161220.4145-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 ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URI: openvpn.net] [URI: sh.in] 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1wxoKa-0003xR-5U Subject: [Openvpn-devel] [PATCH v3] 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: 1874240670264390489 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 3 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 2a4bdb4..003dec4 100644 --- a/tests/t_client.rc-sample +++ b/tests/t_client.rc-sample @@ -14,8 +14,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 @@ -63,6 +63,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: # # CHECK_SKIP_x = "commands to execute before openvpn, skip test on failure" diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in index 0ef2ec5..9f32a5a 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 @@ -326,7 +329,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 96e3826..013504f 100755 --- a/tests/update_t_client_ips.sh +++ b/tests/update_t_client_ips.sh @@ -2,9 +2,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