From: "cron2 (Code Review)" Date: Fri, 27 Sep 2024 10:23:53 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="q+oD8je2bII="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: t_client.sh: conditionally skip ifconfig+route check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --q+oD8je2bII= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: cron2, flichtenheld, plaisthos. Hello flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/768?usp=3Demail to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review-1 by flichtenheld Change subject: t_client.sh: conditionally skip ifconfig+route check ...................................................................... t_client.sh: conditionally skip ifconfig+route check 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_=3D- 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 --- M tests/t_client.sh.in 1 file changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/68/768/2 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=3D"$@" if [ -z "$expect_list" ] ; then return ; fi + if [ "$expect_list" =3D "-" ] ; 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" =3D "-" ] ; 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? -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/768?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Iec1953415afb53755488dd44407568e72d28e854 Gerrit-Change-Number: 768 Gerrit-PatchSet: 2 Gerrit-Owner: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: cron2 Gerrit-Attention: flichtenheld Gerrit-MessageType: newpatchset --q+oD8je2bII= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: cron2, flichtenheld, plaisthos. <= /p>

cron2 uploaded patch set #2 to this change.

View Change

The following approvals got outdated and were removed: Code-Review-1 by flichtenheld

t_client.sh: conditionally skip ifconfig+rout=
e check

For --dev null or --dev-type af_unix:lwipopenvn tests, there= will be
no visible change to ifconfig or route output, so tests will fa= il
("how can this be?"). Set EXPECT_IFCONFIG4_<n>=3D- t= o skip this
check.

(Simply leaving both EXPECT_IFCONFIG* vars emp= ty and using that as
trigger would interfere with the magic from commit = df0b00c25)

v2: fix string-equal comparison

Change-Id: Iec1953= 415afb53755488dd44407568e72d28e854
Signed-off-by: Gert Doering <gert@= ...1296...>
---
M tests/t_client.sh.in
1 file changed, 11 inser= tions(+), 6 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/=
openvpn refs/changes/68/768/2
diff --git a/tests/t_client.sh.in b/t=
ests/t_client.sh.in
index f6654dd..1ccadeb 100755--- a/tests/t_client.sh.in
+++ b/tests/t_client.sh.i= n
@@ -225,6 +225,7 @@
expect_list=3D&q= uot;$@"

if [ -z "$expect_l= ist" ] ; then return ; fi
+ if [ "$expect_list" =3D "-" ] ; then ret= urn ; fi

for expect in $expect_list<= /span>
do
@@ -404,13 +405,17 @@
output "save ifconfig+route"

get_ifc= onfig_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/$S= UF:ifconfig_route.txt >/dev/null
- then
= - fail "no differences between ifconfig/route before OpenVPN start and= now."
+ if [= "$expect_ifconfig4" =3D "-" ] ; then
+ output "skip ifconfig+ro= ute check"
else
- output " OK!\n"
+ output -n "compare pre-openvpn ifconfig+ro= ute with current values..."
+ if diff $LOGDIR/$SUF:ifconfig_route_pre.txt \
+ $LOGDIR/$SUF:ifconfig_route.txt &= gt;/dev/null
+ then
+ fail "no di= fferences between ifconfig/route before OpenVPN start and now."=
+ else
+ output " OK!\n"+ fi
fi

# post init script needed?
=

To view, visit change 768. To unsubscribe, or for help= writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iec1953415afb53755488dd44407= 568e72d28e854
Gerrit-Change-Number: 768
Gerrit-PatchSet: 2
Gerrit-Owner: cron2 <gert@...1296...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: cron2 <gert@...1296...>= ;
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newpatchset
--q+oD8je2bII=--