aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-03-20 11:09:54 +0100
committerSverker Eriksson <[email protected]>2012-03-20 11:10:55 +0100
commit46dd06a64dc5e14aec5921b293135713baa64059 (patch)
tree81da947af74d87c15a2c002e52ffb8c727200501 /lib/kernel/test
parent28b02062268eece4087b2e441b374ee00e721665 (diff)
parent2fbe8cc9b3f6f443ccccfaa485b05966aacc65d9 (diff)
downloadotp-46dd06a64dc5e14aec5921b293135713baa64059.tar.gz
otp-46dd06a64dc5e14aec5921b293135713baa64059.tar.bz2
otp-46dd06a64dc5e14aec5921b293135713baa64059.zip
Merge branch 'sverk/zlib_port_leak' into maint
* sverk/zlib_port_leak: Fix port leaks in zlib OTP-9981
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/zlib_SUITE.erl19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/kernel/test/zlib_SUITE.erl b/lib/kernel/test/zlib_SUITE.erl
index 74bafe8935..e0fd0f5d19 100644
--- a/lib/kernel/test/zlib_SUITE.erl
+++ b/lib/kernel/test/zlib_SUITE.erl
@@ -73,6 +73,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[{group, api}, {group, examples}, {group, func}, smp,
+ otp_9981,
otp_7359].
groups() ->
@@ -964,6 +965,24 @@ otp_7359_def_inf(Data,{DefSize,InfSize}) ->
?line ok = zlib:close(ZInf),
ok.
+otp_9981(Config) when is_list(Config) ->
+ Ports = lists:sort(erlang:ports()),
+ Invalid = <<"My invalid data">>,
+ catch zlib:compress(invalid),
+ Ports = lists:sort(erlang:ports()),
+ catch zlib:uncompress(Invalid),
+ Ports = lists:sort(erlang:ports()),
+ catch zlib:zip(invalid),
+ Ports = lists:sort(erlang:ports()),
+ catch zlib:unzip(Invalid),
+ Ports = lists:sort(erlang:ports()),
+ catch zlib:gzip(invalid),
+ Ports = lists:sort(erlang:ports()),
+ catch zlib:gunzip(Invalid),
+ Ports = lists:sort(erlang:ports()),
+ ok.
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Helps with testing directly %%%%%%%%%%%%%