aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-11-19 10:16:13 +0100
committerHans Nilsson <[email protected]>2018-12-03 10:17:36 +0100
commit71deec5cbec7bd7dcf67f30f60f2acd49ae0d0bb (patch)
treef54033bce8314d97aa4cd43df016a912febaee30 /lib
parent34d377f0a557478de13b56934389144c338e367b (diff)
downloadotp-71deec5cbec7bd7dcf67f30f60f2acd49ae0d0bb.tar.gz
otp-71deec5cbec7bd7dcf67f30f60f2acd49ae0d0bb.tar.bz2
otp-71deec5cbec7bd7dcf67f30f60f2acd49ae0d0bb.zip
crypto: Add some crypto:engine_unload in engine test suite
Got valgrind errors for error tests otherwise
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto/test/engine_SUITE.erl15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/crypto/test/engine_SUITE.erl b/lib/crypto/test/engine_SUITE.erl
index 42d8edf4d2..8a45fc9076 100644
--- a/lib/crypto/test/engine_SUITE.erl
+++ b/lib/crypto/test/engine_SUITE.erl
@@ -587,11 +587,11 @@ ctrl_cmd_string(Config) when is_list(Config) ->
{ok, E} ->
case crypto:engine_ctrl_cmd_string(E, <<"TEST">>, <<"17">>) of
ok ->
+ ok = crypto:engine_unload(E),
ct:fail(fail_ctrl_cmd_should_fail);
{error,ctrl_cmd_failed} ->
- ok
- end,
- ok = crypto:engine_unload(E);
+ ok = crypto:engine_unload(E)
+ end;
{error, bad_engine_id} ->
{skip, "Dynamic Engine not supported"}
end
@@ -617,11 +617,12 @@ ctrl_cmd_string_optional(Config) when is_list(Config) ->
{ok, E} ->
case crypto:engine_ctrl_cmd_string(E, <<"TEST">>, <<"17">>, true) of
ok ->
- ok;
- _ ->
+ ok = crypto:engine_unload(E);
+ Err ->
+ ct:log("Error: ~p",[Err]),
+ ok = crypto:engine_unload(E),
ct:fail(fail_ctrl_cmd_string)
- end,
- ok = crypto:engine_unload(E);
+ end;
{error, bad_engine_id} ->
{skip, "Dynamic Engine not supported"}
end