aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2019-06-19 14:10:30 +0200
committerIngela Anderton Andin <[email protected]>2019-07-01 18:02:39 +0200
commit85b03b8b996549631bb2aa12807243c34df28e7f (patch)
treee94de53635bd8ee2d4c643de3cf5f77e7f707f41
parentb7afb154975f123a785d8223c686e19eb947c3af (diff)
downloadotp-85b03b8b996549631bb2aa12807243c34df28e7f.tar.gz
otp-85b03b8b996549631bb2aa12807243c34df28e7f.tar.bz2
otp-85b03b8b996549631bb2aa12807243c34df28e7f.zip
ssl: Kill OpenSSL processes that survived test run
Should be zero such processes in the normal case
-rw-r--r--lib/ssl/test/openssl_server_cipher_suite_SUITE.erl3
-rw-r--r--lib/ssl/test/ssl_ECC_openssl_SUITE.erl3
-rw-r--r--lib/ssl/test/ssl_test_lib.erl8
-rw-r--r--lib/ssl/test/ssl_to_openssl_SUITE.erl4
4 files changed, 14 insertions, 4 deletions
diff --git a/lib/ssl/test/openssl_server_cipher_suite_SUITE.erl b/lib/ssl/test/openssl_server_cipher_suite_SUITE.erl
index 6ce34ce7fa..0d68d84d61 100644
--- a/lib/ssl/test/openssl_server_cipher_suite_SUITE.erl
+++ b/lib/ssl/test/openssl_server_cipher_suite_SUITE.erl
@@ -177,7 +177,8 @@ init_per_suite(Config) ->
end_per_suite(_Config) ->
ssl:stop(),
- application:stop(crypto).
+ application:stop(crypto),
+ ssl_test_lib:kill_openssl().
%%--------------------------------------------------------------------
init_per_group(GroupName, Config) ->
diff --git a/lib/ssl/test/ssl_ECC_openssl_SUITE.erl b/lib/ssl/test/ssl_ECC_openssl_SUITE.erl
index 68d4e910fd..787c08a517 100644
--- a/lib/ssl/test/ssl_ECC_openssl_SUITE.erl
+++ b/lib/ssl/test/ssl_ECC_openssl_SUITE.erl
@@ -67,7 +67,8 @@ init_per_suite(Config0) ->
end_per_suite(_Config) ->
application:stop(ssl),
- application:stop(crypto).
+ application:stop(crypto),
+ ssl_test_lib:kill_openssl().
%%--------------------------------------------------------------------
init_per_group(GroupName, Config) ->
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index 32fd917937..6c8ce7a0bc 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -2474,3 +2474,11 @@ digest() ->
_ ->
{digest, sha1}
end.
+
+kill_openssl() ->
+ case os:type() of
+ {unix, _} ->
+ os:cmd("pkill openssl");
+ {win32, _} ->
+ os:cmd("cmd.exe /C \"taskkill /IM openssl.exe /F\"")
+ end.
diff --git a/lib/ssl/test/ssl_to_openssl_SUITE.erl b/lib/ssl/test/ssl_to_openssl_SUITE.erl
index 07abddbcf7..31d9af5298 100644
--- a/lib/ssl/test/ssl_to_openssl_SUITE.erl
+++ b/lib/ssl/test/ssl_to_openssl_SUITE.erl
@@ -179,8 +179,8 @@ init_per_suite(Config0) ->
end_per_suite(_Config) ->
ssl:stop(),
- application:stop(crypto).
-
+ application:stop(crypto),
+ ssl_test_lib:kill_openssl().
init_per_group(GroupName, Config) ->
case ssl_test_lib:is_tls_version(GroupName) of