From patchwork Fri Oct 25 13:00:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 3913 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:3a4c:b0:5b9:581e:f939 with SMTP id n12csp982552mao; Fri, 25 Oct 2024 06:00:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV0X29PCQMhX5vMWZrYU8h1PamU0uvQYVOwF/RFglZniLaIiP8WbCbhmtxlRrUsvMX4zE6Zh6XD3kw=@openvpn.net X-Google-Smtp-Source: AGHT+IGv9dJrY+M5iyg64KYtTbl+caaggag9dWHuZbXIZSUOcE5rgNM1+OeQwX3qqeh9vI/r8OwE X-Received: by 2002:a05:6808:2026:b0:3e5:f4e7:82e4 with SMTP id 5614622812f47-3e62c5abb71mr2951489b6e.21.1729861237414; Fri, 25 Oct 2024 06:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729861237; cv=none; d=google.com; s=arc-20240605; b=lLag7S7UAwhEzfnQErYAxObiJsxKuCrgzpGrLW5moFY114hwn++P8+e6Z6PqMrM3Wr NAafuTGl0I0CrzOL6sVTqiBO8Yz/tUgfFKCFvodsTFZgSO3R9PImfhbDQZpsTvxHDAH/ B4rJbA8NC2sclmH31NIpB5IBqIL6SJpu3UHMdjGqygo6ctc4kvSn0dYB7fV86TqNx5QO d5U31A/Tex3KRv9Dj60VgIBdQD6CcRydy3in1qjZK5qwSYWw5RDsLMWmL/40nvuuAkCg eUmrQXTKfvIQeFmdPUKpyzu8BeBauxYddIEikccf6dQdxq9hgmcaO8fte/uQ3It081ND H0cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=J2gkTHO5N0DDZ9cMAtZx4K1jkMyzTHINbZsLu8TsqhY=; fh=U7wEyxtwz2o5+UdevFSA47vNeG9knhWH0KV//QhD5a0=; b=RfXbV7DWSk/XZVXBkI6hq759NQArAxZ2eut/TgKV8GuILLoqcmHZfuOhCeG2joYs11 ktEuxEhK3OaQOXVLJ3qrh5gsO9eTVxhoNOYq5WoZp1vT9PpVTzspbUW9Ja3EoGM+JLQn EvBj93QsXtdxbB5ZdDHK80VTuKzua1JXUv2LWD04YYxm7QB9UqdoMuN/nujONrAyB43n zlhbzW8KeQEGIc29pwTbWJzDg0Le8DhIL+XiOEgwyhJ9auqBf/Y3HkMx9jmC+m8DzOw1 7rFjkByi9btkiTgqc27EGw2QB5QNfbn2UKmeBPhm2nedxxkdTs4Wh7DggZT5OJumXosN HetA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=MKT42tCQ; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=jKa8h7zP; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=X5ItikbJ; 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; dara=fail header.i=@openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 006d021491bc7-5ec1856fe38si593088eaf.34.2024.10.25.06.00.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Oct 2024 06:00: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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=MKT42tCQ; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=jKa8h7zP; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=X5ItikbJ; 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; dara=fail header.i=@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 1t4JvS-00017R-6b; Fri, 25 Oct 2024 13:00:22 +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 1t4JvR-00017K-7s for openvpn-devel@lists.sourceforge.net; Fri, 25 Oct 2024 13:00:21 +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=tWEGDBRjSorcdMa8Pu75Ect1I8kB5WxGxDKt9GeSLh0=; b=MKT42tCQyCFaNcoPmyvxDZvuaa UGQwn10VGUBpRbG1RuF2oU2f9LLwEqPuuNMmoIfBT0qF3DHYlw6aw0BfEqqF2bgKbyUouHurN6b06 9VZ4bZFO+2h27pMX5Z0MyBOVy3pVywqPYtaT4jPM6+Iomm56Yrkk4DR27n/PgxMNTV+g=; 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=tWEGDBRjSorcdMa8Pu75Ect1I8kB5WxGxDKt9GeSLh0=; b=j Ka8h7zPOpclJEwEaAMx2LBdFLFfDD2sPZij22CVLju7CwJ0BA+hY8MOg/u5pzze477SB78Zzinli3 Yb6KWxEt655ofn1tOFW6/5YeCXU2+6VJS35NBtgHP2JKzWfSmhPQ+D1yg2ZrusOflvBUEjXyytODa OJkNAklnNRjKvmJo=; Received: from mail-wm1-f41.google.com ([209.85.128.41]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1t4JvQ-0004sY-2u for openvpn-devel@lists.sourceforge.net; Fri, 25 Oct 2024 13:00:21 +0000 Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-43161c0068bso19849655e9.1 for ; Fri, 25 Oct 2024 06:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1729861213; x=1730466013; 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=tWEGDBRjSorcdMa8Pu75Ect1I8kB5WxGxDKt9GeSLh0=; b=X5ItikbJcSp/6EKH+J10XHvmBUuAqY59l6y2EAvRw6GJ0nb8pfGbVe2h7JrWsmgZgU qIT8ax0CmVm32B732T5qAitWDlGFRJgYaJPIpehRpEsH0hLBYE+5OiaBu60sRShwf3+K nB/mQmB5f5UFgoPyjrYsIYhF++DpBbpMVo2TFIueA7Ve/AJNCXAptBPujr+XAlb6ZxXK cvQ3v9dOlQUUaK4ZN2tyWgzs/6osi4RgMD/V1X5JZtHhcpds/EiOr/fhiLR5L8q9QCdq 5K6X0Tstd0YGXNnMsrwAVI0mFBnU+bbbR6jIXSwX0eg6FC0sEUJz2Dbx4Bux8IHEatHV 6yMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729861213; x=1730466013; 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=tWEGDBRjSorcdMa8Pu75Ect1I8kB5WxGxDKt9GeSLh0=; b=HzL6Chu9GtZkDNNHs908ecNySDoqxxw1Ps1z5GRjMB8qceGsfDifDE/bRvqXa9yQGX wHG8xQI30/2vEfICpijFpFvjOfnoP7/RhmX37IHAstyWt5RITG1L/lj+Ch0ePBV894A8 O/cqgFzqWAeJ+JDySH8SKbelE8uDMaSn8JMiAiAvD8OBLoP4ZqDjhMSjcObdWYlx9G8s iYL3Qxapiy+Vb5qQH/nWsugQJ3SKRrpYRw4XBiFNnDEHGeUWchQvr3euUyp4lTuZ77sk ofmlPUqkbyayOIa9hnCDssZzxMXaRYVTK3bKFEU3m6l/o/KsC7fKAc4gi+bzWhPpWu2A eMOA== X-Gm-Message-State: AOJu0YyaDyOEo6Amhp41PCICkYe1mTbZBEmpxDH8P2kyQkRpq4y2r939 a4ZErzX9NZE1DOSu4i5CNfM8zVVEsKAb+F78c8JiTyM4yHgWdyIWEImES4MnapYR3lPZoE8b3eH Q X-Received: by 2002:a05:600c:83c5:b0:42f:7ed4:4c25 with SMTP id 5b1f17b1804b1-431841fe068mr90468335e9.14.1729861213396; Fri, 25 Oct 2024 06:00:13 -0700 (PDT) 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 5b1f17b1804b1-4318b57a1a4sm47200855e9.41.2024.10.25.06.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:00:13 -0700 (PDT) From: "mattock (Code Review)" X-Google-Original-From: "mattock (Code Review)" X-Gerrit-PatchSet: 1 Date: Fri, 25 Oct 2024 13:00:12 +0000 To: plaisthos , flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: Ib385080e1dd1c3046c54e6267db8aa7d5c09e2fb X-Gerrit-Change-Number: 786 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: ea26809ccb8243a965c570ca455dcde0d2c67ebd References: Message-ID: MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -1.9 (-) 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: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit Content analysis details: (-1.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.41 listed in list.dnswl.org] -1.7 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.41 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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_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_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1t4JvQ-0004sY-2u Subject: [Openvpn-devel] [S] Change in openvpn[master]: t_server_null: use wait instead of marker files 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: samuli@openvpn.net, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1813890976135267568?= X-GMAIL-MSGID: =?utf-8?q?1813890976135267568?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/786?usp=email to review the following change. Change subject: t_server_null: use wait instead of marker files ...................................................................... t_server_null: use wait instead of marker files By using wait in a more inventive way we can avoid using a marker file to detect the "server could not be killed gracefully" situation. Change-Id: Ib385080e1dd1c3046c54e6267db8aa7d5c09e2fb Signed-off-by: Samuli Seppänen --- M tests/t_server_null.sh M tests/t_server_null_server.sh 2 files changed, 10 insertions(+), 8 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/86/786/1 diff --git a/tests/t_server_null.sh b/tests/t_server_null.sh index 3c0fc4b..74ffd52 100755 --- a/tests/t_server_null.sh +++ b/tests/t_server_null.sh @@ -62,6 +62,8 @@ mkdir $t_server_null_logdir "${srcdir}/t_server_null_server.sh" & +T_SERVER_NULL_SERVER_PID=$! + "${srcdir}/t_server_null_client.sh" retval=$? @@ -69,11 +71,9 @@ # that this script does not exit before all --dev null servers are dead and # their network interfaces are gone. Otherwise t_client.sh will fail because # pre and post ifconfig output does not match. -wait +wait $T_SERVER_NULL_SERVER_PID -. ./t_server_null_default.rc - -if [ -e $SERVER_KILL_FAIL_FILE ]; then +if [ $? -ne 0 ]; then exit 1 else exit $retval diff --git a/tests/t_server_null_server.sh b/tests/t_server_null_server.sh index ab01dd2..acf8479 100755 --- a/tests/t_server_null_server.sh +++ b/tests/t_server_null_server.sh @@ -37,8 +37,9 @@ # Load local configuration, if any test -r ./t_server_null.rc && . ./t_server_null.rc -# Remove server kill failure marker file, if any -rm -f $SERVER_KILL_FAIL_FILE +# We can't exit immediately on the first failure as that could leave processes +# lying around. +retval=0 # Launch test servers for SUF in $TEST_SERVER_LIST @@ -81,7 +82,6 @@ # Make sure that the server processes are truly dead before exiting. If a # server process does not exit in 15 seconds assume it never will, move on and # hope for the best. - echo "Waiting for servers to exit" for PID_FILE in $server_pid_files do @@ -111,6 +111,8 @@ echo "ERROR: had to send SIGKILL to server ${SERVER_NAME} with pid ${SERVER_PID}!" echo "Tail of server log:" tail -n 20 "${t_server_null_logdir}/${SERVER_NAME}.log" - touch $SERVER_KILL_FAIL_FILE + retval=1 fi done + +exit $retval