From patchwork Mon Dec 8 19:39:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4663 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:29c3:b0:7b1:439f:bdf with SMTP id g3csp888076max; Mon, 8 Dec 2025 11:40:02 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVZ84t4Da2HLHrGk77s07Dk0jtvltctiF33vgGHzJDceLZlFyt0wY9WLhCgAttGeS6yAzuVGbpxib4=@openvpn.net X-Google-Smtp-Source: AGHT+IElYUKmlBAjNa6W8/sKdIHXN3jAF7RukNgqCgTsK3wPUX1jp6Y/yIz+44qIOFSDt15XID3u X-Received: by 2002:a05:6830:3488:b0:7c7:827f:872e with SMTP id 46e09a7af769-7c97085b6c3mr5788569a34.38.1765222802725; Mon, 08 Dec 2025 11:40:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1765222802; cv=none; d=google.com; s=arc-20240605; b=CrqUWy3/tnKsScfMx/EjucYYwlUkildhnkwBvelTR+l+X8YzLyIBOJbLEjylZ9HS6p D12R6OhQtbYTntZ7tXN0jVw7nb9d7GH59tCmikUq1F4WBAVNoNVzANCQeap3kY6QED5o uAds8K7XgI1U/h/A0/3HFk63h6QmPbp0Fg14eobOuFUygpEMXTJ3YZRB9R2k+7e2V4Gi +bdys2MQpg4YFCKr34ipRdW3FgI2CKLWYgkqsClkETIDU/lPIqoSYiorfTffseDre91Q 0vlDNUVisZ1sULaR1J2KRukbrGSeeZYegdmTltOC3nqhq36vN255Dzy9f4Bi2YA7rI82 rQzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=vUy2jpE17LNMRJAnlszRIGowWe/K+kNDybBa/CY4M+M=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=i4rlH71LIa/HJruMvx60Rsf/XtTiSGQo9xSebZDRW3wCjIaQfuylj2nh65Ag22L6I7 lQ2R56nN6kD8W3WhnamRImzPB5TQYu5p8KDMQ3uTYh/WAdPtp5Xu79dy++3PPksmQ9tH 1IiymzX35yK72D264cLlvt9qPjOkYrs/up3nOxMq0ESqRcQ+GDN6Q13GmKxE6QaElsH9 HqNtN+8Vq3u7EJIJlJ+1QX/bbsZgWHd5IjS4C6qgiVLY+rHjLxZiR84fH3pobq7imhug bYEGeY3nW/os6BSuRzA2W07AizYP+Cvb5BulthuwE9rtwn2j//JQKIFDbPIU+XHcEZge y4sw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=GO+sjcOQ; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=kMci0HpW; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=GEu8e53s; 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-7c95ac59cabsi9900546a34.145.2025.12.08.11.40.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Dec 2025 11:40:02 -0800 (PST) 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=GO+sjcOQ; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=kMci0HpW; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=GEu8e53s; 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=vUy2jpE17LNMRJAnlszRIGowWe/K+kNDybBa/CY4M+M=; b=GO+sjcOQBd6tn9it/+LFlTiYwo wSoJ3K8QDP4kLuLD7x8+IWO7UnbWXUclWBivLoyH2pDT6dO1A74Yt3jLAFvh6/L2hgM+RYHzdI4KJ mPxdE3C76vkKz4BlwhJ3S2N6S6WKQMOty8PMfgyf/pmPNs+A0H/xrWBqPqW0EaaM83aM=; 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 1vSh5T-0000N9-GX; Mon, 08 Dec 2025 19:39:59 +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 1vSh5S-0000N0-CO for openvpn-devel@lists.sourceforge.net; Mon, 08 Dec 2025 19:39:58 +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=cRm8HCyOzY8fEL9j5jTpz/tWUWkm84s5FdbHrPJEZMs=; b=kMci0HpWZoHVoYETjlGLDkYNsa GUi4fK/m7C+XuFl4vJGWScbuuiuPS3YihdrDsJpMktN4dd88j4XUMcSVvAHEk7ij43Gis5bC1OX0A beFVnuaRJUDiGpTq2CyW/xmk2BsQPJRsbh/t4QP5rveZy1D6aOMKKZS9/49zJFhGpnjk=; 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=cRm8HCyOzY8fEL9j5jTpz/tWUWkm84s5FdbHrPJEZMs=; b=GEu8e53s9qSTz3TM32HTOjTMeh xRX4YOB5/ET6giOg/6vXVSjkQ/cz/QIMfWKar+Tsj5M4JiIACY/h5npUqNLrhms/nhlpBaSGGga6i V0qz3fNJTI801cNbO98FZdkIpvGHfzVGSo9OEdyUPjBDj+sbpsA0MknLDikBywC76A4Q=; Received: from [193.149.48.134] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1vSh5R-0002t8-EY for openvpn-devel@lists.sourceforge.net; Mon, 08 Dec 2025 19:39:58 +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 5B8Jdoni017076 for ; Mon, 8 Dec 2025 20:39:50 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 5B8JdoDI017061 for openvpn-devel@lists.sourceforge.net; Mon, 8 Dec 2025 20:39:50 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 8 Dec 2025 20:39:42 +0100 Message-ID: <20251208193950.16969-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.51.2 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 This makes it easy to test an installed binary for example. Change-Id: Ida7a64a299cd5bf7ae4f0cc725756b5f5cc408f9 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Message-Id: <20230511101253.369196-1-frank@li [...] 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: 1vSh5R-0002t8-EY Subject: [Openvpn-devel] [PATCH v1] tests: Allow to override openvpn binary used 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: =?utf-8?q?1850970265798217479?= X-GMAIL-MSGID: =?utf-8?q?1850970265798217479?= From: Frank Lichtenheld This makes it easy to test an installed binary for example. Change-Id: Ida7a64a299cd5bf7ae4f0cc725756b5f5cc408f9 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Message-Id: <20230511101253.369196-1-frank@lichtenheld.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26648.html Signed-off-by: Gert Doering Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1424 (cherry picked from commit d623aa6c29545a7f00daaa73d87818a9c5b1e942) --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to release/2.6. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1424 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in index 03a0dbf..f6654dd 100755 --- a/tests/t_client.sh.in +++ b/tests/t_client.sh.in @@ -18,6 +18,7 @@ srcdir="${srcdir:-.}" top_builddir="${top_builddir:-..}" +openvpn="${openvpn:-${top_builddir}/src/openvpn/openvpn}" if [ -r "${top_builddir}"/t_client.rc ] ; then . "${top_builddir}"/t_client.rc elif [ -r "${srcdir}"/t_client.rc ] ; then @@ -49,7 +50,7 @@ exit "${TCLIENT_SKIP_RC}" fi -if [ ! -x "${top_builddir}/src/openvpn/openvpn" ] +if [ ! -x "${openvpn}" ] then echo "no (executable) openvpn binary in current build tree. FAIL." >&2 exit 1 @@ -352,9 +353,9 @@ pidfile="${top_builddir}/tests/$LOGDIR/openvpn-$SUF.pid" openvpn_conf="$openvpn_conf --writepid $pidfile $up" output " run openvpn $openvpn_conf" - echo "# src/openvpn/openvpn $openvpn_conf" >$LOGDIR/$SUF:openvpn.log + echo "# ${openvpn} $openvpn_conf" >$LOGDIR/$SUF:openvpn.log umask 022 - $RUN_SUDO "${top_builddir}/src/openvpn/openvpn" $openvpn_conf >>$LOGDIR/$SUF:openvpn.log & + $RUN_SUDO "${openvpn}" $openvpn_conf >>$LOGDIR/$SUF:openvpn.log & sudopid=$! # Check if OpenVPN has initialized before continuing. It will check every 3rd second up diff --git a/tests/t_cltsrv.sh b/tests/t_cltsrv.sh index 752251e..4a8643a 100755 --- a/tests/t_cltsrv.sh +++ b/tests/t_cltsrv.sh @@ -22,6 +22,7 @@ srcdir="${srcdir:-.}" top_srcdir="${top_srcdir:-..}" top_builddir="${top_builddir:-..}" +openvpn="${openvpn:-${top_builddir}/src/openvpn/openvpn}" trap "rm -f log.$$ log.$$.signal ; trap 0 ; exit 77" 1 2 15 trap "rm -f log.$$ log.$$.signal ; exit 1" 0 3 addopts= @@ -55,8 +56,8 @@ for i in 1 2 3 ; do set +e ( - "${top_builddir}/src/openvpn/openvpn" --script-security 2 --cd "${root}" ${addopts} --setenv role srv --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-server" & - "${top_builddir}/src/openvpn/openvpn" --script-security 2 --cd "${top_srcdir}/sample" ${addopts} --setenv role clt --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-client" + "${openvpn}" --script-security 2 --cd "${root}" ${addopts} --setenv role srv --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-server" & + "${openvpn}" --script-security 2 --cd "${top_srcdir}/sample" ${addopts} --setenv role clt --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-client" ) 3>log.$$.signal >log.$$ 2>&1 e1=$? wait $! diff --git a/tests/t_lpback.sh b/tests/t_lpback.sh index 5aabbd5..482016a 100755 --- a/tests/t_lpback.sh +++ b/tests/t_lpback.sh @@ -21,6 +21,7 @@ set -eu top_builddir="${top_builddir:-..}" +openvpn="${openvpn:-${top_builddir}/src/openvpn/openvpn}" trap "rm -f key.$$ tc-server-key.$$ tc-client-key.$$ log.$$ ; trap 0 ; exit 77" 1 2 15 trap "rm -f key.$$ tc-server-key.$$ tc-client-key.$$ log.$$ ; exit 1" 0 3 @@ -71,7 +72,7 @@ # Get list of supported ciphers from openvpn --show-ciphers output -CIPHERS=$(${top_builddir}/src/openvpn/openvpn --show-ciphers | \ +CIPHERS=$(${openvpn} --show-ciphers | \ sed -e '/The following/,/^$/d' -e s'/ .*//' -e '/^[[:space:]]*$/d') # SK, 2014-06-04: currently the DES-EDE3-CFB1 implementation of OpenSSL is @@ -90,23 +91,23 @@ # Also test cipher 'none' CIPHERS=${CIPHERS}$(printf "\nnone") -"${top_builddir}/src/openvpn/openvpn" --genkey secret key.$$ +"${openvpn}" --genkey secret key.$$ set +e for cipher in ${CIPHERS} do test_start "Testing cipher ${cipher}... " - ( "${top_builddir}/src/openvpn/openvpn" --test-crypto --secret key.$$ --cipher ${cipher} ) >log.$$ 2>&1 + ( "${openvpn}" --test-crypto --secret key.$$ --cipher ${cipher} ) >log.$$ 2>&1 test_end $? log.$$ done test_start "Testing tls-crypt-v2 server key generation... " -"${top_builddir}/src/openvpn/openvpn" \ +"${openvpn}" \ --genkey tls-crypt-v2-server tc-server-key.$$ >log.$$ 2>&1 test_end $? log.$$ test_start "Testing tls-crypt-v2 key generation (no metadata)... " -"${top_builddir}/src/openvpn/openvpn" --tls-crypt-v2 tc-server-key.$$ \ +"${openvpn}" --tls-crypt-v2 tc-server-key.$$ \ --genkey tls-crypt-v2-client tc-client-key.$$ >log.$$ 2>&1 test_end $? log.$$ @@ -118,7 +119,7 @@ i=$(expr $i + 1) done test_start "Testing tls-crypt-v2 key generation (max length metadata)... " -"${top_builddir}/src/openvpn/openvpn" --tls-crypt-v2 tc-server-key.$$ \ +"${openvpn}" --tls-crypt-v2 tc-server-key.$$ \ --genkey tls-crypt-v2-client tc-client-key.$$ "${METADATA}" \ >log.$$ 2>&1 test_end $? log.$$ diff --git a/tests/t_net.sh b/tests/t_net.sh index bc91f82..8134832 100755 --- a/tests/t_net.sh +++ b/tests/t_net.sh @@ -7,7 +7,7 @@ srcdir="${srcdir:-.}" top_builddir="${top_builddir:-..}" -openvpn="${top_builddir}/src/openvpn/openvpn" +openvpn="${openvpn:-${top_builddir}/src/openvpn/openvpn}" # bail out right away on non-linux. NetLink (the object of this test) is only