openvpn icon indicating copy to clipboard operation
openvpn copied to clipboard

tests: add --dev null test suite

Open mattock opened this issue 1 year ago • 6 comments

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.

mattock avatar Apr 23 '24 07:04 mattock

Made changes based on openvpn-devel IRC discussions:

  • Used the same privilege escalation mechanism as in t_client.sh
  • Kill server instances using the info in their pid files instead of netcat
  • Fix some documentation/comment issues

mattock avatar Apr 23 '24 11:04 mattock

Misses changes to github config to actually run the new tests.

flichtenheld avatar Apr 23 '24 12:04 flichtenheld

@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?

mattock avatar May 07 '24 08:05 mattock

@flichtenheld I believe the parallel make issue is now gone, see latest commit.

mattock avatar May 14 '24 17:05 mattock

@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.

mattock avatar May 16 '24 05:05 mattock

@flichtenheld I believe this PR is now ready. Care to check?

mattock avatar Jun 04 '24 05:06 mattock

Merged via 06c7ce5d1fc3b17e0da731d22002e58b9e2d4994

flichtenheld avatar Aug 12 '24 11:08 flichtenheld