<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/kernel/test/code_SUITE_data, branch OTP-19.1.6</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>update copyright-year</title>
<updated>2016-03-15T14:19:56+00:00</updated>
<author>
<name>Henrik Nord</name>
<email>henrik@erlang.org</email>
</author>
<published>2016-03-15T14:19:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=6664eed554974336909d3ffe03f20349cc4c38fd'/>
<id>6664eed554974336909d3ffe03f20349cc4c38fd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>code: Correct the types for error returns</title>
<updated>2016-01-28T11:16:01+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2016-01-25T14:56:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=28f7a47ab4d533cc72090484eb3a7e5713fa58bc'/>
<id>28f7a47ab4d533cc72090484eb3a7e5713fa58bc</id>
<content type='text'>
The specifications for functions that load code in the 'code'
module (e.g. code:load_file/1) have some problems:

* The specs claim that the functions can return {error,on_load}, but
  they never do. However, they can return {error,on_load_failure} if
  the -on_load function in a module fails.

* The specs claim that the functions can return {error,native_code},
  but they never do.

While we are it, also extend the on_load_errors/1 test case to test
that the load functions return {error,on_load_failure} when an
-on_load function fails.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The specifications for functions that load code in the 'code'
module (e.g. code:load_file/1) have some problems:

* The specs claim that the functions can return {error,on_load}, but
  they never do. However, they can return {error,on_load_failure} if
  the -on_load function in a module fails.

* The specs claim that the functions can return {error,native_code},
  but they never do.

While we are it, also extend the on_load_errors/1 test case to test
that the load functions return {error,on_load_failure} when an
-on_load function fails.
</pre>
</div>
</content>
</entry>
<entry>
<title>Change license text to APLv2</title>
<updated>2015-06-18T09:31:02+00:00</updated>
<author>
<name>Bruce Yinhe</name>
<email>bruce@erlang.org</email>
</author>
<published>2015-06-18T09:31:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=738c34d4bb8f1a3811acd00af8c6c12107f8315b'/>
<id>738c34d4bb8f1a3811acd00af8c6c12107f8315b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make pre-loaded modules permanently sticky</title>
<updated>2014-06-04T14:43:17+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2014-05-09T10:35:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=ed06dd12ea74018b902a2c4c7924313d23cedb75'/>
<id>ed06dd12ea74018b902a2c4c7924313d23cedb75</id>
<content type='text'>
Modules in the kernel, stdlib, and compiler applications are by
default "sticky", meaning that the code server will refuse to
re-load them.

The pre-loaded modules (those that are part of the run-time system
itself, such as 'erlang') are, however, not sticky. They used to be
sticky a long time ago when the pre-loaded modules were part of
the kernel application. Now they are part of the erts application.

Since re-loading a pre-loaded module can be catastrophic (especially
re-loading the 'erlang' module), the pre-loaded modules must be
sticky. Furthermore, it should not be allowed to unstick them.

The sticky_dir/1 test case in code_SUITE is never actually run and
is broken. Rewrite it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modules in the kernel, stdlib, and compiler applications are by
default "sticky", meaning that the code server will refuse to
re-load them.

The pre-loaded modules (those that are part of the run-time system
itself, such as 'erlang') are, however, not sticky. They used to be
sticky a long time ago when the pre-loaded modules were part of
the kernel application. Now they are part of the erts application.

Since re-loading a pre-loaded module can be catastrophic (especially
re-loading the 'erlang' module), the pre-loaded modules must be
sticky. Furthermore, it should not be allowed to unstick them.

The sticky_dir/1 test case in code_SUITE is never actually run and
is broken. Rewrite it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add kernel/test/code_SUITE:upgrade</title>
<updated>2012-06-12T09:26:04+00:00</updated>
<author>
<name>Sverker Eriksson</name>
<email>sverker@erlang.org</email>
</author>
<published>2012-06-11T14:20:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=0128b0064470997430cf5cead012309a1bd2d63d'/>
<id>0128b0064470997430cf5cead012309a1bd2d63d</id>
<content type='text'>
For now we only test beam as hipe doesn't pass the test
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For now we only test beam as hipe doesn't pass the test
</pre>
</div>
</content>
</entry>
<entry>
<title>Mend on_load_embedded testcase which did not handle windows links</title>
<updated>2010-12-01T14:11:07+00:00</updated>
<author>
<name>Patrik Nyblom</name>
<email>pan@erlang.org</email>
</author>
<published>2010-12-01T14:11:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=30ad8cfadba47123920128023cb06af6e0922746'/>
<id>30ad8cfadba47123920128023cb06af6e0922746</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix hang in on_load handlers in embedded mode</title>
<updated>2010-10-20T10:02:08+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2010-10-19T11:43:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=7f82eddfaa3b89f734b4d58f1de92db86e5880cf'/>
<id>7f82eddfaa3b89f734b4d58f1de92db86e5880cf</id>
<content type='text'>
In embedded mode, all on_load handlers will be called after
loading all modules but before starting any servers. Therefore,
if an on_load handler calls any function in the code module that
calls the code server (such as code:priv_dir/1), there will be a
deadlock because the code server has not yet been started.

Fix this problem by invoking the on_load handlers after
having started most servers in the kernel application.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In embedded mode, all on_load handlers will be called after
loading all modules but before starting any servers. Therefore,
if an on_load handler calls any function in the code module that
calls the code server (such as code:priv_dir/1), there will be a
deadlock because the code server has not yet been started.

Fix this problem by invoking the on_load handlers after
having started most servers in the kernel application.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add tests for code:clash/0</title>
<updated>2010-02-06T08:29:34+00:00</updated>
<author>
<name>Tuncer Ayaz</name>
<email>tuncer.ayaz@gmail.com</email>
</author>
<published>2010-02-04T18:58:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=79194d5fa70c7cd8ca0a31918e7954f9e3ae9f6c'/>
<id>79194d5fa70c7cd8ca0a31918e7954f9e3ae9f6c</id>
<content type='text'>
Add first batch of tests for code:clash/0.

Signed-off-by: Tuncer Ayaz &lt;tuncer.ayaz@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add first batch of tests for code:clash/0.

Signed-off-by: Tuncer Ayaz &lt;tuncer.ayaz@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Test on_load functions that don't return 'ok'</title>
<updated>2009-12-13T14:42:42+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2009-12-10T13:09:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=1fe894432615e35f4ecbe3a33f8ba2ded21f8096'/>
<id>1fe894432615e35f4ecbe3a33f8ba2ded21f8096</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Change the expected return value for on_load functions</title>
<updated>2009-12-13T14:42:36+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2009-12-10T09:21:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=7ab33f49185d5a416198f1e0bf5a2ca9f347bbac'/>
<id>7ab33f49185d5a416198f1e0bf5a2ca9f347bbac</id>
<content type='text'>
An on_load function is supposed to return 'true' to indicate
that the module should be loaded, and 'false' if it should be
unloaded. But returning any other term, as well as causing an
exception, will also unload the module.

Since we don't like boolean values mixed with other values,
change the expected return value as follows:

* If 'ok' is returned, the module will remain loaded and become
  callable.

* If any other value is returned (or an exception is generated),
  the module will be unloaded. Also, if the returned value is
  not an atom, send a warning message to the error_logger
  (using error_logger:warning_msg/2).

The new interpretation of the return value means that an on_load
function can now directly return the return value from
erlang:load_nif/2.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An on_load function is supposed to return 'true' to indicate
that the module should be loaded, and 'false' if it should be
unloaded. But returning any other term, as well as causing an
exception, will also unload the module.

Since we don't like boolean values mixed with other values,
change the expected return value as follows:

* If 'ok' is returned, the module will remain loaded and become
  callable.

* If any other value is returned (or an exception is generated),
  the module will be unloaded. Also, if the returned value is
  not an atom, send a warning message to the error_logger
  (using error_logger:warning_msg/2).

The new interpretation of the return value means that an on_load
function can now directly return the return value from
erlang:load_nif/2.
</pre>
</div>
</content>
</entry>
</feed>
