mbedtls/tests
Hanno Becker adfa64f0c4 Abort idle-loop in ssl_server2 if sockets gets invalid
Previously, the idling loop in ssl_server2 didn't check whether
the underlying call to mbedtls_net_poll signalled that the socket
became invalid. This had the consequence that during idling, the
server couldn't be terminated through a SIGTERM, as the corresponding
handler would only close the sockets and expect the remainder of
the program to shutdown gracefully as a consequence of this.
This was subsequently attempted to be fixed through a change
in ssl-opt.sh by terminating the server through a KILL signal,
which however lead to other problems when the latter was run
under valgrind.

This commit changes the idling loop in ssl_server2 and ssl_client2
to obey the return code of mbedtls_net_poll and gracefully shutdown
if an error occurs, e.g. because the socket was closed.

As a consequence, the server termination via a KILL signal in
ssl-opt.sh is no longer necessary, with the previous `kill; wait`
pattern being sufficient. The commit reverts the corresponding
change.
2018-03-15 11:43:41 +00:00
..
data_files Improve Readme for long test certificate chains 2017-07-26 13:49:38 +01:00
git-scripts Move the git scripts to correct path 2017-07-27 21:44:34 +01:00
scripts Pre push hook script 2017-07-27 21:44:34 +01:00
suites Update version number to 2.6.0 2017-08-10 11:51:16 +01:00
.gitignore Move some ignore patterns to subdirectories 2015-01-28 15:33:23 +00:00
CMakeLists.txt Remove need for elevated command line in Windows 2017-02-15 09:08:26 +00:00
compat.sh Allow SHA-1 in test scripts 2017-06-06 18:44:14 +02:00
Descriptions.txt Add selftest program to the list of tests 2014-04-04 16:33:01 +02:00
Makefile Clean up of formatting, and potential integer overflow fix 2016-10-13 13:51:13 +01:00
ssl-opt.sh Abort idle-loop in ssl_server2 if sockets gets invalid 2018-03-15 11:43:41 +00:00