From nobody Tue Oct 18 08:23:14 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ms6Lp4GqYz4gPyC; Tue, 18 Oct 2022 08:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ms6Lp3bPbz3pb4; Tue, 18 Oct 2022 08:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666081394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IOyMG5I8oO9HIpzf5BhXAh9h3mipsl6ngEskvCJj574=; b=JOH7ZDTuXaMhsjWwiMYdBobxYvx73jajPQIRDKgFtyMIKS35xzlULX3jiauG3ZG3RajG8x LLbiqC08ChNDjlexNRUn2Dbr5HyyWBkn4jTAsRqP9en++PTCqSFAB/xIH8DoZA1OwkkSSi xFgsuLEOIXItyGos0FlVCXLCVrvj16kp+PwLX7lUaZ/qH+Vl6msFKihXXgIxCywK2fVyzG hGAljWcspUI08PJGxVvlD+HmVtJ/s+XEvvynHA//pAGv664g98C9DIsWNMB3hJWaXAMaA0 VfmmWBfp7lpsose9OsSuThE0JhdZw2sgr+8PMpuUsCOOywVRHE5AXtiBiL8f+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ms6Lp2j0Dz16Y2; Tue, 18 Oct 2022 08:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29I8NEQf071627; Tue, 18 Oct 2022 08:23:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29I8NEfa071626; Tue, 18 Oct 2022 08:23:14 GMT (envelope-from git) Date: Tue, 18 Oct 2022 08:23:14 GMT Message-Id: <202210180823.29I8NEfa071626@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 713efe054297 - main - if_ovpn tests: fix timeout test case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 713efe0542975362cbde9c07479ac8bdd4cb8803 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666081394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IOyMG5I8oO9HIpzf5BhXAh9h3mipsl6ngEskvCJj574=; b=uZhxaj/FaEhR5hmBVIBqISPIMtYFOHxPcWD9D3LmAve68YJvrTS5LSxNCal8nKUUwMO4av ry2EN+iyYLa5uFddO5P7T2IYj32mlvnOpwE0GgZ4maS08JG8P8Qmdx2GhPMqqDyFgUYTIx bKyvN/QPNAh0SAiBXtQv2icKI8oNjMDxMFp/wS6FAuru8ljvowRLs+1PQuC0Yb2KZJE2VK 2mvllGNyXbktB2fv7t0+4GlGt+3gCp8KjbIqndGg/el5bM/lLgdtGfwdETO6pof7yFuYSo PSkCph56CLCnrFtH63Jjbe4AoLKiIoW1SBLtUuxihsKGvdJ1N+t3AF0PqImslA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666081394; a=rsa-sha256; cv=none; b=k8ld3rucWsNyKX1SUrYD6ZE64rdLwBSz5b3Djx5FNVfLKrEfnDIUOYdHTaQCa7X9q4Hzvl 64PhO81DaySAL+QhRYwuG1JazPo/Ybfd/Pesj/PPGRJS5oCeZPv2BuSdTiS7aXz+PyuEU8 bd3VtQIsbRD+5/BJxDMsPKdPoW8FxY7BCvU0TJR7mL1+/l68a0fvp34or2cuBL55YLSNm9 dZnv0Xd/RGT5mNzmOwiKXEiCFGNWPol5iqGxNWR0DzKpSHmsFOVx3983l6LlQ7YV6a/6vK nQqMTWJXFso8fczkdBWfV/h7QJTnvNo/yxWqa8ZH5/hkNCi0t2xMtH/2jnf2aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=713efe0542975362cbde9c07479ac8bdd4cb8803 commit 713efe0542975362cbde9c07479ac8bdd4cb8803 Author: Kristof Provost AuthorDate: 2022-10-17 16:28:23 +0000 Commit: Kristof Provost CommitDate: 2022-10-18 08:12:23 +0000 if_ovpn tests: fix timeout test case Use the management interface to work out if we've timed out the client, rather than looking for an openvpn process to die (with incorrect syntax). Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/net/if_ovpn/if_ovpn.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh index 531a4fc2c856..83bf13bf0cba 100644 --- a/tests/sys/net/if_ovpn/if_ovpn.sh +++ b/tests/sys/net/if_ovpn/if_ovpn.sh @@ -407,6 +407,7 @@ timeout_client_body() vnet_mkjail a ${l}a jexec a ifconfig ${l}a 192.0.2.1/24 up + jexec a ifconfig lo0 127.0.0.1/8 up vnet_mkjail b ${l}b jexec b ifconfig ${l}b 192.0.2.2/24 up @@ -434,6 +435,8 @@ timeout_client_body() topology subnet keepalive 2 10 + + management 192.0.2.1 1234 " ovpn_start b " dev tun0 @@ -449,8 +452,7 @@ timeout_client_body() key $(atf_get_srcdir)/client.key dh $(atf_get_srcdir)/dh.pem - ping 2 - ping-exit 10 + keepalive 2 10 " # Give the tunnel time to come up @@ -458,16 +460,16 @@ timeout_client_body() atf_check -s exit:0 -o ignore jexec b ping -c 3 198.51.100.1 - # Kill the server - jexec a killall openvpn + # Kill the client + jexec b killall openvpn - # Now wait for the client to notice - sleep 20 + # Now wait for the server to notice + sleep 15 - if [ jexec b pgrep openvpn ]; then - jexec b ps auxf - atf_fail "OpenVPN client still running?" - fi + while echo "status" | jexec a nc -N 192.0.2.1 1234 | grep 192.0.2.2; do + echo "Client disconnect not discovered" + sleep 1 + done } timeout_client_cleanup()