aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2011-04-27 18:27:46 +0200
committerSverker Eriksson <[email protected]>2011-04-27 18:27:46 +0200
commit35738703648e2508ef26fb3cc20cff0e0ffee596 (patch)
tree2d8fe76be887fc3545459d585400f32e95a2b4fb /erts/emulator/test
parent317452247f37133f27d9e4e8040269dbccedb268 (diff)
parent2907429cfe450c08ff7d95ad648e28a0f5a2b150 (diff)
downloadotp-35738703648e2508ef26fb3cc20cff0e0ffee596.tar.gz
otp-35738703648e2508ef26fb3cc20cff0e0ffee596.tar.bz2
otp-35738703648e2508ef26fb3cc20cff0e0ffee596.zip
Merge branch 'sverker/code_SUITE-false_dependency-bug' into dev
* sverker/code_SUITE-false_dependency-bug: Fix bug in test case code_SUITE:false_dependency
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/code_SUITE.erl15
1 files changed, 11 insertions, 4 deletions
diff --git a/erts/emulator/test/code_SUITE.erl b/erts/emulator/test/code_SUITE.erl
index 703a00a598..c1a048be75 100644
--- a/erts/emulator/test/code_SUITE.erl
+++ b/erts/emulator/test/code_SUITE.erl
@@ -483,7 +483,7 @@ do_false_dependency(Init, Code) ->
%% Spawn process. Make sure it has the appropriate init function
%% and returned. CP should not contain garbage after the return.
Parent = self(),
- ?line Pid = spawn_link(fun() -> false_dependency_loop(Parent, Init) end),
+ ?line Pid = spawn_link(fun() -> false_dependency_loop(Parent, Init, true) end),
?line receive initialized -> ok end,
%% Reload the module. Make sure the process is still alive.
@@ -501,11 +501,18 @@ do_false_dependency(Init, Code) ->
?line true = erlang:purge_module(cpbugx),
ok.
-false_dependency_loop(Parent, Init) ->
+false_dependency_loop(Parent, Init, SendInitAck) ->
Init(),
- Parent ! initialized,
+ case SendInitAck of
+ true -> Parent ! initialized;
+ false -> void
+ %% Just send one init-ack. I guess the point of this test
+ %% wasn't to fill parents msg-queue (?). Seen to cause
+ %% out-of-mem (on halfword-vm for some reason) by
+ %% 91 million msg in queue. /sverker
+ end,
receive
- _ -> false_dependency_loop(Parent, Init)
+ _ -> false_dependency_loop(Parent, Init, false)
end.
coverage(Config) when is_list(Config) ->