Age | Commit message (Collapse) | Author |
|
Change how to interpret end of document to comply with Tim Brays
comment on the standard. This makes it possible to handle more
than one doc on a stream, the standard makes it impossible to
know when the document is ended without waiting for the next
document (and not always even that).
Tim Brays comment about the trailing "Misc" rule:
The fact that you're allowed some trailing junk after the root
element, I decided (but unfortunately too late) is a real design
error in XML. If I'm writing a network client, I'm probably going
to close the link as soon as a I see the root element end-tag, and
not depend on the other end closing it down properly.
Furthermore, if I want to send a succession of XML documents over
a network link, if I find a processing instruction after a root
element, is it a trailer on the previous document, or part of the
prolog of the next?
|
|
AES256 was preferred over 3DES already, so this only makes sure AES128
is preferred over 3DES also. This changes the default but probably
nobody will notice as a better algorithm will be chosen anyhow.
|
|
OTP-14210
|
|
The Suite parameter is added to all group- and testcase hook
callbacks. This commit updates cth_conn_log and cth_log_redirect
according to this new API.
|
|
into maint
* legoscia/erl_interface/doc-no-tuple-funs/PR-1343/OTP-14233:
Documentation: tuple funs are unsupported
|
|
by removing some unnecessary conditions and
remove unused and faulty summation for 'cur' and 'old'.
|
|
fix for already merged but not releases 808b2f4d53e446aed07f85716c5c4b85abb3d18a
|
|
The size/1 callback was added as a non-optional callback in
42b8a29dbae1d626f32bc16dd81a129caf741138 but wasn't added to the
documentation for the ssl_session_cache_api behavior.
Signed-off-by: Steven Danna <[email protected]>
|
|
When a test case is skipped from the test spec, there is no call to
the common_test hook functions 'pre_init_per_testcase' and
'post_end_per_testcase'. This causes cth_surefire to erroneously mark
the previous test case as skipped in the xml report. The actually
skipped test case is not present in the xml report at all. This is now
corrected.
OTP-14129
|
|
If the port terminates before Port ! close is issued,
there will be no 'closed' reply, so the old code would
hang. As it turns out there is no way to figure out
if a closed reply is supposed to come as that reply
is sent after all links and monitors are triggered.
So we have to use the synchronous port_close to close
the port.
|
|
As of committing this branch maps:fold/3 calls maps:to_list/1, which
means that the time and memory needed for printing maps is not always
proportional to the size of the generated deep list of characters.
|
|
|
|
Add safe_relative_path/1 to guard against directory traversal
attacks. It either returns a shorter path without any ".." or
"." components, or 'unsafe' if an ".." component would climb
up above the root of the relative path. Here are a few
examples:
safe_relative_path("a/b/..") => "a"
safe_relative_path("a/..") => ""
safe_relative_path("a/../..") => unsafe
safe_relative_path("/absolute/path") => unsafe
The returned path can be used directly or combined with an
absolute path using filename:join/2.
|
|
def_arg_reg[0] is used for storage of timeout instruction
when a 'receive after' is executed. When a process was
scheduled out inside prim_eval:'receive'/0 due to a function
call, def_arg_reg[0] was overwritten due to storage of live
registers.
prim_eval:'receive'/2 now calls arg_reg_alloc/0 which
bumps all reductions and then calls arg_reg_alloc/7
which will cause an allocation of a new arg_reg array
since def_arg_reg only can hold 6 values. This ensures
that the timeout instruction in def_arg_reg[0] used
for the timeout wont be overwritten.
|
|
When skipping or failing in a configuration function, the
configuration function itself would get {auto_skipped,Reason},
{skipped,Reason} or {failed,Reason} in the hook callbacks on_tc_skip
or on_tc_fail. The other test cases that were skipped as a result of
this would only get Reason in the hook callbacks. This is now
corrected.
|
|
If test cases were skipped because of option {force_stop,skip_rest} or
because of a failed sequence, then no tc_start event would be sent,
only only tc_done. This is now corrected.
|
|
Documentation says that a test case is skipped if init_per_testcase
fails. This is correct if init_per_testcase fails in a normal way, but
if it gets an exit signal causing the process to die, then the case
was earlier marked as failed with reason {skip,...}. This is now
corrected, so the case is auto skipped.
If end_per_testcase crashes, it does not change the result of a test
case, it only adds a warning in the comment field. But if it gets an
exit signal causing the process to die while running end_per_testcase,
then the case was earlier marked as failed in addition to this
warning. This is now corrected, so the result of the test case is not
changed by an exit signal during end_per_testcase.
|
|
The following bugs are corrected:
* Tests that were skipped before calling pre_init_per_* got faulty
calls to the corresponding post_init_per_*. E.g. if a test was
skipped because suite/0 returned a 'require' statement that was not
fulfilled, then post_init_per_suite would be called, even though
pre_init_per_suite and init_per_suite were not called.
* Tests that were skipped before or in init_per_testcase got faulty
calls to pre_end_per_testcase and post_end_per_testcase
(end_per_testcase is not called in these situations).
Test are added to make sure that the expected callbacks, and only
those, are called when tests are skipped in different ways.
Conflicts:
lib/common_test/test/ct_hooks_SUITE.erl
|
|
common_test requires that if init_per_suite/1 exists, then
end_per_suite/1 must also exist. If end_per_suite/1 does not exist,
then it will be marked in the log as failed with reason 'undef'. Some
test suites are corrected to avoid this.
|
|
The following bugs are corrected:
- if init_per_suite is exported from a test suite, but not
end_per_suite, then pre/post_end_per_suite will be called with
Suite=ct_framework instead of the correct suite name.
- if end_per_group is exported from a suite, but not init_per_group,
then end_per_group is never called.
According to the documentation, if implementing an init config
function, you must also implement the end config function, so the two
scenarios above are really not allowed. To make this more visible,
common_test will now mark the non-exported config function as failed
with reason 'undef' if the other function is exported.
For example, if init_per_suite is exported, but not end_per_suite,
then end_per_suite will be marked as failed with reason undef. (If
none of them exist, then they will both be marked as passed since the
default functions in ct_framework are called instead.)
All hook functions are always called with the correct suite name,
i.e. never with Suite=ct_framework.
Conflicts:
lib/common_test/test/ct_hooks_SUITE.erl
|
|
An extra argument, Suite, is added as the first argument to each of
the following hook callback functions:
- pre_init_per_group
- post_init_per_group
- pre_end_per_group
- post_end_per_group
- pre_init_per_testcase
- post_init_per_testcase
- pre_end_per_testcase
- post_end_per_testcase
- on_tc_fail
- on_tc_skip
For backwards compatibility, if the new function is not exported from
a hook callback module, common_test will fall back to the old
interface and call the function without the Suite argument.
The reason for adding the new argument is that if a test suite is
skipped by a 'skip_suites' statement in the test specification, then
there will be no call to pre/post_init_per_suite, and thus the hook
has no other way of knowing which Suite is skipped when it gets the
on_tc_skip callback. The other callbacks are updated for symmetry.
|
|
|
|
|
|
|
|
Running this test when for some reason stdlib has been
unstickied could cause the emulator to die. So we check first
to make sure that the expected files are sticky.
|
|
An error report on ssh_cli pointed to a usage of erlang:iolist_size/1. It is replaced by a specialized function.
|
|
machines
|
|
Conflicts:
lib/ssh/test/ssh_sftpd_SUITE.erl
|
|
Conflicts:
lib/ssh/test/ssh_sftpd_SUITE.erl
|
|
hans/ssh/sftpd_fixes/OTP-14225
|
|
|
|
maint
|
|
* sverker/enif_send-noproc-fix:
erts: Fix enif_send from noproc and no msg_env
|
|
* sverker/include-module-literal-size:
erts: Add size of literals to module code size
|
|
* sverker/round-bug/OTP-14227:
erts: Fix round/1 for large floats
|
|
* lars/xmerl/standard-namespace-problem/OTP-14139:
[xmerl] Correct handling of implicit XML namespace
|
|
If CtHook:pre_init_per_testcase(...,end_per_testcase,...) failed, then
the ct_framework:end_tc would fail with function_clause. This is now
corrected.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The namespace_conformant option did not work when parsing
documents without explicit XML namespace declaration.
|
|
Remove use of tuple fun from erl_call documentation. It seems like
fun math:sqrt/1 isn't parsed correctly by erl_call, so I replaced the
example with a simpler one that doesn't require a fun.
|
|
|
|
|
|
|
|
|
|
1> round(6209607916799025.0).
6209607916799026
Problem: Adding/subtracting 0.5 and large double floats between
(1 bsl 52) and (1 bsl 53) does not give reliable results.
Solution: Use round() function in math.h.
|