<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/tools/test/cover_SUITE_data, branch maint</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Fix purge of code</title>
<updated>2016-08-29T14:26:24+00:00</updated>
<author>
<name>Rickard Green</name>
<email>rickard@erlang.org</email>
</author>
<published>2016-08-02T13:58:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=9d0638216d35ca0f21c1eea20f8daa3992ac4f71'/>
<id>9d0638216d35ca0f21c1eea20f8daa3992ac4f71</id>
<content type='text'>
Ensure that we cannot get any dangling pointers into code that
has been purged. This is done by a two phase purge. At first
phase all fun entries pointing into the code to purge are marked
for purge. All processes trying to call these funs will be suspended
and by this we avoid getting new direct references into the code.
When all processes has been checked, these processes are resumed.

The new purge strategy now also completely ignore the existence of
indirect references to the code (funs). If such exist, they will
cause bad fun exceptions to the caller, but will not prevent a
soft purge or cause a kill of a process having such live references
during a hard purge. This since it is impossible to give any
guarantees that no processes in the system have such indirect
references. Even when the system is completely clean from such
references, new ones can appear via distribution and/or disk.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that we cannot get any dangling pointers into code that
has been purged. This is done by a two phase purge. At first
phase all fun entries pointing into the code to purge are marked
for purge. All processes trying to call these funs will be suspended
and by this we avoid getting new direct references into the code.
When all processes has been checked, these processes are resumed.

The new purge strategy now also completely ignore the existence of
indirect references to the code (funs). If such exist, they will
cause bad fun exceptions to the caller, but will not prevent a
soft purge or cause a kill of a process having such live references
during a hard purge. This since it is impossible to give any
guarantees that no processes in the system have such indirect
references. Even when the system is completely clean from such
references, new ones can appear via distribution and/or disk.
</pre>
</div>
</content>
</entry>
<entry>
<title>stdlib: Add a Cover test with typed record field</title>
<updated>2016-02-17T11:58:19+00:00</updated>
<author>
<name>Hans Bolinder</name>
<email>hasse@erlang.org</email>
</author>
<published>2015-11-27T13:44:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=ef8141ff27d0c7d94f71b0bf6a4766e6876b725a'/>
<id>ef8141ff27d0c7d94f71b0bf6a4766e6876b725a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[cover] Simplify module cc in cover test to avoid confusion</title>
<updated>2015-12-17T13:33:24+00:00</updated>
<author>
<name>Siri Hansen</name>
<email>siri@erlang.org</email>
</author>
<published>2015-12-17T13:33:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=dcdeac8cc6504c091e6886fa1ec2ac48709026c9'/>
<id>dcdeac8cc6504c091e6886fa1ec2ac48709026c9</id>
<content type='text'>
Functions in this module are never called, and some functions are
outdated. In order to avoid confusion (and need for update), the
module is now reduced to a simple dummy module.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Functions in this module are never called, and some functions are
outdated. In order to avoid confusion (and need for update), the
module is now reduced to a simple dummy module.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add test for "Fix cover output file"</title>
<updated>2015-09-10T08:17:21+00:00</updated>
<author>
<name>Siri Hansen</name>
<email>siri@erlang.org</email>
</author>
<published>2015-09-09T12:51:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=3a9a34e581494451cc798911477f3b7bc81e3492'/>
<id>3a9a34e581494451cc798911477f3b7bc81e3492</id>
<content type='text'>
If a module includes eunit.hrl, a parse transform adds the function
test/0 on line 0 in the module.  A bug in OTP-18.0 caused
cover:analyse_to_file/1 to fail to insert cover data in the output
file when line 0 existed in the cover data table. The bug is corrected
by the commit "Fix cover output file".

This commit adds a test which checks that the bug is not introduced
again.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a module includes eunit.hrl, a parse transform adds the function
test/0 on line 0 in the module.  A bug in OTP-18.0 caused
cover:analyse_to_file/1 to fail to insert cover data in the output
file when line 0 existed in the cover data table. The bug is corrected
by the commit "Fix cover output file".

This commit adds a test which checks that the bug is not introduced
again.
</pre>
</div>
</content>
</entry>
<entry>
<title>cover: handle undefined module when analysing to file</title>
<updated>2015-06-10T09:44:33+00:00</updated>
<author>
<name>Péter Gömöri</name>
<email>gomoripeti@gmail.com</email>
</author>
<published>2015-05-29T17:00:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=b1012c31f38810c6754dcd4cf03f8d2bfb010506'/>
<id>b1012c31f38810c6754dcd4cf03f8d2bfb010506</id>
<content type='text'>
It is possible that not just the source but even the beam of a module
is not available when calling analyse_to_file.

For example when coverdata is imported from an old file and since then
a module was removed.

Before this fix cover:analyse_to_file/3 could possibly never return
because of a helper process crashed with error:undef and never reply
to the caller.

At the same time link the helper process to cover_server so any
further error won't let the caller waiting indefinitely.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is possible that not just the source but even the beam of a module
is not available when calling analyse_to_file.

For example when coverdata is imported from an old file and since then
a module was removed.

Before this fix cover:analyse_to_file/3 could possibly never return
because of a helper process crashed with error:undef and never reply
to the caller.

At the same time link the helper process to cover_server so any
further error won't let the caller waiting indefinitely.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix cover bug on last expressions with empty clauses</title>
<updated>2014-11-08T20:07:26+00:00</updated>
<author>
<name>José Valim</name>
<email>jose.valim@plataformatec.com.br</email>
</author>
<published>2014-10-23T11:59:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=b7740a6fe01d254d79291bbcbbc853e874eb41ef'/>
<id>b7740a6fe01d254d79291bbcbbc853e874eb41ef</id>
<content type='text'>
OTP-8188 introduced a fix for handling last expressions in
expressions like case, try and friends. However the fix did
not account that some of those expressions like receive may
have no clauses (only an after clause), leading to a function
clause error when cover compiling code with such expressions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OTP-8188 introduced a fix for handling last expressions in
expressions like case, try and friends. However the fix did
not account that some of those expressions like receive may
have no clauses (only an after clause), leading to a function
clause error when cover compiling code with such expressions.
</pre>
</div>
</content>
</entry>
<entry>
<title>cover_SUITE:reconnect/1: Let the other side initiate the disconnect</title>
<updated>2014-03-06T11:06:23+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2014-03-04T11:20:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=651d8b9ab88b4bad73d37f3696b8d3cf0970a80d'/>
<id>651d8b9ab88b4bad73d37f3696b8d3cf0970a80d</id>
<content type='text'>
The reconnect/1 test starts another node and takes down the connection
to it for a while. However, it has been in observed in our daily builds
that sometimes a "spontaneous" re-connection occurs.

I think that it because of the call to rpc:cast/3 which internally
will set the group leader for the remote process to a process on
the test_server node. It seems that sometimes the group_leader/2
call will re-establish the connection. Unfortunately, I have not
been able to force this to happen by inserting delays in the rpc
module, so it it still just an hypothesis.

However, letting the other node do the disconnection does seem to fix
the problem and intuitively that should be safer way to do it because
the group_leader/2 call and the disconnection will be executed
sequentially on the same node instead of concurrently from two
different nodes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The reconnect/1 test starts another node and takes down the connection
to it for a while. However, it has been in observed in our daily builds
that sometimes a "spontaneous" re-connection occurs.

I think that it because of the call to rpc:cast/3 which internally
will set the group leader for the remote process to a process on
the test_server node. It seems that sometimes the group_leader/2
call will re-establish the connection. Unfortunately, I have not
been able to force this to happen by inserting delays in the rpc
module, so it it still just an hypothesis.

However, letting the other node do the disconnection does seem to fix
the problem and intuitively that should be safer way to do it because
the group_leader/2 call and the disconnection will be executed
sequentially on the same node instead of concurrently from two
different nodes.
</pre>
</div>
</content>
</entry>
<entry>
<title>tools: Fix compile_beam_opts testcase</title>
<updated>2013-10-30T10:19:44+00:00</updated>
<author>
<name>Fredrik Gustafsson</name>
<email>fredrik@erlang.org</email>
</author>
<published>2013-10-25T07:14:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=dc672094a5c926b1b4a656c13b688bb8c06f7a3b'/>
<id>dc672094a5c926b1b4a656c13b688bb8c06f7a3b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a bug in cover when used with no_auto_import</title>
<updated>2013-01-25T13:57:00+00:00</updated>
<author>
<name>José Valim</name>
<email>jose.valim@plataformatec.com.br</email>
</author>
<published>2012-11-28T11:51:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=261880cfbebafddb61c728ed873f4e93107d9af9'/>
<id>261880cfbebafddb61c728ed873f4e93107d9af9</id>
<content type='text'>
Cover was rewriting guard clauses as non-remote calls.
That said, if a guard contains erlang:is_binary(Binary),
Cover was incorrectly removing the erlang prefix which
lead to errors if is_binary is not auto imported.

This commit keeps the abstract format as it is.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cover was rewriting guard clauses as non-remote calls.
That said, if a guard contains erlang:is_binary(Binary),
Cover was incorrectly removing the erlang prefix which
lead to errors if is_binary is not auto imported.

This commit keeps the abstract format as it is.
</pre>
</div>
</content>
</entry>
<entry>
<title>cover now relies on the compile info to find file sources</title>
<updated>2013-01-25T13:57:00+00:00</updated>
<author>
<name>José Valim</name>
<email>jose.valim@plataformatec.com.br</email>
</author>
<published>2012-11-28T12:45:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=29231033bfa618e5c4e1c50a5cefba32e02f2708'/>
<id>29231033bfa618e5c4e1c50a5cefba32e02f2708</id>
<content type='text'>
Prior to this commit, cover relied on a simple heuristic that
traverses directory from the beam file to find a source file.
The heuristic was maintained with this patch but, if it fails,
it fallbacks to the source value in the module compile info.

In order to illustrate how it works, one of the tests that
could not find its source now passes successfully (showing the
source lookup is more robust).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior to this commit, cover relied on a simple heuristic that
traverses directory from the beam file to find a source file.
The heuristic was maintained with this patch but, if it fails,
it fallbacks to the source value in the module compile info.

In order to illustrate how it works, one of the tests that
could not find its source now passes successfully (showing the
source lookup is more robust).
</pre>
</div>
</content>
</entry>
</feed>
