aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-06-17 16:32:08 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-06-17 16:32:08 +0200
commit00f92e552cb62233ad9dec788f4826b3e1dab4f7 (patch)
tree2d55e4b3ab15953ae0f9a8443ca95d067cb852a7
parentaae5a947a0c1c6dc6881cf9e5d81b7363055a04d (diff)
parent549428e11f1d9b4d61135a36fc9ab594c5512d6b (diff)
downloadotp-00f92e552cb62233ad9dec788f4826b3e1dab4f7.tar.gz
otp-00f92e552cb62233ad9dec788f4826b3e1dab4f7.tar.bz2
otp-00f92e552cb62233ad9dec788f4826b3e1dab4f7.zip
Merge branch 'egil/cuddle-tests'
* egil/cuddle-tests: kernel: Remove ?line macros in inet_SUITE:t_gethostbyaddr/1 erts: Tweak statistics_SUITE:scheduler_wall_time/1
-rw-r--r--erts/emulator/test/statistics_SUITE.erl6
-rw-r--r--lib/kernel/test/inet_SUITE.erl55
2 files changed, 31 insertions, 30 deletions
diff --git a/erts/emulator/test/statistics_SUITE.erl b/erts/emulator/test/statistics_SUITE.erl
index c428be6c5a..16cee81158 100644
--- a/erts/emulator/test/statistics_SUITE.erl
+++ b/erts/emulator/test/statistics_SUITE.erl
@@ -308,7 +308,7 @@ scheduler_wall_time(Config) when is_list(Config) ->
try
Schedulers = erlang:system_info(schedulers_online),
%% Let testserver and everyone else finish their work
- timer:sleep(500),
+ timer:sleep(1500),
%% Empty load
EmptyLoad = get_load(),
{false, _} = {lists:any(fun(Load) -> Load > 50 end, EmptyLoad),EmptyLoad},
@@ -347,7 +347,7 @@ scheduler_wall_time(Config) when is_list(Config) ->
[exit(Pid, kill) || Pid <- [P1|HalfHogs++LastHogs]],
AfterLoad = get_load(),
- {false,_} = {lists:any(fun(Load) -> Load > 5 end, AfterLoad),AfterLoad},
+ {false,_} = {lists:any(fun(Load) -> Load > 25 end, AfterLoad),AfterLoad},
true = erlang:system_flag(scheduler_wall_time, false)
after
erlang:system_flag(scheduler_wall_time, false)
@@ -355,7 +355,7 @@ scheduler_wall_time(Config) when is_list(Config) ->
get_load() ->
Start = erlang:statistics(scheduler_wall_time),
- timer:sleep(500),
+ timer:sleep(1500),
End = erlang:statistics(scheduler_wall_time),
lists:reverse(lists:sort(load_percentage(lists:sort(Start),lists:sort(End)))).
diff --git a/lib/kernel/test/inet_SUITE.erl b/lib/kernel/test/inet_SUITE.erl
index c77de9316f..994c4b35f9 100644
--- a/lib/kernel/test/inet_SUITE.erl
+++ b/lib/kernel/test/inet_SUITE.erl
@@ -120,36 +120,37 @@ t_gethostbyaddr() ->
required(v4).
t_gethostbyaddr(doc) -> "Test the inet:gethostbyaddr/1 function.";
t_gethostbyaddr(Config) when is_list(Config) ->
- ?line {Name,FullName,IPStr,{A,B,C,D}=IP,Aliases,_,_} =
- ct:get_config(test_host_ipv4_only),
- ?line Rname = integer_to_list(D) ++ "." ++
- integer_to_list(C) ++ "." ++
- integer_to_list(B) ++ "." ++
- integer_to_list(A) ++ ".in-addr.arpa",
- ?line {ok,HEnt} = inet:gethostbyaddr(IPStr),
- ?line {ok,HEnt} = inet:gethostbyaddr(IP),
- ?line {error,Error} = inet:gethostbyaddr(Name),
- ?line ok = io:format("Failure reason: ~p: ~s",
- [error,inet:format_error(Error)]),
- ?line HEnt_ = HEnt#hostent{h_addrtype = inet,
- h_length = 4,
- h_addr_list = [IP]},
- ?line HEnt_ = HEnt,
+ {Name,FullName,IPStr,{A,B,C,D}=IP,Aliases,_,_} = ct:get_config(test_host_ipv4_only),
+ Rname = integer_to_list(D) ++ "." ++
+ integer_to_list(C) ++ "." ++
+ integer_to_list(B) ++ "." ++
+ integer_to_list(A) ++ ".in-addr.arpa",
+ {ok,HEnt} = inet:gethostbyaddr(IPStr),
+ {ok,HEnt} = inet:gethostbyaddr(IP),
+ {error,Error} = inet:gethostbyaddr(Name),
+ ok = io:format("Failure reason: ~p: ~s", [error,inet:format_error(Error)]),
+ HEnt_ = HEnt#hostent{h_addrtype = inet,
+ h_length = 4,
+ h_addr_list = [IP]},
+ HEnt_ = HEnt,
case {os:type(),os:version()} of
- {{unix,freebsd},{5,0,0}} ->
- %% The alias list seems to be buggy in FreeBSD 5.0.0.
- ?line check_elems([{HEnt#hostent.h_name,[Name,FullName]}]),
- io:format("Buggy alias list: ~p", [HEnt#hostent.h_aliases]),
- ok;
- _ ->
- ?line check_elems([{HEnt#hostent.h_name,[Name,FullName]},
- {HEnt#hostent.h_aliases,[[],Aliases,[Rname]]}])
+ {{unix,freebsd},{5,0,0}} ->
+ %% The alias list seems to be buggy in FreeBSD 5.0.0.
+ check_elems([{HEnt#hostent.h_name,[Name,FullName]}]),
+ io:format("Buggy alias list: ~p", [HEnt#hostent.h_aliases]),
+ ok;
+ _ ->
+ io:format("alias list: ~p", [HEnt#hostent.h_aliases]),
+ io:format("check alias list: ~p", [[Aliases,[Rname]]]),
+ io:format("name: ~p", [HEnt#hostent.h_name]),
+ io:format("check name: ~p", [[Name,FullName]]),
+ check_elems([{HEnt#hostent.h_name,[Name,FullName]},
+ {HEnt#hostent.h_aliases,[[],Aliases,[Rname]]}])
end,
- ?line {_DName, _DFullName, DIPStr, DIP, _, _, _} =
- ct:get_config(test_dummy_host),
- ?line {error,nxdomain} = inet:gethostbyaddr(DIPStr),
- ?line {error,nxdomain} = inet:gethostbyaddr(DIP),
+ {_DName, _DFullName, DIPStr, DIP, _, _, _} = ct:get_config(test_dummy_host),
+ {error,nxdomain} = inet:gethostbyaddr(DIPStr),
+ {error,nxdomain} = inet:gethostbyaddr(DIP),
ok.
t_gethostbyaddr_v6() -> required(v6).