Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: run stunnel for HTTPS and FTPS on a dynamic port #5267

Closed
wants to merge 1 commit into from

Conversation

@bagder
Copy link
Member

bagder commented Apr 19, 2020

This is achieved by iterating over a series of random high number ports and stick to the first one that works for stunnel.

@bagder bagder added the tests label Apr 19, 2020
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 bagder force-pushed the bagder/tests-stunnel-dynport branch from 9b82185 to e9f7885 Apr 20, 2020
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 bagder force-pushed the bagder/tests-stunnel-dynport branch from e9f7885 to d0ac29a Apr 20, 2020
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 bagder force-pushed the bagder/tests-stunnel-dynport branch from d0ac29a to 945cd06 Apr 20, 2020
@bagder bagder changed the title tests: run stunnel (for HTTPS) on a dynamic port tests: run stunnel for HTTPS and FTP on a dynamic port Apr 20, 2020
bagder added a commit that referenced this pull request Apr 21, 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 bagder force-pushed the bagder/tests-stunnel-dynport branch from 945cd06 to f924991 Apr 21, 2020
@bagder bagder marked this pull request as ready for review Apr 21, 2020
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 bagder force-pushed the bagder/tests-stunnel-dynport branch from f924991 to e97b1e8 Apr 21, 2020
@bagder bagder changed the title tests: run stunnel for HTTPS and FTP on a dynamic port tests: run stunnel for HTTPS and FTPS on a dynamic port Apr 21, 2020
@mback2k mback2k self-requested a review Apr 21, 2020
@mback2k
Copy link
Member

mback2k commented Apr 21, 2020

Please give me a chance to test this locally on Windows before merging. I will try to do that now.

Copy link
Member

mback2k left a comment

This is passing my local tests on Windows 👍

@bagder bagder self-assigned this Apr 26, 2020
@bagder bagder closed this in 9a8fa07 Apr 30, 2020
@bagder bagder deleted the bagder/tests-stunnel-dynport branch Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.