diff options
author | Sverker Eriksson <[email protected]> | 2011-04-06 16:59:31 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2011-04-06 16:59:31 +0200 |
commit | 2907429cfe450c08ff7d95ad648e28a0f5a2b150 (patch) | |
tree | 9d0f79c68ec8e15efb2eaa573c3b3a038d4fc5d4 /erts/emulator/test | |
parent | d8dcd70f386de09109ca1f6f817a381cd1387769 (diff) | |
download | otp-2907429cfe450c08ff7d95ad648e28a0f5a2b150.tar.gz otp-2907429cfe450c08ff7d95ad648e28a0f5a2b150.tar.bz2 otp-2907429cfe450c08ff7d95ad648e28a0f5a2b150.zip |
Fix bug in test case code_SUITE:false_dependency
Causing out-of-memory on halfword emulator.
Diffstat (limited to 'erts/emulator/test')
-rw-r--r-- | erts/emulator/test/code_SUITE.erl | 15 |
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) -> |