aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/init_SUITE.erl
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-08-29 18:38:48 +0200
committerRickard Green <[email protected]>2016-08-29 18:38:48 +0200
commit5006f1e0c45d4e9b888b2c0ca48130049d33074c (patch)
tree0dba1e3ed85e04d22755461bcce40704e0d68b49 /lib/kernel/test/init_SUITE.erl
parent928d74ffa09bd56652d9390b02fa51ef51d71d51 (diff)
parent0e04e76df2ea71e2e2e116afef04c497d84b1024 (diff)
downloadotp-5006f1e0c45d4e9b888b2c0ca48130049d33074c.tar.gz
otp-5006f1e0c45d4e9b888b2c0ca48130049d33074c.tar.bz2
otp-5006f1e0c45d4e9b888b2c0ca48130049d33074c.zip
Merge branch 'rickard/ds-purge-module/OTP-13808' into maint
* rickard/ds-purge-module/OTP-13808: Perform check_process_code while process is executing dirty Conflicts: erts/doc/src/erl_nif.xml
Diffstat (limited to 'lib/kernel/test/init_SUITE.erl')
-rw-r--r--lib/kernel/test/init_SUITE.erl21
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/kernel/test/init_SUITE.erl b/lib/kernel/test/init_SUITE.erl
index b96de94427..2b59eb2bfe 100644
--- a/lib/kernel/test/init_SUITE.erl
+++ b/lib/kernel/test/init_SUITE.erl
@@ -365,7 +365,7 @@ restart(Config) when is_list(Config) ->
%% Ok, the node is up, now the real test test begins.
erlang:monitor_node(Node, true),
SysProcs0 = rpc:call(Node, ?MODULE, find_system_processes, []),
- [InitPid, PurgerPid, LitCollectorPid] = SysProcs0,
+ [InitPid, PurgerPid, LitCollectorPid, DirtyCodePid] = SysProcs0,
InitPid = rpc:call(Node, erlang, whereis, [init]),
PurgerPid = rpc:call(Node, erlang, whereis, [erts_code_purger]),
Procs = rpc:call(Node, erlang, processes, []),
@@ -381,7 +381,7 @@ restart(Config) when is_list(Config) ->
ok = wait_restart(30, Node),
SysProcs1 = rpc:call(Node, ?MODULE, find_system_processes, []),
- [InitPid1, PurgerPid1, LitCollectorPid1] = SysProcs1,
+ [InitPid1, PurgerPid1, LitCollectorPid1, DirtyCodePid1] = SysProcs1,
%% Still the same init process!
InitPid1 = rpc:call(Node, erlang, whereis, [init]),
@@ -401,6 +401,14 @@ restart(Config) when is_list(Config) ->
LitCollectorP = pid_to_list(LitCollectorPid1)
end,
+ %% and same dirty process code checker process!
+ case DirtyCodePid of
+ undefined -> undefined = DirtyCodePid1;
+ _ ->
+ DirtyCodeP = pid_to_list(DirtyCodePid),
+ DirtyCodeP = pid_to_list(DirtyCodePid1)
+ end,
+
NewProcs0 = rpc:call(Node, erlang, processes, []),
NewProcs = NewProcs0 -- SysProcs1,
case check_processes(NewProcs, MaxPid) of
@@ -424,7 +432,8 @@ restart(Config) when is_list(Config) ->
-record(sys_procs, {init,
code_purger,
- literal_collector}).
+ literal_collector,
+ dirty_proc_checker}).
find_system_processes() ->
find_system_procs(processes(), #sys_procs{}).
@@ -432,7 +441,8 @@ find_system_processes() ->
find_system_procs([], SysProcs) ->
[SysProcs#sys_procs.init,
SysProcs#sys_procs.code_purger,
- SysProcs#sys_procs.literal_collector];
+ SysProcs#sys_procs.literal_collector,
+ SysProcs#sys_procs.dirty_proc_checker];
find_system_procs([P|Ps], SysProcs) ->
case process_info(P, initial_call) of
{initial_call,{otp_ring0,start,2}} ->
@@ -444,6 +454,9 @@ find_system_procs([P|Ps], SysProcs) ->
{initial_call,{erts_literal_area_collector,start,0}} ->
undefined = SysProcs#sys_procs.literal_collector,
find_system_procs(Ps, SysProcs#sys_procs{literal_collector = P});
+ {initial_call,{erts_dirty_process_code_checker,start,0}} ->
+ undefined = SysProcs#sys_procs.dirty_proc_checker,
+ find_system_procs(Ps, SysProcs#sys_procs{dirty_proc_checker = P});
_ ->
find_system_procs(Ps, SysProcs)
end.