tests: run stunnel for HTTPS and FTPS on a dynamic port - #5267
Closed
bagder wants to merge 1 commit into
Closed
Conversation
bagder
force-pushed
the
bagder/tests-stunnel-dynport
branch
from
April 20, 2020 06:20
9b82185 to
e9f7885
Compare
bagder
added a commit
that referenced
this pull request
Apr 20, 2020
stunnel is an external tool and it has no specific option to export the actually used port number, runtests tries to figure that out by parsing the stunnel log. This is fragile. As a backup, it runs "netstat -ptln" in an attempt to see what stunnel listens to. Closes #5267
bagder
force-pushed
the
bagder/tests-stunnel-dynport
branch
from
April 20, 2020 06:25
e9f7885 to
d0ac29a
Compare
bagder
added a commit
that referenced
this pull request
Apr 20, 2020
stunnel is an external tool and it has no specific option to export the actually used port number. Runtests tries to figure it out by parsing the stunnel log. This is fragile. As a backup, it runs "netstat -ptln" in an attempt to see what stunnel listens to. That's not going to be widely portable. Closes #5267
bagder
force-pushed
the
bagder/tests-stunnel-dynport
branch
from
April 20, 2020 09:08
d0ac29a to
945cd06
Compare
bagder
force-pushed
the
bagder/tests-stunnel-dynport
branch
from
April 21, 2020 07:33
945cd06 to
f924991
Compare
bagder
marked this pull request as ready for review
April 21, 2020 07:33
As stunnel is an external tool and it has no specific option to export the actually used port number when asked to listen to 0, runtests instead iterates over ten randomly picked high number ports and sticks to the first one stunnel can listen to. Closes #5267
bagder
force-pushed
the
bagder/tests-stunnel-dynport
branch
from
April 21, 2020 08:00
f924991 to
e97b1e8
Compare
mback2k
self-requested a review
April 21, 2020 17:05
Member
|
Please give me a chance to test this locally on Windows before merging. I will try to do that now. |
mback2k
approved these changes
Apr 21, 2020
mback2k
left a comment
Member
There was a problem hiding this comment.
This is passing my local tests on Windows 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is achieved by iterating over a series of random high number ports and stick to the first one that works for stunnel.