Skip to contentSkip to conversation

brainstorming: t_client system test equivalent for windows?

Openvpn-devel Gert Doering 5 participants 8 messages Jun 24, 2016 – Jun 26, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

a new patch set from Heiko is coming up, which is going to change the "IFCONFIG_BEFORE_TUN_OPEN" to "what everyone else does" (because what we currently have is older than anyone remembers, and makes life much more complicated than needed).

Now, we are not currently properly testing Windows - on the unix systems, I'd build a t_client.rc test set with like 5 extra tests for "--route-method adaptive/ipapi/exe", "IPv4 only", "IPv6 and IPv6", interactive service or not, etc. - but I'm not sure what the best way is to do this on windows.

Would "use mingw/msys bash" work for stuff like "put regular openvpn.exe into background with 'openvpn.exe & pid=$! ' and kill with "kill $opid"?

I have been toying with the idea of replacing t_client.sh with a perl script that uses the management interface to control openvpn (at least the "has our startup finished? have we exploded? shutdown orderly now!" bits...) - but that's also not trivially implemented as one would have to redo the whole "look at ifconfig/route output and parse in a system dependent way" - and test on a gazillion of platforms :-)

So... other ideas? Selva, Valdikss, how do you test windows builds?

Jens, since you have dived into t_client improvements - any nice ideas how to make this happen with "reasonable effort"?

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#1 lore raw

I would suggest powershell instead of perl. I can write powershell stuff 24 июня 2016 г. 19:07 пользователь "Gert Doering" <[email protected].....> написал:

Quoted 53 lines

Hi,

a new patch set from Heiko is coming up, which is going to change the "IFCONFIG_BEFORE_TUN_OPEN" to "what everyone else does" (because what we currently have is older than anyone remembers, and makes life much more complicated than needed).

Now, we are not currently properly testing Windows - on the unix systems, I'd build a t_client.rc test set with like 5 extra tests for "--route-method
adaptive/ipapi/exe", "IPv4 only", "IPv6 and IPv6", interactive service or not, etc. - but I'm not sure what the best way is to do this on windows.

Would "use mingw/msys bash" work for stuff like "put regular openvpn.exe into background with 'openvpn.exe & pid=$! ' and kill with "kill $opid"?

I have been toying with the idea of replacing t_client.sh with a perl script that uses the management interface to control openvpn (at least the "has our startup finished? have we exploded? shutdown orderly now!" bits...) - but that's also not trivially implemented as one would have to redo the whole "look at ifconfig/route output and parse in a system dependent way" - and test on a gazillion of platforms :-)

So... other ideas? Selva, Valdikss, how do you test windows builds?

Jens, since you have dived into t_client improvements - any nice ideas how to make this happen with "reasonable effort"?

gert
--
USENET is *not* the non-clickable part of WWW!

                                                           //

www.muc.de/~gert/
Gert Doering - Munich, Germany
[email protected]...
fax: +49-89-35655025
[email protected]...

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

#2 lore raw

Hi,

Quoted 1 line · ???????? ??????????????

I would suggest powershell instead of perl. I can write powershell stuff

Fine with me, if someone else writes and maintains it... I can do a bit of .bat scripts, but no powershell.

Perl has the advantage of being available on all platforms (or at least "you can install it", I know it's not there out of the box everywhere) so maybe we can do a common test driver implementation that runs on windows and unix, so less maintenance...

But first and all, we need something. We have no perl, and no powershell, so having a working powershell implementation is much better than a non- existing perl script :-)

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#3 lore raw
Quoted 5 lines · Gert Doering

Hi,

Quoted 1 line · ???????? ??????????????

I would suggest powershell instead of perl. I can write powershell stuff

Quoted 7 lines

Fine with me, if someone else writes and maintains it... I can do a bit of .bat scripts, but no powershell.

Perl has the advantage of being available on all platforms (or at least "you can install it", I know it's not there out of the box everywhere) so maybe we can do a common test driver implementation that runs on windows and unix, so less maintenance...

That argument can be said about Python as well. And there's a lot of different testing resources for Python, a lot of them are unittest oriented (so not so directly interesting for us) but there are others which also "drives" external test cases. Beaker [1] is the one I've worked most with, but that is overkill in this scenario. But there are most likely lots of stuff we can extract and reuse too. And there are several others which I don't recall right now.

[1] <https://beaker-project.org/>
Beaker is the framework Red Hat uses for testing everything which ends up being released for RHEL.

We might also consider if there are possibilities for us to integrate such tests with Travis or similar stuff for platforms where that is possible. Often these solutions have Python or Ruby modules available too.

Signature · 3 lines
kind regards,

David Sommerseth
#4 lore raw

Hi,

Quoted 5 lines · David Sommerseth
Quoted 4 lines

Perl has the advantage of being available on all platforms (or at least "you can install it", I know it's not there out of the box everywhere) so maybe we can do a common test driver implementation that runs on windows and unix, so less maintenance...

Quoted 7 lines

That argument can be said about Python as well. And there's a lot of different testing resources for Python, a lot of them are unittest oriented (so not so directly interesting for us) but there are others which also "drives" external test cases. Beaker [1] is the one I've worked most with, but that is overkill in this scenario. But there are most likely lots of stuff we can extract and reuse too. And there are several others which I don't recall right now.

The point is not so much "running arbitrary tests" but "controlling OpenVPN in a scripted way" - what t_client does as a shell script today.

Quoted 3 lines

We might also consider if there are possibilities for us to integrate such tests with Travis or similar stuff for platforms where that is possible. Often these solutions have Python or Ruby modules available too.

While totally interesting, how is this going to help with *Windows* testing (which is what this thread is about)?

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#5 lore raw
Quoted 6 lines · Gert Doering
Quoted 3 lines
Quoted 3 lines

We might also consider if there are possibilities for us to integrate such tests with Travis or similar stuff for platforms where that is possible. Often these solutions have Python or Ruby modules available too.

While totally interesting, how is this going to help with *Windows* testing (which is what this thread is about)?

Having a standardised testing framework makes it possible to run a similar set of tests (comparable to what t_client.sh does today) in an automated way across multiple platforms, and can report these results to a shared hub. This way we can run automated tests and catch regressions which is not caught by our current buildbots ... such as the Windows platform.

These test cases can then be extended too, to test even more of the feature sets. With a good test framework you can for example define that you have 1 server and 10 clients doing various work in parallel. Other scenarios can be performance testing, if performance drops below a predefined limit, we will get alerts ... and so on ... and I did mention cross platform testing?

But! Building such a framework takes a lot of time, which is why it is good to build on what others have already done. Of those things I've seen, much of them have been written in Python or Ruby to some degree - but also a lot of things in bash too for Linux based testing.

Signature · 3 lines
kind regards,

David Sommerseth
#6 lore raw
Quoted 9 lines · David Sommerseth
Quoted 3 lines · Gert Doering
Quoted 3 lines
Quoted 3 lines

We might also consider if there are possibilities for us to integrate such tests with Travis or similar stuff for platforms where that is possible. Often these solutions have Python or Ruby modules

available too.

Quoted 3 lines

While totally interesting, how is this going to help with *Windows* testing (which is what this thread is about)?

Quoted 6 lines

Having a standardised testing framework makes it possible to run a similar set of tests (comparable to what t_client.sh does today) in an automated way across multiple platforms, and can report these results to a shared hub. This way we can run automated tests and catch regressions which is not caught by our current buildbots ... such as the Windows platform.

Python may be better than perl and a cross-platform choice like that may reduce duplication, but lets not forget the primary objective here, viz.,
system level testing to catch bugs during development. For windows that
means we should run tests through the management interface (as that's what the GUI uses), test use of keystrokes for signals, interactive service
etc., unlike unix for which all current tests are run through command line
control running with sudo, I suppose. Some bugs show up only when the management is active (or the other way) and is important to catch those as the GUI uses the management.

The way I test patches for windows is by manually running a number of clients with hand-edited configs against a few servers - - one tcp, one udp, one with user-auth, challenge-response enabled etc. This is indeed painful, error-prone and never comprehensive enough. Obviously, automated tests would be of great help, but I do not think a port of the current t_client scripts to windows is that useful.

At least in the short-term, a windows-specific perl or python or powershell or whatever script using the management interface looks like the way to go. A single cross-platform scripting framework could be a longer-term goal.

Selva

#7 lore raw
In reply to Илья Шипицин

I've written a fair amount of Powershell lately, and it's definitely the best out-of-the-box option there is for Windows.

Il ven giu 24 17:44:18 2016 GMT+0300, Илья Шипицин scrive:

Quoted 58 lines

I would suggest powershell instead of perl. I can write powershell stuff 24 июня 2016 г. 19:07 пользователь "Gert Doering" <[email protected]...> написал:

Quoted 53 lines

Hi,

a new patch set from Heiko is coming up, which is going to change the "IFCONFIG_BEFORE_TUN_OPEN" to "what everyone else does" (because what we currently have is older than anyone remembers, and makes life much more complicated than needed).

Now, we are not currently properly testing Windows - on the unix systems, I'd build a t_client.rc test set with like 5 extra tests for "--route-method
adaptive/ipapi/exe", "IPv4 only", "IPv6 and IPv6", interactive service or not, etc. - but I'm not sure what the best way is to do this on windows.

Would "use mingw/msys bash" work for stuff like "put regular openvpn.exe into background with 'openvpn.exe & pid=$! ' and kill with "kill $opid"?

I have been toying with the idea of replacing t_client.sh with a perl script that uses the management interface to control openvpn (at least the "has our startup finished? have we exploded? shutdown orderly now!" bits...) - but that's also not trivially implemented as one would have to redo the whole "look at ifconfig/route output and parse in a system dependent way" - and test on a gazillion of platforms :-)

So... other ideas? Selva, Valdikss, how do you test windows builds?

Jens, since you have dived into t_client improvements - any nice ideas how to make this happen with "reasonable effort"?

gert
--
USENET is *not* the non-clickable part of WWW!

                                                           //

www.muc.de/~gert/
Gert Doering - Munich, Germany
[email protected]...
fax: +49-89-35655025
[email protected]...

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel