aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/test/code_SUITE.erl7
-rw-r--r--lib/kernel/test/sendfile_SUITE.erl20
-rw-r--r--lib/kernel/test/zlib_SUITE.erl3
3 files changed, 26 insertions, 4 deletions
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl
index 17983e972d..42b81d16b3 100644
--- a/lib/kernel/test/code_SUITE.erl
+++ b/lib/kernel/test/code_SUITE.erl
@@ -653,7 +653,7 @@ clash(Config) when is_list(Config) ->
DDir = ?config(data_dir,Config)++"clash/",
P = code:get_path(),
[TestServerPath|_] = [Path || Path <- code:get_path(),
- re:run(Path,"test_server/?$",[]) /= nomatch],
+ re:run(Path,"test_server/?$",[unicode]) /= nomatch],
%% test non-clashing entries
@@ -1527,7 +1527,10 @@ create_big_script(Config,Local) ->
Leftover <- UnloadFix,
lists:keymember(Leftover,1,InitialApplications) ],
%% Now we should have only "real" applications...
- [application:load(list_to_atom(Y)) || {match,[Y]} <- [ re:run(X,code:lib_dir()++"/"++"([^/-]*).*/ebin",[{capture,[1],list}]) || X <- code:get_path()],filter_app(Y,Local)],
+ [application:load(list_to_atom(Y))
+ || {match,[Y]} <- [re:run(X,code:lib_dir()++"/"++"([^/-]*).*/ebin",
+ [{capture,[1],list},unicode]) ||
+ X <- code:get_path()],filter_app(Y,Local)],
Apps = [ {N,V} || {N,_,V} <- application:loaded_applications()],
{ok,Fd} = file:open(Name ++ ".rel", [write]),
io:format(Fd,
diff --git a/lib/kernel/test/sendfile_SUITE.erl b/lib/kernel/test/sendfile_SUITE.erl
index 4cf4c6489d..24884bada5 100644
--- a/lib/kernel/test/sendfile_SUITE.erl
+++ b/lib/kernel/test/sendfile_SUITE.erl
@@ -33,6 +33,7 @@ all() ->
,t_sendfile_offset
,t_sendfile_sendafter
,t_sendfile_recvafter
+ ,t_sendfile_recvafter_remoteclose
,t_sendfile_sendduring
,t_sendfile_recvduring
,t_sendfile_closeduring
@@ -228,6 +229,25 @@ t_sendfile_recvafter(Config) ->
ok = sendfile_send(Send).
+%% This tests specifically for a bug fixed in 17.0
+t_sendfile_recvafter_remoteclose(Config) ->
+ Filename = proplists:get_value(small_file, Config),
+
+ Send = fun(Sock, SFServer) ->
+ {Size, _Data} = sendfile_file_info(Filename),
+ {ok, Size} = file:sendfile(Filename, Sock),
+
+ %% Make sure the remote end has been closed
+ SFServer ! stop,
+ timer:sleep(100),
+
+ %% In the bug this returned {error,ebadf}
+ {error,closed} = gen_tcp:recv(Sock, 1),
+ -1
+ end,
+
+ ok = sendfile_send({127,0,0,1},Send,0).
+
t_sendfile_sendduring(Config) ->
Filename = proplists:get_value(big_file, Config),
diff --git a/lib/kernel/test/zlib_SUITE.erl b/lib/kernel/test/zlib_SUITE.erl
index e91f6f18d4..3be6f39d95 100644
--- a/lib/kernel/test/zlib_SUITE.erl
+++ b/lib/kernel/test/zlib_SUITE.erl
@@ -178,7 +178,7 @@ api_deflateInit(Config) when is_list(Config) ->
?m(ok,zlib:close(Z))
end, lists:seq(1,8)),
- Strategies = [filtered,huffman_only,default],
+ Strategies = [filtered,huffman_only,rle,default],
lists:foreach(fun(Strategy) ->
?line Z = zlib:open(),
?m(ok, zlib:deflateInit(Z,best_speed,deflated,-15,8,Strategy)),
@@ -220,7 +220,6 @@ api_deflateParams(Config) when is_list(Config) ->
?m(_, zlib:deflate(Z1, <<1,1,1,1,1,1,1,1,1>>, none)),
?m(ok, zlib:deflateParams(Z1, best_compression, huffman_only)),
?m(_, zlib:deflate(Z1, <<1,1,1,1,1,1,1,1,1>>, sync)),
- ?m({'EXIT',_}, zlib:deflateParams(Z1,best_speed, filtered)),
?m(ok, zlib:close(Z1)).
api_deflate(doc) -> "Test deflate";