From patchwork Mon Dec 11 15:53:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "flichtenheld (Code Review)" X-Patchwork-Id: 3518 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:8d12:b0:fc:24ac:f0cb with SMTP id i18csp5262858dys; Mon, 11 Dec 2023 07:55:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpwjyoXSfRNqLabcnbMmveFmQvEH8vT659m4GMVeKmucds6EX0dFLbpvcMYYALehxcriC9 X-Received: by 2002:a17:902:ec89:b0:1d1:cd7f:5428 with SMTP id x9-20020a170902ec8900b001d1cd7f5428mr8436289plg.1.1702310113369; Mon, 11 Dec 2023 07:55:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702310113; cv=none; d=google.com; s=arc-20160816; b=yYKvE+iQi4vVJof1LOjqRGBXgikExHWUopLrrQb+wkVoMoHCMah9GETYmnCuWWgYga 6Cpu25mfbFlsaO0qoL98NZdHXRPUAwVKbYBgKpt+1/sV437m+L3A/kxglp7w71Mi01vQ nmh5njq9RaoRNej7CfMDnoXuQYWUn490d9Jo6Y2B0wISpKgiR2nNOVCtPaM3/WNx9qNJ pttkbnIhod+FSOP0lpv6JwRDVp3VgVjwhm5eg8wbkM5khEyoyZXZ9BQuNbpvJIfIuuFl aP4y7rNa7zTEU0FwhvmaM46bBFFzKs/Ymfzov8dI7FDvoY1JQe4mBxBGwb8NMugU+1ap 4miw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=+GcJYbsbDbUT022O+EyFbPqUZb4FfvXwf30y/L7zxB4=; fh=GFP4qDxgyJ2WEPo/oeLZg3Mj4NqvY1j2nTvTt7psNwg=; b=Rvy6EbDCpZMFyFr58LW/QmKlMZj0tr2hejdWWQl2Ta79r/ATYCirsZt/nd8E0Um910 /vNtqxMdtKEaC0SibFf4DajLXwwHZ/ysiQeEiAALNaVXLbYWfVS1wP9sUye3rtX2fALV vQ0R5eEMvpXoSV1BKCxlY54eU+rPXGEpyNQgyiO28Eaw/nNA+XqnDIqvDLeB31+MaeXf MUdL/RN4FejwA99bYHLCwk5IiuxyKQV5qAKEoVoI0+w4F/gM7ZAsTB56Ma+AT8ifitn8 TZ7s/Phe1be3gLo6xiiZh09VSh69tgzg4aaajUvtQVWJ7jdQz+cFDaX7B3z89KYSPv/P S6Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=KzBqyYo7; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=VPsrp6rZ; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=T4+Ex2Mz; 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=openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id be3-20020a170902aa0300b001c5e1c94588si6042616plb.550.2023.12.11.07.55.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2023 07:55:13 -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=KzBqyYo7; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=VPsrp6rZ; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=T4+Ex2Mz; 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=openvpn.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 1rCibq-0005mw-Bp; Mon, 11 Dec 2023 15:54:18 +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 1rCibn-0005mq-Ov for openvpn-devel@lists.sourceforge.net; Mon, 11 Dec 2023 15:54:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2DIX3sfNE4H9eFho7QHVjlCeaF1NJhXfYzh9HSX4jhk=; b=KzBqyYo70iJCl17zS9g4ur4Mk2 z1Cu4dHDtjLTjoVznITEdhJ9G3cHMcv5JAobef/qoZSfbCw5A0Aj/zv1dDuNwGqWXyfC0keGJYXZm 0vbj+HZ0doIvVgSnNWKZayH2GEQgGZBhFB9ztqpXpneCo2SbAzY0fn4PcR8auTS7sfNg=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=2DIX3sfNE4H9eFho7QHVjlCeaF1NJhXfYzh9HSX4jhk=; b=V Psrp6rZLXHBotUDycumYTOaIEr5YvWWLY+T1/5QMmeRbszy/CH3lAR+Ymw61EVEFoHfoQ6CuGqqzp 1MoqnByPNgQCOEoeAsxvCJg0g1eSmwi1THOjN/VQOTorhVd1zRNJ9JMJWuA0FN3IsSYZyjG1ICC8Z e7dJ6ToRdnLzLrac=; Received: from mail-wr1-f52.google.com ([209.85.221.52]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1rCibi-0005Dq-VZ for openvpn-devel@lists.sourceforge.net; Mon, 11 Dec 2023 15:54:12 +0000 Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-33334480eb4so5267032f8f.0 for ; Mon, 11 Dec 2023 07:54:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1702310039; x=1702914839; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=2DIX3sfNE4H9eFho7QHVjlCeaF1NJhXfYzh9HSX4jhk=; b=T4+Ex2Mzi1W2I3kqSE5wWtG6IJEb8wU19eDU1vw+cJ6+F58hTyc7P8NYufr1C5yi1G OJTTzFf71dR9vD0AlvTUwT8T7S1m52JXWA97EuwHiq0JNigvmG4vBCK49d7/AYcN7yvD 4190jGQHf6za1fq6+W2+ILAKI1kOtfqXOoaZfseMES2MjUa7FZ7sKsX11YNTNiOxeyAl zfcgUsSYLpLz76HkOH98EM6KLXcS1nOZYaRxNKmql6tVjVK9xlCInlCPDl7JHpYvwOtQ SSYARKwS6e9Dh9gcqx4neDWCJmYpETOBO5h6CoMEI5IqgyDB2HUmPgvf4MR6LQYYH81n N6XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702310039; x=1702914839; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2DIX3sfNE4H9eFho7QHVjlCeaF1NJhXfYzh9HSX4jhk=; b=T4qb0WOboU0pcKK90cry8tvc2ZuR8ldQ1U8ywcCG0ehcmJNtMyPD8PGZHqnofYHxLt mK3JGh5+sksIpU3EZqe2p5QkfLL6zhexFCQxYSb3VR9x14WvzhYs6zqhV49e7URKqQDd x2dd6esdYG8imW8OAZ3Zf+i4Ah5a5cMSWUl+FXOhR4D5hg+nRzjMhKWbZou6lwJlh2Zc lZyydMo9ntjAJOf9yqv4zMRARHvFsTmInD65p9u9n8YzIUajVc876QOjThxnLymQB+yD wYDp4qQ9OVWieXWWawOwq3a7JokRA+9TK/f2J0pLK46eq71kQkJ1CGFiJ2L3+cKeNhiw kwmg== X-Gm-Message-State: AOJu0Ywm9LfdfnM9DQ/4SG++/tQM3IeerRX6SOwkZfICino6g+s8+VEU K0vpmrsCpDD9FivPe6bOOT0TKC2ZXsCD0lBFvAE= X-Received: by 2002:a05:600c:3411:b0:40b:36e9:bf4b with SMTP id y17-20020a05600c341100b0040b36e9bf4bmr2229300wmp.41.1702310039352; Mon, 11 Dec 2023 07:53:59 -0800 (PST) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id iv19-20020a05600c549300b0040b397787d3sm9836920wmb.24.2023.12.11.07.53.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 07:53:58 -0800 (PST) From: "flichtenheld (Code Review)" X-Google-Original-From: "flichtenheld (Code Review)" X-Gerrit-PatchSet: 1 Date: Mon, 11 Dec 2023 15:53:58 +0000 To: plaisthos Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: I67d461afbcc9c06b1fc5ab4477141d7b8bd9ba8e X-Gerrit-Change-Number: 478 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 6c980d578faafbd6013e9e6ee6640a27d925ddb3 References: Message-ID: MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) 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: Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.52 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.52 listed in list.dnswl.org] 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1rCibi-0005Dq-VZ Subject: [Openvpn-devel] [M] Change in openvpn[master]: 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: , Reply-To: frank@lichtenheld.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1785001529844024337?= X-GMAIL-MSGID: =?utf-8?q?1785001529844024337?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/478?usp=email to review the following change. Change subject: tests: fork default automake test-driver ...................................................................... tests: fork default automake test-driver We don't really 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. Change-Id: I67d461afbcc9c06b1fc5ab4477141d7b8bd9ba8e Signed-off-by: Frank Lichtenheld --- A forked-test-driver M tests/Makefile.am M tests/unit_tests/example_test/Makefile.am M tests/unit_tests/openvpn/Makefile.am M tests/unit_tests/plugins/auth-pam/Makefile.am 5 files changed, 157 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/78/478/1 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 diff --git a/tests/unit_tests/example_test/Makefile.am b/tests/unit_tests/example_test/Makefile.am index 1ae80c8..988366a 100644 --- a/tests/unit_tests/example_test/Makefile.am +++ b/tests/unit_tests/example_test/Makefile.am @@ -1,6 +1,7 @@ AUTOMAKE_OPTIONS = foreign AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING) example Unit-Tests' +LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver check_PROGRAMS = example_testdriver example2_testdriver diff --git a/tests/unit_tests/openvpn/Makefile.am b/tests/unit_tests/openvpn/Makefile.am index cecf4dc..80001bf 100644 --- a/tests/unit_tests/openvpn/Makefile.am +++ b/tests/unit_tests/openvpn/Makefile.am @@ -1,6 +1,7 @@ AUTOMAKE_OPTIONS = foreign AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING) Unit-Tests' +LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver test_binaries= diff --git a/tests/unit_tests/plugins/auth-pam/Makefile.am b/tests/unit_tests/plugins/auth-pam/Makefile.am index ba32013..385922f 100644 --- a/tests/unit_tests/plugins/auth-pam/Makefile.am +++ b/tests/unit_tests/plugins/auth-pam/Makefile.am @@ -1,6 +1,7 @@ AUTOMAKE_OPTIONS = foreign AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING) auth_pam Plugin Unit-Tests' +LOG_DRIVER = $(SHELL) $(top_srcdir)/forked-test-driver if ENABLE_PLUGIN_AUTH_PAM check_PROGRAMS = auth_pam_testdriver