Age | Commit message (Collapse) | Author |
|
|
|
This also hides the module behind ?PRIM_FILE to make testing new
implementations less painful.
|
|
A bad directory in the path would prevent the run-time system
from starting:
$ echo >foobar
$ erl -pa foobar
{"init terminating in do_boot",{load_failed,[supervisor,kernel,gen_server,file_io_server,filename,file,erl_parse,error_logger,code_server,erl_lint,proc_lib,code,application_controller,application_master,gen_event,application,error_handler,lists,heart,gen,file_server,ets,erl_eval]}}
Crash dump is being written to: erl_crash.dump...done
init terminating in do_boot ()
The reason is that when attempting to read each of the BEAM files,
there would be an 'enotdir' error which
erl_prim_load:get_modules/2,3 assumed was a fatal error.
Update erl_prim_load:get_modules/2,3 to ignore any error and try
the next directory in the path.
Reported-by: http://bugs.erlang.org/browse/ERL-142
Reported-by: Michael Truog
|
|
|
|
* bjorn/kernel/modernize-tests:
Remove ?line macros
Fix comments
gen_tcp_misc_SUITE: Use unique node names
Eliminate use of the ?t macro
Eliminate use of doc and suite clauses
Replace use of test_server:capture*/0 with ct:capture*/0
Eliminate use test_server:format()
Eliminate use of test_server:sleep/1
Eliminate use of test_server:fail/0,1
Eliminate use of ?config() macro
Modernize timetraps
disk_log_SUITE: Remove vestiges of VxWorks support
Conflicts:
lib/kernel/test/code_SUITE.erl
|
|
While we are it, also re-ident the files.
|
|
Those clause are obsolete and never used by common_test.
|
|
|
|
|
|
?config is ugly and not recommended. Use proplists:get_value/2
instead.
|
|
|
|
|
|
code:which/1 will return 'cover_compiled' instead of a path. We
could work around that, but since erl_prim_loader is not
cover-compiled, it does not gain us anything.
|
|
When we are going to implement functions that can load many modules
at once, we don't the erl_prim_loader server to become a bottleneck.
Therefore, we need erl_prim_loader:get_modules/3 that can read many
BEAM files in parallel.
Note that we will not bother making reading from archive files
or using the inet loader efficient. That can be done later if it
turns out to be important.
|
|
As a first step to removing the test_server application as
as its own separate application, change the inclusion of
test_server.hrl to an inclusion of ct.hrl and remove the
inclusion of test_server_line.hrl.
|
|
Eliminate duplicated code by factoring out the common code
for starting erl_boot_server and a slave node.
Also, in the new start_boot_server/0 helper, fix a problem
with Linux systems that assign 127.0.1.1 as the IP address
for the hostname.
Also stop using the -setcookie option when starting a node
using -loader inet. The inet loading method doesn't use
the distribution anymore.
|
|
Rename release_archives/0 to purge_archive_cache/0 to make it
clearer what it does and what it doesn't do. Also add a comment
about its intended purpose.
Note that release_archives/0 is not documented and is part of the
experimental archive feature. Furthermore, the only uses I could find
were in the test suite. I did not find any uses in the external
applications relx and rebar3 applications that are known to use
archives. Therefore, I think that the increased clarity is worth
the small risk of breaking code.
|
|
The OSE port is no longer supported and this commit removed it
and any changes related to it. The things that were general
improvements have been left in the code.
|
|
|
|
This commit complements 769996c0cd4cb68c157e39de725642f209ed7423 and
adds tests for the following problems introduced by
f11aabdc9fec593c31e6c4f3fa25c1707e9c35df:
Given the symlink 'dirlink' pointing to an existing dir, then
- filelib:is_regular("dirlink") -> false
- filelib:is_dir("dirlink") -> false
Given the symlink 'filelink' pointing to an existing file, then
- filelib:is_regular("filelink") -> false
- filelib:is_file("filelink") -> false
- filelib:last_modified("filelink") and filelib:filesize("filelink")
return the info of the link and not the file
Given the symlink "broken_symlink" pointing to a non-existing file, then
- filelib:wildcard("broken_symlink",File) -> []
|
|
This function normalizes a path:
* convert atoms to strings
* flatten strings
* convert backslash to a forward slash
The bugfix is to only convert backslashes to forward slashes on
windows and not on any other platforms.
|
|
|
|
If the mtime of an escript/primary archive file changes after being
added to the code path, correctly reload the archive and update the
cache.
The existing code didn't consider that it might be a zip archive and failed:
=ERROR REPORT==== 3-Aug-2011::09:21:21 ===
File operation error: bad_central_directory. Target:
/escript_archive/module.beam. Function: get_file. Process: code_server.
Thanks David Reid and Hakan Mattson.
|
|
|
|
Since tracing is not supported on native-compiled modules and
the inet_disconnects/1 test case depends on tracing, skip the
test case if erl_boot_server is native.
|
|
Running Dialyzer on the test suites revealed a few type errors.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For example, if an archive (app-vsn.ez) just contains an
app-vsn/ebin/mod.beam file, the file info for the app-vsn and
app-vsn/ebin directories are faked using the file info from the
archive file as origin. The virtual direcories can also be
listed. For short, the top directories are virtual if they does
not exist.
|
|
|