tcp_conn: add initialization of sigaction variables

Without the initialization these variables sometimes contain garbage
data in the .sa_flags field, that makes the signal handling be reset
after recieving the specified signal once. This results in the parent
process being killed by a child process.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
TestIcmpPing: add option to specify source interface

This commit adds a test option 'iface' to the IcmpPing test module, that
translates to the -I argument of the ping utility. This option was
already present for the Icmp6Ping module, so I added it here as well.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
NetTestResultSerializer: add error messages to recipe results

This commit extends result reporting of the run_recipe method in
NetTestController to report not only the result of the command but also
add an error message if the recipe failed. To reflect this
NetTestResultSerializer now uses that information to create an
additional xml node and the error message will appear in the result
summary.

The reason is that when the recipe failed during configuration there
would be no information in the result summary indicating what happend
only a that the recipe failed.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
NetTestSlave: update of slave cleanup

I didn't notice this before but we already had a method that did slave
cleanup. This commit makes a slight modification to the function and
makes use of it instead of calling the individual cleanup methods
themselves.

The cleanup process is now logged in DEBUG level, and I added detection
of server startup so that no cleanup happens when we didn't do anything
yet.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
NetTestController: add detection of slave disconnect

This commit adds detection of slaves being disconnected while the
controller is waiting for a response.

When this happens an Exception is raised resulting in the recipe failing
and remaining slaves being deconfigured.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
NetTestSlave: ctl disconnect cleanup fix

Slaves were too good at cleaning up- the config_only run didn't work
because the slave would cleanup everything after the controller
disconnected.

This commit fixes that by slave cleaning up only when the controller
disconnected unexpectedly. This relies on the controller calling the bye
method before disconnecting.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>