-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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: add --dev null test suite #541
base: master
Are you sure you want to change the base?
Conversation
a3e49e3
to
9554d06
Compare
Made changes based on openvpn-devel IRC discussions:
|
Misses changes to github config to actually run the new tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely not tested with out-of-tree build ;)
@@ -0,0 +1,65 @@ | |||
# Notes regarding --dev null server and client configurations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Notes regarding --dev null server and client configurations: | |
# -*- shell-script -*- | |
# Notes regarding --dev null server and client configurations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We seem to have similar declarations/hints elsewhere, namely -*- Autoconf -*-
in .m4 files and -*- coding: utf-8 -*-
in Python files. I see how this might be useful in some context as this is a shell script without an explicit #!/bin/sh
at the top. However, I think we should also add this to t_client.rc-sample to be consistent with these markers. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't hurt
@flichtenheld I applied your suggestions and ran in-tree and out-of-tree builds and did some stress testing just in case. Everything seemed to work fine. Perhaps we're close to the point where these changes could be wrapped into a patch (series) and sent to openvpn-devel? |
Signed-off-by: Samuli Seppänen <[email protected]>
This removes the dependency to netcat and is more in line with the rest of the scripts. Signed-off-by: Samuli Seppänen <[email protected]>
The code is borrowed from t_client.sh Signed-off-by: Samuli Seppänen <[email protected]>
The code is mostly copy-and-paste from t_client.sh Signed-off-by: Samuli Seppänen <[email protected]>
Signed-off-by: Samuli Seppänen <[email protected]>
Signed-off-by: Samuli Seppänen <[email protected]>
Signed-off-by: Samuli Seppänen <[email protected]>
Signed-off-by: Samuli Seppänen <[email protected]>
Signed-off-by: Samuli Seppänen <[email protected]>
Signed-off-by: Samuli Seppänen <[email protected]>
Co-authored-by: Frank Lichtenheld <[email protected]>
Co-authored-by: Frank Lichtenheld <[email protected]>
Co-authored-by: Frank Lichtenheld <[email protected]>
Co-authored-by: Frank Lichtenheld <[email protected]>
Co-authored-by: Frank Lichtenheld <[email protected]>
Both t_server_null.sh and t_client.sh created network interfaces. This worked fine when the tests ran in serial, but broke t_client.sh when make ran tests in parallel mode. This commit fixes this by ordering the two test suites so that they never run at the same time, and by ensuring that server instances launched by t_server_null.sh are completely shut down before t_client.sh starts. Signed-off-by: Samuli Seppänen <[email protected]>
@flichtenheld I believe the parallel make issue is now gone, see latest commit. |
Note that t_client.sh seems to fail if the host "make check" runs on does not have IPv6. That caught me by surprise yesterday. |
Signed-off-by: Samuli Seppänen <[email protected]>
@flichtenheld I believe this PR is now ready. Care to check? |
Co-authored-by: Frank Lichtenheld <[email protected]>
This PR adds a --dev null test suite. The implementation has been described in doc/t_server_null.rst. In addition the scripts themselves include plenty of documentation on what is happening.
This particular incarnation of --dev null has been stress-tested for ~2000 rounds with zero failure rate. Currently tested platforms are Fedora Linux 38 and FreeBSD 14. Any changes to the test suite, in particular its logic, will need to be exposed to a fairly comprehensive tests to avoid subtle issues; for example, in one case a small bug caused ~1% test failure rate - a rate which is impossible to notice without hundreds or so rounds of stress-testing.