aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/z_SUITE.erl
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-10-23 10:45:03 +0200
committerRickard Green <[email protected]>2014-10-23 10:45:03 +0200
commitfd64aab6bdb78688de780925d1d23fd565c58e33 (patch)
tree7b0f05ac2452cf57205e44762dc65292fa804da5 /erts/emulator/test/z_SUITE.erl
parent527ae7b5030ba7339eba5ba4089888c8f90e2879 (diff)
parent3b972c26208c99282215766c3716ae23a1ac6214 (diff)
downloadotp-fd64aab6bdb78688de780925d1d23fd565c58e33.tar.gz
otp-fd64aab6bdb78688de780925d1d23fd565c58e33.tar.bz2
otp-fd64aab6bdb78688de780925d1d23fd565c58e33.zip
Merge branch 'rickard/master/eager-check-io/OTP-12117'
* rickard/master/eager-check-io/OTP-12117: No eager check I/O on OSE Introduce support for eager check I/O scheduling
Diffstat (limited to 'erts/emulator/test/z_SUITE.erl')
-rw-r--r--erts/emulator/test/z_SUITE.erl28
1 files changed, 18 insertions, 10 deletions
diff --git a/erts/emulator/test/z_SUITE.erl b/erts/emulator/test/z_SUITE.erl
index 4b3075a164..b0c6224dfe 100644
--- a/erts/emulator/test/z_SUITE.erl
+++ b/erts/emulator/test/z_SUITE.erl
@@ -38,7 +38,7 @@
-export([schedulers_alive/1, node_container_refc_check/1,
long_timers/1, pollset_size/1,
- check_io_debug/1]).
+ check_io_debug/1, get_check_io_info/0]).
-define(DEFAULT_TIMEOUT, ?t:minutes(5)).
@@ -288,11 +288,14 @@ check_io_debug(Config) when is_list(Config) ->
end.
check_io_debug_test() ->
+ ?line erlang:display(get_check_io_info()),
?line erts_debug:set_internal_state(available_internal_state, true),
- ?line erlang:display(erlang:system_info(check_io)),
- ?line NoOfErrorFds = erts_debug:get_internal_state(check_io_debug),
+ ?line {NoErrorFds, NoUsedFds, NoDrvSelStructs, NoDrvEvStructs}
+ = erts_debug:get_internal_state(check_io_debug),
?line erts_debug:set_internal_state(available_internal_state, false),
- ?line 0 = NoOfErrorFds,
+ ?line 0 = NoErrorFds,
+ ?line NoUsedFds = NoDrvSelStructs,
+ ?line 0 = NoDrvEvStructs,
?line ok.
@@ -305,7 +308,7 @@ display_check_io(ChkIo) ->
catch erlang:display('--- CHECK IO INFO ---'),
catch erlang:display(ChkIo),
catch erts_debug:set_internal_state(available_internal_state, true),
- NoOfErrorFds = (catch erts_debug:get_internal_state(check_io_debug)),
+ NoOfErrorFds = (catch element(1, erts_debug:get_internal_state(check_io_debug))),
catch erlang:display({'NoOfErrorFds', NoOfErrorFds}),
catch erts_debug:set_internal_state(available_internal_state, false),
catch erlang:display('--- CHECK IO INFO ---'),
@@ -313,14 +316,19 @@ display_check_io(ChkIo) ->
get_check_io_info() ->
ChkIo = erlang:system_info(check_io),
- case lists:keysearch(pending_updates, 1, ChkIo) of
- {value, {pending_updates, 0}} ->
+ PendUpdNo = case lists:keysearch(pending_updates, 1, ChkIo) of
+ {value, {pending_updates, PendNo}} ->
+ PendNo;
+ false ->
+ 0
+ end,
+ {value, {active_fds, ActFds}} = lists:keysearch(active_fds, 1, ChkIo),
+ case {PendUpdNo, ActFds} of
+ {0, 0} ->
display_check_io(ChkIo),
ChkIo;
- false ->
- ChkIo;
_ ->
- receive after 10 -> ok end,
+ receive after 100 -> ok end,
get_check_io_info()
end.