From patchwork Fri Aug 28 09:52:52 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5286 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:2a5c:b0:87d:ab56:3700 with SMTP id l28csp935304maz; Fri, 28 Aug 2026 02:53:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AHgh+Roc+7Yk5w+jBHd8jDAi7rvEf5BjPAG28BG1M+4OSVKdw4bRK+GoGneUT15XyOFQbVXX51G25H7t0OM=@openvpn.net X-Received: by 2002:a05:6830:6411:b0:7f4:effa:a5ad with SMTP id 46e09a7af769-7f4f2345e0emr6739330a34.10.1787910816504; Fri, 28 Aug 2026 02:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1787910816; cv=none; d=google.com; s=arc-20260327; b=DGpMDxvsp5zaLvEy2fNrPcxsY6mGdCyUYg5vKcIEYtBLbYh6y6HHzEhaEfMNa+svoP 09n6PYQugFW7JFAWRY60AtEIoYlmmeRCfeTTAmNtXoKbCgktfrs62iBahPLRqMJFlztW uQ1mkeVtraYyk/GvlI1bpiFFqKHtd3IttLtNs/1eHvjncCJE4e6yd5LYa3dJpPKQxrvw dr/vYrUX6JX5Oh0BcaEyuXIunLtlejh9HG9oLH+Tbd8mTXtGNWGixwYelWSAtI9POUJs EOUm9Tj9IkxsTtd2xVrUYkmx22VNPXA4o9BzSqv2uCX4mLaEw+E2TNy5UnPbiJaJ5psh FXPw== 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=+0t/wAEiA9PfMbPcrSGItUvvHkwBi/XT3uQOtBdTkxE=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=jqWro9z1498qazOimgnPIOMpM2VP0GjjxID4TPpjPTJ4caLoyJi7GVT424FH62xQ8a gLAWduSrqYh+SEtSXq8v0Fyrkgy/QHh/PCDaTWRDUEFBKIUlRoz+6T9/PCBbmlwvseqM TXdgdiZw6ji4/UQNunvF/HDY2dYFvYF0B2ZixC5EvGBAoPGKiL1acVmWS7PrVB4U/XoH 8enXoFsEC3ku/tVLjD7GE8smVq/6anzUkb/QW8qrketNAY9AA997Q+T5ATAwPfd9VJJX IFMDFUCF44FcIwMmU/lWS9h2I8yn+Z4eGj8vRAAukqUYeImJHjAIiFsvMZc0MgNnHwT0 uILw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=AnFAPc3t; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Wv3+4bz1; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=QrxqjSA3; 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 46e09a7af769-7f4fa9e72dcsi1615719a34.78.2026.08.28.02.53.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Aug 2026 02:53:36 -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=AnFAPc3t; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Wv3+4bz1; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=QrxqjSA3; 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=+0t/wAEiA9PfMbPcrSGItUvvHkwBi/XT3uQOtBdTkxE=; b=AnFAPc3tVCKyw99jPBi2iOGS2S /DAcbu8ya+KOjaFQJzJ+K9riI8UCqjukTC3AhnDjapsvh1dFZQm23COrYpvQfQhOBn9DsES59sNlC WDmhvGoHG6+VLNSHLV54l8h+1KFEjOBCnXoieBTLXgF9WVLDEsxpPZtUkoQwVUnyuRdQ=; 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 1wztH5-0005Hu-OD; Fri, 28 Aug 2026 09:53:27 +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 1wztGo-0005Hd-SI for openvpn-devel@lists.sourceforge.net; Fri, 28 Aug 2026 09:53:10 +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=GY7yZoGy85Rb7teCryeoF0S/9zqnSNjqUkfFc8VogKY=; b=Wv3+4bz16uGrSZcRIy08uHIqJW dk76aRpVGUtyYN8MrZzpIfi5d8gPIblimx952lyDcZSpV+2oqtd17MOpJcJJpfcSE9cBBmMeoKHeg xi11QHlwIKzO5vbFsmr+0Kotp63kJXUOxDZi1qJZovoWX1NgyqYCqtmyyJK2zDC5OfKg=; 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=GY7yZoGy85Rb7teCryeoF0S/9zqnSNjqUkfFc8VogKY=; b=QrxqjSA3QszCgtTSd+QGn/FdX9 FjDIKqjB2G8NMtMVY0JGvEvasKodZSO9I4h2o/7mA1iC+qBz6Csk/Grtq46FVVwyzYcWc9hBnnRiW fY85SghbmV7x4t87jdb5ZULIxw0eZ5Yqzl0OUmha2szTlwpc5Z/eG/kFvJKaH5BXc/8w=; 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 1wztGn-0006ir-GN for openvpn-devel@lists.sourceforge.net; Fri, 28 Aug 2026 09:53:10 +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 67S9r1SS009667 for ; Fri, 28 Aug 2026 11:53:01 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 67S9r17I009666 for openvpn-devel@lists.sourceforge.net; Fri, 28 Aug 2026 11:53:01 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Fri, 28 Aug 2026 11:52:52 +0200 Message-ID: <20260828095300.9652-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-2.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 This allows to skip tests on old versions of openvpn. Makes it much easier to maintain a t_client.rc across multiple versions. Change-Id: I1905d9494336da4e91f1946d2ffd875720605b41 Signed-off-by: Frank Lichtenheld Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/o [...] 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: 1wztGn-0006ir-GN Subject: [Openvpn-devel] [PATCH v5] t_client.sh.in: Add utility function needs_openvpn() 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: 1874760372449888374 X-GMAIL-MSGID: 1874760372449888374 From: Frank Lichtenheld This allows to skip tests on old versions of openvpn. Makes it much easier to maintain a t_client.rc across multiple versions. Change-Id: I1905d9494336da4e91f1946d2ffd875720605b41 Signed-off-by: Frank Lichtenheld Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1763 --- 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/+/1763 This mail reflects revision 5 of this Change. Acked-by according to Gerrit (reflected above): Razvan Cojocaru diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in index 7c23020..c3a9655 100755 --- a/tests/t_client.sh.in +++ b/tests/t_client.sh.in @@ -22,14 +22,16 @@ 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 - . "${srcdir}"/t_client.rc -else - echo "$0: cannot find 't_client.rc' in build dir ('${top_builddir}')" >&2 - echo "$0: or source directory ('${srcdir}'). SKIPPING TEST." >&2 - exit "${TCLIENT_SKIP_RC}" +if [ -z "${t_client_rc}" ]; then + if [ -r "${top_builddir}"/t_client.rc ]; then + t_client_rc="${top_builddir}"/t_client.rc + elif [ -r "${srcdir}"/t_client.rc ]; then + t_client_rc="${srcdir}"/t_client.rc + else + echo "$0: cannot find 't_client.rc' in build dir ('${top_builddir}')" >&2 + echo "$0: or source directory ('${srcdir}'). SKIPPING TEST." >&2 + exit "${TCLIENT_SKIP_RC}" + fi fi # Check for external dependencies @@ -63,6 +65,18 @@ exit 1 fi +openvpn_version=$(${openvpn} --version | head -n 1 | cut -f2 -d" " | sed -E 's/^2\.([0123456789]+).*$/2\1/') + +needs_openvpn() +{ + needs_version=$1 + + [ "$openvpn_version" -ge "$needs_version" ] + return $? +} + +. "${t_client_rc}" + if [ -z "$TEST_RUN_LIST" ]; then echo "TEST_RUN_LIST empty, no tests defined. SKIP test." >&2 exit "${TCLIENT_SKIP_RC}"