Attention is currently required from: flichtenheld, plaisthos.

chugly has posted comments on this change by chugly. ( 
http://gerrit.openvpn.net/c/openvpn/+/1949?usp=email )

Change subject: tests: add an end-to-end test for --route gateway keywords
......................................................................


Patch Set 2:

(5 comments)

Thanks, all five are addressed in PS2.

On the *BSD question, I split the script. t_route_common.sh holds the parts 
that do not care how the environment is isolated: starting the openvpn pair, 
waiting for the route, and comparing the gateway. t_route.sh supplies three 
hooks, one to run a command inside the namespace and two to query the routing 
table. The assertion needed the real change. It used to match "via $GW" against 
ip route output, and it now compares against a gateway the platform hook 
extracts, since netstat -rn spells the entry differently.

So a BSD front end would define the three hooks and reuse the rest. I have not 
written one and have no way to test one, so I would rather not guess at it in 
this change.

One heads up: 1946 adds a case to test_networking.c and bumps LAST_TEST in 
t_net.sh, which is the same area 1586 touches. Whichever lands first will leave 
the other needing a rebase.

File tests/t_route.sh:

http://gerrit.openvpn.net/c/openvpn/+/1949/comment/9ab45991_002f433c?usp=email :
PS2, Line 1: #!/bin/sh
Nothing needed bash. checkbashisms and dash -n are both clean now. The reason 
it failed rather than skipped on BSD was the shebang itself: /usr/bin/env bash 
exits before the uname check at the top of the script can run, so with /bin/sh 
the runtime skip works and no Makefile gating is needed. I also replaced seq 
with a plain counter loop, since seq is not in POSIX either.


http://gerrit.openvpn.net/c/openvpn/+/1949/comment/81f3d34c_a339030b?usp=email :
PS2, Line 29: TUN="ovpnt$$"
Applied, using the arguments from dev-tools/reformat-shell.sh. Note that 
tests/t_client.sh is also listed by shfmt on current master. I left that alone 
as unrelated to this change.


http://gerrit.openvpn.net/c/openvpn/+/1949/comment/983cb7ea_f046a1f4?usp=email :
PS2, Line 67: # A namespace needs the same privileges the rest of the test 
does, so use
Removed.


http://gerrit.openvpn.net/c/openvpn/+/1949/comment/2691b0cb_d3bc84e8?usp=email :
PS2, Line 79: cleanup()
Removed, along with the two on lines 80 and 81 that were the same pattern. I 
kept one redirection, on the route query in the polling loop, with a comment 
saying why: absence of the route is the normal state while polling, so the 
unreachable error iproute2 prints there is noise rather than a diagnostic. 
Happy to drop that one too if you would rather have it consistent.


http://gerrit.openvpn.net/c/openvpn/+/1949/comment/4c3a713b_6cb3f26c?usp=email :
PS2, Line 83:     wait
Removed.



--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1949?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2e8f1449fe54e7f628e2bdb042ee2a567f25e02d
Gerrit-Change-Number: 1949
Gerrit-PatchSet: 2
Gerrit-Owner: chugly <[email protected]>
Gerrit-Reviewer: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
Gerrit-Comment-Date: Mon, 28 Sep 2026 07:37:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to