From patchwork Sat Sep 28 20:05:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 3881 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:101b:b0:5b9:581e:f939 with SMTP id k27csp1014761mae; Sat, 28 Sep 2024 13:05:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVdDRtQ3nx+nb/o0iRXtSDsAWIibNvy4KAubuBzDcGfFs+PgUQOJ7FKbj7oDVW4ArrLItqak6VTp6M=@openvpn.net X-Google-Smtp-Source: AGHT+IFeO/29bt2x3ENEACXISIQHMQvQ8FkuDCUN0oeYrQrdtGhUfGgwLNMX3oOeZZUJzVlOej8q X-Received: by 2002:a05:6830:410a:b0:710:9f34:8d7b with SMTP id 46e09a7af769-713d39d41e7mr5864451a34.14.1727553942644; Sat, 28 Sep 2024 13:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727553942; cv=none; d=google.com; s=arc-20240605; b=K58ZN8zuNn0fR8SDlmFzFXFsx0rNDYlha/Ulu49DGX6B2X8lllagOrsSAVS/GE2Aup YhxjvAMFBZBv8BZr2TVfWXUihzjI4ch1G/ll1bYq2JuQ6KT9ld26z25njAFKv8c2geFC pkm3ujnby2do8UIaXYz4sRa7/MpwAMVRXLf54v3Ca5MH6lXYYpiNR73qnX9QkB95pGgU ST+B1RAEjH2wb2OEOjvvi0H1nATEyzB5U7vQjZoRyzC3LSFJ4FwUFMuRFD8dTgwEXfBc N0q/zOvX1e8HQVwH8d5CklxVkr8fsTU6Uf65m1jqcW4lDUwActHwnETBnTuGz3fRfP0i 5QeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding: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; bh=XrBeUgaYc+pBkSe3JBq4HimiaJk11LG4Iu4v9G/U5a4=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=U71jCV9bXOHzyx5aTWa/1FZtYhXkeaSMkv8ENSjxYTzWH6hcGUruEaWnCIt/jN/CRv SZ4IAZTT8eyRZtgERk10oZrklCKBcXz0RtBUe72N84yj1cT4q+GlzVlPgZAsKDyqw3u5 KV66fmvsHjktgyV77pxJYy0xF1/TYHfW6zU3Y+O1JEapPj6GmaFthmDkyX0sASaKY4g8 q7aXquvqWEVjMQjtwjSig2zKmptEMCHLhIIfyplAfvPCAamG4kmDU+u9vDbObMUQTwVA iz8DWpZ6P5NpcNcTfsWxpB7QUzpsJvkxRoOgt5zIA45jg4KWLqUl14XqITW2dbV6hd9H rALQ==; 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=Rb5IcEu0; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=DOagl8T3; 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=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 46e09a7af769-714fb6d219esi2097758a34.178.2024.09.28.13.05.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Sep 2024 13:05:42 -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=Rb5IcEu0; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=DOagl8T3; 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=muc.de Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sudh4-0007bL-Bb; Sat, 28 Sep 2024 20:05:29 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sudh2-0007bF-Fo for openvpn-devel@lists.sourceforge.net; Sat, 28 Sep 2024 20:05:27 +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: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VIsTQj8ia4BFQl7B4rrLeLp1jOqCNcet1iqlg0XGML8=; b=Rb5IcEu0Myjjse+3Gus6Jar/Qg Of8IdJPKDqwLAuc9x2Oyr65cKy68qrZMSs71qlaL3dcKCEQonDh+uBxL+yDooWZQsLLuAQ8sjWZfm sAuWRPm7Qv+tN5m9SuiEq2771eTh/ZGKpJ81z72BZpA3fW5Zyr4VxcR/Wm0M9vl4FRKk=; 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: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=VIsTQj8ia4BFQl7B4rrLeLp1jOqCNcet1iqlg0XGML8=; b=DOagl8T3P0aIP/djBkrsrWY4aZ qqNr+a9HHcuRiuLCayyLZbKizCaVt7sP5hkqxlPy6Zm1JteF5rBBJNqeYo6vSriJPss6Frx4swoWI 6uR5seFstgisxBwS+DzgHNfYFw/HYBl1cJQXbb+36Nc9omPgxjPxW5KHsSqFeAIWSHf0=; Received: from dhcp-174.greenie.muc.de ([193.149.48.174] helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1sudgw-0004hT-HM for openvpn-devel@lists.sourceforge.net; Sat, 28 Sep 2024 20:05:27 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 48SK59Cm023757 for ; Sat, 28 Sep 2024 22:05:09 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 48SK590k023756 for openvpn-devel@lists.sourceforge.net; Sat, 28 Sep 2024 22:05:09 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sat, 28 Sep 2024 22:05:08 +0200 Message-ID: <20240928200508.23747-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.44.2 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -0.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: For --dev null or --dev-type af_unix:lwipopenvn tests, there will be no visible change to ifconfig or route output, so tests will fail ("how can this be?"). Set EXPECT_IFCONFIG4_=- to skip this che [...] Content analysis details: (-0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-Headers-End: 1sudgw-0004hT-HM Subject: [Openvpn-devel] [PATCH v2] t_client.sh: conditionally skip ifconfig+route check 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 X-GMAIL-THRID: =?utf-8?q?1811471603127953013?= X-GMAIL-MSGID: =?utf-8?q?1811471603127953013?= For --dev null or --dev-type af_unix:lwipopenvn tests, there will be no visible change to ifconfig or route output, so tests will fail ("how can this be?"). Set EXPECT_IFCONFIG4_=- to skip this check. (Simply leaving both EXPECT_IFCONFIG* vars empty and using that as trigger would interfere with the magic from commit df0b00c25) v2: fix string-equal comparison Change-Id: Iec1953415afb53755488dd44407568e72d28e854 Signed-off-by: Gert Doering Acked-by: Frank Lichtenheld --- 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/+/768 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in index f6654dd..1ccadeb 100755 --- a/tests/t_client.sh.in +++ b/tests/t_client.sh.in @@ -225,6 +225,7 @@ expect_list="$@" if [ -z "$expect_list" ] ; then return ; fi + if [ "$expect_list" = "-" ] ; then return ; fi for expect in $expect_list do @@ -404,13 +405,17 @@ output "save ifconfig+route" get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route.txt - output -n "compare pre-openvpn ifconfig+route with current values..." - if diff $LOGDIR/$SUF:ifconfig_route_pre.txt \ - $LOGDIR/$SUF:ifconfig_route.txt >/dev/null - then - fail "no differences between ifconfig/route before OpenVPN start and now." + if [ "$expect_ifconfig4" = "-" ] ; then + output "skip ifconfig+route check" else - output " OK!\n" + output -n "compare pre-openvpn ifconfig+route with current values..." + if diff $LOGDIR/$SUF:ifconfig_route_pre.txt \ + $LOGDIR/$SUF:ifconfig_route.txt >/dev/null + then + fail "no differences between ifconfig/route before OpenVPN start and now." + else + output " OK!\n" + fi fi # post init script needed?