From patchwork Fri Jul 22 03:49:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 2601 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director12.mail.ord1d.rsapps.net ([172.27.255.1]) by backend30.mail.ord1d.rsapps.net with LMTP id uFU1Ax2r2mJQXgAAIUCqbw (envelope-from ) for ; Fri, 22 Jul 2022 09:50:21 -0400 Received: from proxy17.mail.iad3a.rsapps.net ([172.27.255.1]) by director12.mail.ord1d.rsapps.net with LMTP id GBgTAx2r2mJoGQAAIasKDg (envelope-from ) for ; Fri, 22 Jul 2022 09:50:21 -0400 Received: from smtp39.gate.iad3a ([172.27.255.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy17.mail.iad3a.rsapps.net with LMTPS id EGu+Fh2r2mLqRgAAR4KW9A (envelope-from ) for ; Fri, 22 Jul 2022 09:50:21 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp39.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=lichtenheld.com X-Suspicious-Flag: YES X-Classification-ID: 3997e914-09c5-11ed-9c27-525400eea4e4-1-1 Received: from [216.105.38.7] ([216.105.38.7:45930] helo=lists.sourceforge.net) by smtp39.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 1E/68-01670-C1BAAD26; Fri, 22 Jul 2022 09:50:20 -0400 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.94.2) (envelope-from ) id 1oEt1v-00086x-RT; Fri, 22 Jul 2022 13:49:23 +0000 Received: from [172.30.20.202] (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.94.2) (envelope-from ) id 1oEt1u-00086i-IV for openvpn-devel@lists.sourceforge.net; Fri, 22 Jul 2022 13:49:22 +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: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=U/l0VsIlkdiw1djRvvJzdvuu/f7kXhgrKePmQosZGcY=; b=akrvv1XEhEdZLh3mNCypdGJROt pHeZrD6POmufZlvq8lJ24hlOiKfwKxFmmZR5pmSi+ftPzc8l/Fw+HWpeNbFp6yDzZ2qMWmKm+LPzF ipYmhOQNH8sjbSgh+lkiSLQjoc6QGFumOt0xCKdR+tm1KCK7bRA4kkMP2UCVnvmz8ylQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version: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:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=U/l0VsIlkdiw1djRvvJzdvuu/f7kXhgrKePmQosZGcY=; b=h UHtp0KEBgzxEgXSxzUoIGhCsCkiun7ydFsqIsI06Ld6B7jyiEjMuJAsYInhz2RTu0Le6YXZQcD6Sr hcTdDqAtRTZqkFHfAJnxc0FmkcTMXG15D06tjQkU3LZe/1wCazI8d5hEr9lv8u86R0fYbTQGd86iK spn6mt5XuTgLnYzo=; Received: from mout-p-202.mailbox.org ([80.241.56.172]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1oEt1s-0003C9-Dn for openvpn-devel@lists.sourceforge.net; Fri, 22 Jul 2022 13:49:22 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Lq9lR3tgtz9sWX for ; Fri, 22 Jul 2022 15:49:07 +0200 (CEST) From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Fri, 22 Jul 2022 15:49:02 +0200 Message-Id: <20220722134902.22092-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", 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: In automated tests we want the build to fail if the worker node is configured incorrectly. Signed-off-by: Frank Lichtenheld --- tests/t_client.sh.in | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) Content analysis details: (-0.7 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.172 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1oEt1s-0003C9-Dn Subject: [Openvpn-devel] [PATCH] t_client: Allow to force FAIL on prerequisite fails 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 In automated tests we want the build to fail if the worker node is configured incorrectly. Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering --- tests/t_client.sh.in | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in index 294546be..465c3a33 100755 --- a/tests/t_client.sh.in +++ b/tests/t_client.sh.in @@ -12,6 +12,10 @@ # - for "ping6" checks: fping6 binary in $PATH # +# by changing this to 1 we can force automated builds to fail +# that are expected to have all the prerequisites +TCLIENT_SKIP_RC="${TCLIENT_SKIP_RC:-77}" + srcdir="${srcdir:-.}" top_builddir="${top_builddir:-..}" if [ -r "${top_builddir}"/t_client.rc ] ; then @@ -21,25 +25,25 @@ elif [ -r "${srcdir}"/t_client.rc ] ; then else echo "$0: cannot find 't_client.rc' in build dir ('${top_builddir}')" >&2 echo "$0: or source directory ('${srcdir}'). SKIPPING TEST." >&2 - exit 77 + exit "${TCLIENT_SKIP_RC}" fi # Check for external dependencies which fping > /dev/null if [ $? -ne 0 ]; then echo "$0: fping is not available in \$PATH" >&2 - exit 77 + exit "${TCLIENT_SKIP_RC}" fi which fping6 > /dev/null if [ $? -ne 0 ]; then echo "$0: fping6 is not available in \$PATH" >&2 - exit 77 + exit "${TCLIENT_SKIP_RC}" fi KILL_EXEC=`which kill` if [ $? -ne 0 ]; then echo "$0: kill not found in \$PATH" >&2 - exit 77 + exit "${TCLIENT_SKIP_RC}" fi if [ ! -x "${top_builddir}/src/openvpn/openvpn" ] @@ -56,12 +60,12 @@ fi if [ -z "$CA_CERT" ] ; then echo "CA_CERT not defined in 't_client.rc'. SKIP test." >&2 - exit 77 + exit "${TCLIENT_SKIP_RC}" fi if [ -z "$TEST_RUN_LIST" ] ; then echo "TEST_RUN_LIST empty, no tests defined. SKIP test." >&2 - exit 77 + exit "${TCLIENT_SKIP_RC}" fi # Ensure PREFER_KSU is in a known state @@ -91,7 +95,7 @@ else then echo "$0: this test must run be as root, or RUN_SUDO=... " >&2 echo " must be set correctly in 't_client.rc'. SKIP." >&2 - exit 77 + exit "${TCLIENT_SKIP_RC}" else # We have to use sudo. Make sure that we (hopefully) do not have # to ask the users password during the test. This is done to @@ -101,7 +105,7 @@ else echo "$0: $RUN_SUDO $KILL_EXEC -0 succeeded, good." else echo "$0: $RUN_SUDO $KILL_EXEC -0 failed, cannot go on. SKIP." >&2 - exit 77 + exit "${TCLIENT_SKIP_RC}" fi fi fi