From patchwork Thu Jan 25 11:00:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3591 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7301:3b94:b0:101:b91e:57cc with SMTP id kh20csp1602812dyb; Thu, 25 Jan 2024 03:01:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFZxh0EcW+KLXwwqv7p6vYNQy22RMXgMZBG5CPCzlf2lcCUxXfYDzIoLlvP5dwNdjB819q X-Received: by 2002:a17:90a:ea01:b0:28e:1e79:c5c2 with SMTP id w1-20020a17090aea0100b0028e1e79c5c2mr1382093pjy.1.1706180499049; Thu, 25 Jan 2024 03:01:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706180499; cv=none; d=google.com; s=arc-20160816; b=ieLUEb8Mw5K5e0P8XOLYr7JL4S7Uelh97hMonfsp8Q5i2d+iDM37yXINYQWl1u0ubI NsjhSbDD2QCv8M8mv1LKjOJLIKJ6t87E7oselrkyMu2/thpQTzZGehAPjpBMjMKysdrN IN+q/MA2vCAvk5kXqnEuw3rqTQhOTHErKoGOdLj8MRykQnQ0hVuBWXxrMSfBUUVmy1zE xkHApeud2+BVCiNNUgPKSxCHwW7oZCQVWtQWulh5jDNTaPSrjTDNBre9NTlvV2xr8zCS lo3f1Y6JgDdWb65Zg/ZFhD7n8XpppqG3GMujhgFKFfBcgznGZtwlGYw0oSWHjM5vaigW n4yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:cc: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=9X7letbzsWWK0HET/iG9Uy5AqE7NUFfTaAOyX+GnqjA=; fh=CfxSpwd5kfiMJoL3kcov7PTxVKT7pGe/79idnx9XlBs=; b=FYoZdavuJqIDpHWt6MdYuWBI13u7ahQTTY6MkKbUpfsNq2RRblicsX+dxE0lNQYQ42 bQIO+FugqT9r4McQSfWK362SCIeAAnnROanGWQo8IIeKPV7IuM6u37gv7iKpoJYtiUeE GwgjGG4POvSnDw4A2opDZzyyZO5wY3fhVMyVFQpBRHEftGndy5IDjfDikxtkjvnzJs0U JRJMjCN3VmI6CtcYV7f4wYlGzGzQzwCco8cTs8u5LNpEr4Gwdv2z/8xGdy9o0LRqCyfT f6jDFPiTuZKuKBooKVKKiz7DyVdqhWgvYY934YTJiWiI3IUg+tne4ccIHPMlS0Ks1Gvy Ovrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Yc+Epq1E; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=IHCtrx0c; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=iTKiExTq; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id j9-20020a17090a060900b00290ea2f6490si1143319pjj.130.2024.01.25.03.01.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jan 2024 03:01:38 -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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Yc+Epq1E; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=IHCtrx0c; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=iTKiExTq; 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 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 1rSxTk-0004ty-NC; Thu, 25 Jan 2024 11:01:04 +0000 Received: from [172.30.20.202] (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 1rSxTj-0004tr-9d for openvpn-devel@lists.sourceforge.net; Thu, 25 Jan 2024 11:01:03 +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:Cc:To:From:Sender:Reply-To: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=tYsnfJekMaaXeiuF5bxzDpgVoldtUpegbLa6/l57SeY=; b=Yc+Epq1EA1n2AdAkAC14PK45Rk QyHgBI2Y6PoXfhKQj//OmzMX2Bivo4WOW3JPTn/wkQMEJ5ogoHnInbCFmAPPN117pTZqKXbirY7Zq 5zIDmskPPpPciugXNO93zFw7+Dbwn9VY8GRJoIyoWEH9jc5JKvTlkqMqor39dwZh9+H8=; 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:Cc:To:From:Sender:Reply-To: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=tYsnfJekMaaXeiuF5bxzDpgVoldtUpegbLa6/l57SeY=; b=IHCtrx0crop0A2TNoD2J4OhYiR Yz5JFWgm+84lhgDN8sXfyFs6jtWbOOOcFLPHQDewU3r2ypEGJrta4tvYTzBE0SXPWRFZpHnbzqfWH lBwyDlyu6qFosZldyuiRv/Rpzbdy69mQc4EpggBVCEvlmrCqXaausvq8/iBfTbQrmFeI=; Received: from mout-p-201.mailbox.org ([80.241.56.171]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1rSxTd-0003pj-7i for openvpn-devel@lists.sourceforge.net; Thu, 25 Jan 2024 11:01:00 +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 X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4TLHtH1T1sz9stT; Thu, 25 Jan 2024 12:00:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1706180439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tYsnfJekMaaXeiuF5bxzDpgVoldtUpegbLa6/l57SeY=; b=iTKiExTqcutHjSC0YJ+tHJLxcpPQ81wb8H3WbC7NSzKyaov+hiDFTJooiaUvzQ9SuRpukN 5S8zgSpfg/b/+6+wTWhjRQ6zw5Vvhv90pqew8avQhnLtcdo5XlGvAE7wB7+qbosCZHP+EW XM1mVpVLPujSKOs6TsWYyFD3JkGIsBNi/7C135ciu/myTLX+LPMCZMlnYcFEK8pLCxlPnZ Ad1DU2mNZbIDw2UlirScRMwGtXN0t9p+VojTeWpFfRxTrXEWy/mqlRaEzgLGgsCurqnRaF +JN4sVtQSHRZA+5Yu8sftEBMLiLtPd4DmZKZGwUqC3gwqBYk7bTrBpkhM3pEaA== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Thu, 25 Jan 2024 12:00:36 +0100 Message-Id: <20240125110036.16070-1-frank@lichtenheld.com> In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.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: For some of the test we don't like the default log behavior and there seems no easy way to change that except to fork the driver. The license seems unproblematic since we're GPL anyway. v2: - Do not use forked-test-driver for UTs. Default behavior is fine for those. Content analysis details: (-0.9 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.171 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1rSxTd-0003pj-7i Subject: [Openvpn-devel] [PATCH v6] tests: fork default automake test-driver 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: , Cc: Arne Schwabe Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1789059921844084045?= X-GMAIL-MSGID: =?utf-8?q?1789059921844084045?= For some of the test we don't like the default log behavior and there seems no easy way to change that except to fork the driver. The license seems unproblematic since we're GPL anyway. v2: - Do not use forked-test-driver for UTs. Default behavior is fine for those. Change-Id: I67d461afbcc9c06b1fc5ab4477141d7b8bd9ba8e Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- 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/+/478 This mail reflects revision 6 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/Makefile.am b/Makefile.am index 792588a..d93bd1b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,7 +45,8 @@ ltrc.inc \ CMakeLists.txt \ CMakePresets.json \ - config.h.cmake.in + config.h.cmake.in \ + forked-test-driver .PHONY: config-version.h doxygen diff --git a/forked-test-driver b/forked-test-driver new file mode 100755 index 0000000..be73b80 --- /dev/null +++ b/forked-test-driver @@ -0,0 +1,153 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2018-03-07.03; # UTC + +# Copyright (C) 2011-2021 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <"$log_file" +"$@" >>"$log_file" 2>&1 +estatus=$? + +if test $enable_hard_errors = no && test $estatus -eq 99; then + tweaked_estatus=1 +else + tweaked_estatus=$estatus +fi + +case $tweaked_estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>"$log_file" + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/tests/Makefile.am b/tests/Makefile.am index 6c71067..b3b2d74 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -15,6 +15,7 @@ SUBDIRS = unit_tests AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING) System Tests' +LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver if !WIN32 test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh