aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/asn1/doc/src/notes.xml15
-rw-r--r--lib/asn1/vsn.mk2
-rw-r--r--lib/common_test/doc/src/notes.xml25
-rw-r--r--lib/common_test/src/ct_gen_conn.erl10
-rw-r--r--lib/common_test/src/ct_logs.erl17
-rw-r--r--lib/common_test/src/ct_master_logs.erl2
-rw-r--r--lib/common_test/src/ct_telnet.erl88
-rw-r--r--lib/common_test/test/ct_config_SUITE.erl53
-rw-r--r--lib/common_test/test/ct_config_SUITE_data/config/test/config_dynamic_SUITE.erl7
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE_data/netconfc_remote_SUITE.erl4
-rw-r--r--lib/common_test/test/ct_netconfc_SUITE_data/ns.erl6
-rw-r--r--lib/common_test/vsn.mk2
-rw-r--r--lib/compiler/doc/src/notes.xml111
-rw-r--r--lib/compiler/src/beam_block.erl98
-rw-r--r--lib/compiler/src/beam_dead.erl7
-rw-r--r--lib/compiler/src/compile.erl20
-rw-r--r--lib/compiler/test/beam_block_SUITE.erl27
-rw-r--r--lib/compiler/test/match_SUITE.erl13
-rw-r--r--lib/compiler/vsn.mk2
-rw-r--r--lib/cosEvent/doc/src/notes.xml17
-rw-r--r--lib/cosEvent/test/event_channel_SUITE.erl17
-rw-r--r--lib/cosEvent/test/generated_SUITE.erl50
-rw-r--r--lib/cosEvent/vsn.mk2
-rw-r--r--lib/cosEventDomain/doc/src/notes.xml17
-rw-r--r--lib/cosEventDomain/test/event_domain_SUITE.erl16
-rw-r--r--lib/cosEventDomain/test/generated_SUITE.erl42
-rw-r--r--lib/cosEventDomain/vsn.mk2
-rw-r--r--lib/cosFileTransfer/doc/src/notes.xml17
-rw-r--r--lib/cosFileTransfer/test/fileTransfer_SUITE.erl290
-rw-r--r--lib/cosFileTransfer/vsn.mk2
-rw-r--r--lib/cosNotification/doc/src/notes.xml17
-rw-r--r--lib/cosNotification/test/eventDB_SUITE.erl85
-rw-r--r--lib/cosNotification/test/generated_SUITE.erl185
-rw-r--r--lib/cosNotification/test/grammar_SUITE.erl25
-rw-r--r--lib/cosNotification/test/notification_SUITE.erl47
-rw-r--r--lib/cosNotification/vsn.mk2
-rw-r--r--lib/cosProperty/doc/src/notes.xml17
-rw-r--r--lib/cosProperty/test/generated_SUITE.erl68
-rw-r--r--lib/cosProperty/test/property_SUITE.erl29
-rw-r--r--lib/cosProperty/vsn.mk2
-rw-r--r--lib/cosTime/doc/src/notes.xml17
-rw-r--r--lib/cosTime/test/generated_SUITE.erl30
-rw-r--r--lib/cosTime/test/time_SUITE.erl160
-rw-r--r--lib/cosTime/vsn.mk2
-rw-r--r--lib/cosTransactions/doc/src/notes.xml17
-rw-r--r--lib/cosTransactions/test/generated_SUITE.erl62
-rw-r--r--lib/cosTransactions/test/transactions_SUITE.erl131
-rw-r--r--lib/cosTransactions/vsn.mk2
-rw-r--r--lib/crypto/c_src/crypto.c2
-rw-r--r--lib/crypto/doc/src/notes.xml46
-rw-r--r--lib/crypto/vsn.mk2
-rw-r--r--lib/debugger/doc/src/notes.xml16
-rw-r--r--lib/debugger/vsn.mk2
-rw-r--r--lib/dialyzer/doc/src/notes.xml96
-rw-r--r--lib/dialyzer/src/dialyzer.erl2
-rw-r--r--lib/dialyzer/src/dialyzer_dataflow.erl62
-rw-r--r--lib/dialyzer/test/Makefile1
-rw-r--r--lib/dialyzer/test/abstract_SUITE.erl102
-rw-r--r--lib/dialyzer/test/dialyzer_common.erl11
-rw-r--r--lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/a.erl9
-rw-r--r--lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/b.erl3
-rw-r--r--lib/dialyzer/vsn.mk2
-rw-r--r--lib/diameter/doc/src/notes.xml35
-rw-r--r--lib/edoc/doc/src/notes.xml14
-rw-r--r--lib/edoc/src/edoc_extract.erl14
-rw-r--r--lib/edoc/src/edoc_lib.erl2
-rw-r--r--lib/edoc/src/edoc_tags.erl11
-rw-r--r--lib/edoc/vsn.mk2
-rw-r--r--lib/eldap/doc/src/notes.xml33
-rw-r--r--lib/erl_docgen/doc/src/notes.xml47
-rwxr-xr-xlib/erl_docgen/priv/bin/xref_mod_app.escript2
-rw-r--r--lib/erl_docgen/priv/dtd/erlref.dtd2
-rw-r--r--lib/erl_docgen/priv/xsl/db_html.xsl4
-rw-r--r--lib/erl_docgen/src/docgen_edoc_xml_cb.erl142
-rw-r--r--lib/erl_docgen/test/erl_docgen_SUITE.erl10
-rw-r--r--lib/erl_docgen/vsn.mk2
-rw-r--r--lib/erl_interface/doc/src/notes.xml42
-rw-r--r--lib/erl_interface/vsn.mk2
-rw-r--r--lib/et/doc/src/notes.xml16
-rw-r--r--lib/et/vsn.mk2
-rw-r--r--lib/eunit/doc/src/notes.xml15
-rw-r--r--lib/eunit/vsn.mk2
-rw-r--r--lib/gs/doc/src/notes.xml17
-rw-r--r--lib/gs/vsn.mk2
-rw-r--r--lib/hipe/cerl/cerl_pmatch.erl28
-rw-r--r--lib/hipe/cerl/erl_types.erl20
-rw-r--r--lib/hipe/doc/src/notes.xml40
-rw-r--r--lib/hipe/vsn.mk2
-rw-r--r--lib/ic/doc/src/notes.xml17
-rw-r--r--lib/ic/test/c_client_erl_server_SUITE.erl76
-rw-r--r--lib/ic/test/c_client_erl_server_SUITE_data/c_client.c1
-rw-r--r--lib/ic/test/c_client_erl_server_proto_SUITE.erl76
-rw-r--r--lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl78
-rw-r--r--lib/ic/test/erl_client_c_server_SUITE.erl77
-rw-r--r--lib/ic/test/erl_client_c_server_proto_SUITE.erl77
-rw-r--r--lib/ic/test/ic_SUITE.erl469
-rw-r--r--lib/ic/test/ic_be_SUITE.erl23
-rw-r--r--lib/ic/test/ic_pp_SUITE.erl212
-rw-r--r--lib/ic/test/ic_pragma_SUITE.erl48
-rw-r--r--lib/ic/test/ic_register_SUITE.erl186
-rw-r--r--lib/ic/test/java_client_erl_server_SUITE.erl137
-rw-r--r--lib/ic/vsn.mk2
-rw-r--r--lib/inets/doc/src/mod_esi.xml157
-rw-r--r--lib/inets/doc/src/notes.xml85
-rw-r--r--lib/inets/src/ftp/ftp.erl6
-rw-r--r--lib/inets/src/http_server/httpd_conf.erl12
-rw-r--r--lib/inets/src/http_server/httpd_example.erl11
-rw-r--r--lib/inets/src/http_server/mod_esi.erl66
-rw-r--r--lib/inets/src/inets_app/inets.appup.src6
-rw-r--r--lib/inets/test/httpd_SUITE.erl60
-rw-r--r--lib/inets/test/inets_SUITE.erl14
-rw-r--r--lib/inets/test/inets_sup_SUITE.erl38
-rw-r--r--lib/inets/vsn.mk2
-rw-r--r--lib/jinterface/doc/src/notes.xml32
-rw-r--r--lib/jinterface/vsn.mk2
-rw-r--r--lib/kernel/doc/src/notes.xml215
-rw-r--r--lib/kernel/src/code_server.erl20
-rw-r--r--lib/kernel/src/erl_epmd.erl6
-rw-r--r--lib/kernel/src/inet.erl67
-rw-r--r--lib/kernel/src/inet_tcp_dist.erl2
-rw-r--r--lib/kernel/src/local_tcp.erl2
-rw-r--r--lib/kernel/src/os.erl48
-rw-r--r--lib/kernel/test/gen_sctp_SUITE.erl148
-rw-r--r--lib/kernel/test/gen_tcp_api_SUITE.erl265
-rw-r--r--lib/kernel/test/gen_udp_SUITE.erl177
-rw-r--r--lib/kernel/test/init_SUITE.erl2
-rw-r--r--lib/kernel/test/loose_node.erl11
-rw-r--r--lib/kernel/test/os_SUITE.erl22
-rw-r--r--lib/kernel/vsn.mk2
-rw-r--r--lib/megaco/doc/src/notes.xml17
-rw-r--r--lib/megaco/vsn.mk2
-rw-r--r--lib/mnesia/doc/src/notes.xml23
-rw-r--r--lib/mnesia/vsn.mk2
-rw-r--r--lib/observer/doc/src/notes.xml62
-rw-r--r--lib/observer/src/observer_perf_wx.erl40
-rw-r--r--lib/observer/vsn.mk2
-rw-r--r--lib/odbc/configure.in2
-rw-r--r--lib/odbc/doc/src/notes.xml18
-rw-r--r--lib/odbc/test/odbc_connect_SUITE.erl188
-rw-r--r--lib/odbc/test/odbc_data_type_SUITE.erl421
-rw-r--r--lib/odbc/test/odbc_query_SUITE.erl464
-rw-r--r--lib/odbc/test/odbc_start_SUITE.erl37
-rw-r--r--lib/odbc/test/odbc_test_lib.erl6
-rw-r--r--lib/odbc/vsn.mk2
-rw-r--r--lib/orber/doc/src/notes.xml17
-rw-r--r--lib/orber/test/cdrcoding_10_SUITE.erl237
-rw-r--r--lib/orber/test/cdrcoding_11_SUITE.erl236
-rw-r--r--lib/orber/test/cdrcoding_12_SUITE.erl236
-rw-r--r--lib/orber/test/cdrlib_SUITE.erl182
-rw-r--r--lib/orber/test/corba_SUITE.erl454
-rw-r--r--lib/orber/test/csiv2_SUITE.erl103
-rw-r--r--lib/orber/test/data_types_SUITE.erl16
-rw-r--r--lib/orber/test/generated_SUITE.erl48
-rw-r--r--lib/orber/test/interceptors_SUITE.erl18
-rw-r--r--lib/orber/test/iop_ior_10_SUITE.erl70
-rw-r--r--lib/orber/test/iop_ior_11_SUITE.erl70
-rw-r--r--lib/orber/test/iop_ior_12_SUITE.erl80
-rw-r--r--lib/orber/test/ip_v4v6_interop_SUITE.erl9
-rw-r--r--lib/orber/test/lname_SUITE.erl76
-rw-r--r--lib/orber/test/multi_ORB_SUITE.erl294
-rw-r--r--lib/orber/test/naming_context_SUITE.erl111
-rw-r--r--lib/orber/test/orber_SUITE.erl22
-rw-r--r--lib/orber/test/orber_acl_SUITE.erl42
-rw-r--r--lib/orber/test/orber_firewall_ipv4_in_SUITE.erl47
-rw-r--r--lib/orber/test/orber_firewall_ipv4_out_SUITE.erl43
-rw-r--r--lib/orber/test/orber_firewall_ipv6_in_SUITE.erl47
-rw-r--r--lib/orber/test/orber_firewall_ipv6_out_SUITE.erl43
-rw-r--r--lib/orber/test/orber_nat_SUITE.erl42
-rw-r--r--lib/orber/test/orber_web_SUITE.erl32
-rw-r--r--lib/orber/test/tc_SUITE.erl346
-rw-r--r--lib/orber/vsn.mk2
-rw-r--r--lib/os_mon/doc/src/notes.xml34
-rw-r--r--lib/os_mon/vsn.mk2
-rw-r--r--lib/otp_mibs/doc/src/notes.xml15
-rw-r--r--lib/otp_mibs/vsn.mk2
-rw-r--r--lib/parsetools/doc/src/notes.xml15
-rw-r--r--lib/parsetools/vsn.mk2
-rw-r--r--lib/percept/doc/src/notes.xml29
-rw-r--r--lib/percept/vsn.mk2
-rw-r--r--lib/public_key/doc/src/notes.xml28
-rw-r--r--lib/public_key/doc/src/public_key.xml1
-rw-r--r--lib/public_key/vsn.mk2
-rw-r--r--lib/reltool/doc/src/notes.xml19
-rw-r--r--lib/reltool/src/reltool_server.erl151
-rw-r--r--lib/reltool/test/reltool_server_SUITE.erl37
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/x-1.0/ebin/x.app7
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/x-1.0/src/x1.erl5
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/y-1.0/ebin/y.app8
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/y-1.0/src/y1.erl5
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/z-1.0/ebin/z.app7
-rw-r--r--lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/z-1.0/src/z1.erl5
-rw-r--r--lib/reltool/vsn.mk2
-rw-r--r--lib/runtime_tools/doc/src/notes.xml94
-rw-r--r--lib/runtime_tools/vsn.mk2
-rw-r--r--lib/sasl/doc/src/notes.xml17
-rw-r--r--lib/sasl/test/release_handler_SUITE.erl62
-rw-r--r--lib/sasl/test/rh_test_lib.erl2
-rw-r--r--lib/snmp/doc/src/notes.xml17
-rw-r--r--lib/snmp/src/agent/snmpa_conf.erl16
-rw-r--r--lib/snmp/test/modules.mk1
-rw-r--r--lib/snmp/test/snmp_SUITE.erl4
-rw-r--r--lib/snmp/test/snmp_agent_conf_test.erl210
-rw-r--r--lib/snmp/vsn.mk2
-rw-r--r--lib/ssh/doc/src/notes.xml118
-rw-r--r--lib/ssh/src/ssh_auth.erl231
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl109
-rw-r--r--lib/ssh/src/ssh_dbg.erl37
-rw-r--r--lib/ssh/src/ssh_io.erl52
-rw-r--r--lib/ssh/test/ssh_basic_SUITE.erl84
-rw-r--r--lib/ssh/vsn.mk2
-rw-r--r--lib/ssl/doc/src/notes.xml174
-rw-r--r--lib/ssl/doc/src/ssl.xml19
-rw-r--r--lib/ssl/doc/src/ssl_app.xml12
-rw-r--r--lib/ssl/doc/src/ssl_distribution.xml1
-rw-r--r--lib/ssl/src/dtls_connection.erl408
-rw-r--r--lib/ssl/src/dtls_connection.hrl1
-rw-r--r--lib/ssl/src/dtls_handshake.erl208
-rw-r--r--lib/ssl/src/dtls_record.erl115
-rw-r--r--lib/ssl/src/ssl.app.src2
-rw-r--r--lib/ssl/src/ssl.appup.src10
-rw-r--r--lib/ssl/src/ssl_connection.erl51
-rw-r--r--lib/ssl/src/ssl_connection.hrl7
-rw-r--r--lib/ssl/src/ssl_handshake.erl188
-rw-r--r--lib/ssl/src/ssl_record.erl18
-rw-r--r--lib/ssl/src/ssl_record.hrl2
-rw-r--r--lib/ssl/src/ssl_tls_dist_proxy.erl2
-rw-r--r--lib/ssl/src/tls_connection.erl50
-rw-r--r--lib/ssl/src/tls_handshake.erl14
-rw-r--r--lib/ssl/test/ssl_ECC_SUITE.erl60
-rw-r--r--lib/ssl/test/ssl_basic_SUITE.erl48
-rw-r--r--lib/ssl/test/ssl_certificate_verify_SUITE.erl123
-rw-r--r--lib/ssl/test/ssl_dist_SUITE.erl350
-rw-r--r--lib/ssl/test/ssl_packet_SUITE.erl32
-rw-r--r--lib/ssl/test/ssl_test_lib.erl16
-rw-r--r--lib/ssl/test/ssl_to_openssl_SUITE.erl39
-rw-r--r--lib/ssl/vsn.mk2
-rw-r--r--lib/stdlib/doc/src/gen_statem.xml18
-rw-r--r--lib/stdlib/doc/src/notes.xml329
-rw-r--r--lib/stdlib/src/ets.erl8
-rw-r--r--lib/stdlib/src/gen_statem.erl13
-rw-r--r--lib/stdlib/src/shell.erl4
-rw-r--r--lib/stdlib/test/ets_SUITE.erl37
-rw-r--r--lib/stdlib/test/shell_SUITE.erl17
-rw-r--r--lib/stdlib/test/slave_SUITE.erl1
-rw-r--r--lib/stdlib/vsn.mk2
-rw-r--r--lib/syntax_tools/doc/specs/.gitignore1
-rw-r--r--lib/syntax_tools/doc/src/Makefile8
-rw-r--r--lib/syntax_tools/doc/src/notes.xml26
-rw-r--r--lib/syntax_tools/doc/src/specs.xml14
-rw-r--r--lib/syntax_tools/src/erl_comment_scan.erl10
-rw-r--r--lib/syntax_tools/src/erl_prettypr.erl21
-rw-r--r--lib/syntax_tools/src/erl_recomment.erl4
-rw-r--r--lib/syntax_tools/src/erl_syntax_lib.erl4
-rw-r--r--lib/syntax_tools/src/erl_tidy.erl9
-rw-r--r--lib/syntax_tools/src/igor.erl6
-rw-r--r--lib/syntax_tools/test/syntax_tools_SUITE.erl10
-rw-r--r--lib/syntax_tools/test/syntax_tools_SUITE_data/erl_tidy_tilde.erl13
-rw-r--r--lib/tools/doc/src/notes.xml50
-rw-r--r--lib/tools/emacs/erlang-skels.el12
-rw-r--r--lib/tools/emacs/erlang-test.el57
-rw-r--r--lib/tools/emacs/erlang.el160
-rw-r--r--lib/tools/src/fprof.erl11
-rw-r--r--lib/tools/src/xref_base.erl4
-rw-r--r--lib/tools/test/xref_SUITE.erl17
-rw-r--r--lib/tools/vsn.mk2
-rw-r--r--lib/typer/doc/src/notes.xml15
-rw-r--r--lib/typer/vsn.mk2
-rw-r--r--lib/wx/doc/specs/.gitignore1
-rw-r--r--lib/wx/doc/src/Makefile6
-rw-r--r--lib/wx/doc/src/notes.xml37
-rw-r--r--lib/wx/doc/src/specs.xml232
-rw-r--r--lib/wx/vsn.mk2
-rw-r--r--lib/xmerl/doc/src/notes.xml15
-rw-r--r--lib/xmerl/vsn.mk2
275 files changed, 8597 insertions, 5884 deletions
diff --git a/lib/asn1/doc/src/notes.xml b/lib/asn1/doc/src/notes.xml
index 7af6ad72d2..68d335f451 100644
--- a/lib/asn1/doc/src/notes.xml
+++ b/lib/asn1/doc/src/notes.xml
@@ -32,6 +32,21 @@
<p>This document describes the changes made to the asn1 application.</p>
+<section><title>Asn1 4.0.3</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Asn1 4.0.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/asn1/vsn.mk b/lib/asn1/vsn.mk
index ab2c127ca2..527af05da1 100644
--- a/lib/asn1/vsn.mk
+++ b/lib/asn1/vsn.mk
@@ -1 +1 @@
-ASN1_VSN = 4.0.2
+ASN1_VSN = 4.0.3
diff --git a/lib/common_test/doc/src/notes.xml b/lib/common_test/doc/src/notes.xml
index ebba864606..32ae699c7a 100644
--- a/lib/common_test/doc/src/notes.xml
+++ b/lib/common_test/doc/src/notes.xml
@@ -33,6 +33,31 @@
<file>notes.xml</file>
</header>
+<section><title>Common_Test 1.12.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The following modules were missing in
+ common_test.app.src: ct_groups, ct_property_test,
+ ct_release_test, ct_webtool, ct_webtool_sup,
+ test_server_gl. They have now been added.</p>
+ <p>
+ Own Id: OTP-13475</p>
+ </item>
+ <item>
+ <p>
+ Common Test printed incorrect timestamps for received
+ error reports.</p>
+ <p>
+ Own Id: OTP-13615 Aux Id: seq13124 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Common_Test 1.12.1</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/common_test/src/ct_gen_conn.erl b/lib/common_test/src/ct_gen_conn.erl
index 23ba1ab981..8b59d3ab23 100644
--- a/lib/common_test/src/ct_gen_conn.erl
+++ b/lib/common_test/src/ct_gen_conn.erl
@@ -27,7 +27,7 @@
-export([start/4, stop/1, get_conn_pid/1, check_opts/1]).
-export([call/2, call/3, return/2, do_within_time/2]).
--export([log/3, start_log/1, cont_log/2, end_log/0]).
+-export([log/3, start_log/1, cont_log/2, cont_log_no_timestamp/2, end_log/0]).
%%----------------------------------------------------------------------
%% Exported types
@@ -175,6 +175,14 @@ cont_log(Format,Args) ->
log(cont_log,[Format,Args]).
%%%-----------------------------------------------------------------
+%%% @spec cont_log_no_timestamp(Format,Args) -> ok
+%%%
+%%% @doc Log activities on the current connection (tool-internal use only).
+%%% @see ct_logs:cont_log/2
+cont_log_no_timestamp(Format,Args) ->
+ log(cont_log_no_timestamp,[Format,Args]).
+
+%%%-----------------------------------------------------------------
%%% @spec end_log() -> ok
%%%
%%% @doc Log activities on the current connection (tool-internal use only).
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index 53245c596a..9282a9f81d 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -32,7 +32,7 @@
-export([init/2, close/2, init_tc/1, end_tc/1]).
-export([register_groupleader/2, unregister_groupleader/1]).
-export([get_log_dir/0, get_log_dir/1]).
--export([log/3, start_log/1, cont_log/2, end_log/0]).
+-export([log/3, start_log/1, cont_log/2, cont_log_no_timestamp/2, end_log/0]).
-export([set_stylesheet/2, clear_stylesheet/1]).
-export([add_external_logs/1, add_link/3]).
-export([make_last_run_index/0]).
@@ -373,6 +373,20 @@ cont_log(Format,Args) ->
ok.
%%%-----------------------------------------------------------------
+%%% @spec cont_log_no_timestamp(Format,Args) -> ok
+%%%
+%%% @doc Adds information about an activity (tool-internal use only).
+%%%
+%%% @see start_log/1
+%%% @see end_log/0
+cont_log_no_timestamp([],[]) ->
+ ok;
+cont_log_no_timestamp(Format,Args) ->
+ cast({log,sync,self(),group_leader(),ct_internal,?MAX_IMPORTANCE,
+ [{Format,Args}],true}),
+ ok.
+
+%%%-----------------------------------------------------------------
%%% @spec end_log() -> ok
%%%
%%% @doc Ends the logging of an activity (tool-internal use only).
@@ -595,7 +609,6 @@ div_header(Class,Printer) ->
div_footer() ->
"</pre></div>\n<pre>".
-
maybe_log_timestamp() ->
{MS,S,US} = ?now,
case get(log_timestamp) of
diff --git a/lib/common_test/src/ct_master_logs.erl b/lib/common_test/src/ct_master_logs.erl
index a2542171f8..52003f752d 100644
--- a/lib/common_test/src/ct_master_logs.erl
+++ b/lib/common_test/src/ct_master_logs.erl
@@ -560,7 +560,7 @@ get_format_args(Content) ->
make_dir(Dir) ->
case file:make_dir(Dir) of
- {error, exist} ->
+ {error, eexist} ->
ok;
Else ->
Else
diff --git a/lib/common_test/src/ct_telnet.erl b/lib/common_test/src/ct_telnet.erl
index 8fb411ec4f..34d27ed5f4 100644
--- a/lib/common_test/src/ct_telnet.erl
+++ b/lib/common_test/src/ct_telnet.erl
@@ -954,7 +954,7 @@ log(#state{name=Name,teln_pid=TelnPid,host=Host,port=Port},
true ->
ok;
false ->
- ct_gen_conn:cont_log(String,Args)
+ ct_gen_conn:cont_log_no_timestamp(String,Args)
end;
ForcePrint == true ->
@@ -965,7 +965,7 @@ log(#state{name=Name,teln_pid=TelnPid,host=Host,port=Port},
%% called
ct_gen_conn:log(heading(Action,Name1),String,Args);
false ->
- ct_gen_conn:cont_log(String,Args)
+ ct_gen_conn:cont_log_no_timestamp(String,Args)
end
end
end.
@@ -1224,7 +1224,6 @@ teln_expect1(Name,Pid,Data,Pattern,Acc,EO=#eo{idle_timeout=IdleTO,
EOMod = if TotalTO /= infinity -> EO#eo{total_timeout=trunc(TotalTO)};
true -> EO
end,
-
ExpectFun = case EOMod#eo.seq of
true -> fun() ->
seq_expect(Name,Pid,Data,Pattern,Acc,EOMod)
@@ -1247,38 +1246,34 @@ teln_expect1(Name,Pid,Data,Pattern,Acc,EO=#eo{idle_timeout=IdleTO,
true ->
IdleTO
end,
+ {PatOrPats1,Acc1,Rest1} = case NotFinished of
+ {nomatch,Rest0} ->
+ %% one expect
+ {Pattern,[],Rest0};
+ {continue,Pats0,Acc0,Rest0} ->
+ %% sequence
+ {Pats0,Acc0,Rest0}
+ end,
case timer:tc(ct_gen_conn, do_within_time, [Fun,BreakAfter]) of
- {_,{error,Reason}} ->
+ {_,{error,Reason}} ->
%% A timeout will occur when the telnet connection
%% is idle for EO#eo.idle_timeout milliseconds.
+ if Rest1 /= [] ->
+ log(name_or_pid(Name,Pid)," ~ts",[Rest1]);
+ true ->
+ ok
+ end,
{error,Reason};
{_,{ok,Data1}} when TotalTO == infinity ->
- case NotFinished of
- {nomatch,Rest} ->
- %% One expect
- teln_expect1(Name,Pid,Rest++Data1,
- Pattern,[],EOMod);
- {continue,Patterns1,Acc1,Rest} ->
- %% Sequence
- teln_expect1(Name,Pid,Rest++Data1,
- Patterns1,Acc1,EOMod)
- end;
+ teln_expect1(Name,Pid,Rest1++Data1,PatOrPats1,Acc1,EOMod);
{Elapsed,{ok,Data1}} ->
TVal = TotalTO - (Elapsed/1000),
if TVal =< 0 ->
{error,timeout};
true ->
EO1 = EO#eo{total_timeout = TVal},
- case NotFinished of
- {nomatch,Rest} ->
- %% One expect
- teln_expect1(Name,Pid,Rest++Data1,
- Pattern,[],EO1);
- {continue,Patterns1,Acc1,Rest} ->
- %% Sequence
- teln_expect1(Name,Pid,Rest++Data1,
- Patterns1,Acc1,EO1)
- end
+ teln_expect1(Name,Pid,Rest1++Data1,
+ PatOrPats1,Acc1,EO1)
end
end
end.
@@ -1416,14 +1411,14 @@ match_lines(Name,Pid,Data,Patterns,EO) ->
case one_line(Data,[]) of
{noline,Rest} when FoundPrompt=/=false ->
%% This is the line including the prompt
- case match_line(Name,Pid,Rest,Patterns,FoundPrompt,EO) of
+ case match_line(Name,Pid,Rest,Patterns,FoundPrompt,false,EO) of
nomatch ->
{nomatch,prompt};
{Tag,Match} ->
{Tag,Match,[]}
end;
{noline,Rest} when EO#eo.prompt_check==false ->
- case match_line(Name,Pid,Rest,Patterns,false,EO) of
+ case match_line(Name,Pid,Rest,Patterns,false,false,EO) of
nomatch ->
{nomatch,Rest};
{Tag,Match} ->
@@ -1432,7 +1427,7 @@ match_lines(Name,Pid,Data,Patterns,EO) ->
{noline,Rest} ->
{nomatch,Rest};
{Line,Rest} ->
- case match_line(Name,Pid,Line,Patterns,false,EO) of
+ case match_line(Name,Pid,Line,Patterns,false,true,EO) of
nomatch ->
match_lines(Name,Pid,Rest,Patterns,EO);
{Tag,Match} ->
@@ -1440,45 +1435,50 @@ match_lines(Name,Pid,Data,Patterns,EO) ->
end
end.
-
%% For one line, match each pattern
-match_line(Name,Pid,Line,Patterns,FoundPrompt,EO) ->
- match_line(Name,Pid,Line,Patterns,FoundPrompt,EO,match).
+match_line(Name,Pid,Line,Patterns,FoundPrompt,Terminated,EO) ->
+ match_line(Name,Pid,Line,Patterns,FoundPrompt,Terminated,EO,match).
-match_line(Name,Pid,Line,[prompt|Patterns],false,EO,RetTag) ->
- match_line(Name,Pid,Line,Patterns,false,EO,RetTag);
-match_line(Name,Pid,Line,[prompt|_Patterns],FoundPrompt,_EO,RetTag) ->
+match_line(Name,Pid,Line,[prompt|Patterns],false,Term,EO,RetTag) ->
+ match_line(Name,Pid,Line,Patterns,false,Term,EO,RetTag);
+match_line(Name,Pid,Line,[prompt|_Patterns],FoundPrompt,_Term,_EO,RetTag) ->
log(name_or_pid(Name,Pid)," ~ts",[Line]),
log(name_or_pid(Name,Pid),"PROMPT: ~ts",[FoundPrompt]),
{RetTag,{prompt,FoundPrompt}};
-match_line(Name,Pid,Line,[{prompt,PromptType}|_Patterns],FoundPrompt,_EO,RetTag)
- when PromptType==FoundPrompt ->
+match_line(Name,Pid,Line,[{prompt,PromptType}|_Patterns],FoundPrompt,_Term,
+ _EO,RetTag) when PromptType==FoundPrompt ->
log(name_or_pid(Name,Pid)," ~ts",[Line]),
log(name_or_pid(Name,Pid),"PROMPT: ~ts",[FoundPrompt]),
{RetTag,{prompt,FoundPrompt}};
-match_line(Name,Pid,Line,[{prompt,PromptType}|Patterns],FoundPrompt,EO,RetTag)
+match_line(Name,Pid,Line,[{prompt,PromptType}|Patterns],FoundPrompt,Term,
+ EO,RetTag)
when PromptType=/=FoundPrompt ->
- match_line(Name,Pid,Line,Patterns,FoundPrompt,EO,RetTag);
-match_line(Name,Pid,Line,[{Tag,Pattern}|Patterns],FoundPrompt,EO,RetTag) ->
+ match_line(Name,Pid,Line,Patterns,FoundPrompt,Term,EO,RetTag);
+match_line(Name,Pid,Line,[{Tag,Pattern}|Patterns],FoundPrompt,Term,EO,RetTag) ->
case re:run(Line,Pattern,[{capture,all,list}]) of
nomatch ->
- match_line(Name,Pid,Line,Patterns,FoundPrompt,EO,RetTag);
+ match_line(Name,Pid,Line,Patterns,FoundPrompt,Term,EO,RetTag);
{match,Match} ->
log(name_or_pid(Name,Pid),"MATCH: ~ts",[Line]),
{RetTag,{Tag,Match}}
end;
-match_line(Name,Pid,Line,[Pattern|Patterns],FoundPrompt,EO,RetTag) ->
+match_line(Name,Pid,Line,[Pattern|Patterns],FoundPrompt,Term,EO,RetTag) ->
case re:run(Line,Pattern,[{capture,all,list}]) of
nomatch ->
- match_line(Name,Pid,Line,Patterns,FoundPrompt,EO,RetTag);
+ match_line(Name,Pid,Line,Patterns,FoundPrompt,Term,EO,RetTag);
{match,Match} ->
log(name_or_pid(Name,Pid),"MATCH: ~ts",[Line]),
{RetTag,Match}
end;
-match_line(Name,Pid,Line,[],FoundPrompt,EO,match) ->
- match_line(Name,Pid,Line,EO#eo.haltpatterns,FoundPrompt,EO,halt);
-match_line(Name,Pid,Line,[],_FoundPrompt,_EO,halt) ->
+match_line(Name,Pid,Line,[],FoundPrompt,Term,EO,match) ->
+ match_line(Name,Pid,Line,EO#eo.haltpatterns,FoundPrompt,Term,EO,halt);
+%% print any terminated line that can not be matched
+match_line(Name,Pid,Line,[],_FoundPrompt,true,_EO,halt) ->
log(name_or_pid(Name,Pid)," ~ts",[Line]),
+ nomatch;
+%% if there's no line termination, Line is saved as Rest (above) and will
+%% be printed later
+match_line(_Name,_Pid,_Line,[],_FoundPrompt,false,_EO,halt) ->
nomatch.
one_line([$\n|Rest],Line) ->
diff --git a/lib/common_test/test/ct_config_SUITE.erl b/lib/common_test/test/ct_config_SUITE.erl
index 9879e0f20d..cbbfe408a8 100644
--- a/lib/common_test/test/ct_config_SUITE.erl
+++ b/lib/common_test/test/ct_config_SUITE.erl
@@ -113,10 +113,14 @@ userconfig_static(Config) when is_list(Config) ->
["config_static_SUITE"]).
userconfig_dynamic(Config) when is_list(Config) ->
- run_test(config_dynamic_SUITE,
- Config,
- {userconfig, {config_driver, "config_server"}},
- ["config_dynamic_SUITE"]).
+ case skip_dynamic() of
+ true -> {skip,"TimeWarpingOS"};
+ false ->
+ run_test(config_dynamic_SUITE,
+ Config,
+ {userconfig, {config_driver, "config_server"}},
+ ["config_dynamic_SUITE"])
+ end.
testspec_legacy(Config) when is_list(Config) ->
DataDir = ?config(data_dir, Config),
@@ -147,16 +151,20 @@ testspec_static(Config) when is_list(Config) ->
file:delete(filename:join(ConfigDir, "spec_static.spec")).
testspec_dynamic(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
- ConfigDir = ?config(config_dir, Config),
- make_spec(DataDir, ConfigDir, "spec_dynamic.spec",
- [config_dynamic_SUITE],
- [{userconfig, {config_driver, "config_server"}}]),
- run_test(config_dynamic_SUITE,
- Config,
- {spec, filename:join(ConfigDir, "spec_dynamic.spec")},
- []),
- file:delete(filename:join(ConfigDir, "spec_dynamic.spec")).
+ case skip_dynamic() of
+ true -> {skip,"TimeWarpingOS"};
+ false ->
+ DataDir = ?config(data_dir, Config),
+ ConfigDir = ?config(config_dir, Config),
+ make_spec(DataDir, ConfigDir, "spec_dynamic.spec",
+ [config_dynamic_SUITE],
+ [{userconfig, {config_driver, "config_server"}}]),
+ run_test(config_dynamic_SUITE,
+ Config,
+ {spec, filename:join(ConfigDir, "spec_dynamic.spec")},
+ []),
+ file:delete(filename:join(ConfigDir, "spec_dynamic.spec"))
+ end.
@@ -198,6 +206,23 @@ setup_env(Test, Config, CTConfig) ->
reformat_events(Events, EH) ->
ct_test_support:reformat(Events, EH).
+
+%%%-----------------------------------------------------------------
+%%% Test related to 'localtime' will often fail if the test host is
+%%% time warping, so let's just skip the 'dynamic' tests then.
+skip_dynamic() ->
+ case os:getenv("TS_EXTRA_PLATFORM_LABEL") of
+ TSExtraPlatformLabel when is_list(TSExtraPlatformLabel) ->
+ case string:str(TSExtraPlatformLabel,"TimeWarpingOS") of
+ 0 -> false;
+ _ -> true
+ end;
+ _ ->
+ false
+ end.
+
+
+
%%%-----------------------------------------------------------------
%%% TEST EVENTS
%%%-----------------------------------------------------------------
diff --git a/lib/common_test/test/ct_config_SUITE_data/config/test/config_dynamic_SUITE.erl b/lib/common_test/test/ct_config_SUITE_data/config/test/config_dynamic_SUITE.erl
index 0b3f834732..20fdf1034b 100644
--- a/lib/common_test/test/ct_config_SUITE_data/config/test/config_dynamic_SUITE.erl
+++ b/lib/common_test/test/ct_config_SUITE_data/config/test/config_dynamic_SUITE.erl
@@ -73,7 +73,7 @@ test_get_known_variable(_)->
% localtime will be updated in 5 seconds, check that
test_localtime_update(_)->
Seconds = 5,
- LT1 = ct:get_config(localtime),
+ LT1 = ct:reload_config(localtime),
timer:sleep(Seconds*1000), % don't want scaling of this timer
LT2 = ct:reload_config(localtime),
case is_diff_ok(LT1, LT2, Seconds) of
@@ -137,6 +137,11 @@ my_dt_to_datetime([{date, D},{time, T}])->
is_diff_ok(DT1, DT2, Seconds)->
GS1 = calendar:datetime_to_gregorian_seconds(my_dt_to_datetime(DT1)),
GS2 = calendar:datetime_to_gregorian_seconds(my_dt_to_datetime(DT2)),
+ ct:log("Checking diff~n"
+ "DT1: ~p, gregorian seconds: ~p~n"
+ "DT2: ~p, gregorian seconds: ~p~n"
+ "Diff: ~p",
+ [DT1,GS1,DT2,GS2,GS2-GS1]),
if
GS2-GS1 > Seconds+Seconds/2;
GS2-GS1 < Seconds-Seconds/2->
diff --git a/lib/common_test/test/ct_netconfc_SUITE.erl b/lib/common_test/test/ct_netconfc_SUITE.erl
index 2919f01605..8932f930d1 100644
--- a/lib/common_test/test/ct_netconfc_SUITE.erl
+++ b/lib/common_test/test/ct_netconfc_SUITE.erl
@@ -55,7 +55,7 @@ check_crypto_and_ssh() ->
(catch code:load_file(crypto)),
case code:is_loaded(crypto) of
{file,_} ->
- case ssh:start() of
+ case catch ssh:start() of
Ok when Ok==ok; Ok=={error,{already_started,ssh}} ->
ct:log("ssh started",[]),
ok;
diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc_remote_SUITE.erl b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc_remote_SUITE.erl
index a65275da43..f2580ad8e9 100644
--- a/lib/common_test/test/ct_netconfc_SUITE_data/netconfc_remote_SUITE.erl
+++ b/lib/common_test/test/ct_netconfc_SUITE_data/netconfc_remote_SUITE.erl
@@ -83,7 +83,9 @@ end_per_suite(Config) ->
%% Running the netconf server in a remote node, test that the client
%% process terminates if the remote node goes down.
remote_crash(Config) ->
- {ok,Node} = ct_slave:start(nc_remote_crash),
+ {ok,Node} = ct_slave:start(nc_remote_crash,[{boot_timeout,15},
+ {init_timeout,15},
+ {startup_timeout,15}]),
Pa = filename:dirname(code:which(?NS)),
true = rpc:call(Node,code,add_patha,[Pa]),
rpc:call(Node,code,load_file,[crypto]),
diff --git a/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl b/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl
index e62bc617fa..2412ea6aba 100644
--- a/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl
+++ b/lib/common_test/test/ct_netconfc_SUITE_data/ns.erl
@@ -302,10 +302,14 @@ table_trans(Fun,Args) ->
S ->
apply(Fun,Args);
Pid ->
+ Ref = erlang:monitor(process,Pid),
Pid ! {table_trans,Fun,Args,self()},
receive
{table_trans_done,Result} ->
- Result
+ erlang:demonitor(Ref,[flush]),
+ Result;
+ {'DOWN',Ref,process,Pid,Reason} ->
+ exit({main_ns_proc_died,Reason})
after 20000 ->
exit(table_trans_timeout)
end
diff --git a/lib/common_test/vsn.mk b/lib/common_test/vsn.mk
index 2fab4d3883..c68750886a 100644
--- a/lib/common_test/vsn.mk
+++ b/lib/common_test/vsn.mk
@@ -1 +1 @@
-COMMON_TEST_VSN = 1.13
+COMMON_TEST_VSN = 1.12.2
diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml
index ae375c5f58..92b3d809fc 100644
--- a/lib/compiler/doc/src/notes.xml
+++ b/lib/compiler/doc/src/notes.xml
@@ -32,6 +32,117 @@
<p>This document describes the changes made to the Compiler
application.</p>
+<section><title>Compiler 7.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ A literal binary matching regression was introduced in
+ 19.0 where a match could fail to resolve to the right
+ clause. This has now been fixed.</p>
+ <p>
+ Own Id: OTP-13738</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Compiler 7.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p><c>compile:forms/1,2</c> would crash when used in a
+ working directory that had been deleted by another
+ process.</p>
+ <p>
+ Own Id: OTP-13430 Aux Id: ERL-113 </p>
+ </item>
+ <item>
+ <p>Dialyzer no longer crashes when there is an invalid
+ function call such as <c>42(7)</c> in a module being
+ analyzed. The compiler will now warn for invalid function
+ calls such as <c>X = 42, x(7)</c>.</p>
+ <p>
+ Own Id: OTP-13552 Aux Id: ERL-138 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Optimization of tuple matching has been slightly
+ improved.</p>
+ <p>
+ Own Id: OTP-12951</p>
+ </item>
+ <item>
+ <p>Five deprecated and undocumented functions in the
+ module <c>core_lib</c> have been removed. The functions
+ are: <c>get_anno/{1,2}</c>, <c>is_literal/1</c>,
+ <c>is_literal_list/1</c>, and <c>literal_value</c>. Use
+ the appropriate functions in the <c>cerl</c> module
+ instead.</p>
+ <p>
+ Own Id: OTP-12979</p>
+ </item>
+ <item>
+ <p>The pre-processor can now expand the ?FUNCTION_NAME
+ and ?FUNCTION_ARITY macros.</p>
+ <p>
+ Own Id: OTP-13059</p>
+ </item>
+ <item>
+ <p>The function mapfold/4 has been added to the
+ <c>cerl_trees</c> module.</p>
+ <p>
+ Own Id: OTP-13280</p>
+ </item>
+ <item>
+ <p>Bitstring comprehensions have been generalized to
+ allow arbitrary expressions in the construction part.</p>
+ <p>
+ Own Id: OTP-13289</p>
+ </item>
+ <item>
+ <p>The compiler will now produce warnings for binary
+ patterns that will never match (example:
+ <c>&lt;&lt;-1/unsigned&gt;&gt; = Bin</c>). </p>
+ <p>
+ Own Id: OTP-13374 Aux Id: ERL-44 </p>
+ </item>
+ <item>
+ <p>The compiler will no longer put the compilation date
+ and time into BEAM files. That means that two BEAM files
+ compiled on the same computer from the same source code
+ and compilation options will be identical.</p>
+ <p>Note: If you want to find out whether a BEAM file on
+ disk is different from the loaded code, compared the MD5
+ value obtained from <c>Mod:module_info(md5)</c> with the
+ MD5 value obtained from
+ <c>beam_lib:md5(BeamFileForMod)</c></p>.
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-13504</p>
+ </item>
+ <item>
+ <p>The function <c>compile:env_compiler_options/0</c> has
+ been added to allow tools to pick up the same default
+ compiler options as the compiler itself.</p>
+ <p>
+ Own Id: OTP-13654</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Compiler 6.0.3</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl
index 85d332c56e..ec41925beb 100644
--- a/lib/compiler/src/beam_block.erl
+++ b/lib/compiler/src/beam_block.erl
@@ -159,14 +159,43 @@ find_fixpoint(OptFun, Is0) ->
end.
%% move_allocates(Is0) -> Is
-%% Move allocate instructions upwards in the instruction stream, in the
-%% hope of getting more possibilities for optimizing away moves later.
+%% Move allocate instructions upwards in the instruction stream
+%% (within the same block), in the hope of getting more possibilities
+%% for optimizing away moves later.
%%
-%% NOTE: Moving allocation instructions is only safe because it is done
-%% immediately after code generation so that we KNOW that if {x,X} is
-%% initialized, all x registers with lower numbers are also initialized.
-%% That assumption may not be true after other optimizations, such as
-%% the beam_utils:live_opt/1 optimization.
+%% For example, we can transform the following instructions:
+%%
+%% get_tuple_element x(1) Element => x(2)
+%% allocate_zero StackSize 3 %% x(0), x(1), x(2) are live
+%%
+%% to the following instructions:
+%%
+%% allocate_zero StackSize 2 %% x(0) and x(1) are live
+%% get_tuple_element x(1) Element => x(2)
+%%
+%% NOTE: Since the beam_reorder pass has been run, it is no longer
+%% safe to assume that if x(N) is initialized, then all lower-numbered
+%% x registers are also initialized.
+%%
+%% For example, in general it is not safe to transform the following
+%% instructions:
+%%
+%% get_tuple_element x(0) Element => x(1)
+%% allocate_zero StackSize 3 %x(0), x(1), x(2) are live
+%%
+%% to the following instructions:
+%%
+%% allocate_zero StackSize 3
+%% get_tuple_element x(0) Element => x(1)
+%%
+%% The transformation is safe if and only if x(1) has been
+%% initialized previously. Unfortunately, beam_reorder may have moved
+%% a get_tuple_element instruction so that x(1) is not always
+%% initialized when this code is reached. To find whether or not x(1)
+%% is initialized, we would need to analyze all code preceding these
+%% two instructions (across branches). Since we currently don't have
+%% any practical mechanism for doing that, we will have to
+%% conservatively assume that the transformation is unsafe.
move_allocates([{block,Bl0}|Is]) ->
Bl = move_allocates_1(reverse(Bl0), []),
@@ -175,27 +204,19 @@ move_allocates([I|Is]) ->
[I|move_allocates(Is)];
move_allocates([]) -> [].
-move_allocates_1([{set,[],[],{alloc,_,_}=Alloc}|Is0], Acc0) ->
- {Is,Acc} = move_allocates_2(Alloc, Is0, Acc0),
- move_allocates_1(Is, Acc);
+move_allocates_1([I|Is], [{set,[],[],{alloc,Live0,Info}}|Acc]=Acc0) ->
+ case {alloc_may_pass(I),alloc_live_regs(I, Live0)} of
+ {false,_} ->
+ move_allocates_1(Is, [I|Acc0]);
+ {true,not_possible} ->
+ move_allocates_1(Is, [I|Acc0]);
+ {true,Live} when is_integer(Live) ->
+ A = {set,[],[],{alloc,Live,Info}},
+ move_allocates_1(Is, [A,I|Acc])
+ end;
move_allocates_1([I|Is], Acc) ->
move_allocates_1(Is, [I|Acc]);
-move_allocates_1([], Is) -> Is.
-
-move_allocates_2({alloc,Live,Info}, [{set,[],[],{alloc,Live0,Info0}}|Is], Acc) ->
- Live = Live0, % Assertion.
- Alloc = {alloc,Live,combine_alloc(Info0, Info)},
- move_allocates_2(Alloc, Is, Acc);
-move_allocates_2({alloc,Live,Info}=Alloc0, [I|Is]=Is0, Acc) ->
- case alloc_may_pass(I) of
- false ->
- {Is0,[{set,[],[],Alloc0}|Acc]};
- true ->
- Alloc = {alloc,alloc_live_regs(I, Live),Info},
- move_allocates_2(Alloc, Is, [I|Acc])
- end;
-move_allocates_2(Alloc, [], Acc) ->
- {[],[{set,[],[],Alloc}|Acc]}.
+move_allocates_1([], Acc) -> Acc.
alloc_may_pass({set,_,_,{alloc,_,_}}) -> false;
alloc_may_pass({set,_,_,{set_tuple_element,_}}) -> false;
@@ -204,9 +225,6 @@ alloc_may_pass({set,_,_,put_list}) -> false;
alloc_may_pass({set,_,_,put}) -> false;
alloc_may_pass({set,_,_,_}) -> true.
-combine_alloc({_,Ns,Nh1,Init}, {_,nostack,Nh2,[]}) ->
- {zero,Ns,beam_utils:combine_heap_needs(Nh1, Nh2),Init}.
-
%% opt([Instruction]) -> [Instruction]
%% Optimize the instruction stream inside a basic block.
@@ -393,10 +411,19 @@ eliminate_use_of_from_reg([I]=Is, From, _To, Acc) ->
%% opt_alloc(Instructions) -> Instructions'
%% Optimises all allocate instructions.
+opt_alloc([{set,[],[],{alloc,Live0,Info0}},
+ {set,[],[],{alloc,Live,Info}}|Is]) ->
+ Live = Live0, %Assertion.
+ Alloc = combine_alloc(Info0, Info),
+ I = {set,[],[],{alloc,Live,Alloc}},
+ opt_alloc([I|Is]);
opt_alloc([{set,[],[],{alloc,R,{_,Ns,Nh,[]}}}|Is]) ->
[{set,[],[],opt_alloc(Is, Ns, Nh, R)}|Is];
opt_alloc([I|Is]) -> [I|opt_alloc(Is)];
opt_alloc([]) -> [].
+
+combine_alloc({_,Ns,Nh1,Init}, {_,nostack,Nh2,[]}) ->
+ {zero,Ns,beam_utils:combine_heap_needs(Nh1, Nh2),Init}.
%% opt_alloc(Instructions, FrameSize, HeapNeed, LivingRegs) -> [Instr]
%% Generates the optimal sequence of instructions for
@@ -445,13 +472,14 @@ count_ones(Bits, Acc) ->
alloc_live_regs({set,Ds,Ss,_}, Regs0) ->
Rset = x_live(Ss, x_dead(Ds, (1 bsl Regs0)-1)),
- live_regs(Rset).
+ live_regs(0, Rset).
-live_regs(Regs) ->
- live_regs_1(0, Regs).
-
-live_regs_1(N, 0) -> N;
-live_regs_1(N, Regs) -> live_regs_1(N+1, Regs bsr 1).
+live_regs(N, 0) ->
+ N;
+live_regs(N, Regs) when Regs band 1 =:= 1 ->
+ live_regs(N+1, Regs bsr 1);
+live_regs(_, _) ->
+ not_possible.
x_dead([{x,N}|Rs], Regs) -> x_dead(Rs, Regs band (bnot (1 bsl N)));
x_dead([_|Rs], Regs) -> x_dead(Rs, Regs);
diff --git a/lib/compiler/src/beam_dead.erl b/lib/compiler/src/beam_dead.erl
index b01f58f683..6f6d742293 100644
--- a/lib/compiler/src/beam_dead.erl
+++ b/lib/compiler/src/beam_dead.erl
@@ -272,17 +272,14 @@ backward([{jump,{f,To}}=J|[{bif,Op,_,Ops,Reg}|Is]=Is0], D, Acc) ->
catch
throw:not_possible -> backward(Is0, D, [J|Acc])
end;
-backward([{test,bs_start_match2,F,Live,[R,_]=Args,Ctxt}|Is], D,
+backward([{test,bs_start_match2,F,_,[R,_],Ctxt}=I|Is], D,
[{test,bs_match_string,F,[Ctxt,Bs]},
{test,bs_test_tail2,F,[Ctxt,0]}|Acc0]=Acc) ->
- {f,To0} = F,
- To = shortcut_bs_start_match(To0, R, D),
case beam_utils:is_killed(Ctxt, Acc0, D) of
true ->
- Eq = {test,is_eq_exact,{f,To},[R,{literal,Bs}]},
+ Eq = {test,is_eq_exact,F,[R,{literal,Bs}]},
backward(Is, D, [Eq|Acc0]);
false ->
- I = {test,bs_start_match2,{f,To},Live,Args,Ctxt},
backward(Is, D, [I|Acc])
end;
backward([{test,bs_start_match2,{f,To0},Live,[Src|_]=Info,Dst}|Is], D, Acc) ->
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 82ff8a95f3..e951a25e04 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -43,6 +43,10 @@
-type abstract_code() :: [erl_parse:abstract_form()].
+%% Internal representations used for 'from_asm' and 'from_beam' compilation can
+%% also be valid, but have no relevant types defined.
+-type forms() :: abstract_code() | cerl:c_module().
+
-type option() :: atom() | {atom(), term()} | {'d', atom(), term()}.
-type err_info() :: {erl_anno:line() | 'none',
@@ -88,7 +92,7 @@ file(File, Opt) ->
forms(Forms) -> forms(Forms, ?DEFAULT_OPTIONS).
--spec forms(abstract_code(), [option()] | option()) -> comp_ret().
+-spec forms(forms(), [option()] | option()) -> comp_ret().
forms(Forms, Opts) when is_list(Opts) ->
do_compile({forms,Forms}, [binary|Opts++env_default_opts()]);
@@ -116,7 +120,7 @@ noenv_file(File, Opts) when is_list(Opts) ->
noenv_file(File, Opt) ->
noenv_file(File, [Opt|?DEFAULT_OPTIONS]).
--spec noenv_forms(abstract_code(), [option()] | option()) -> comp_ret().
+-spec noenv_forms(forms(), [option()] | option()) -> comp_ret().
noenv_forms(Forms, Opts) when is_list(Opts) ->
do_compile({forms,Forms}, [binary|Opts]);
@@ -236,6 +240,8 @@ format_error({epp,E}) ->
epp:format_error(E);
format_error(write_error) ->
"error writing file";
+format_error({write_error, Error}) ->
+ io_lib:format("error writing file: ~ts", [file:format_error(Error)]);
format_error({rename,From,To,Error}) ->
io_lib:format("failed to rename ~ts to ~ts: ~ts",
[From,To,file:format_error(Error)]);
@@ -1206,7 +1212,7 @@ makedep_output(#compile{code=Code,options=Opts,ofile=Ofile}=St) ->
end,
{ok,St}
catch
- exit:_ ->
+ error:_ ->
%% Couldn't write to output Makefile.
Err = {St#compile.ifile,[{none,?MODULE,write_error}]},
{error,St#compile{errors=St#compile.errors++[Err]}}
@@ -1479,8 +1485,8 @@ save_binary_1(St) ->
end,
{error,St#compile{errors=St#compile.errors ++ Es}}
end;
- {error,_Error} ->
- Es = [{Tfile,[{none,compile,write_error}]}],
+ {error,Error} ->
+ Es = [{Tfile,[{none,compile,{write_error,Error}}]}],
{error,St#compile{errors=St#compile.errors ++ Es}}
end.
@@ -1628,8 +1634,8 @@ listing(LFun, Ext, St) ->
LFun(Lf, Code),
ok = file:close(Lf),
{ok,St};
- {error,_Error} ->
- Es = [{Lfile,[{none,compile,write_error}]}],
+ {error,Error} ->
+ Es = [{Lfile,[{none,compile,{write_error,Error}}]}],
{error,St#compile{errors=St#compile.errors ++ Es}}
end.
diff --git a/lib/compiler/test/beam_block_SUITE.erl b/lib/compiler/test/beam_block_SUITE.erl
index 4bcb252833..9fcb6e497d 100644
--- a/lib/compiler/test/beam_block_SUITE.erl
+++ b/lib/compiler/test/beam_block_SUITE.erl
@@ -21,7 +21,8 @@
-export([all/0,suite/0,groups/0,init_per_suite/1,end_per_suite/1,
init_per_group/2,end_per_group/2,
- get_map_elements/1,otp_7345/1,move_opt_across_gc_bif/1]).
+ get_map_elements/1,otp_7345/1,move_opt_across_gc_bif/1,
+ erl_202/1]).
%% The only test for the following functions is that
%% the code compiles and is accepted by beam_validator.
@@ -37,7 +38,8 @@ groups() ->
[{p,[parallel],
[get_map_elements,
otp_7345,
- move_opt_across_gc_bif
+ move_opt_across_gc_bif,
+ erl_202
]}].
init_per_suite(Config) ->
@@ -135,6 +137,27 @@ positive(speaking) ->
paris([], P) -> P + 1.
+
+%% See https://bugs.erlang.org/browse/ERL-202.
+%% Test that move_allocates/1 in beam_block doesn't move allocate
+%% when it would not be safe.
+
+-record(erl_202_r1, {y}).
+-record(erl_202_r2, {x}).
+
+erl_202(_Config) ->
+ Ref = make_ref(),
+ Ref = erl_202({{1,2},Ref}, 42),
+
+ {Ref} = erl_202({7,8}, #erl_202_r1{y=#erl_202_r2{x=Ref}}),
+
+ ok.
+
+erl_202({{_, _},X}, _) ->
+ X;
+erl_202({_, _}, #erl_202_r1{y=R2}) ->
+ {R2#erl_202_r2.x}.
+
%%%
%%% The only test of the following code is that it compiles.
%%%
diff --git a/lib/compiler/test/match_SUITE.erl b/lib/compiler/test/match_SUITE.erl
index 31402ac717..127679ba69 100644
--- a/lib/compiler/test/match_SUITE.erl
+++ b/lib/compiler/test/match_SUITE.erl
@@ -24,7 +24,7 @@
pmatch/1,mixed/1,aliases/1,non_matching_aliases/1,
match_in_call/1,untuplify/1,shortcut_boolean/1,letify_guard/1,
selectify/1,underscore/1,match_map/1,map_vars_used/1,
- coverage/1,grab_bag/1]).
+ coverage/1,grab_bag/1,literal_binary/1]).
-include_lib("common_test/include/ct.hrl").
@@ -40,7 +40,7 @@ groups() ->
match_in_call,untuplify,
shortcut_boolean,letify_guard,selectify,
underscore,match_map,map_vars_used,coverage,
- grab_bag]}].
+ grab_bag,literal_binary]}].
init_per_suite(Config) ->
@@ -574,6 +574,15 @@ grab_bag_remove_failure([{stretch,_,Mi}=Stretch | Specs], Unit, _MaxFailure) ->
ok
end.
+%% Regression in 19.0, reported by Alexei Sholik
+literal_binary(_Config) ->
+ 3 = literal_binary_match(bar,<<"y">>),
+ ok.
+
+literal_binary_match(bar, <<"x">>) -> 1;
+literal_binary_match(_, <<"x">>) -> 2;
+literal_binary_match(_, <<"y">>) -> 3;
+literal_binary_match(_, _) -> fail.
id(I) -> I.
diff --git a/lib/compiler/vsn.mk b/lib/compiler/vsn.mk
index c83455240d..334784657e 100644
--- a/lib/compiler/vsn.mk
+++ b/lib/compiler/vsn.mk
@@ -1 +1 @@
-COMPILER_VSN = 6.0.3
+COMPILER_VSN = 7.0.1
diff --git a/lib/cosEvent/doc/src/notes.xml b/lib/cosEvent/doc/src/notes.xml
index 83fa5fa4b7..fe94cb64d3 100644
--- a/lib/cosEvent/doc/src/notes.xml
+++ b/lib/cosEvent/doc/src/notes.xml
@@ -33,7 +33,22 @@
<file>notes.xml</file>
</header>
- <section><title>cosEvent 2.2</title>
+ <section><title>cosEvent 2.2.1</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosEvent 2.2</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosEvent/test/event_channel_SUITE.erl b/lib/cosEvent/test/event_channel_SUITE.erl
index d237db8e9b..bbae8d782a 100644
--- a/lib/cosEvent/test/event_channel_SUITE.erl
+++ b/lib/cosEvent/test/event_channel_SUITE.erl
@@ -32,7 +32,7 @@
%% Macros
%%-----------------------------------------------------------------
--define(default_timeout, ?t:minutes(5)).
+-define(default_timeout, test_server:minutes(5)).
-define(match(ExpectedRes, Expr),
@@ -46,7 +46,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -87,12 +87,12 @@ cases() ->
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -131,8 +131,7 @@ app_test(_Config) ->
-event_objects_api(doc) -> ["Testing the CosEvent API to setup a complete service", ""];
-event_objects_api(suite) -> [];
+%% Testing the CosEvent API to setup a complete service
event_objects_api(_Config) ->
Ch = ?match({_,key,_,_,_,_}, cosEventApp:start_channel([{typecheck, true},
@@ -234,8 +233,7 @@ event_objects_api(_Config) ->
ok.
-events_api(doc) -> ["Testing the CosEvent API for sending events asynchronous", ""];
-events_api(suite) -> [];
+%% Testing the CosEvent API for sending events asynchronous
events_api(_Config) ->
Ch = ?match({_,key,_,_,_,_}, cosEventApp:start_channel([{typecheck, true},
@@ -244,8 +242,7 @@ events_api(_Config) ->
event_sender(Ch).
-events_sync_api(doc) -> ["Testing the CosEvent API for sending events synchronous", ""];
-events_sync_api(suite) -> [];
+%% Testing the CosEvent API for sending events synchronous
events_sync_api(_Config) ->
Ch = ?match({_,key,_,_,_,_}, cosEventApp:start_channel([{typecheck, true},
diff --git a/lib/cosEvent/test/generated_SUITE.erl b/lib/cosEvent/test/generated_SUITE.erl
index 2fa15c3a96..86794023af 100644
--- a/lib/cosEvent/test/generated_SUITE.erl
+++ b/lib/cosEvent/test/generated_SUITE.erl
@@ -29,7 +29,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/include/corba.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
-define(match(ExpectedRes, Expr),
fun() ->
@@ -40,7 +40,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -51,7 +51,7 @@
Not ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS);
+ exit(AcTuAlReS);
_ ->
AcTuAlReS
end
@@ -63,7 +63,7 @@
case orber_tc:check_tc(TC) of
false ->
io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]),
- ?line exit(TC);
+ exit(TC);
true ->
true
end
@@ -125,12 +125,12 @@ end_per_group(_GroupName, Config) ->
%% Init and cleanup functions.
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -139,8 +139,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventChannelAdmin_AlreadyConnected'
%% Description:
%%-----------------------------------------------------------------
-'CosEventChannelAdmin_AlreadyConnected'(doc) -> [""];
-'CosEventChannelAdmin_AlreadyConnected'(suite) -> [];
'CosEventChannelAdmin_AlreadyConnected'(_) ->
?match(true, orber_tc:check_tc('CosEventChannelAdmin_AlreadyConnected':tc())),
?match("IDL:omg.org/CosEventChannelAdmin/AlreadyConnected:1.0",
@@ -154,8 +152,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventChannelAdmin_TypeError'
%% Description:
%%-----------------------------------------------------------------
-'CosEventChannelAdmin_TypeError'(doc) -> [""];
-'CosEventChannelAdmin_TypeError'(suite) -> [];
'CosEventChannelAdmin_TypeError'(_) ->
?match(true, orber_tc:check_tc('CosEventChannelAdmin_TypeError':tc())),
?match("IDL:omg.org/CosEventChannelAdmin/TypeError:1.0",
@@ -169,8 +165,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventComm_Disconnected'
%% Description:
%%-----------------------------------------------------------------
-'CosEventComm_Disconnected'(doc) -> [""];
-'CosEventComm_Disconnected'(suite) -> [];
'CosEventComm_Disconnected'(_) ->
?match(true, orber_tc:check_tc('CosEventComm_Disconnected':tc())),
?match("IDL:omg.org/CosEventComm/Disconnected:1.0",
@@ -183,8 +177,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventChannelAdmin_ConsumerAdmin'
%% Description:
%%-----------------------------------------------------------------
-'CosEventChannelAdmin_ConsumerAdmin'(doc) -> [""];
-'CosEventChannelAdmin_ConsumerAdmin'(suite) -> [];
'CosEventChannelAdmin_ConsumerAdmin'(_) ->
?nomatch(undefined, 'CosEventChannelAdmin_ConsumerAdmin':oe_tc(obtain_push_supplier)),
?nomatch(undefined, 'CosEventChannelAdmin_ConsumerAdmin':oe_tc(obtain_pull_supplier)),
@@ -201,8 +193,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventChannelAdmin_EventChannel'
%% Description:
%%-----------------------------------------------------------------
-'CosEventChannelAdmin_EventChannel'(doc) -> [""];
-'CosEventChannelAdmin_EventChannel'(suite) -> [];
'CosEventChannelAdmin_EventChannel'(_) ->
?nomatch(undefined, 'CosEventChannelAdmin_EventChannel':oe_tc(for_consumers)),
?nomatch(undefined, 'CosEventChannelAdmin_EventChannel':oe_tc(for_suppliers)),
@@ -220,8 +210,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventChannelAdmin_ProxyPullConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosEventChannelAdmin_ProxyPullConsumer'(doc) -> [""];
-'CosEventChannelAdmin_ProxyPullConsumer'(suite) -> [];
'CosEventChannelAdmin_ProxyPullConsumer'(_) ->
?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullConsumer':oe_tc(connect_pull_supplier)),
?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullConsumer':oe_tc(disconnect_pull_consumer)),
@@ -239,8 +227,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventChannelAdmin_ProxyPullSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosEventChannelAdmin_ProxyPullSupplier'(doc) -> [""];
-'CosEventChannelAdmin_ProxyPullSupplier'(suite) -> [];
'CosEventChannelAdmin_ProxyPullSupplier'(_) ->
?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(connect_pull_consumer)),
?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(pull)),
@@ -260,8 +246,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventChannelAdmin_ProxyPushConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosEventChannelAdmin_ProxyPushConsumer'(doc) -> [""];
-'CosEventChannelAdmin_ProxyPushConsumer'(suite) -> [];
'CosEventChannelAdmin_ProxyPushConsumer'(_) ->
?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushConsumer':oe_tc(connect_push_supplier)),
?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushConsumer':oe_tc(push)),
@@ -280,8 +264,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventChannelAdmin_ProxyPushSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosEventChannelAdmin_ProxyPushSupplier'(doc) -> [""];
-'CosEventChannelAdmin_ProxyPushSupplier'(suite) -> [];
'CosEventChannelAdmin_ProxyPushSupplier'(_) ->
?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushSupplier':oe_tc(connect_push_consumer)),
?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushSupplier':oe_tc(disconnect_push_supplier)),
@@ -299,8 +281,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventChannelAdmin_SupplierAdmin'
%% Description:
%%-----------------------------------------------------------------
-'CosEventChannelAdmin_SupplierAdmin'(doc) -> [""];
-'CosEventChannelAdmin_SupplierAdmin'(suite) -> [];
'CosEventChannelAdmin_SupplierAdmin'(_) ->
?nomatch(undefined, 'CosEventChannelAdmin_SupplierAdmin':oe_tc(obtain_push_consumer)),
?nomatch(undefined, 'CosEventChannelAdmin_SupplierAdmin':oe_tc(obtain_pull_consumer)),
@@ -317,8 +297,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'oe_CosEventComm_CAdmin'
%% Description:
%%-----------------------------------------------------------------
-'oe_CosEventComm_CAdmin'(doc) -> [""];
-'oe_CosEventComm_CAdmin'(suite) -> [];
'oe_CosEventComm_CAdmin'(_) ->
?nomatch(undefined, 'oe_CosEventComm_CAdmin':oe_tc(obtain_push_supplier)),
?nomatch(undefined, 'oe_CosEventComm_CAdmin':oe_tc(obtain_pull_supplier)),
@@ -339,8 +317,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'oe_CosEventComm_Channel'
%% Description:
%%-----------------------------------------------------------------
-'oe_CosEventComm_Channel'(doc) -> [""];
-'oe_CosEventComm_Channel'(suite) -> [];
'oe_CosEventComm_Channel'(_) ->
?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(for_consumers)),
?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(for_suppliers)),
@@ -362,8 +338,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'oe_CosEventComm_Event'
%% Description:
%%-----------------------------------------------------------------
-'oe_CosEventComm_Event'(doc) -> [""];
-'oe_CosEventComm_Event'(suite) -> [];
'oe_CosEventComm_Event'(_) ->
?nomatch(undefined, 'oe_CosEventComm_Event':oe_tc(send)),
?nomatch(undefined, 'oe_CosEventComm_Event':oe_tc(send_sync)),
@@ -380,8 +354,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'oe_CosEventComm_PullerS'
%% Description:
%%-----------------------------------------------------------------
-'oe_CosEventComm_PullerS'(doc) -> [""];
-'oe_CosEventComm_PullerS'(suite) -> [];
'oe_CosEventComm_PullerS'(_) ->
?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(connect_pull_consumer)),
?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(pull)),
@@ -405,8 +377,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'oe_CosEventComm_PusherS'
%% Description:
%%-----------------------------------------------------------------
-'oe_CosEventComm_PusherS'(doc) -> [""];
-'oe_CosEventComm_PusherS'(suite) -> [];
'oe_CosEventComm_PusherS'(_) ->
?nomatch(undefined, 'oe_CosEventComm_PusherS':oe_tc(connect_push_consumer)),
?nomatch(undefined, 'oe_CosEventComm_PusherS':oe_tc(disconnect_push_supplier)),
@@ -428,8 +398,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventComm_PullConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosEventComm_PullConsumer'(doc) -> [""];
-'CosEventComm_PullConsumer'(suite) -> [];
'CosEventComm_PullConsumer'(_) ->
?nomatch(undefined, 'CosEventComm_PullConsumer':oe_tc(disconnect_pull_consumer)),
?match(undefined, 'CosEventComm_PullConsumer':oe_tc(undefined)),
@@ -445,8 +413,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventComm_PullSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosEventComm_PullSupplier'(doc) -> [""];
-'CosEventComm_PullSupplier'(suite) -> [];
'CosEventComm_PullSupplier'(_) ->
?nomatch(undefined, 'CosEventComm_PullSupplier':oe_tc(pull)),
?nomatch(undefined, 'CosEventComm_PullSupplier':oe_tc(try_pull)),
@@ -464,8 +430,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventComm_PushConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosEventComm_PushConsumer'(doc) -> [""];
-'CosEventComm_PushConsumer'(suite) -> [];
'CosEventComm_PushConsumer'(_) ->
?nomatch(undefined, 'CosEventComm_PushConsumer':oe_tc(push)),
?nomatch(undefined, 'CosEventComm_PushConsumer':oe_tc(disconnect_push_consumer)),
@@ -482,8 +446,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventComm_PushSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosEventComm_PushSupplier'(doc) -> [""];
-'CosEventComm_PushSupplier'(suite) -> [];
'CosEventComm_PushSupplier'(_) ->
?nomatch(undefined, 'CosEventComm_PushSupplier':oe_tc(disconnect_push_supplier)),
?match(undefined, 'CosEventComm_PushSupplier':oe_tc(undefined)),
diff --git a/lib/cosEvent/vsn.mk b/lib/cosEvent/vsn.mk
index 3149020d7c..c39bed9fe4 100644
--- a/lib/cosEvent/vsn.mk
+++ b/lib/cosEvent/vsn.mk
@@ -1,2 +1,2 @@
-COSEVENT_VSN = 2.2
+COSEVENT_VSN = 2.2.1
diff --git a/lib/cosEventDomain/doc/src/notes.xml b/lib/cosEventDomain/doc/src/notes.xml
index 5617efe697..5e5bb2c33e 100644
--- a/lib/cosEventDomain/doc/src/notes.xml
+++ b/lib/cosEventDomain/doc/src/notes.xml
@@ -32,7 +32,22 @@
<file>notes.xml</file>
</header>
- <section><title>cosEventDomain 1.2</title>
+ <section><title>cosEventDomain 1.2.1</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosEventDomain 1.2</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosEventDomain/test/event_domain_SUITE.erl b/lib/cosEventDomain/test/event_domain_SUITE.erl
index b80b16ae6f..031b7726c5 100644
--- a/lib/cosEventDomain/test/event_domain_SUITE.erl
+++ b/lib/cosEventDomain/test/event_domain_SUITE.erl
@@ -35,7 +35,7 @@
%% Macros
%%-----------------------------------------------------------------
--define(default_timeout, ?t:minutes(5)).
+-define(default_timeout, test_server:minutes(5)).
-define(match(ExpectedRes, Expr),
@@ -49,7 +49,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -89,12 +89,12 @@ cases() ->
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -129,15 +129,12 @@ end_per_suite(Config) when is_list(Config) ->
%%-----------------------------------------------------------------
%% Tests app file
%%-----------------------------------------------------------------
-app_test(doc) -> [];
-app_test(suite) -> [];
app_test(_Config) ->
ok=test_server:app_test(cosEventDomain),
ok.
-event_domain_api(doc) -> ["Testing the CosEventDomain Domain API", ""];
-event_domain_api(suite) -> [];
+%% Testing the CosEventDomain Domain API
event_domain_api(_Config) ->
%% We will setup a cluster looking like:
@@ -418,8 +415,7 @@ event_domain_api(_Config) ->
ok.
-event_domain_factory_api(doc) -> ["Testing the CosEventDomain Factory API", ""];
-event_domain_factory_api(suite) -> [];
+%% Testing the CosEventDomain Factory API
event_domain_factory_api(_Config) ->
Cyclic = #'CosNotification_Property'{name=?CycleDetection,
diff --git a/lib/cosEventDomain/test/generated_SUITE.erl b/lib/cosEventDomain/test/generated_SUITE.erl
index 51b627f0d6..172465da2f 100644
--- a/lib/cosEventDomain/test/generated_SUITE.erl
+++ b/lib/cosEventDomain/test/generated_SUITE.erl
@@ -29,7 +29,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/include/corba.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
-define(match(ExpectedRes, Expr),
fun() ->
@@ -40,7 +40,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -51,7 +51,7 @@
Not ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS);
+ exit(AcTuAlReS);
_ ->
AcTuAlReS
end
@@ -63,7 +63,7 @@
case orber_tc:check_tc(TC) of
false ->
io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]),
- ?line exit(TC);
+ exit(TC);
true ->
true
end
@@ -123,12 +123,12 @@ end_per_group(_GroupName, Config) ->
%% Init and cleanup functions.
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -137,8 +137,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin'(doc) -> ["CosEventDomainAdmin"];
-'CosEventDomainAdmin'(suite) -> [];
'CosEventDomainAdmin'(_) ->
?match("CycleDetection", 'CosEventDomainAdmin':'CycleDetection'()),
?match(0, 'CosEventDomainAdmin':'AuthorizeCycles'()),
@@ -152,8 +150,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_DiamondSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_DiamondSeq'(doc) -> ["CosEventDomainAdmin_DiamondSeq"];
-'CosEventDomainAdmin_DiamondSeq'(suite) -> [];
'CosEventDomainAdmin_DiamondSeq'(_) ->
?match(true, orber_tc:check_tc('CosEventDomainAdmin_DiamondSeq':tc())),
?match("IDL:omg.org/CosEventDomainAdmin/DiamondSeq:1.0",
@@ -166,8 +162,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_AlreadyExists'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_AlreadyExists'(doc) -> ["CosEventDomainAdmin_AlreadyExists"];
-'CosEventDomainAdmin_AlreadyExists'(suite) -> [];
'CosEventDomainAdmin_AlreadyExists'(_) ->
?match(true, orber_tc:check_tc('CosEventDomainAdmin_AlreadyExists':tc())),
?match("IDL:omg.org/CosEventDomainAdmin/AlreadyExists:1.0",
@@ -180,8 +174,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_DomainIDSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_DomainIDSeq'(doc) -> ["CosEventDomainAdmin_DomainIDSeq"];
-'CosEventDomainAdmin_DomainIDSeq'(suite) -> [];
'CosEventDomainAdmin_DomainIDSeq'(_) ->
?match(true, orber_tc:check_tc('CosEventDomainAdmin_DomainIDSeq':tc())),
?match("IDL:omg.org/CosEventDomainAdmin/DomainIDSeq:1.0",
@@ -194,8 +186,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_Connection'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_Connection'(doc) -> ["CosEventDomainAdmin_Connection"];
-'CosEventDomainAdmin_Connection'(suite) -> [];
'CosEventDomainAdmin_Connection'(_) ->
?match(true, orber_tc:check_tc('CosEventDomainAdmin_Connection':tc())),
?match("IDL:omg.org/CosEventDomainAdmin/Connection:1.0",
@@ -208,8 +198,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_ConnectionIDSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_ConnectionIDSeq'(doc) -> ["CosEventDomainAdmin_ConnectionIDSeq"];
-'CosEventDomainAdmin_ConnectionIDSeq'(suite) -> [];
'CosEventDomainAdmin_ConnectionIDSeq'(_) ->
?match(true, orber_tc:check_tc('CosEventDomainAdmin_ConnectionIDSeq':tc())),
?match("IDL:omg.org/CosEventDomainAdmin/ConnectionIDSeq:1.0",
@@ -222,8 +210,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_ConnectionNotFound'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_ConnectionNotFound'(doc) -> ["CosEventDomainAdmin_ConnectionNotFound"];
-'CosEventDomainAdmin_ConnectionNotFound'(suite) -> [];
'CosEventDomainAdmin_ConnectionNotFound'(_) ->
?match(true, orber_tc:check_tc('CosEventDomainAdmin_ConnectionNotFound':tc())),
?match("IDL:omg.org/CosEventDomainAdmin/ConnectionNotFound:1.0",
@@ -236,8 +222,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_CycleCreationForbidden'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_CycleCreationForbidden'(doc) -> ["CosEventDomainAdmin_CycleCreationForbidden"];
-'CosEventDomainAdmin_CycleCreationForbidden'(suite) -> [];
'CosEventDomainAdmin_CycleCreationForbidden'(_) ->
?match(true, orber_tc:check_tc('CosEventDomainAdmin_CycleCreationForbidden':tc())),
?match("IDL:omg.org/CosEventDomainAdmin/CycleCreationForbidden:1.0",
@@ -250,8 +234,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_CycleSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_CycleSeq'(doc) -> ["CosEventDomainAdmin_CycleSeq"];
-'CosEventDomainAdmin_CycleSeq'(suite) -> [];
'CosEventDomainAdmin_CycleSeq'(_) ->
?match(true, orber_tc:check_tc('CosEventDomainAdmin_CycleSeq':tc())),
?match("IDL:omg.org/CosEventDomainAdmin/CycleSeq:1.0",
@@ -264,8 +246,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_DiamondCreationForbidden'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_DiamondCreationForbidden'(doc) -> ["CosEventDomainAdmin_DiamondCreationForbidden"];
-'CosEventDomainAdmin_DiamondCreationForbidden'(suite) -> [];
'CosEventDomainAdmin_DiamondCreationForbidden'(_) ->
?match(true, orber_tc:check_tc('CosEventDomainAdmin_DiamondCreationForbidden':tc())),
?match("IDL:omg.org/CosEventDomainAdmin/DiamondCreationForbidden:1.0",
@@ -278,8 +258,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_DomainNotFound'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_DomainNotFound'(doc) -> ["CosEventDomainAdmin_DomainNotFound"];
-'CosEventDomainAdmin_DomainNotFound'(suite) -> [];
'CosEventDomainAdmin_DomainNotFound'(_) ->
?match(true, orber_tc:check_tc('CosEventDomainAdmin_DomainNotFound':tc())),
?match("IDL:omg.org/CosEventDomainAdmin/DomainNotFound:1.0",
@@ -292,8 +270,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_MemberIDSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_MemberIDSeq'(doc) -> ["CosEventDomainAdmin_MemberIDSeq"];
-'CosEventDomainAdmin_MemberIDSeq'(suite) -> [];
'CosEventDomainAdmin_MemberIDSeq'(_) ->
?match(true, orber_tc:check_tc('CosEventDomainAdmin_MemberIDSeq':tc())),
?match("IDL:omg.org/CosEventDomainAdmin/MemberIDSeq:1.0",
@@ -306,8 +282,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_RouteSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_RouteSeq'(doc) -> ["CosEventDomainAdmin_RouteSeq"];
-'CosEventDomainAdmin_RouteSeq'(suite) -> [];
'CosEventDomainAdmin_RouteSeq'(_) ->
?match(true, orber_tc:check_tc('CosEventDomainAdmin_RouteSeq':tc())),
?match("IDL:omg.org/CosEventDomainAdmin/RouteSeq:1.0",
@@ -320,8 +294,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_EventDomainFactory'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_EventDomainFactory'(doc) -> ["CosEventDomainAdmin_EventDomainFactory"];
-'CosEventDomainAdmin_EventDomainFactory'(suite) -> [];
'CosEventDomainAdmin_EventDomainFactory'(_) ->
?nomatch(undefined, 'CosEventDomainAdmin_EventDomainFactory':oe_tc(create_event_domain)),
?nomatch(undefined, 'CosEventDomainAdmin_EventDomainFactory':oe_tc(get_all_domains)),
@@ -340,8 +312,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosEventDomainAdmin_EventDomain'
%% Description:
%%-----------------------------------------------------------------
-'CosEventDomainAdmin_EventDomain'(doc) -> ["CosEventDomainAdmin_EventDomain"];
-'CosEventDomainAdmin_EventDomain'(suite) -> [];
'CosEventDomainAdmin_EventDomain'(_) ->
?nomatch(undefined, 'CosEventDomainAdmin_EventDomain':oe_tc(add_channel)),
?nomatch(undefined, 'CosEventDomainAdmin_EventDomain':oe_tc(get_all_channels)),
diff --git a/lib/cosEventDomain/vsn.mk b/lib/cosEventDomain/vsn.mk
index bdde1f6ab2..4e10d6ac60 100644
--- a/lib/cosEventDomain/vsn.mk
+++ b/lib/cosEventDomain/vsn.mk
@@ -1,2 +1,2 @@
-COSEVENTDOMAIN_VSN = 1.2
+COSEVENTDOMAIN_VSN = 1.2.1
diff --git a/lib/cosFileTransfer/doc/src/notes.xml b/lib/cosFileTransfer/doc/src/notes.xml
index eacc75062b..58ab087014 100644
--- a/lib/cosFileTransfer/doc/src/notes.xml
+++ b/lib/cosFileTransfer/doc/src/notes.xml
@@ -31,7 +31,22 @@
<file>notes.xml</file>
</header>
- <section><title>cosFileTransfer 1.2</title>
+ <section><title>cosFileTransfer 1.2.1</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosFileTransfer 1.2</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosFileTransfer/test/fileTransfer_SUITE.erl b/lib/cosFileTransfer/test/fileTransfer_SUITE.erl
index 7ca6eaf7b3..12aef2913a 100644
--- a/lib/cosFileTransfer/test/fileTransfer_SUITE.erl
+++ b/lib/cosFileTransfer/test/fileTransfer_SUITE.erl
@@ -32,7 +32,7 @@
-include_lib("common_test/include/ct.hrl").
%%--------------- DEFINES ------------------------------------
--define(default_timeout, ?t:minutes(20)).
+-define(default_timeout, test_server:minutes(20)).
-define(match(ExpectedRes, Expr),
fun() ->
AcTuAlReS = (catch (Expr)),
@@ -122,12 +122,12 @@ cases() ->
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -192,7 +192,6 @@ end_per_suite(Config) ->
-define(FTP_PASS, "fileTransfer_SUITE@localhost").
-define(TEST_DIR,["/", "incoming"]).
-
-define(FTP_PORT, 21).
-define(FTP_ACC, "anonymous").
@@ -203,53 +202,48 @@ end_per_suite(Config) ->
-define(TEST_FILE_DATA, "If this file exists after a completed test an error occurred.").
-define(TEST_FILE_DATA2, "1234567890123").
-
%%-----------------------------------------------------------------
%% aoo-file test
%%-----------------------------------------------------------------
-app_test(doc) -> [];
-app_test(suite) -> [];
app_test(_Config) ->
- ?line ok=?t:app_test(cosFileTransfer),
+ ok=?t:app_test(cosFileTransfer),
ok.
%%-----------------------------------------------------------------
%% FileIterator API tests
%%-----------------------------------------------------------------
-fileIterator_api(doc) -> ["CosFileTransfer FileIterator API tests.", ""];
-fileIterator_api(suite) -> [];
fileIterator_api(Config) ->
case ftp_host(Config) of
{skipped, SkippedReason} ->
{skipped, SkippedReason};
Host ->
- ?line {ok, Node} = create_node("fileIterator_api", 4008, normal),
- ?line ?match(ok, remote_apply(Node, ?MODULE, install_data,
+ {ok, Node} = create_node("fileIterator_api", 4008, normal),
+ ?match(ok, remote_apply(Node, ?MODULE, install_data,
[tcp, {{'NATIVE',
'cosFileTransferNATIVE_file'}, Host,
"fileIterator_api"}])),
%% Create a Virtual File System.
-%% ?line VFS = ?match({_,_,_,_,_,_},
+%% VFS = ?match({_,_,_,_,_,_},
%% cosFileTransferApp:create_VFS({'NATIVE',
%% 'cosFileTransferNATIVE_file'},
%% [], Host, ?FTP_PORT)),
- ?line VFS = ?matchnopr({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_},
+ VFS = ?matchnopr({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_},
corba:string_to_object("corbaname::1.2@localhost:4008/NameService#fileIterator_api")),
%% Start two File Transfer Sessions (Source and Target).
- ?line {FS, Dir} = ?matchnopr({{_,_,_},{_,_,_}},
+ {FS, Dir} = ?matchnopr({{_,_,_},{_,_,_}},
'CosFileTransfer_VirtualFileSystem':login(VFS,
?FTP_USER,
?FTP_PASS,
?FTP_ACC)),
%% Do some basic test on one of the Directories attributes.
- ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(Dir)),
- ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(Dir)),
- ?line ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(Dir)),
- ?line ?matchnopr(FS, 'CosFileTransfer_Directory':'_get_associated_session'(Dir)),
+ ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(Dir)),
+ ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(Dir)),
+ ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(Dir)),
+ ?matchnopr(FS, 'CosFileTransfer_Directory':'_get_associated_session'(Dir)),
{ok,[],FileIter} = ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir, 0)),
%% Usually the working directory for the test is not empty so no need for
%% creating files of our own?!
@@ -259,23 +253,23 @@ fileIterator_api(Config) ->
if
Children > 5 ->
- ?line ?matchnopr({true, _}, 'CosFileTransfer_FileIterator':next_one(FileIter)),
- ?line ?matchnopr({true, _}, 'CosFileTransfer_FileIterator':next_n(FileIter, 3)),
- ?line ?matchnopr({true, _}, 'CosFileTransfer_FileIterator':next_n(FileIter,
+ ?matchnopr({true, _}, 'CosFileTransfer_FileIterator':next_one(FileIter)),
+ ?matchnopr({true, _}, 'CosFileTransfer_FileIterator':next_n(FileIter, 3)),
+ ?matchnopr({true, _}, 'CosFileTransfer_FileIterator':next_n(FileIter,
Children)),
- ?line ?matchnopr({false, _}, 'CosFileTransfer_FileIterator':next_one(FileIter)),
- ?line ?match({false, []}, 'CosFileTransfer_FileIterator':next_n(FileIter, 1)),
+ ?matchnopr({false, _}, 'CosFileTransfer_FileIterator':next_one(FileIter)),
+ ?match({false, []}, 'CosFileTransfer_FileIterator':next_n(FileIter, 1)),
ok;
true ->
ok
end,
- ?line ?match(ok, 'CosFileTransfer_FileIterator':destroy(FileIter)),
- ?line ?match(false, corba_object:non_existent(FS)),
- ?line ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FS)),
+ ?match(ok, 'CosFileTransfer_FileIterator':destroy(FileIter)),
+ ?match(false, corba_object:non_existent(FS)),
+ ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FS)),
%% To make sure Orber can remove it from mnesia.
timer:sleep(1000),
- ?line ?match(true, corba_object:non_existent(FS)),
- ?line ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, ["fileIterator_api"])),
+ ?match(true, corba_object:non_existent(FS)),
+ ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, ["fileIterator_api"])),
stop_orber_remote(Node, normal),
ok
end.
@@ -284,36 +278,27 @@ fileIterator_api(Config) ->
%%-----------------------------------------------------------------
%% FileTransferSession API tests
%%-----------------------------------------------------------------
-fts_ftp_file_api(doc) -> ["CosFileTransfer FTP FileTransferSession API tests.", ""];
-fts_ftp_file_api(suite) -> [];
fts_ftp_file_api(Config) ->
- ?line {ok, Node} = create_node("ftp_file_api", 4004, normal),
+ {ok, Node} = create_node("ftp_file_api", 4004, normal),
file_helper(Config, 'FTP', ?TEST_DIR, Node, 4004, "ftp_file_api", tcp).
-fts_ftp_file_ssl_api(doc) -> ["CosFileTransfer FTP FileTransferSession API tests.", ""];
-fts_ftp_file_ssl_api(suite) -> [];
fts_ftp_file_ssl_api(Config) ->
- ?line {ok, Node} = create_node("ftp_file_api_ssl", {4005, 1}, ssl),
+ {ok, Node} = create_node("ftp_file_api_ssl", {4005, 1}, ssl),
file_helper(Config, 'FTP', ?TEST_DIR, Node, 4005, "ftp_file_api_ssl", ssl).
-fts_native_file_api(doc) -> ["CosFileTransfer NATIVE FileTransferSession API tests.", ""];
-fts_native_file_api(suite) -> [];
fts_native_file_api(Config) ->
- ?line {ok, Node} = create_node("native_file_api", 4006, normal),
+ {ok, Node} = create_node("native_file_api", 4006, normal),
{ok, Pwd} = file:get_cwd(),
file_helper(Config,{'NATIVE', 'cosFileTransferNATIVE_file'},filename:split(Pwd),
Node, 4006, "native_file_api", tcp).
-fts_native_file_ssl_api(doc) -> ["CosFileTransfer NATIVE FileTransferSession API tests.", ""];
-fts_native_file_ssl_api(suite) -> [];
fts_native_file_ssl_api(Config) ->
- ?line {ok, Node} = create_node("native_file_ssl_api", {4007, 1}, ssl),
+ {ok, Node} = create_node("native_file_ssl_api", {4007, 1}, ssl),
{ok, Pwd} = file:get_cwd(),
file_helper(Config,{'NATIVE', 'cosFileTransferNATIVE_file'},filename:split(Pwd),
Node, 4007, "native_file_ssl_api", ssl).
-
file_helper(Config, WhichType, TEST_DIR, Node, Port, Name, Type) ->
case ftp_host(Config) of
{skipped, SkippedReason} ->
@@ -326,47 +311,47 @@ file_helper(Config, WhichType, TEST_DIR, Node, Port, Name, Type) ->
io:format("<<<<<< CosFileTransfer Testing Configuration >>>>>>~n",[]),
io:format("Source: ~p~nTarget: ~p~n", [TEST_SOURCE, TEST_TARGET]),
- ?line ?match(ok, remote_apply(Node, ?MODULE, install_data,
+ ?match(ok, remote_apply(Node, ?MODULE, install_data,
[Type, {WhichType, Host, Name}])),
- ?line VFST = ?match({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_},
+ VFST = ?match({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_},
corba:string_to_object("corbaname::1.2@localhost:"++integer_to_list(Port)++"/NameService#"++Name)),
%% Create a Virtual File System.
- ?line VFS = ?match({_,_,_,_,_,_},
+ VFS = ?match({_,_,_,_,_,_},
cosFileTransferApp:create_VFS(WhichType, [], Host, ?FTP_PORT,
[{protocol, Type}])),
%% Start two File Transfer Sessions (Source and Target).
- ?line {FST, _DirT} = ?match({{_,_,_},{_,_,_}},
+ {FST, _DirT} = ?match({{_,_,_},{_,_,_}},
'CosFileTransfer_VirtualFileSystem':login(VFST,
?FTP_USER,
?FTP_PASS,
?FTP_ACC)),
- ?line {FSS, DirS} = ?match({{_,_,_,_,_,_},{_,_,_,_,_,_}},
+ {FSS, DirS} = ?match({{_,_,_,_,_,_},{_,_,_,_,_,_}},
'CosFileTransfer_VirtualFileSystem':login(VFS,
?FTP_USER,
?FTP_PASS,
?FTP_ACC)),
%% Do some basic test on one of the Directories attributes.
- ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(DirS)),
- ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(DirS)),
- ?line ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(DirS)),
- ?line ?match(FSS, 'CosFileTransfer_Directory':'_get_associated_session'(DirS)),
+ ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(DirS)),
+ ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(DirS)),
+ ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(DirS)),
+ ?match(FSS, 'CosFileTransfer_Directory':'_get_associated_session'(DirS)),
%% Get a FileList before we create any new Files
- ?line #'CosFileTransfer_FileWrapper'{the_file = Dir} =
+ #'CosFileTransfer_FileWrapper'{the_file = Dir} =
?match({'CosFileTransfer_FileWrapper', _, ndirectory},
'CosFileTransfer_FileTransferSession':get_file(FSS, TEST_DIR)),
- ?line {ok,FileList, Iter1} = ?match({ok,_,_}, 'CosFileTransfer_Directory':list(Dir, 10)),
- ?line loop_files(FileList),
+ {ok,FileList, Iter1} = ?match({ok,_,_}, 'CosFileTransfer_Directory':list(Dir, 10)),
+ loop_files(FileList),
case Iter1 of
{'IOP_IOR',[],[]} ->
ok;
_->
- ?line ?match(ok, 'CosFileTransfer_FileIterator':destroy(Iter1))
+ ?match(ok, 'CosFileTransfer_FileIterator':destroy(Iter1))
end,
#any{value=Count1} = ?match({any, _, _}, 'CosPropertyService_PropertySet':
@@ -374,17 +359,17 @@ file_helper(Config, WhichType, TEST_DIR, Node, Port, Name, Type) ->
%% Now we want to transfer a file from source to target. First, we'll create
%% a a file to work with.
- ?line create_file_on_source_node(WhichType, Config, Host,
+ create_file_on_source_node(WhichType, Config, Host,
filename:join(TEST_SOURCE), TEST_DIR,
?TEST_FILE_DATA),
- ?line create_file_on_source_node(WhichType, Config, Host,
+ create_file_on_source_node(WhichType, Config, Host,
filename:join(TEST_SOURCE2), TEST_DIR,
?TEST_FILE_DATA2),
- ?line #'CosFileTransfer_FileWrapper'{the_file = FileS} =
+ #'CosFileTransfer_FileWrapper'{the_file = FileS} =
?matchnopr({'CosFileTransfer_FileWrapper', _, nfile},
'CosFileTransfer_FileTransferSession':get_file(FSS, TEST_SOURCE)),
- ?line #'CosFileTransfer_FileWrapper'{the_file = FileS2} =
+ #'CosFileTransfer_FileWrapper'{the_file = FileS2} =
?matchnopr({'CosFileTransfer_FileWrapper', _, nfile},
'CosFileTransfer_FileTransferSession':get_file(FSS, TEST_SOURCE2)),
@@ -394,27 +379,27 @@ file_helper(Config, WhichType, TEST_DIR, Node, Port, Name, Type) ->
?match(true, (Count1+2 == Count2)),
%% Create a target File
- ?line FileT = ?matchnopr({_,_,_},
+ FileT = ?matchnopr({_,_,_},
'CosFileTransfer_FileTransferSession':create_file(FST, TEST_TARGET)),
%% Try to delete the non-existing file.
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_FileTransferSession':delete(FST, FileT)),
- ?line ?match(ok, 'CosFileTransfer_FileTransferSession':transfer(FSS, FileS, FileT)),
+ ?match(ok, 'CosFileTransfer_FileTransferSession':transfer(FSS, FileS, FileT)),
%% Remove this test when ftp supports append.
case WhichType of
{'NATIVE', 'cosFileTransferNATIVE_file'} ->
- ?line ?match(ok, 'CosFileTransfer_FileTransferSession':append(FSS, FileS, FileT)),
- ?line ?match(ok, 'CosFileTransfer_FileTransferSession':insert(FSS, FileS2, FileT, 7));
+ ?match(ok, 'CosFileTransfer_FileTransferSession':append(FSS, FileS, FileT)),
+ ?match(ok, 'CosFileTransfer_FileTransferSession':insert(FSS, FileS2, FileT, 7));
_->
ok
end,
%% Delete source and target files
- ?line ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FSS, FileS)),
- ?line ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FSS, FileS2)),
- ?line ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FST, FileT)),
+ ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FSS, FileS)),
+ ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FSS, FileS2)),
+ ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FST, FileT)),
%% Should be back where we started.
timer:sleep(2000),
@@ -423,15 +408,15 @@ file_helper(Config, WhichType, TEST_DIR, Node, Port, Name, Type) ->
?match(true, (Count1 == Count3)),
- ?line ?match(false, corba_object:non_existent(FSS)),
- ?line ?match(false, corba_object:non_existent(FST)),
- ?line ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FSS)),
- ?line ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FST)),
+ ?match(false, corba_object:non_existent(FSS)),
+ ?match(false, corba_object:non_existent(FST)),
+ ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FSS)),
+ ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FST)),
%% To make sure Orber can remove it from mnesia.
timer:sleep(2000),
- ?line ?match(true, corba_object:non_existent(FSS)),
- ?line ?match(true, corba_object:non_existent(FST)),
- ?line ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, [Name])),
+ ?match(true, corba_object:non_existent(FSS)),
+ ?match(true, corba_object:non_existent(FST)),
+ ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, [Name])),
stop_orber_remote(Node, normal),
ok
end.
@@ -439,17 +424,12 @@ file_helper(Config, WhichType, TEST_DIR, Node, Port, Name, Type) ->
%%-----------------------------------------------------------------
%% FileTransferSession API tests
%%-----------------------------------------------------------------
-fts_ftp_dir_api(doc) -> ["CosFileTransfer FTP FileTransferSession API tests.", ""];
-fts_ftp_dir_api(suite) -> [];
fts_ftp_dir_api(Config) ->
- ?line {ok, Node} = create_node("ftp_dir_api", 4009, normal),
+ {ok, Node} = create_node("ftp_dir_api", 4009, normal),
dir_helper(Config, 'FTP', ?TEST_DIR, Node, 4009, "ftp_dir_api").
-
-fts_native_dir_api(doc) -> ["CosFileTransfer NATIVE FileTransferSession API tests.", ""];
-fts_native_dir_api(suite) -> [];
fts_native_dir_api(Config) ->
- ?line {ok, Node} = create_node("native_dir_api", 4010, normal),
+ {ok, Node} = create_node("native_dir_api", 4010, normal),
{ok, Pwd} = file:get_cwd(),
dir_helper(Config, {'NATIVE', 'cosFileTransferNATIVE_file'},
filename:split(Pwd), Node, 4010, "native_dir_api").
@@ -465,235 +445,235 @@ dir_helper(Config, WhichType, TEST_DIR, Node, Port, Name) ->
io:format("<<<<<< CosFileTransfer Testing Configuration >>>>>>~n",[]),
io:format("Top Dir: ~p~nLevel2 Dir: ~p~n", [TEST_DIR_LEVEL1, TEST_DIR_LEVEL2]),
- ?line ?match(ok, remote_apply(Node, ?MODULE, install_data,
+ ?match(ok, remote_apply(Node, ?MODULE, install_data,
[tcp, {WhichType, Host, Name}])),
- ?line VFS = ?matchnopr({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_},
+ VFS = ?matchnopr({'IOP_IOR',"IDL:omg.org/CosFileTransfer/VirtualFileSystem:1.0",_},
corba:string_to_object("corbaname::1.2@localhost:"++integer_to_list(Port)++"/NameService#"++Name)),
%% Start two File Transfer Sessions (Source and Target).
- ?line {FS, DirS} = ?matchnopr({{'IOP_IOR',_,_}, _},
+ {FS, DirS} = ?matchnopr({{'IOP_IOR',_,_}, _},
'CosFileTransfer_VirtualFileSystem':login(VFS,
?FTP_USER,
?FTP_PASS,
?FTP_ACC)),
%% Do some basic test on one of the Directories attributes.
- ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(DirS)),
- ?line ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(DirS)),
- ?line ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(DirS)),
- ?line ?matchnopr(FS, 'CosFileTransfer_Directory':'_get_associated_session'(DirS)),
+ ?match([_H|_], 'CosFileTransfer_Directory':'_get_name'(DirS)),
+ ?match([_H|_], 'CosFileTransfer_Directory':'_get_complete_file_name'(DirS)),
+ ?match({'IOP_IOR',[],[]}, 'CosFileTransfer_Directory':'_get_parent'(DirS)),
+ ?matchnopr(FS, 'CosFileTransfer_Directory':'_get_associated_session'(DirS)),
%% Create a Root Directory. Currently we only need to create one but
%% later on, when supporting other protocols than FTP it's not enough.
- ?line Dir1 = 'CosFileTransfer_FileTransferSession':create_directory(FS,
+ Dir1 = 'CosFileTransfer_FileTransferSession':create_directory(FS,
TEST_DIR_LEVEL1),
io:format("<<<<<< CosFileTransfer Testing Properties >>>>>>~n",[]),
- ?line ?match({ok, [tk_long, tk_boolean]},
+ ?match({ok, [tk_long, tk_boolean]},
'CosFileTransfer_Directory':get_allowed_property_types(Dir1)),
- ?line ?match({ok, [_,_]},
+ ?match({ok, [_,_]},
'CosFileTransfer_Directory':get_allowed_properties(Dir1)),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':define_property_with_mode(Dir1,
"num_children",
#any{typecode=tk_long, value=0},
fixed_readonly)),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':define_property_with_mode(Dir1,
"wrong",
#any{typecode=tk_long, value=0},
fixed_readonly)),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':define_property_with_mode(Dir1,
"num_children",
#any{typecode=tk_short, value=0},
fixed_readonly)),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':define_property_with_mode(Dir1,
"num_children",
#any{typecode=tk_long, value=0},
fixed_normal)),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':define_properties_with_modes(Dir1,
[#'CosPropertyService_PropertyDef'
{property_name = "num_children",
property_value = #any{typecode=tk_long, value=0},
property_mode = fixed_readonly}])),
- ?line ?match(fixed_readonly,
+ ?match(fixed_readonly,
'CosFileTransfer_Directory':get_property_mode(Dir1, "num_children")),
- ?line ?match({true,
+ ?match({true,
[#'CosPropertyService_PropertyMode'{property_name = "num_children",
property_mode = fixed_readonly}]},
'CosFileTransfer_Directory':get_property_modes(Dir1, ["num_children"])),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':set_property_mode(Dir1, "num_children", fixed_readonly)),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':
set_property_modes(Dir1,
[#'CosPropertyService_PropertyMode'
{property_name = "num_children",
property_mode = fixed_readonly}])),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':
set_property_modes(Dir1,
[#'CosPropertyService_PropertyMode'
{property_name = "wrong",
property_mode = fixed_readonly}])),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':
set_property_modes(Dir1,
[#'CosPropertyService_PropertyMode'
{property_name = "num_children",
property_mode = fixed_normal}])),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':define_property(Dir1,
"num_children",
#any{typecode=tk_long, value=0})),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':define_property(Dir1,
"wrong",
#any{typecode=tk_long, value=0})),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':define_property(Dir1,
"num_children",
#any{typecode=tk_short, value=0})),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':define_property(Dir1,
"num_children",
#any{typecode=tk_long, value=0})),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':
define_properties(Dir1,
[#'CosPropertyService_Property'
{property_name = "num_children",
property_value = #any{typecode=tk_long,
value=0}}])),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':
define_properties(Dir1,
[#'CosPropertyService_Property'
{property_name = "wrong",
property_value = #any{typecode=tk_long,
value=0}}])),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':
define_properties(Dir1,
[#'CosPropertyService_Property'
{property_name = "num_children",
property_value = #any{typecode=tk_short,
value=0}}])),
- ?line ?match(2, 'CosFileTransfer_Directory':get_number_of_properties(Dir1)),
+ ?match(2, 'CosFileTransfer_Directory':get_number_of_properties(Dir1)),
- ?line ?match({ok, ["num_children", "is_directory"], {'IOP_IOR',[],[]}},
+ ?match({ok, ["num_children", "is_directory"], {'IOP_IOR',[],[]}},
'CosFileTransfer_Directory':get_all_property_names(Dir1, 2)),
- ?line ?match({ok, ["is_directory"], _},
+ ?match({ok, ["is_directory"], _},
'CosFileTransfer_Directory':get_all_property_names(Dir1, 1)),
- ?line ?match(#any{},
+ ?match(#any{},
'CosFileTransfer_Directory':get_property_value(Dir1, "num_children")),
- ?line ?match(#any{},
+ ?match(#any{},
'CosFileTransfer_Directory':get_property_value(Dir1, "is_directory")),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':get_property_value(Dir1, "wrong")),
- ?line ?match({true,
+ ?match({true,
[#'CosPropertyService_Property'{property_name = "num_children"}]},
'CosFileTransfer_Directory':get_properties(Dir1, ["num_children"])),
- ?line ?match({false,
+ ?match({false,
[#'CosPropertyService_Property'{property_name = "wrong"}]},
'CosFileTransfer_Directory':get_properties(Dir1, ["wrong"])),
- ?line ?match({ok, [_],_},
+ ?match({ok, [_],_},
'CosFileTransfer_Directory':get_all_properties(Dir1, 1)),
- ?line ?match({ok, [_,_], {'IOP_IOR',[],[]}},
+ ?match({ok, [_,_], {'IOP_IOR',[],[]}},
'CosFileTransfer_Directory':get_all_properties(Dir1, 2)),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':delete_property(Dir1, "num_children")),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':delete_property(Dir1, "wrong")),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':delete_properties(Dir1, ["num_children"])),
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_Directory':delete_properties(Dir1, ["wrong"])),
- ?line ?match(false, 'CosFileTransfer_Directory':delete_all_properties(Dir1)),
- ?line ?match(true,
+ ?match(false, 'CosFileTransfer_Directory':delete_all_properties(Dir1)),
+ ?match(true,
'CosFileTransfer_Directory':is_property_defined(Dir1, "num_children")),
- ?line ?match(false,
+ ?match(false,
'CosFileTransfer_Directory':is_property_defined(Dir1, "wrong")),
%% The Top Dir should be empty and ...
- ?line ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir1, 1000)),
- ?line ?match( #any{value=0},
+ ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir1, 1000)),
+ ?match( #any{value=0},
'CosPropertyService_PropertySet':get_property_value(Dir1, "num_children")),
%% Create a sub-directory.
- ?line Dir2 = 'CosFileTransfer_FileTransferSession':create_directory(FS,
+ Dir2 = 'CosFileTransfer_FileTransferSession':create_directory(FS,
TEST_DIR_LEVEL2),
- ?line ?match( #any{value=1},
+ ?match( #any{value=1},
'CosPropertyService_PropertySet':get_property_value(Dir1, "num_children")),
- ?line ?match({ok, [_,_], {'IOP_IOR',[],[]}},
+ ?match({ok, [_,_], {'IOP_IOR',[],[]}},
'CosFileTransfer_Directory':get_all_properties(Dir1, 2)),
- ?line {_,_,Iterator1} = ?match({ok, [_], _},
+ {_,_,Iterator1} = ?match({ok, [_], _},
'CosFileTransfer_Directory':get_all_properties(Dir1, 1)),
- ?line ?match({false, [_]},
+ ?match({false, [_]},
'CosPropertyService_PropertiesIterator':next_n(Iterator1,4)),
- ?line {_,_,Iterator0} = ?match({ok, [], _},
+ {_,_,Iterator0} = ?match({ok, [], _},
'CosFileTransfer_Directory':get_all_properties(Dir1, 0)),
- ?line ?match({false, [_, {'CosPropertyService_Property',
+ ?match({false, [_, {'CosPropertyService_Property',
"num_children",{any,tk_long,1}}]},
'CosPropertyService_PropertiesIterator':next_n(Iterator0,4)),
- ?line ?match({true,
+ ?match({true,
[#'CosPropertyService_Property'{property_name = "num_children"}]},
'CosFileTransfer_Directory':get_properties(Dir1, ["num_children"])),
%% The Top Directory is not emtpy any more and ...
- ?line {ok,[#'CosFileTransfer_FileWrapper'{the_file = DirRef}],_} =
+ {ok,[#'CosFileTransfer_FileWrapper'{the_file = DirRef}],_} =
?matchnopr({ok,[{'CosFileTransfer_FileWrapper', _, ndirectory}],_},
'CosFileTransfer_Directory':list(Dir1, 1000)),
%% ... its name eq. to 'TEST_DIR_LEVEL2'
- ?line ?match(TEST_DIR_LEVEL2,
+ ?match(TEST_DIR_LEVEL2,
'CosFileTransfer_Directory':'_get_complete_file_name'(DirRef)),
- ?line #'CosFileTransfer_FileWrapper'{the_file = Dir3} =
+ #'CosFileTransfer_FileWrapper'{the_file = Dir3} =
?matchnopr({'CosFileTransfer_FileWrapper', _, ndirectory},
'CosFileTransfer_FileTransferSession':get_file(FS, TEST_DIR_LEVEL1)),
%% Must get the same result for the 'get_file' operation.
- ?line {ok,[#'CosFileTransfer_FileWrapper'{the_file = DirRef2}],_} =
+ {ok,[#'CosFileTransfer_FileWrapper'{the_file = DirRef2}],_} =
?matchnopr({ok,[{'CosFileTransfer_FileWrapper', _, ndirectory}],_},
'CosFileTransfer_Directory':list(Dir3,1000)),
- ?line ?match(TEST_DIR_LEVEL2,
+ ?match(TEST_DIR_LEVEL2,
'CosFileTransfer_Directory':'_get_complete_file_name'(DirRef2)),
%% Since the top directory isn't empty deleting it must fail.
- ?line ?match({'EXCEPTION', _},
+ ?match({'EXCEPTION', _},
'CosFileTransfer_FileTransferSession':delete(FS, Dir1)),
%% Delete the sub-directory and ...
- ?line ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FS, Dir2)),
+ ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FS, Dir2)),
%% ... see if the top directory realyy is empty.
- ?line ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir1, 1000)),
+ ?match({ok,[],_}, 'CosFileTransfer_Directory':list(Dir1, 1000)),
- ?line ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FS, Dir1)),
+ ?match(ok, 'CosFileTransfer_FileTransferSession':delete(FS, Dir1)),
%% Test if the top directory been removed as intended.
- ?line ?match({'EXCEPTION', {'CosFileTransfer_FileNotFoundException', _, _}},
+ ?match({'EXCEPTION', {'CosFileTransfer_FileNotFoundException', _, _}},
'CosFileTransfer_FileTransferSession':get_file(FS, TEST_DIR_LEVEL1)),
- ?line ?match(false, corba_object:non_existent(FS)),
- ?line ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FS)),
+ ?match(false, corba_object:non_existent(FS)),
+ ?match(ok, 'CosFileTransfer_FileTransferSession':logout(FS)),
%% To make sure Orber can remove it from mnesia.
timer:sleep(1000),
- ?line ?match(true, corba_object:non_existent(FS)),
- ?line ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, [Name])),
+ ?match(true, corba_object:non_existent(FS)),
+ ?match(ok, remote_apply(Node, ?MODULE, uninstall_data, [Name])),
stop_orber_remote(Node, normal),
ok
end.
@@ -790,10 +770,10 @@ create_node(Name, Port, Retries, Type, Args, Options) ->
[_, Host] = ?match([_,_],string:tokens(atom_to_list(node()), [$@])),
case starter(Host, Name, Args) of
{ok, NewNode} ->
- ?line ?match(pong, net_adm:ping(NewNode)),
+ ?match(pong, net_adm:ping(NewNode)),
{ok, Cwd} = file:get_cwd(),
Path = code:get_path(),
- ?line ?match(ok, rpc:call(NewNode, file, set_cwd, [Cwd])),
+ ?match(ok, rpc:call(NewNode, file, set_cwd, [Cwd])),
true = rpc:call(NewNode, code, set_path, [Path]),
?match(ok, start_orber_remote(NewNode, Type, Options, Port)),
spawn_link(NewNode, ?MODULE, slave_sup, []),
@@ -939,7 +919,7 @@ install_data(Protocol, {WhichType, Host, Name}) ->
io:format("<<<<<< Starting ~p/~p VFS at ~p/~p>>>>>>~n",
[Protocol, WhichType, Host, Name]),
%% Create a Virtual File System.
- ?line VFS = ?match({_,_,_,_,_,_},
+ VFS = ?match({_,_,_,_,_,_},
cosFileTransferApp:create_VFS(WhichType, [], Host, ?FTP_PORT,
[{protocol, Protocol}])),
NS = corba:resolve_initial_references("NameService"),
@@ -948,9 +928,9 @@ install_data(Protocol, {WhichType, Host, Name}) ->
'CosNaming_NamingContext':rebind(NS, N, VFS).
uninstall_data(Name) ->
- ?line VFS = ?match({_,_,_,_,_,_},
+ VFS = ?match({_,_,_,_,_,_},
corba:string_to_object("corbaname:rir:/NameService#"++Name)),
- ?line ?match(ok, corba:dispose(VFS)),
+ ?match(ok, corba:dispose(VFS)),
ok.
diff --git a/lib/cosFileTransfer/vsn.mk b/lib/cosFileTransfer/vsn.mk
index 00bfdb3087..e271c05242 100644
--- a/lib/cosFileTransfer/vsn.mk
+++ b/lib/cosFileTransfer/vsn.mk
@@ -1 +1 @@
-COSFILETRANSFER_VSN = 1.2
+COSFILETRANSFER_VSN = 1.2.1
diff --git a/lib/cosNotification/doc/src/notes.xml b/lib/cosNotification/doc/src/notes.xml
index 3f3f0be3e7..1237000153 100644
--- a/lib/cosNotification/doc/src/notes.xml
+++ b/lib/cosNotification/doc/src/notes.xml
@@ -32,7 +32,22 @@
<file>notes.xml</file>
</header>
- <section><title>cosNotification 1.2.1</title>
+ <section><title>cosNotification 1.2.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosNotification 1.2.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosNotification/test/eventDB_SUITE.erl b/lib/cosNotification/test/eventDB_SUITE.erl
index 337c7effed..a0c47ad4c7 100644
--- a/lib/cosNotification/test/eventDB_SUITE.erl
+++ b/lib/cosNotification/test/eventDB_SUITE.erl
@@ -45,7 +45,7 @@
-include_lib("common_test/include/ct.hrl").
%%--------------- DEFINES ------------------------------------
--define(default_timeout, ?t:minutes(20)).
+-define(default_timeout, test_server:minutes(20)).
-define(match(ExpectedRes, Expr),
fun() ->
AcTuAlReS = (catch (Expr)),
@@ -57,7 +57,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -297,14 +297,13 @@ cases() ->
%%-----------------------------------------------------------------
%% Init and cleanup functions.
%%-----------------------------------------------------------------
-
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -333,12 +332,10 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% cosNotification_eventDB lookup API tests
%%-----------------------------------------------------------------
-mapping_filter_api(doc) -> ["The event DB is used to store events which cannot be",
- "delivered at once. This case is supposed to test",
- "that the events are delivered in the correct order",
- "if a MappingFilter have benn associated.",
- ""];
-mapping_filter_api(suite) -> [];
+%% The event DB is used to store events which cannot be
+%% delivered at once. This case is supposed to test
+%% that the events are delivered in the correct order
+%% if a MappingFilter have benn associated.
mapping_filter_api(_Config) ->
InitQoS = ?not_CreateInitQoS(),
InitQoS2 = ?not_SetMaxEventsPerConsumer(InitQoS,100),
@@ -405,12 +402,10 @@ do_lookup(QoS, Events, Return, Txt, DLFilter, PrioFilter, Timeout) ->
%%-----------------------------------------------------------------
%% cosNotification_eventDB discard API tests
%%-----------------------------------------------------------------
-discard_api(doc) -> ["The event DB is used to store events which cannot be",
- "delivered at once. If MaxEvents limit is reached there",
- "different ways we can discard the. This case will test",
- "all permutations of order and discard policies.",
- ""];
-discard_api(suite) -> [];
+%% The event DB is used to store events which cannot be
+%% delivered at once. If MaxEvents limit is reached there
+%% different ways we can discard the. This case will test
+%% all permutations of order and discard policies.
discard_api(_Config) ->
InitQoS1 = ?not_CreateInitQoS(),
InitQoS2 = ?not_SetPriority(InitQoS1, 10),
@@ -523,11 +518,9 @@ do_discard(Events, QoS, Reply, Txt) ->
%%-----------------------------------------------------------------
%% cosNotification_eventDB lookup API tests
%%-----------------------------------------------------------------
-lookup_api(doc) -> ["The event DB is used to store events which cannot be",
- "delivered at once. This case is supposed to test",
- "that the events are delivered in the correct order.",
- ""];
-lookup_api(suite) -> [];
+%% The event DB is used to store events which cannot be
+%% delivered at once. This case is supposed to test
+%% that the events are delivered in the correct order.
lookup_api(_Config) ->
InitQoS = ?not_CreateInitQoS(),
InitQoS2 = ?not_SetMaxEventsPerConsumer(InitQoS,100),
@@ -562,11 +555,9 @@ do_lookup(QoS, Events, Return, Txt) ->
%%-----------------------------------------------------------------
%% cosNotification_eventDB max events API tests
%%-----------------------------------------------------------------
-max_events_api(doc) -> ["The event DB is used to store events which cannot be",
- "delivered at once. If the MaxEvents QoS is updated we must be",
- "able to reduce the amount of stored events.",
- ""];
-max_events_api(suite) -> [];
+%% The event DB is used to store events which cannot be
+%% delivered at once. If the MaxEvents QoS is updated we must be
+%% able to reduce the amount of stored events.
max_events_api(_Config) ->
QoS1 = ?not_CreateInitQoS(),
@@ -602,10 +593,8 @@ max_events_api(_Config) ->
%%-----------------------------------------------------------------
%% cosNotification_eventDB persisten events API tests
%%-----------------------------------------------------------------
-persisten_event_api(doc) -> ["The event DB is used to store events which cannot be",
- "delivered at once.",
- ""];
-persisten_event_api(suite) -> [];
+%% The event DB is used to store events which cannot be
+%% delivered at once.
persisten_event_api(_Config) ->
QoS1 = ?not_CreateInitQoS(),
@@ -639,11 +628,9 @@ persisten_event_api(_Config) ->
%%-----------------------------------------------------------------
%% cosNotification_eventDB gc API tests
%%-----------------------------------------------------------------
-gc_api(doc) -> ["The event DB is used to store events which cannot be",
- "delivered at once. If Deadline defined the events that",
- "are older must be discarded.",
- ""];
-gc_api(suite) -> [];
+%% The event DB is used to store events which cannot be
+%% delivered at once. If Deadline defined the events that
+%% are older must be discarded.
gc_api(_Config) ->
QoS1 = ?not_CreateInitQoS(),
@@ -680,11 +667,9 @@ gc_api(_Config) ->
%%-----------------------------------------------------------------
%% cosNotification_eventDB gc API tests
%%-----------------------------------------------------------------
-auto_gc_api(doc) -> ["The event DB is used to store events which cannot be",
- "delivered at once. If Deadline defined the events that",
- "are older must be discarded.",
- ""];
-auto_gc_api(suite) -> [];
+%% The event DB is used to store events which cannot be
+%% delivered at once. If Deadline defined the events that
+%% are older must be discarded.
auto_gc_api(_Config) ->
QoS1 = ?not_CreateInitQoS(),
@@ -717,11 +702,9 @@ auto_gc_api(_Config) ->
%%-----------------------------------------------------------------
%% cosNotification_eventDB start- and stop-time API tests
%%-----------------------------------------------------------------
-start_stop_time_api(doc) -> ["The event DB is used to store events which cannot be",
- "delivered at once. If Deadline defined the events that",
- "are older must be discarded.",
- ""];
-start_stop_time_api(suite) -> [];
+%% The event DB is used to store events which cannot be
+%% delivered at once. If Deadline defined the events that
+%% are older must be discarded.
start_stop_time_api(_Config) ->
QoS1 = ?not_CreateInitQoS(),
@@ -823,12 +806,10 @@ start_stop_time_api(_Config) ->
%%-----------------------------------------------------------------
%% cosNotification_eventDB order API tests
%%-----------------------------------------------------------------
-reorder_api(doc) -> ["The event DB is used to store events which cannot be",
- "delivered at once. If the QoS is updated we must be",
- "able to change the ordering of events as the discard",
- "and order policies tells us.",
- ""];
-reorder_api(suite) -> [];
+%% The event DB is used to store events which cannot be
+%% delivered at once. If the QoS is updated we must be
+%% able to change the ordering of events as the discard
+%% and order policies tells us.
reorder_api(_Config) ->
%% We need to test switching between:
%% * Priority -> Fifo
diff --git a/lib/cosNotification/test/generated_SUITE.erl b/lib/cosNotification/test/generated_SUITE.erl
index 810a007672..8e3ccbd90e 100644
--- a/lib/cosNotification/test/generated_SUITE.erl
+++ b/lib/cosNotification/test/generated_SUITE.erl
@@ -29,7 +29,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/include/corba.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
-define(match(ExpectedRes, Expr),
fun() ->
@@ -40,7 +40,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -51,7 +51,7 @@
Not ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS);
+ exit(AcTuAlReS);
_ ->
AcTuAlReS
end
@@ -63,7 +63,7 @@
case orber_tc:check_tc(TC) of
false ->
io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]),
- ?line exit(TC);
+ exit(TC);
true ->
true
end
@@ -193,12 +193,12 @@ end_per_group(_GroupName, Config) ->
%% Init and cleanup functions.
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -206,8 +206,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification'(doc) -> ["CosNotification"];
-'CosNotification'(suite) -> [];
'CosNotification'(_) ->
?match("EventReliability", 'CosNotification':'EventReliability'()),
?match(0, 'CosNotification':'BestEffort'()),
@@ -242,8 +240,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_EventHeader'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_EventHeader'(doc) -> ["CosNotification_EventHeader"];
-'CosNotification_EventHeader'(suite) -> [];
'CosNotification_EventHeader'(_) ->
?match(true, orber_tc:check_tc('CosNotification_EventHeader':tc())),
?match("IDL:omg.org/CosNotification/EventHeader:1.0",
@@ -257,8 +253,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_EventType'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_EventType'(doc) -> ["CosNotification_EventType"];
-'CosNotification_EventType'(suite) -> [];
'CosNotification_EventType'(_) ->
?match(true, orber_tc:check_tc('CosNotification_EventType':tc())),
?match("IDL:omg.org/CosNotification/EventType:1.0",
@@ -272,8 +266,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_FixedEventHeader'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_FixedEventHeader'(doc) -> ["CosNotification_FixedEventHeader"];
-'CosNotification_FixedEventHeader'(suite) -> [];
'CosNotification_FixedEventHeader'(_) ->
?match(true, orber_tc:check_tc('CosNotification_FixedEventHeader':tc())),
?match("IDL:omg.org/CosNotification/FixedEventHeader:1.0",
@@ -287,8 +279,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_NamedPropertyRange'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_NamedPropertyRange'(doc) -> ["CosNotification_NamedPropertyRange"];
-'CosNotification_NamedPropertyRange'(suite) -> [];
'CosNotification_NamedPropertyRange'(_) ->
?match(true, orber_tc:check_tc('CosNotification_NamedPropertyRange':tc())),
?match("IDL:omg.org/CosNotification/NamedPropertyRange:1.0",
@@ -302,8 +292,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_Property'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_Property'(doc) -> ["CosNotification_Property"];
-'CosNotification_Property'(suite) -> [];
'CosNotification_Property'(_) ->
?match(true, orber_tc:check_tc('CosNotification_Property':tc())),
?match("IDL:omg.org/CosNotification/Property:1.0",
@@ -317,8 +305,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_PropertyError'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_PropertyError'(doc) -> ["CosNotification_PropertyError"];
-'CosNotification_PropertyError'(suite) -> [];
'CosNotification_PropertyError'(_) ->
?match(true, orber_tc:check_tc('CosNotification_PropertyError':tc())),
?match("IDL:omg.org/CosNotification/PropertyError:1.0",
@@ -332,8 +318,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_PropertyRange'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_PropertyRange'(doc) -> [""];
-'CosNotification_PropertyRange'(suite) -> [];
'CosNotification_PropertyRange'(_) ->
?match(true, orber_tc:check_tc('CosNotification_PropertyRange':tc())),
?match("IDL:omg.org/CosNotification/PropertyRange:1.0",
@@ -347,8 +331,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_StructuredEvent'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_StructuredEvent'(doc) -> ["CosNotification_StructuredEvent"];
-'CosNotification_StructuredEvent'(suite) -> [];
'CosNotification_StructuredEvent'(_) ->
?match(true, orber_tc:check_tc('CosNotification_StructuredEvent':tc())),
?match("IDL:omg.org/CosNotification/StructuredEvent:1.0",
@@ -362,8 +344,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_UnsupportedAdmin'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_UnsupportedAdmin'(doc) -> ["CosNotification_UnsupportedAdmin"];
-'CosNotification_UnsupportedAdmin'(suite) -> [];
'CosNotification_UnsupportedAdmin'(_) ->
?match(true, orber_tc:check_tc('CosNotification_UnsupportedAdmin':tc())),
?match("IDL:omg.org/CosNotification/UnsupportedAdmin:1.0",
@@ -377,8 +357,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_UnsupportedQoS'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_UnsupportedQoS'(doc) -> ["CosNotification_UnsupportedQoS"];
-'CosNotification_UnsupportedQoS'(suite) -> [];
'CosNotification_UnsupportedQoS'(_) ->
?match(true, orber_tc:check_tc('CosNotification_UnsupportedQoS':tc())),
?match("IDL:omg.org/CosNotification/UnsupportedQoS:1.0",
@@ -392,8 +370,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_EventBatch'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_EventBatch'(doc) -> ["CosNotification_EventBatch"];
-'CosNotification_EventBatch'(suite) -> [];
'CosNotification_EventBatch'(_) ->
?match(true, orber_tc:check_tc('CosNotification_EventBatch':tc())),
?match("IDL:omg.org/CosNotification/EventBatch:1.0",
@@ -407,8 +383,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_EventTypeSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_EventTypeSeq'(doc) -> ["CosNotification_EventTypeSeq"];
-'CosNotification_EventTypeSeq'(suite) -> [];
'CosNotification_EventTypeSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotification_EventTypeSeq':tc())),
?match("IDL:omg.org/CosNotification/EventTypeSeq:1.0",
@@ -422,8 +396,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_NamedPropertyRangeSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_NamedPropertyRangeSeq'(doc) -> ["CosNotification_NamedPropertyRangeSeq"];
-'CosNotification_NamedPropertyRangeSeq'(suite) -> [];
'CosNotification_NamedPropertyRangeSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotification_NamedPropertyRangeSeq':tc())),
?match("IDL:omg.org/CosNotification/NamedPropertyRangeSeq:1.0",
@@ -437,8 +409,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_PropertyErrorSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_PropertyErrorSeq'(doc) -> ["CosNotification_PropertyErrorSeq"];
-'CosNotification_PropertyErrorSeq'(suite) -> [];
'CosNotification_PropertyErrorSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotification_PropertyErrorSeq':tc())),
?match("IDL:omg.org/CosNotification/PropertyErrorSeq:1.0",
@@ -452,8 +422,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_PropertySeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_PropertySeq'(doc) -> ["CosNotification_PropertySeq"];
-'CosNotification_PropertySeq'(suite) -> [];
'CosNotification_PropertySeq'(_) ->
?match(true, orber_tc:check_tc('CosNotification_PropertySeq':tc())),
?match("IDL:omg.org/CosNotification/PropertySeq:1.0",
@@ -467,8 +435,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_AdminLimit'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_AdminLimit'(doc) -> ["CosNotifyChannelAdmin_AdminLimit"];
-'CosNotifyChannelAdmin_AdminLimit'(suite) -> [];
'CosNotifyChannelAdmin_AdminLimit'(_) ->
?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_AdminLimit':tc())),
?match("IDL:omg.org/CosNotifyChannelAdmin/AdminLimit:1.0",
@@ -482,8 +448,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_AdminLimitExceeded'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_AdminLimitExceeded'(doc) -> ["CosNotifyChannelAdmin_AdminLimitExceeded"];
-'CosNotifyChannelAdmin_AdminLimitExceeded'(suite) -> [];
'CosNotifyChannelAdmin_AdminLimitExceeded'(_) ->
?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_AdminLimitExceeded':tc())),
?match("IDL:omg.org/CosNotifyChannelAdmin/AdminLimitExceeded:1.0",
@@ -497,8 +461,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_AdminNotFound'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_AdminNotFound'(doc) -> ["CosNotifyChannelAdmin_AdminNotFound"];
-'CosNotifyChannelAdmin_AdminNotFound'(suite) -> [];
'CosNotifyChannelAdmin_AdminNotFound'(_) ->
?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_AdminNotFound':tc())),
?match("IDL:omg.org/CosNotifyChannelAdmin/AdminNotFound:1.0",
@@ -512,8 +474,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_ChannelNotFound'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ChannelNotFound'(doc) -> ["CosNotifyChannelAdmin_ChannelNotFound"];
-'CosNotifyChannelAdmin_ChannelNotFound'(suite) -> [];
'CosNotifyChannelAdmin_ChannelNotFound'(_) ->
?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_ChannelNotFound':tc())),
?match("IDL:omg.org/CosNotifyChannelAdmin/ChannelNotFound:1.0",
@@ -527,8 +487,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_ConnectionAlreadyActive'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ConnectionAlreadyActive'(doc) -> ["CosNotifyChannelAdmin_ConnectionAlreadyActive"];
-'CosNotifyChannelAdmin_ConnectionAlreadyActive'(suite) -> [];
'CosNotifyChannelAdmin_ConnectionAlreadyActive'(_) ->
?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_ConnectionAlreadyActive':tc())),
?match("IDL:omg.org/CosNotifyChannelAdmin/ConnectionAlreadyActive:1.0",
@@ -537,13 +495,10 @@ end_per_testcase(_Case, Config) ->
'CosNotifyChannelAdmin_ConnectionAlreadyActive':name()),
ok.
-
%%-----------------------------------------------------------------
%% Test Case: 'CosNotifyChannelAdmin_ConnectionAlreadyInactive'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ConnectionAlreadyInactive'(doc) -> ["CosNotifyChannelAdmin_ConnectionAlreadyInactive"];
-'CosNotifyChannelAdmin_ConnectionAlreadyInactive'(suite) -> [];
'CosNotifyChannelAdmin_ConnectionAlreadyInactive'(_) ->
?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_ConnectionAlreadyInactive':tc())),
?match("IDL:omg.org/CosNotifyChannelAdmin/ConnectionAlreadyInactive:1.0",
@@ -556,8 +511,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_NotConnected'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_NotConnected'(doc) -> ["CosNotifyChannelAdmin_NotConnected"];
-'CosNotifyChannelAdmin_NotConnected'(suite) -> [];
'CosNotifyChannelAdmin_NotConnected'(_) ->
?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_NotConnected':tc())),
?match("IDL:omg.org/CosNotifyChannelAdmin/NotConnected:1.0",
@@ -570,8 +523,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_AdminIDSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_AdminIDSeq'(doc) -> ["CosNotifyChannelAdmin_AdminIDSeq"];
-'CosNotifyChannelAdmin_AdminIDSeq'(suite) -> [];
'CosNotifyChannelAdmin_AdminIDSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_AdminIDSeq':tc())),
?match("IDL:omg.org/CosNotifyChannelAdmin/AdminIDSeq:1.0",
@@ -584,8 +535,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_ChannelIDSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ChannelIDSeq'(doc) -> ["CosNotifyChannelAdmin_ChannelIDSeq"];
-'CosNotifyChannelAdmin_ChannelIDSeq'(suite) -> [];
'CosNotifyChannelAdmin_ChannelIDSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_ChannelIDSeq':tc())),
?match("IDL:omg.org/CosNotifyChannelAdmin/ChannelIDSeq:1.0",
@@ -598,8 +547,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_ProxyIDSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ProxyIDSeq'(doc) -> ["CosNotifyChannelAdmin_ProxyIDSeq"];
-'CosNotifyChannelAdmin_ProxyIDSeq'(suite) -> [];
'CosNotifyChannelAdmin_ProxyIDSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_ProxyIDSeq':tc())),
?match("IDL:omg.org/CosNotifyChannelAdmin/ProxyIDSeq:1.0",
@@ -612,8 +559,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_CallbackNotFound'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_CallbackNotFound'(doc) -> ["CosNotifyFilter_CallbackNotFound"];
-'CosNotifyFilter_CallbackNotFound'(suite) -> [];
'CosNotifyFilter_CallbackNotFound'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_CallbackNotFound':tc())),
?match("IDL:omg.org/CosNotifyFilter/CallbackNotFound:1.0",
@@ -626,8 +571,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_ConstraintExp'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_ConstraintExp'(doc) -> ["CosNotifyFilter_ConstraintExp"];
-'CosNotifyFilter_ConstraintExp'(suite) -> [];
'CosNotifyFilter_ConstraintExp'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_ConstraintExp':tc())),
?match("IDL:omg.org/CosNotifyFilter/ConstraintExp:1.0",
@@ -640,8 +583,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_ConstraintInfo'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_ConstraintInfo'(doc) -> ["CosNotifyFilter_ConstraintInfo"];
-'CosNotifyFilter_ConstraintInfo'(suite) -> [];
'CosNotifyFilter_ConstraintInfo'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_ConstraintInfo':tc())),
?match("IDL:omg.org/CosNotifyFilter/ConstraintInfo:1.0",
@@ -654,8 +595,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_ConstraintNotFound'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_ConstraintNotFound'(doc) -> ["CosNotifyFilter_ConstraintNotFound"];
-'CosNotifyFilter_ConstraintNotFound'(suite) -> [];
'CosNotifyFilter_ConstraintNotFound'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_ConstraintNotFound':tc())),
?match("IDL:omg.org/CosNotifyFilter/ConstraintNotFound:1.0",
@@ -668,8 +607,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_DuplicateConstraintID'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_DuplicateConstraintID'(doc) -> ["CosNotifyFilter_DuplicateConstraintID"];
-'CosNotifyFilter_DuplicateConstraintID'(suite) -> [];
'CosNotifyFilter_DuplicateConstraintID'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_DuplicateConstraintID':tc())),
?match("IDL:omg.org/CosNotifyFilter/DuplicateConstraintID:1.0",
@@ -682,8 +619,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_FilterNotFound'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_FilterNotFound'(doc) -> ["CosNotifyFilter_FilterNotFound"];
-'CosNotifyFilter_FilterNotFound'(suite) -> [];
'CosNotifyFilter_FilterNotFound'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_FilterNotFound':tc())),
?match("IDL:omg.org/CosNotifyFilter/FilterNotFound:1.0",
@@ -696,8 +631,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_InvalidConstraint'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_InvalidConstraint'(doc) -> ["CosNotifyFilter_InvalidConstraint"];
-'CosNotifyFilter_InvalidConstraint'(suite) -> [];
'CosNotifyFilter_InvalidConstraint'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_InvalidConstraint':tc())),
?match("IDL:omg.org/CosNotifyFilter/InvalidConstraint:1.0",
@@ -710,8 +643,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_InvalidGrammar'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_InvalidGrammar'(doc) -> ["CosNotifyFilter_InvalidGrammar"];
-'CosNotifyFilter_InvalidGrammar'(suite) -> [];
'CosNotifyFilter_InvalidGrammar'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_InvalidGrammar':tc())),
?match("IDL:omg.org/CosNotifyFilter/InvalidGrammar:1.0",
@@ -724,8 +655,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_InvalidValue'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_InvalidValue'(doc) -> ["CosNotifyFilter_InvalidValue"];
-'CosNotifyFilter_InvalidValue'(suite) -> [];
'CosNotifyFilter_InvalidValue'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_InvalidValue':tc())),
?match("IDL:omg.org/CosNotifyFilter/InvalidValue:1.0",
@@ -738,8 +667,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_MappingConstraintInfo'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_MappingConstraintInfo'(doc) -> ["CosNotifyFilter_MappingConstraintInfo"];
-'CosNotifyFilter_MappingConstraintInfo'(suite) -> [];
'CosNotifyFilter_MappingConstraintInfo'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_MappingConstraintInfo':tc())),
?match("IDL:omg.org/CosNotifyFilter/MappingConstraintInfo:1.0",
@@ -752,8 +679,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_MappingConstraintPair'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_MappingConstraintPair'(doc) -> ["CosNotifyFilter_MappingConstraintPair"];
-'CosNotifyFilter_MappingConstraintPair'(suite) -> [];
'CosNotifyFilter_MappingConstraintPair'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_MappingConstraintPair':tc())),
?match("IDL:omg.org/CosNotifyFilter/MappingConstraintPair:1.0",
@@ -766,8 +691,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_UnsupportedFilterableData'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_UnsupportedFilterableData'(doc) -> ["CosNotifyFilter_UnsupportedFilterableData"];
-'CosNotifyFilter_UnsupportedFilterableData'(suite) -> [];
'CosNotifyFilter_UnsupportedFilterableData'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_UnsupportedFilterableData':tc())),
?match("IDL:omg.org/CosNotifyFilter/UnsupportedFilterableData:1.0",
@@ -780,8 +703,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_CallbackIDSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_CallbackIDSeq'(doc) -> ["CosNotifyFilter_CallbackIDSeq"];
-'CosNotifyFilter_CallbackIDSeq'(suite) -> [];
'CosNotifyFilter_CallbackIDSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_CallbackIDSeq':tc())),
?match("IDL:omg.org/CosNotifyFilter/CallbackIDSeq:1.0",
@@ -795,8 +716,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_ConstraintExpSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_ConstraintExpSeq'(doc) -> ["CosNotifyFilter_ConstraintExpSeq"];
-'CosNotifyFilter_ConstraintExpSeq'(suite) -> [];
'CosNotifyFilter_ConstraintExpSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_ConstraintExpSeq':tc())),
?match("IDL:omg.org/CosNotifyFilter/ConstraintExpSeq:1.0",
@@ -810,8 +729,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_ConstraintIDSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_ConstraintIDSeq'(doc) -> ["CosNotifyFilter_ConstraintIDSeq"];
-'CosNotifyFilter_ConstraintIDSeq'(suite) -> [];
'CosNotifyFilter_ConstraintIDSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_ConstraintIDSeq':tc())),
?match("IDL:omg.org/CosNotifyFilter/ConstraintIDSeq:1.0",
@@ -825,8 +742,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_ConstraintInfoSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_ConstraintInfoSeq'(doc) -> ["CosNotifyFilter_ConstraintInfoSeq"];
-'CosNotifyFilter_ConstraintInfoSeq'(suite) -> [];
'CosNotifyFilter_ConstraintInfoSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_ConstraintInfoSeq':tc())),
?match("IDL:omg.org/CosNotifyFilter/ConstraintInfoSeq:1.0",
@@ -840,8 +755,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_FilterIDSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_FilterIDSeq'(doc) -> ["CosNotifyFilter_FilterIDSeq"];
-'CosNotifyFilter_FilterIDSeq'(suite) -> [];
'CosNotifyFilter_FilterIDSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_FilterIDSeq':tc())),
?match("IDL:omg.org/CosNotifyFilter/FilterIDSeq:1.0",
@@ -855,8 +768,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_MappingConstraintInfoSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_MappingConstraintInfoSeq'(doc) -> ["CosNotifyFilter_MappingConstraintInfoSeq"];
-'CosNotifyFilter_MappingConstraintInfoSeq'(suite) -> [];
'CosNotifyFilter_MappingConstraintInfoSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_MappingConstraintInfoSeq':tc())),
?match("IDL:omg.org/CosNotifyFilter/MappingConstraintInfoSeq:1.0",
@@ -870,8 +781,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_MappingConstraintPairSeq'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_MappingConstraintPairSeq'(doc) -> ["CosNotifyFilter_MappingConstraintPairSeq"];
-'CosNotifyFilter_MappingConstraintPairSeq'(suite) -> [];
'CosNotifyFilter_MappingConstraintPairSeq'(_) ->
?match(true, orber_tc:check_tc('CosNotifyFilter_MappingConstraintPairSeq':tc())),
?match("IDL:omg.org/CosNotifyFilter/MappingConstraintPairSeq:1.0",
@@ -885,8 +794,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_InvalidEventType'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_InvalidEventType'(doc) -> ["CosNotifyComm_InvalidEventType"];
-'CosNotifyComm_InvalidEventType'(suite) -> [];
'CosNotifyComm_InvalidEventType'(_) ->
?match(true, orber_tc:check_tc('CosNotifyComm_InvalidEventType':tc())),
?match("IDL:omg.org/CosNotifyComm/InvalidEventType:1.0",
@@ -900,8 +807,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_ProxyNotFound'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ProxyNotFound'(doc) -> ["CosNotifyChannelAdmin_ProxyNotFound"];
-'CosNotifyChannelAdmin_ProxyNotFound'(suite) -> [];
'CosNotifyChannelAdmin_ProxyNotFound'(_) ->
?match(true, orber_tc:check_tc('CosNotifyChannelAdmin_ProxyNotFound':tc())),
?match("IDL:omg.org/CosNotifyChannelAdmin/ProxyNotFound:1.0",
@@ -915,8 +820,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_AdminPropertiesAdmin'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_AdminPropertiesAdmin'(doc) -> ["CosNotification_AdminPropertiesAdmin"];
-'CosNotification_AdminPropertiesAdmin'(suite) -> [];
'CosNotification_AdminPropertiesAdmin'(_) ->
?nomatch(undefined, 'CosNotification_AdminPropertiesAdmin':oe_tc(get_admin)),
?nomatch(undefined, 'CosNotification_AdminPropertiesAdmin':oe_tc(set_admin)),
@@ -933,8 +836,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotification_QoSAdmin'
%% Description:
%%-----------------------------------------------------------------
-'CosNotification_QoSAdmin'(doc) -> ["CosNotification_QoSAdmin"];
-'CosNotification_QoSAdmin'(suite) -> [];
'CosNotification_QoSAdmin'(_) ->
?nomatch(undefined, 'CosNotification_QoSAdmin':oe_tc(get_qos)),
?nomatch(undefined, 'CosNotification_QoSAdmin':oe_tc(set_qos)),
@@ -952,8 +853,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_ConsumerAdmin'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ConsumerAdmin'(doc) -> ["CosNotifyChannelAdmin_ConsumerAdmin"];
-'CosNotifyChannelAdmin_ConsumerAdmin'(suite) -> [];
'CosNotifyChannelAdmin_ConsumerAdmin'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_ConsumerAdmin':oe_tc('_get_MyID')),
?nomatch(undefined, 'CosNotifyChannelAdmin_ConsumerAdmin':oe_tc('_get_MyChannel')),
@@ -999,8 +898,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_EventChannel'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_EventChannel'(doc) -> ["CosNotifyChannelAdmin_EventChannel"];
-'CosNotifyChannelAdmin_EventChannel'(suite) -> [];
'CosNotifyChannelAdmin_EventChannel'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_EventChannel':oe_tc('_get_MyFactory')),
?nomatch(undefined, 'CosNotifyChannelAdmin_EventChannel':oe_tc('_get_default_consumer_admin')),
@@ -1039,8 +936,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_EventChannelFactory'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_EventChannelFactory'(doc) -> ["CosNotifyChannelAdmin_EventChannelFactory"];
-'CosNotifyChannelAdmin_EventChannelFactory'(suite) -> [];
'CosNotifyChannelAdmin_EventChannelFactory'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_EventChannelFactory':oe_tc(create_channel)),
?nomatch(undefined, 'CosNotifyChannelAdmin_EventChannelFactory':oe_tc(get_all_channels)),
@@ -1058,8 +953,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_ProxyConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ProxyConsumer'(doc) -> ["CosNotifyChannelAdmin_ProxyConsumer"];
-'CosNotifyChannelAdmin_ProxyConsumer'(suite) -> [];
'CosNotifyChannelAdmin_ProxyConsumer'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyConsumer':oe_tc('_get_MyType')),
?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyConsumer':oe_tc('_get_MyAdmin')),
@@ -1088,8 +981,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_ProxyPullConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ProxyPullConsumer'(doc) -> ["CosNotifyChannelAdmin_ProxyPullConsumer"];
-'CosNotifyChannelAdmin_ProxyPullConsumer'(suite) -> [];
'CosNotifyChannelAdmin_ProxyPullConsumer'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPullConsumer':oe_tc(connect_any_pull_supplier)),
?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPullConsumer':oe_tc(suspend_connection)),
@@ -1129,8 +1020,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_ProxyPullSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ProxyPullSupplier'(doc) -> ["CosNotifyChannelAdmin_ProxyPullSupplier"];
-'CosNotifyChannelAdmin_ProxyPullSupplier'(suite) -> [];
'CosNotifyChannelAdmin_ProxyPullSupplier'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPullSupplier':oe_tc('_get_MyType')),
?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPullSupplier':oe_tc('_get_MyAdmin')),
@@ -1176,8 +1065,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_ProxyPushConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ProxyPushConsumer'(doc) -> ["CosNotifyChannelAdmin_ProxyPushConsumer"];
-'CosNotifyChannelAdmin_ProxyPushConsumer'(suite) -> [];
'CosNotifyChannelAdmin_ProxyPushConsumer'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPushConsumer':oe_tc(connect_any_push_supplier)),
?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPushConsumer':oe_tc('_get_MyType')),
@@ -1216,8 +1103,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_ProxyPushSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ProxyPushSupplier'(doc) -> ["CosNotifyChannelAdmin_ProxyPushSupplier"];
-'CosNotifyChannelAdmin_ProxyPushSupplier'(suite) -> [];
'CosNotifyChannelAdmin_ProxyPushSupplier'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPushSupplier':oe_tc(connect_any_push_consumer)),
?nomatch(undefined, 'CosNotifyChannelAdmin_ProxyPushSupplier':oe_tc(suspend_connection)),
@@ -1264,8 +1149,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_ProxySupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_ProxySupplier'(doc) -> ["CosNotifyChannelAdmin_ProxySupplier"];
-'CosNotifyChannelAdmin_ProxySupplier'(suite) -> [];
'CosNotifyChannelAdmin_ProxySupplier'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_ProxySupplier':oe_tc('_get_MyType')),
?nomatch(undefined, 'CosNotifyChannelAdmin_ProxySupplier':oe_tc('_get_MyAdmin')),
@@ -1299,8 +1182,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_SequenceProxyPullConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_SequenceProxyPullConsumer'(doc) -> ["CosNotifyChannelAdmin_SequenceProxyPullConsumer"];
-'CosNotifyChannelAdmin_SequenceProxyPullConsumer'(suite) -> [];
'CosNotifyChannelAdmin_SequenceProxyPullConsumer'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPullConsumer':oe_tc(connect_sequence_pull_supplier)),
?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPullConsumer':oe_tc(suspend_connection)),
@@ -1338,8 +1219,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_SequenceProxyPullSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_SequenceProxyPullSupplier'(doc) -> ["CosNotifyChannelAdmin_SequenceProxyPullSupplier"];
-'CosNotifyChannelAdmin_SequenceProxyPullSupplier'(suite) -> [];
'CosNotifyChannelAdmin_SequenceProxyPullSupplier'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPullSupplier':oe_tc(connect_sequence_pull_consumer)),
?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPullSupplier':oe_tc('_get_MyType')),
@@ -1384,8 +1263,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_SequenceProxyPushConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_SequenceProxyPushConsumer'(doc) -> ["CosNotifyChannelAdmin_SequenceProxyPushConsumer"];
-'CosNotifyChannelAdmin_SequenceProxyPushConsumer'(suite) -> [];
'CosNotifyChannelAdmin_SequenceProxyPushConsumer'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPushConsumer':oe_tc(connect_sequence_push_supplier)),
?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPushConsumer':oe_tc('_get_MyType')),
@@ -1422,8 +1299,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_SequenceProxyPushSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_SequenceProxyPushSupplier'(doc) -> ["CosNotifyChannelAdmin_SequenceProxyPushSupplier"];
-'CosNotifyChannelAdmin_SequenceProxyPushSupplier'(suite) -> [];
'CosNotifyChannelAdmin_SequenceProxyPushSupplier'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPushSupplier':oe_tc(connect_sequence_push_consumer)),
?nomatch(undefined, 'CosNotifyChannelAdmin_SequenceProxyPushSupplier':oe_tc(suspend_connection)),
@@ -1468,8 +1343,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_StructuredProxyPullConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_StructuredProxyPullConsumer'(doc) -> ["CosNotifyChannelAdmin_StructuredProxyPullConsumer"];
-'CosNotifyChannelAdmin_StructuredProxyPullConsumer'(suite) -> [];
'CosNotifyChannelAdmin_StructuredProxyPullConsumer'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPullConsumer':oe_tc(connect_structured_pull_supplier)),
?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPullConsumer':oe_tc(suspend_connection)),
@@ -1507,8 +1380,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_StructuredProxyPullSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_StructuredProxyPullSupplier'(doc) -> ["CosNotifyChannelAdmin_StructuredProxyPullSupplier"];
-'CosNotifyChannelAdmin_StructuredProxyPullSupplier'(suite) -> [];
'CosNotifyChannelAdmin_StructuredProxyPullSupplier'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPullSupplier':oe_tc(connect_structured_pull_consumer)),
?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPullSupplier':oe_tc('_get_MyType')),
@@ -1553,8 +1424,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_StructuredProxyPushConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_StructuredProxyPushConsumer'(doc) -> ["CosNotifyChannelAdmin_StructuredProxyPushConsumer"];
-'CosNotifyChannelAdmin_StructuredProxyPushConsumer'(suite) -> [];
'CosNotifyChannelAdmin_StructuredProxyPushConsumer'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPushConsumer':oe_tc(connect_structured_push_supplier)),
?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPushConsumer':oe_tc('_get_MyType')),
@@ -1591,8 +1460,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_StructuredProxyPushSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_StructuredProxyPushSupplier'(doc) -> ["CosNotifyChannelAdmin_StructuredProxyPushSupplier"];
-'CosNotifyChannelAdmin_StructuredProxyPushSupplier'(suite) -> [];
'CosNotifyChannelAdmin_StructuredProxyPushSupplier'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPushSupplier':oe_tc(connect_structured_push_consumer)),
?nomatch(undefined, 'CosNotifyChannelAdmin_StructuredProxyPushSupplier':oe_tc(suspend_connection)),
@@ -1637,8 +1504,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyChannelAdmin_SupplierAdmin'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyChannelAdmin_SupplierAdmin'(doc) -> ["CosNotifyChannelAdmin_SupplierAdmin"];
-'CosNotifyChannelAdmin_SupplierAdmin'(suite) -> [];
'CosNotifyChannelAdmin_SupplierAdmin'(_) ->
?nomatch(undefined, 'CosNotifyChannelAdmin_SupplierAdmin':oe_tc('_get_MyID')),
?nomatch(undefined, 'CosNotifyChannelAdmin_SupplierAdmin':oe_tc('_get_MyChannel')),
@@ -1681,8 +1546,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_Filter'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_Filter'(doc) -> ["CosNotifyFilter_Filter"];
-'CosNotifyFilter_Filter'(suite) -> [];
'CosNotifyFilter_Filter'(_) ->
?nomatch(undefined, 'CosNotifyFilter_Filter':oe_tc('_get_constraint_grammar')),
?nomatch(undefined, 'CosNotifyFilter_Filter':oe_tc(add_constraints)),
@@ -1711,8 +1574,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_FilterAdmin'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_FilterAdmin'(doc) -> ["CosNotifyFilter_FilterAdmin"];
-'CosNotifyFilter_FilterAdmin'(suite) -> [];
'CosNotifyFilter_FilterAdmin'(_) ->
?nomatch(undefined, 'CosNotifyFilter_FilterAdmin':oe_tc(add_filter)),
?nomatch(undefined, 'CosNotifyFilter_FilterAdmin':oe_tc(remove_filter)),
@@ -1733,8 +1594,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_FilterFactory'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_FilterFactory'(doc) -> ["CosNotifyFilter_FilterFactory"];
-'CosNotifyFilter_FilterFactory'(suite) -> [];
'CosNotifyFilter_FilterFactory'(_) ->
?nomatch(undefined, 'CosNotifyFilter_FilterFactory':oe_tc(create_filter)),
?nomatch(undefined, 'CosNotifyFilter_FilterFactory':oe_tc(create_mapping_filter)),
@@ -1752,8 +1611,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyFilter_MappingFilter'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyFilter_MappingFilter'(doc) -> ["CosNotifyFilter_MappingFilter"];
-'CosNotifyFilter_MappingFilter'(suite) -> [];
'CosNotifyFilter_MappingFilter'(_) ->
?nomatch(undefined, 'CosNotifyFilter_MappingFilter':oe_tc('_get_constraint_grammar')),
?nomatch(undefined, 'CosNotifyFilter_MappingFilter':oe_tc('_get_value_type')),
@@ -1781,8 +1638,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_NotifyPublish'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_NotifyPublish'(doc) -> ["CosNotifyComm_NotifyPublish"];
-'CosNotifyComm_NotifyPublish'(suite) -> [];
'CosNotifyComm_NotifyPublish'(_) ->
?nomatch(undefined, 'CosNotifyComm_NotifyPublish':oe_tc(offer_change)),
?match(undefined, 'CosNotifyComm_NotifyPublish':oe_tc(undefined)),
@@ -1799,8 +1654,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_NotifySubscribe'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_NotifySubscribe'(doc) -> ["CosNotifyComm_NotifySubscribe"];
-'CosNotifyComm_NotifySubscribe'(suite) -> [];
'CosNotifyComm_NotifySubscribe'(_) ->
?nomatch(undefined, 'CosNotifyComm_NotifySubscribe':oe_tc(subscription_change)),
?match(undefined, 'CosNotifyComm_NotifySubscribe':oe_tc(undefined)),
@@ -1817,8 +1670,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_PullConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_PullConsumer'(doc) -> ["CosNotifyComm_PullConsumer"];
-'CosNotifyComm_PullConsumer'(suite) -> [];
'CosNotifyComm_PullConsumer'(_) ->
?nomatch(undefined, 'CosNotifyComm_PullConsumer':oe_tc(offer_change)),
?nomatch(undefined, 'CosNotifyComm_PullConsumer':oe_tc(disconnect_pull_consumer)),
@@ -1838,8 +1689,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_PullSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_PullSupplier'(doc) -> ["CosNotifyComm_PullSupplier"];
-'CosNotifyComm_PullSupplier'(suite) -> [];
'CosNotifyComm_PullSupplier'(_) ->
?nomatch(undefined, 'CosNotifyComm_PullSupplier':oe_tc(subscription_change)),
?nomatch(undefined, 'CosNotifyComm_PullSupplier':oe_tc(pull)),
@@ -1861,8 +1710,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_PushConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_PushConsumer'(doc) -> ["CosNotifyComm_PushConsumer"];
-'CosNotifyComm_PushConsumer'(suite) -> [];
'CosNotifyComm_PushConsumer'(_) ->
?nomatch(undefined, 'CosNotifyComm_PushConsumer':oe_tc(offer_change)),
?nomatch(undefined, 'CosNotifyComm_PushConsumer':oe_tc(push)),
@@ -1883,8 +1730,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_PushSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_PushSupplier'(doc) -> ["CosNotifyComm_PushSupplier"];
-'CosNotifyComm_PushSupplier'(suite) -> [];
'CosNotifyComm_PushSupplier'(_) ->
?nomatch(undefined, 'CosNotifyComm_PushSupplier':oe_tc(subscription_change)),
?nomatch(undefined, 'CosNotifyComm_PushSupplier':oe_tc(disconnect_push_supplier)),
@@ -1904,8 +1749,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_SequencePullConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_SequencePullConsumer'(doc) -> ["CosNotifyComm_SequencePullConsumer"];
-'CosNotifyComm_SequencePullConsumer'(suite) -> [];
'CosNotifyComm_SequencePullConsumer'(_) ->
?nomatch(undefined, 'CosNotifyComm_SequencePullConsumer':oe_tc(disconnect_sequence_pull_consumer)),
?nomatch(undefined, 'CosNotifyComm_SequencePullConsumer':oe_tc(offer_change)),
@@ -1924,8 +1767,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_SequencePullSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_SequencePullSupplier'(doc) -> ["CosNotifyComm_SequencePullSupplier"];
-'CosNotifyComm_SequencePullSupplier'(suite) -> [];
'CosNotifyComm_SequencePullSupplier'(_) ->
?nomatch(undefined, 'CosNotifyComm_SequencePullSupplier':oe_tc(pull_structured_events)),
?nomatch(undefined, 'CosNotifyComm_SequencePullSupplier':oe_tc(try_pull_structured_events)),
@@ -1946,8 +1787,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_SequencePushConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_SequencePushConsumer'(doc) -> ["CosNotifyComm_SequencePushConsumer"];
-'CosNotifyComm_SequencePushConsumer'(suite) -> [];
'CosNotifyComm_SequencePushConsumer'(_) ->
?nomatch(undefined, 'CosNotifyComm_SequencePushConsumer':oe_tc(push_structured_events)),
?nomatch(undefined, 'CosNotifyComm_SequencePushConsumer':oe_tc(disconnect_sequence_push_consumer)),
@@ -1967,8 +1806,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_SequencePushSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_SequencePushSupplier'(doc) -> ["CosNotifyComm_SequencePushSupplier"];
-'CosNotifyComm_SequencePushSupplier'(suite) -> [];
'CosNotifyComm_SequencePushSupplier'(_) ->
?nomatch(undefined, 'CosNotifyComm_SequencePushSupplier':oe_tc(disconnect_sequence_push_supplier)),
?nomatch(undefined, 'CosNotifyComm_SequencePushSupplier':oe_tc(subscription_change)),
@@ -1987,8 +1824,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_StructuredPullConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_StructuredPullConsumer'(doc) -> ["CosNotifyComm_StructuredPullConsumer"];
-'CosNotifyComm_StructuredPullConsumer'(suite) -> [];
'CosNotifyComm_StructuredPullConsumer'(_) ->
?nomatch(undefined, 'CosNotifyComm_StructuredPullConsumer':oe_tc(disconnect_structured_pull_consumer)),
?nomatch(undefined, 'CosNotifyComm_StructuredPullConsumer':oe_tc(offer_change)),
@@ -2007,8 +1842,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_StructuredPullSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_StructuredPullSupplier'(doc) -> ["CosNotifyComm_StructuredPullSupplier"];
-'CosNotifyComm_StructuredPullSupplier'(suite) -> [];
'CosNotifyComm_StructuredPullSupplier'(_) ->
?nomatch(undefined, 'CosNotifyComm_StructuredPullSupplier':oe_tc(pull_structured_event)),
?nomatch(undefined, 'CosNotifyComm_StructuredPullSupplier':oe_tc(try_pull_structured_event)),
@@ -2029,8 +1862,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_StructuredPushConsumer'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_StructuredPushConsumer'(doc) -> ["CosNotifyComm_StructuredPushConsumer"];
-'CosNotifyComm_StructuredPushConsumer'(suite) -> [];
'CosNotifyComm_StructuredPushConsumer'(_) ->
?nomatch(undefined, 'CosNotifyComm_StructuredPushConsumer':oe_tc(push_structured_event)),
?nomatch(undefined, 'CosNotifyComm_StructuredPushConsumer':oe_tc(disconnect_structured_push_consumer)),
@@ -2050,8 +1881,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosNotifyComm_StructuredPushSupplier'
%% Description:
%%-----------------------------------------------------------------
-'CosNotifyComm_StructuredPushSupplier'(doc) -> ["CosNotifyComm_StructuredPushSupplier"];
-'CosNotifyComm_StructuredPushSupplier'(suite) -> [];
'CosNotifyComm_StructuredPushSupplier'(_) ->
?nomatch(undefined, 'CosNotifyComm_StructuredPushSupplier':oe_tc(disconnect_structured_push_supplier)),
?nomatch(undefined, 'CosNotifyComm_StructuredPushSupplier':oe_tc(subscription_change)),
@@ -2070,8 +1899,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'oe_CosNotificationComm_Event'
%% Description:
%%-----------------------------------------------------------------
-'oe_CosNotificationComm_Event'(doc) -> ["oe_CosNotificationComm_Event"];
-'oe_CosNotificationComm_Event'(suite) -> [];
'oe_CosNotificationComm_Event'(_) ->
?nomatch(undefined, 'oe_CosNotificationComm_Event':oe_tc(callSeq)),
?nomatch(undefined, 'oe_CosNotificationComm_Event':oe_tc(callAny)),
diff --git a/lib/cosNotification/test/grammar_SUITE.erl b/lib/cosNotification/test/grammar_SUITE.erl
index 34b832327d..536292fdee 100644
--- a/lib/cosNotification/test/grammar_SUITE.erl
+++ b/lib/cosNotification/test/grammar_SUITE.erl
@@ -26,8 +26,6 @@
-module(grammar_SUITE).
-
-
%%--------------- INCLUDES -----------------------------------
-include_lib("orber/include/corba.hrl").
-include_lib("orber/include/ifr_types.hrl").
@@ -46,7 +44,7 @@
-include_lib("common_test/include/ct.hrl").
%%--------------- DEFINES ------------------------------------
--define(default_timeout, ?t:minutes(20)).
+-define(default_timeout, test_server:minutes(20)).
-define(match(ExpectedRes, Expr),
fun() ->
AcTuAlReS = (catch (Expr)),
@@ -58,7 +56,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -100,18 +98,17 @@ cases() ->
%%-----------------------------------------------------------------
%% Init and cleanup functions.
%%-----------------------------------------------------------------
-
init_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -134,8 +131,6 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% simple types grammar tests
%%-----------------------------------------------------------------
-simple_types_api(doc) -> ["CosNotification simple types grammar tests", ""];
-simple_types_api(suite) -> [];
simple_types_api(_Config) ->
%% Will always be true, no matter what kind of event we receive.
{ok,T1} = ?match({ok, _}, create_filter("2==2 and 3<4")),
@@ -208,8 +203,6 @@ simple_types_api(_Config) ->
%%-----------------------------------------------------------------
%% enum grammar tests
%%-----------------------------------------------------------------
-enum_api(doc) -> ["CosNotification enum grammar tests", ""];
-enum_api(suite) -> [];
enum_api(_Config) ->
%% Accept events whose 'in' enum is set to the value 'HOUSE' or 'CAR'.
{ok,T1} = ?match({ok, _}, create_filter("$.\\in == HOUSE or $.\\in == CAR")),
@@ -221,13 +214,11 @@ enum_api(_Config) ->
any:create({tk_enum, "IFRId", "in", ["HOUSE", "CAR"]},
'GARAGE')))),
ok.
-
+
%%-----------------------------------------------------------------
%% Union grammar tests
%%-----------------------------------------------------------------
-union_api(doc) -> ["CosNotification union grammar tests", ""];
-union_api(suite) -> [];
union_api(_Config) ->
{ok,T1} = ?match({ok, _}, create_filter("exist $.uni1._d and $.uni1._d == 1 and $.uni1.(1) == 10")),
{ok,T2} = ?match({ok, _}, create_filter("default $.uni1._d and $.uni1.() == 10")),
@@ -541,8 +532,6 @@ union_api(_Config) ->
%%-----------------------------------------------------------------
%% Variables grammar tests
%%-----------------------------------------------------------------
-variable_api(doc) -> ["CosNotification variables grammar tests", ""];
-variable_api(suite) -> [];
variable_api(_Config) ->
%% Accept all "CommunicationsAlarm" events
{ok,T0} = ?match({ok, _}, create_filter("$type_name == 'CommunicationsAlarm'")),
@@ -873,8 +862,6 @@ variable_api(_Config) ->
%%-----------------------------------------------------------------
%% Misc grammar tests
%%-----------------------------------------------------------------
-positional_api(doc) -> ["CosNotification positional notation grammar tests", ""];
-positional_api(suite) -> [];
positional_api(_Config) ->
{ok,T1} = ?match({ok, _}, create_filter("$.3 < 80 or $.1(midterm) > $.1(final) or $.2[3] < 10")),
@@ -929,8 +916,6 @@ positional_api(_Config) ->
%%-----------------------------------------------------------------
%% Components grammar tests
%%-----------------------------------------------------------------
-components_api(doc) -> ["CosNotification components grammar tests", ""];
-components_api(suite) -> [];
components_api(_Config) ->
{ok,T1} = ?match({ok, _}, create_filter("$ == 2")),
?match(true, eval(T1, ?not_CreateSE("DomainName","TypeName","EventName",
diff --git a/lib/cosNotification/test/notification_SUITE.erl b/lib/cosNotification/test/notification_SUITE.erl
index f23dacce4f..624a76c64a 100644
--- a/lib/cosNotification/test/notification_SUITE.erl
+++ b/lib/cosNotification/test/notification_SUITE.erl
@@ -44,7 +44,7 @@
-include_lib("common_test/include/ct.hrl").
%%--------------- DEFINES ------------------------------------
--define(default_timeout, ?t:minutes(20)).
+-define(default_timeout, test_server:minutes(20)).
-define(match(ExpectedRes, Expr),
fun() ->
AcTuAlReS = (catch (Expr)),
@@ -56,7 +56,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -164,18 +164,16 @@ cases() ->
%%-----------------------------------------------------------------
%% Init and cleanup functions.
%%-----------------------------------------------------------------
-
init_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
-
end_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -209,8 +207,6 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% Tests app file
%%-----------------------------------------------------------------
-app_test(doc) -> [];
-app_test(suite) -> [];
app_test(_Config) ->
ok=test_server:app_test(cosNotification),
ok.
@@ -219,9 +215,6 @@ app_test(_Config) ->
%%-----------------------------------------------------------------
%% Persistent events max limit
%%-----------------------------------------------------------------
-persistent_max_events_api(doc) -> ["CosNotification QoS EventReliability Persistent",
- ""];
-persistent_max_events_api(suite) -> [];
persistent_max_events_api(_Config) ->
QoSPersistent =
[#'CosNotification_Property'{name='CosNotification':'ConnectionReliability'(),
@@ -309,10 +302,6 @@ terminated(Items) ->
%%-----------------------------------------------------------------
%% Persistent events timeout
%%-----------------------------------------------------------------
-persistent_timeout_events_api(doc) ->
- ["CosNotification QoS EventReliability Persistent",
- ""];
-persistent_timeout_events_api(suite) -> [];
persistent_timeout_events_api(_Config) ->
QoSPersistent =
[#'CosNotification_Property'{name='CosNotification':'ConnectionReliability'(),
@@ -394,10 +383,6 @@ persistent_timeout_events_api(_Config) ->
%%-----------------------------------------------------------------
%% Persistent events max limit
%%-----------------------------------------------------------------
-persistent_recover_events_api(doc) ->
- ["CosNotification QoS EventReliability Persistent",
- ""];
-persistent_recover_events_api(suite) -> [];
persistent_recover_events_api(_Config) ->
QoSPersistent =
[#'CosNotification_Property'{name='CosNotification':'ConnectionReliability'(),
@@ -484,8 +469,6 @@ persistent_recover_events_api(_Config) ->
%%-----------------------------------------------------------------
%% CosNotifyFilter::Filter API tests
%%-----------------------------------------------------------------
-mapping_filter_api(doc) -> ["CosNotifyFilter::MappingFilter API tests.", ""];
-mapping_filter_api(suite) -> [];
mapping_filter_api(_Config) ->
FiFac = 'CosNotifyFilter_FilterFactory':oe_create(),
?match({_,key,_,_,_,_}, FiFac),
@@ -514,7 +497,7 @@ mapping_filter_api(_Config) ->
constraint_expr = "2==2 and 3<"},
result_to_set = any:create(orber_tc:short(), 10)}])),
%% Try adding two correct constraint_expr
- ?line[{_,_,CID1,_},{_,_,CID2,_}]=
+ [{_,_,CID1,_},{_,_,CID2,_}]=
?match([{'CosNotifyFilter_MappingConstraintInfo',_,_,_}, {'CosNotifyFilter_MappingConstraintInfo',_,_,_}],
'CosNotifyFilter_MappingFilter':add_mapping_constraints(Filter,
[#'CosNotifyFilter_MappingConstraintPair'
@@ -685,8 +668,6 @@ mapping_filter_api(_Config) ->
%%-----------------------------------------------------------------
%% CosNotifyFilter::Filter API tests
%%-----------------------------------------------------------------
-filter_api(doc) -> ["CosNotifyFilter::Filter API tests.", ""];
-filter_api(suite) -> [];
filter_api(_Config) ->
Fac = cosNotificationApp:start_global_factory(?FAC_OPT),
?match({_,key,_,_,_,_}, Fac),
@@ -730,7 +711,7 @@ filter_api(_Config) ->
type_name = "type"}],
constraint_expr = "2==2 and 3<"}])),
%% Try adding two correct constraint_expr
- ?line[{_,_,CID1},{_,_,CID2}]=
+ [{_,_,CID1},{_,_,CID2}]=
?match([{'CosNotifyFilter_ConstraintInfo',_,_}, {'CosNotifyFilter_ConstraintInfo',_,_}],
'CosNotifyFilter_Filter':add_constraints(Filter,
[#'CosNotifyFilter_ConstraintExp'{event_types =
@@ -870,8 +851,6 @@ filter_api(_Config) ->
%%-----------------------------------------------------------------
%% Subscription handling API tests
%%-----------------------------------------------------------------
-subscription_api(doc) -> ["CosNotification subscription handling", ""];
-subscription_api(suite) -> [];
subscription_api(_Config) ->
%% Initialize the application.
Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)),
@@ -1090,8 +1069,6 @@ subscription_api(_Config) ->
%%-----------------------------------------------------------------
%% Filter admin API tests
%%-----------------------------------------------------------------
-filter_adm_api(doc) -> ["CosNotification filter admin tests", ""];
-filter_adm_api(suite) -> [];
filter_adm_api(_Config) ->
Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)),
?match({_,key,_,_,_,_}, Fac),
@@ -1166,8 +1143,6 @@ filter_tests(Mod, Obj, Filter, Ch) ->
%%-----------------------------------------------------------------
%% Creating different event pushing and pulling API tests
%%-----------------------------------------------------------------
-events_api(doc) -> ["CosNotification event pushing and pulling tests", ""];
-events_api(suite) -> [];
events_api(_Config) ->
%% Initialize the application.
Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)),
@@ -1550,7 +1525,7 @@ events_api_helper(Fac, Ch, _Id1) ->
FiFac = 'CosNotifyFilter_FilterFactory':oe_create(),
Filter = 'CosNotifyFilter_FilterFactory':create_filter(FiFac,"EXTENDED_TCL"),
%% Add constraints to the Filter
- ?line[{_,_,CID1},{_,_,CID2}]=
+ [{_,_,CID1},{_,_,CID2}]=
?match([{'CosNotifyFilter_ConstraintInfo',_,_}, {'CosNotifyFilter_ConstraintInfo',_,_}],
'CosNotifyFilter_Filter':add_constraints(Filter,
[#'CosNotifyFilter_ConstraintExp'{event_types =
@@ -1728,8 +1703,6 @@ event_filtering(_FiFac, _Filter, _AdminConsumer, StructuredProxyPushConsumer, Pu
%%-----------------------------------------------------------------
%% Creating different cosEvent API tests
%%-----------------------------------------------------------------
-cosevent_api(doc) -> ["CosNotification Objects tested with CosEvent API", ""];
-cosevent_api(suite) -> [];
cosevent_api(_Config) ->
Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)),
?match({_,key,_,_,_,_}, Fac),
@@ -1844,8 +1817,6 @@ cosevent_api(_Config) ->
%%-----------------------------------------------------------------
%% AdminPropertiesAdmin API tests
%%-----------------------------------------------------------------
-adm_api(doc) -> ["CosNotification AdminPropertiesAdmin tests", ""];
-adm_api(suite) -> [];
adm_api(_Config) ->
Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)),
?match({_,key,_,_,_,_}, Fac),
@@ -1892,8 +1863,6 @@ adm_api(_Config) ->
%%-----------------------------------------------------------------
%% QoSAdm API tests
%%-----------------------------------------------------------------
-qos_api(doc) -> ["CosNotification QoSAdmin tests", ""];
-qos_api(suite) -> [];
qos_api(_Config) ->
Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)),
?match({_,key,_,_,_,_}, Fac),
@@ -2060,8 +2029,6 @@ qos_api(_Config) ->
%%-----------------------------------------------------------------
%% QoSAdm API tests
%%-----------------------------------------------------------------
-event_qos_api(doc) -> ["CosNotification QoSAdmin tests", ""];
-event_qos_api(suite) -> [];
event_qos_api(_Config) ->
Fac = (catch cosNotificationApp:start_global_factory(?FAC_OPT)),
?match({_,key,_,_,_,_}, Fac),
diff --git a/lib/cosNotification/vsn.mk b/lib/cosNotification/vsn.mk
index 07b9bf474b..0d95ab4853 100644
--- a/lib/cosNotification/vsn.mk
+++ b/lib/cosNotification/vsn.mk
@@ -1,2 +1,2 @@
-COSNOTIFICATION_VSN = 1.2.1
+COSNOTIFICATION_VSN = 1.2.2
diff --git a/lib/cosProperty/doc/src/notes.xml b/lib/cosProperty/doc/src/notes.xml
index 4ec7eca94a..d5219fc110 100644
--- a/lib/cosProperty/doc/src/notes.xml
+++ b/lib/cosProperty/doc/src/notes.xml
@@ -32,7 +32,22 @@
<file>notes.xml</file>
</header>
- <section><title>cosProperty 1.2</title>
+ <section><title>cosProperty 1.2.1</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosProperty 1.2</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosProperty/test/generated_SUITE.erl b/lib/cosProperty/test/generated_SUITE.erl
index 8eb794bd8f..313f5bf8f9 100644
--- a/lib/cosProperty/test/generated_SUITE.erl
+++ b/lib/cosProperty/test/generated_SUITE.erl
@@ -29,7 +29,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/include/corba.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
-define(match(ExpectedRes, Expr),
fun() ->
@@ -40,7 +40,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -51,7 +51,7 @@
Not ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS);
+ exit(AcTuAlReS);
_ ->
AcTuAlReS
end
@@ -63,7 +63,7 @@
case orber_tc:check_tc(TC) of
false ->
io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]),
- ?line exit(TC);
+ exit(TC);
true ->
true
end
@@ -136,24 +136,18 @@ end_per_group(_GroupName, Config) ->
%% Init and cleanup functions.
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
-
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
-
-
-
%%-----------------------------------------------------------------
%% Test Case: 'CosPropertyService_ConflictingProperty'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_ConflictingProperty'(doc) -> ["CosPropertyService_ConflictingProperty"];
-'CosPropertyService_ConflictingProperty'(suite) -> [];
'CosPropertyService_ConflictingProperty'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_ConflictingProperty':tc())),
?match("IDL:omg.org/CosPropertyService/ConflictingProperty:1.0",
@@ -167,8 +161,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_ConstraintNotSupported'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_ConstraintNotSupported'(doc) -> ["CosPropertyService_ConstraintNotSupported"];
-'CosPropertyService_ConstraintNotSupported'(suite) -> [];
'CosPropertyService_ConstraintNotSupported'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_ConstraintNotSupported':tc())),
?match("IDL:omg.org/CosPropertyService/ConstraintNotSupported:1.0",
@@ -182,8 +174,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_FixedProperty'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_FixedProperty'(doc) -> ["CosPropertyService_FixedProperty"];
-'CosPropertyService_FixedProperty'(suite) -> [];
'CosPropertyService_FixedProperty'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_FixedProperty':tc())),
?match("IDL:omg.org/CosPropertyService/FixedProperty:1.0",
@@ -197,8 +187,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_InvalidPropertyName'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_InvalidPropertyName'(doc) -> ["CosPropertyService_InvalidPropertyName"];
-'CosPropertyService_InvalidPropertyName'(suite) -> [];
'CosPropertyService_InvalidPropertyName'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_InvalidPropertyName':tc())),
?match("IDL:omg.org/CosPropertyService/InvalidPropertyName:1.0",
@@ -212,8 +200,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_MultipleExceptions'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_MultipleExceptions'(doc) -> ["CosPropertyService_MultipleExceptions"];
-'CosPropertyService_MultipleExceptions'(suite) -> [];
'CosPropertyService_MultipleExceptions'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_MultipleExceptions':tc())),
?match("IDL:omg.org/CosPropertyService/MultipleExceptions:1.0",
@@ -227,8 +213,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_Properties'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_Properties'(doc) -> ["CosPropertyService_Properties"];
-'CosPropertyService_Properties'(suite) -> [];
'CosPropertyService_Properties'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_Properties':tc())),
?match("IDL:omg.org/CosPropertyService/Properties:1.0",
@@ -242,8 +226,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_Property'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_Property'(doc) -> ["CosPropertyService_Property"];
-'CosPropertyService_Property'(suite) -> [];
'CosPropertyService_Property'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_Property':tc())),
?match("IDL:omg.org/CosPropertyService/Property:1.0",
@@ -257,8 +239,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertyDef'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertyDef'(doc) -> ["CosPropertyService_PropertyDef"];
-'CosPropertyService_PropertyDef'(suite) -> [];
'CosPropertyService_PropertyDef'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_PropertyDef':tc())),
?match("IDL:omg.org/CosPropertyService/PropertyDef:1.0",
@@ -272,8 +252,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertyDefs'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertyDefs'(doc) -> ["CosPropertyService_PropertyDefs"];
-'CosPropertyService_PropertyDefs'(suite) -> [];
'CosPropertyService_PropertyDefs'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_PropertyDefs':tc())),
?match("IDL:omg.org/CosPropertyService/PropertyDefs:1.0",
@@ -287,8 +265,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertyException'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertyException'(doc) -> ["CosPropertyService_PropertyException"];
-'CosPropertyService_PropertyException'(suite) -> [];
'CosPropertyService_PropertyException'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_PropertyException':tc())),
?match("IDL:omg.org/CosPropertyService/PropertyException:1.0",
@@ -302,8 +278,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertyExceptions'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertyExceptions'(doc) -> ["CosPropertyService_PropertyExceptions"];
-'CosPropertyService_PropertyExceptions'(suite) -> [];
'CosPropertyService_PropertyExceptions'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_PropertyExceptions':tc())),
?match("IDL:omg.org/CosPropertyService/PropertyExceptions:1.0",
@@ -317,8 +291,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertyMode'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertyMode'(doc) -> ["CosPropertyService_PropertyMode"];
-'CosPropertyService_PropertyMode'(suite) -> [];
'CosPropertyService_PropertyMode'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_PropertyMode':tc())),
?match("IDL:omg.org/CosPropertyService/PropertyMode:1.0",
@@ -332,8 +304,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertyModes'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertyModes'(doc) -> ["CosPropertyService_PropertyModes"];
-'CosPropertyService_PropertyModes'(suite) -> [];
'CosPropertyService_PropertyModes'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_PropertyModes':tc())),
?match("IDL:omg.org/CosPropertyService/PropertyModes:1.0",
@@ -347,8 +317,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertyNames'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertyNames'(doc) -> ["CosPropertyService_PropertyNames"];
-'CosPropertyService_PropertyNames'(suite) -> [];
'CosPropertyService_PropertyNames'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_PropertyNames':tc())),
?match("IDL:omg.org/CosPropertyService/PropertyNames:1.0",
@@ -361,8 +329,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertyNotFound'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertyNotFound'(doc) -> ["CosPropertyService_PropertyNotFound"];
-'CosPropertyService_PropertyNotFound'(suite) -> [];
'CosPropertyService_PropertyNotFound'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_PropertyNotFound':tc())),
?match("IDL:omg.org/CosPropertyService/PropertyNotFound:1.0",
@@ -375,8 +341,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertyTypes'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertyTypes'(doc) -> ["CosPropertyService_PropertyTypes"];
-'CosPropertyService_PropertyTypes'(suite) -> [];
'CosPropertyService_PropertyTypes'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_PropertyTypes':tc())),
?match("IDL:omg.org/CosPropertyService/PropertyTypes:1.0",
@@ -389,8 +353,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_ReadOnlyProperty'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_ReadOnlyProperty'(doc) -> ["CosPropertyService_ReadOnlyProperty"];
-'CosPropertyService_ReadOnlyProperty'(suite) -> [];
'CosPropertyService_ReadOnlyProperty'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_ReadOnlyProperty':tc())),
?match("IDL:omg.org/CosPropertyService/ReadOnlyProperty:1.0",
@@ -403,8 +365,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_UnsupportedMode'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_UnsupportedMode'(doc) -> ["CosPropertyService_UnsupportedMode"];
-'CosPropertyService_UnsupportedMode'(suite) -> [];
'CosPropertyService_UnsupportedMode'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_UnsupportedMode':tc())),
?match("IDL:omg.org/CosPropertyService/UnsupportedMode:1.0",
@@ -417,8 +377,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_UnsupportedProperty'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_UnsupportedProperty'(doc) -> ["CosPropertyService_UnsupportedProperty"];
-'CosPropertyService_UnsupportedProperty'(suite) -> [];
'CosPropertyService_UnsupportedProperty'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_UnsupportedProperty':tc())),
?match("IDL:omg.org/CosPropertyService/UnsupportedProperty:1.0",
@@ -431,8 +389,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_UnsupportedTypeCode'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_UnsupportedTypeCode'(doc) -> ["CosPropertyService_UnsupportedTypeCode"];
-'CosPropertyService_UnsupportedTypeCode'(suite) -> [];
'CosPropertyService_UnsupportedTypeCode'(_) ->
?match(true, orber_tc:check_tc('CosPropertyService_UnsupportedTypeCode':tc())),
?match("IDL:omg.org/CosPropertyService/UnsupportedTypeCode:1.0",
@@ -445,8 +401,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertyNamesIterator'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertyNamesIterator'(doc) -> ["CosPropertyService_PropertyNamesIterator"];
-'CosPropertyService_PropertyNamesIterator'(suite) -> [];
'CosPropertyService_PropertyNamesIterator'(_) ->
?nomatch(undefined, 'CosPropertyService_PropertyNamesIterator':oe_tc(reset)),
?nomatch(undefined, 'CosPropertyService_PropertyNamesIterator':oe_tc(next_one)),
@@ -465,8 +419,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertiesIterator'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertiesIterator'(doc) -> ["CosPropertyService_PropertiesIterator"];
-'CosPropertyService_PropertiesIterator'(suite) -> [];
'CosPropertyService_PropertiesIterator'(_) ->
?nomatch(undefined, 'CosPropertyService_PropertiesIterator':oe_tc(reset)),
?nomatch(undefined, 'CosPropertyService_PropertiesIterator':oe_tc(next_one)),
@@ -486,8 +438,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertySet'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertySet'(doc) -> ["CosPropertyService_PropertySet"];
-'CosPropertyService_PropertySet'(suite) -> [];
'CosPropertyService_PropertySet'(_) ->
?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(define_property)),
?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(define_properties)),
@@ -514,8 +464,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertySetDef'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertySetDef'(doc) -> ["CosPropertyService_PropertySetDef"];
-'CosPropertyService_PropertySetDef'(suite) -> [];
'CosPropertyService_PropertySetDef'(_) ->
?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_allowed_property_types)),
?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_allowed_properties)),
@@ -551,8 +499,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertySetDefFactory'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertySetDefFactory'(doc) -> ["CosPropertyService_PropertySetDefFactory"];
-'CosPropertyService_PropertySetDefFactory'(suite) -> [];
'CosPropertyService_PropertySetDefFactory'(_) ->
?nomatch(undefined, 'CosPropertyService_PropertySetDefFactory':oe_tc(create_propertysetdef)),
?nomatch(undefined, 'CosPropertyService_PropertySetDefFactory':oe_tc(create_constrained_propertysetdef)),
@@ -571,8 +517,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosPropertyService_PropertySetFactory'
%% Description:
%%-----------------------------------------------------------------
-'CosPropertyService_PropertySetFactory'(doc) -> ["CosPropertyService_PropertySetFactory"];
-'CosPropertyService_PropertySetFactory'(suite) -> [];
'CosPropertyService_PropertySetFactory'(_) ->
?nomatch(undefined, 'CosPropertyService_PropertySetFactory':oe_tc(create_propertyset)),
?nomatch(undefined, 'CosPropertyService_PropertySetFactory':oe_tc(create_constrained_propertyset)),
diff --git a/lib/cosProperty/test/property_SUITE.erl b/lib/cosProperty/test/property_SUITE.erl
index 42ddf04038..77f35c319a 100644
--- a/lib/cosProperty/test/property_SUITE.erl
+++ b/lib/cosProperty/test/property_SUITE.erl
@@ -36,7 +36,7 @@
-include_lib("common_test/include/ct.hrl").
%%--------------- DEFINES ------------------------------------
--define(default_timeout, ?t:minutes(20)).
+-define(default_timeout, test_server:minutes(20)).
-define(match(ExpectedRes, Expr),
fun() ->
AcTuAlReS = (catch (Expr)),
@@ -122,18 +122,17 @@ cases() ->
%%-----------------------------------------------------------------
%% Init and cleanup functions.
%%-----------------------------------------------------------------
-
init_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -143,7 +142,7 @@ init_per_suite(Config) ->
orber:jump_start(),
cosProperty:install(),
cosProperty:install_db(),
- ?line ?match(ok, application:start(cosProperty)),
+ ?match(ok, application:start(cosProperty)),
if
is_list(Config) ->
Config;
@@ -163,8 +162,6 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% Tests app file
%%-----------------------------------------------------------------
-app_test(doc) -> [];
-app_test(suite) -> [];
app_test(_Config) ->
ok=test_server:app_test(cosProperty),
ok.
@@ -173,9 +170,6 @@ app_test(_Config) ->
%%-----------------------------------------------------------------
%% CosPropertyService_PropertySetDefFactory API tests
%%-----------------------------------------------------------------
-create_setdef_api(doc) -> ["CosPropertyService_PropertySetDefFactory API tests.",
- ""];
-create_setdef_api(suite) -> [];
create_setdef_api(_Config) ->
ValidDefs = [#'CosPropertyService_PropertyDef'
@@ -239,9 +233,6 @@ create_setdef_api(_Config) ->
%%-----------------------------------------------------------------
%% CosPropertyService_PropertySetFactory API tests
%%-----------------------------------------------------------------
-create_set_api(doc) -> ["CosPropertyService_PropertySetFactory API tests.",
- ""];
-create_set_api(suite) -> [];
create_set_api(_Config) ->
Valid = [#'CosPropertyService_Property'
{property_name = ?id1,
@@ -296,9 +287,6 @@ create_set_api(_Config) ->
%%-----------------------------------------------------------------
%% CosPropertyService_PropertySetDef API tests
%%-----------------------------------------------------------------
-define_api(doc) -> ["CosPropertyService_PropertySet API tests.",
- ""];
-define_api(suite) -> [];
define_api(_Config) ->
ValidDefs = [#'CosPropertyService_Property'
{property_name = ?id1,
@@ -466,9 +454,6 @@ define_api(_Config) ->
%%-----------------------------------------------------------------
%% CosPropertyService_PropertySetDef API tests
%%-----------------------------------------------------------------
-define_with_mode_api(doc) -> ["CosPropertyService_PropertySetDef API tests.",
- ""];
-define_with_mode_api(suite) -> [];
define_with_mode_api(_Config) ->
ValidDefs = [#'CosPropertyService_PropertyDef'
{property_name = ?id1,
@@ -684,9 +669,6 @@ define_with_mode_api(_Config) ->
%%-----------------------------------------------------------------
%% CosPropertyService_PropertyNamesIterator API tests
%%-----------------------------------------------------------------
-names_iterator_api(doc) -> ["CosPropertyService_PropertyNamesIterator API tests.",
- ""];
-names_iterator_api(suite) -> [];
names_iterator_api(_Config) ->
Fac = ?match({_,pseudo,_,_,_,_}, cosProperty:start_SetFactory()),
Obj = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetFactory':
@@ -717,9 +699,6 @@ names_iterator_api(_Config) ->
%%-----------------------------------------------------------------
%% CosPropertyService_PropertiesIterator API tests
%%-----------------------------------------------------------------
-properties_iterator_api(doc) -> ["CosPropertyService_PropertiesIterator API tests.",
- ""];
-properties_iterator_api(suite) -> [];
properties_iterator_api(_Config) ->
Fac = ?match({_,pseudo,_,_,_,_}, cosProperty:start_SetFactory()),
Obj = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetFactory':
diff --git a/lib/cosProperty/vsn.mk b/lib/cosProperty/vsn.mk
index d96508c2d2..1a8e42ffdb 100644
--- a/lib/cosProperty/vsn.mk
+++ b/lib/cosProperty/vsn.mk
@@ -1,2 +1,2 @@
-COSPROPERTY_VSN = 1.2
+COSPROPERTY_VSN = 1.2.1
diff --git a/lib/cosTime/doc/src/notes.xml b/lib/cosTime/doc/src/notes.xml
index 62c1aa3c26..686d9e6add 100644
--- a/lib/cosTime/doc/src/notes.xml
+++ b/lib/cosTime/doc/src/notes.xml
@@ -33,7 +33,22 @@
<file>notes.xml</file>
</header>
- <section><title>cosTime 1.2.1</title>
+ <section><title>cosTime 1.2.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosTime 1.2.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosTime/test/generated_SUITE.erl b/lib/cosTime/test/generated_SUITE.erl
index ea1362adef..b030155340 100644
--- a/lib/cosTime/test/generated_SUITE.erl
+++ b/lib/cosTime/test/generated_SUITE.erl
@@ -29,7 +29,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/include/corba.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
-define(match(ExpectedRes, Expr),
fun() ->
@@ -40,7 +40,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -51,7 +51,7 @@
Not ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS);
+ exit(AcTuAlReS);
_ ->
AcTuAlReS
end
@@ -63,7 +63,7 @@
case orber_tc:check_tc(TC) of
false ->
io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]),
- ?line exit(TC);
+ exit(TC);
true ->
true
end
@@ -114,12 +114,12 @@ end_per_group(_GroupName, Config) ->
%% Init and cleanup functions.
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -127,8 +127,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'TimeBase_IntervalT'
%% Description:
%%-----------------------------------------------------------------
-'TimeBase_IntervalT'(doc) -> ["TimeBase_IntervalT"];
-'TimeBase_IntervalT'(suite) -> [];
'TimeBase_IntervalT'(_) ->
?match(true, orber_tc:check_tc('TimeBase_IntervalT':tc())),
?match("IDL:omg.org/TimeBase/IntervalT:1.0",
@@ -142,8 +140,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'TimeBase_UtcT'
%% Description:
%%-----------------------------------------------------------------
-'TimeBase_UtcT'(doc) -> ["TimeBase_UtcT"];
-'TimeBase_UtcT'(suite) -> [];
'TimeBase_UtcT'(_) ->
?match(true, orber_tc:check_tc('TimeBase_UtcT':tc())),
?match("IDL:omg.org/TimeBase/UtcT:1.0",
@@ -157,8 +153,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTime_TimeUnavailable'
%% Description:
%%-----------------------------------------------------------------
-'CosTime_TimeUnavailable'(doc) -> ["CosTime_TimeUnavailable"];
-'CosTime_TimeUnavailable'(suite) -> [];
'CosTime_TimeUnavailable'(_) ->
?match(true, orber_tc:check_tc('CosTime_TimeUnavailable':tc())),
?match("IDL:omg.org/CosTime/TimeUnavailable:1.0",
@@ -172,8 +166,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTimerEvent_TimerEventT'
%% Description:
%%-----------------------------------------------------------------
-'CosTimerEvent_TimerEventT'(doc) -> ["CosTimerEvent_TimerEventT"];
-'CosTimerEvent_TimerEventT'(suite) -> [];
'CosTimerEvent_TimerEventT'(_) ->
?match(true, orber_tc:check_tc('CosTimerEvent_TimerEventT':tc())),
?match("IDL:omg.org/CosTimerEvent/TimerEventT:1.0",
@@ -187,8 +179,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTime_TIO'
%% Description:
%%-----------------------------------------------------------------
-'CosTime_TIO'(doc) -> ["CosTime_TIO"];
-'CosTime_TIO'(suite) -> [];
'CosTime_TIO'(_) ->
?nomatch(undefined, 'CosTime_TIO':oe_tc('_get_time_interval')),
?nomatch(undefined, 'CosTime_TIO':oe_tc(spans)),
@@ -207,8 +197,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTime_TimeService'
%% Description:
%%-----------------------------------------------------------------
-'CosTime_TimeService'(doc) -> ["CosTime_TimeService"];
-'CosTime_TimeService'(suite) -> [];
'CosTime_TimeService'(_) ->
?nomatch(undefined, 'CosTime_TimeService':oe_tc(universal_time)),
?nomatch(undefined, 'CosTime_TimeService':oe_tc(secure_universal_time)),
@@ -229,8 +217,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTime_UTO'
%% Description:
%%-----------------------------------------------------------------
-'CosTime_UTO'(doc) -> ["CosTime_UTO"];
-'CosTime_UTO'(suite) -> [];
'CosTime_UTO'(_) ->
?nomatch(undefined, 'CosTime_UTO':oe_tc('_get_time')),
?nomatch(undefined, 'CosTime_UTO':oe_tc('_get_inaccuracy')),
@@ -253,8 +239,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTimerEvent_TimerEventHandler'
%% Description:
%%-----------------------------------------------------------------
-'CosTimerEvent_TimerEventHandler'(doc) -> ["CosTimerEvent_TimerEventHandler"];
-'CosTimerEvent_TimerEventHandler'(suite) -> [];
'CosTimerEvent_TimerEventHandler'(_) ->
?nomatch(undefined, 'CosTimerEvent_TimerEventHandler':oe_tc('_get_status')),
?nomatch(undefined, 'CosTimerEvent_TimerEventHandler':oe_tc(time_set)),
@@ -275,8 +259,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTimerEvent_TimerEventService'
%% Description:
%%-----------------------------------------------------------------
-'CosTimerEvent_TimerEventService'(doc) -> ["CosTimerEvent_TimerEventService"];
-'CosTimerEvent_TimerEventService'(suite) -> [];
'CosTimerEvent_TimerEventService'(_) ->
?nomatch(undefined, 'CosTimerEvent_TimerEventService':oe_tc(register)),
?nomatch(undefined, 'CosTimerEvent_TimerEventService':oe_tc(unregister)),
diff --git a/lib/cosTime/test/time_SUITE.erl b/lib/cosTime/test/time_SUITE.erl
index 431b1d2d8a..f85f13badb 100644
--- a/lib/cosTime/test/time_SUITE.erl
+++ b/lib/cosTime/test/time_SUITE.erl
@@ -33,7 +33,7 @@
-include_lib("common_test/include/ct.hrl").
%%--------------- DEFINES ------------------------------------
--define(default_timeout, ?t:minutes(20)).
+-define(default_timeout, test_server:minutes(20)).
-define(match(ExpectedRes, Expr),
fun() ->
AcTuAlReS = (catch (Expr)),
@@ -105,14 +105,14 @@ cases() ->
init_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -150,8 +150,6 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% Tests app file
%%-----------------------------------------------------------------
-app_test(doc) -> [];
-app_test(suite) -> [];
app_test(_Config) ->
ok=test_server:app_test(cosTime),
ok.
@@ -159,27 +157,25 @@ app_test(_Config) ->
%%-----------------------------------------------------------------
%% CosTime API tests
%%-----------------------------------------------------------------
-time_api(doc) -> ["CosTime API tests.", ""];
-time_api(suite) -> [];
time_api(_Config) ->
- ?line ?match(ok, application:start(cosTime)),
+ ?match(ok, application:start(cosTime)),
TS=cosTime:start_time_service(0, 500),
Time=calendar:datetime_to_gregorian_seconds({{1582,1,1},{0,0,0}}),
Inaccuracy = 1000,
Tdf =1,
Utc = #'TimeBase_UtcT'{time=Time, inacclo = ?low_TimeT(Inaccuracy),
inacchi = ?high_TimeT(Inaccuracy), tdf = Tdf},
- ?line UTO1='CosTime_TimeService':new_universal_time(TS, Time, Inaccuracy, Tdf),
- ?line UTO2='CosTime_TimeService':uto_from_utc(TS, Utc),
- ?line ?match(Time, 'CosTime_UTO':'_get_time'(UTO1)),
- ?line ?match(Inaccuracy, 'CosTime_UTO':'_get_inaccuracy'(UTO1)),
- ?line ?match(Tdf, 'CosTime_UTO':'_get_tdf'(UTO1)),
- ?line ?match(Utc, 'CosTime_UTO':'_get_utc_time'(UTO1)),
-
- ?line ?match(Time, 'CosTime_UTO':'_get_time'(UTO2)),
- ?line ?match(Inaccuracy, 'CosTime_UTO':'_get_inaccuracy'(UTO2)),
- ?line ?match(Tdf, 'CosTime_UTO':'_get_tdf'(UTO2)),
- ?line ?match(Utc, 'CosTime_UTO':'_get_utc_time'(UTO2)),
+ UTO1='CosTime_TimeService':new_universal_time(TS, Time, Inaccuracy, Tdf),
+ UTO2='CosTime_TimeService':uto_from_utc(TS, Utc),
+ ?match(Time, 'CosTime_UTO':'_get_time'(UTO1)),
+ ?match(Inaccuracy, 'CosTime_UTO':'_get_inaccuracy'(UTO1)),
+ ?match(Tdf, 'CosTime_UTO':'_get_tdf'(UTO1)),
+ ?match(Utc, 'CosTime_UTO':'_get_utc_time'(UTO1)),
+
+ ?match(Time, 'CosTime_UTO':'_get_time'(UTO2)),
+ ?match(Inaccuracy, 'CosTime_UTO':'_get_inaccuracy'(UTO2)),
+ ?match(Tdf, 'CosTime_UTO':'_get_tdf'(UTO2)),
+ ?match(Utc, 'CosTime_UTO':'_get_utc_time'(UTO2)),
TIO1='CosTime_TimeService':new_interval(TS, 2, 5),
_TIO2='CosTime_TimeService':new_interval(TS, 3, 6),
@@ -189,40 +185,40 @@ time_api(_Config) ->
TIO6='CosTime_TimeService':new_interval(TS, 2, 6),
TIO7='CosTime_TimeService':new_interval(TS, 3, 7),
- ?line {_,TIO8} = ?match({'OTContained', _}, 'CosTime_TIO':overlaps(TIO1, TIO6)),
- ?line {_,TIO9} = ?match({'OTContainer', _}, 'CosTime_TIO':overlaps(TIO1, TIO1)),
- ?line {_,TIO10} = ?match({'OTContainer', _}, 'CosTime_TIO':overlaps(TIO1, TIO4)),
- ?line {_,TIO11} = ?match({'OTOverlap', _}, 'CosTime_TIO':overlaps(TIO1, TIO3)),
- ?line {_,TIO12} = ?match({'OTOverlap', _}, 'CosTime_TIO':overlaps(TIO1, TIO7)),
- ?line {_,TIO13} = ?match({'OTNoOverlap', _}, 'CosTime_TIO':overlaps(TIO1, TIO5)),
+ {_,TIO8} = ?match({'OTContained', _}, 'CosTime_TIO':overlaps(TIO1, TIO6)),
+ {_,TIO9} = ?match({'OTContainer', _}, 'CosTime_TIO':overlaps(TIO1, TIO1)),
+ {_,TIO10} = ?match({'OTContainer', _}, 'CosTime_TIO':overlaps(TIO1, TIO4)),
+ {_,TIO11} = ?match({'OTOverlap', _}, 'CosTime_TIO':overlaps(TIO1, TIO3)),
+ {_,TIO12} = ?match({'OTOverlap', _}, 'CosTime_TIO':overlaps(TIO1, TIO7)),
+ {_,TIO13} = ?match({'OTNoOverlap', _}, 'CosTime_TIO':overlaps(TIO1, TIO5)),
- ?line ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO8)),
- ?line ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO9)),
- ?line ?match({'TimeBase_IntervalT',3,4},'CosTime_TIO':'_get_time_interval'(TIO10)),
- ?line ?match({'TimeBase_IntervalT',2,3},'CosTime_TIO':'_get_time_interval'(TIO11)),
- ?line ?match({'TimeBase_IntervalT',3,5},'CosTime_TIO':'_get_time_interval'(TIO12)),
- ?line ?match({'TimeBase_IntervalT',5,7},'CosTime_TIO':'_get_time_interval'(TIO13)),
+ ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO8)),
+ ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO9)),
+ ?match({'TimeBase_IntervalT',3,4},'CosTime_TIO':'_get_time_interval'(TIO10)),
+ ?match({'TimeBase_IntervalT',2,3},'CosTime_TIO':'_get_time_interval'(TIO11)),
+ ?match({'TimeBase_IntervalT',3,5},'CosTime_TIO':'_get_time_interval'(TIO12)),
+ ?match({'TimeBase_IntervalT',5,7},'CosTime_TIO':'_get_time_interval'(TIO13)),
- ?line UTO3='CosTime_TimeService':new_universal_time(TS, 4, 2, 0), %% 2-6
- ?line UTO4='CosTime_TimeService':new_universal_time(TS, 2, 1, 0), %% 1-3
- ?line UTO5='CosTime_TimeService':new_universal_time(TS, 3, 0, 0), %% 3-3
- ?line UTO6='CosTime_TimeService':new_universal_time(TS, 9, 1, 0), %% 8-10
- ?line UTO7='CosTime_TimeService':new_universal_time(TS, 4, 3, 0), %% 1-7
- ?line UTO8='CosTime_TimeService':new_universal_time(TS, 5, 2, 0), %% 3-7
-
- ?line {_,TIO14} = ?match({'OTContained', _}, 'CosTime_TIO':spans(TIO1, UTO7)),
- ?line {_,TIO15} = ?match({'OTContainer', _}, 'CosTime_TIO':spans(TIO1, UTO5)),
- ?line {_,TIO16} = ?match({'OTOverlap', _}, 'CosTime_TIO':spans(TIO1, UTO4)),
- ?line {_,TIO17} = ?match({'OTOverlap', _}, 'CosTime_TIO':spans(TIO1, UTO8)),
- ?line {_,TIO18} = ?match({'OTNoOverlap', _}, 'CosTime_TIO':spans(TIO1, UTO6)),
- ?line {_,TIO19} = ?match({'OTContained', _}, 'CosTime_TIO':spans(TIO1, UTO3)),
-
- ?line ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO14)),
- ?line ?match({'TimeBase_IntervalT',3,3},'CosTime_TIO':'_get_time_interval'(TIO15)),
- ?line ?match({'TimeBase_IntervalT',2,3},'CosTime_TIO':'_get_time_interval'(TIO16)),
- ?line ?match({'TimeBase_IntervalT',3,5},'CosTime_TIO':'_get_time_interval'(TIO17)),
- ?line ?match({'TimeBase_IntervalT',5,8},'CosTime_TIO':'_get_time_interval'(TIO18)),
- ?line ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO19)),
+ UTO3='CosTime_TimeService':new_universal_time(TS, 4, 2, 0), %% 2-6
+ UTO4='CosTime_TimeService':new_universal_time(TS, 2, 1, 0), %% 1-3
+ UTO5='CosTime_TimeService':new_universal_time(TS, 3, 0, 0), %% 3-3
+ UTO6='CosTime_TimeService':new_universal_time(TS, 9, 1, 0), %% 8-10
+ UTO7='CosTime_TimeService':new_universal_time(TS, 4, 3, 0), %% 1-7
+ UTO8='CosTime_TimeService':new_universal_time(TS, 5, 2, 0), %% 3-7
+
+ {_,TIO14} = ?match({'OTContained', _}, 'CosTime_TIO':spans(TIO1, UTO7)),
+ {_,TIO15} = ?match({'OTContainer', _}, 'CosTime_TIO':spans(TIO1, UTO5)),
+ {_,TIO16} = ?match({'OTOverlap', _}, 'CosTime_TIO':spans(TIO1, UTO4)),
+ {_,TIO17} = ?match({'OTOverlap', _}, 'CosTime_TIO':spans(TIO1, UTO8)),
+ {_,TIO18} = ?match({'OTNoOverlap', _}, 'CosTime_TIO':spans(TIO1, UTO6)),
+ {_,TIO19} = ?match({'OTContained', _}, 'CosTime_TIO':spans(TIO1, UTO3)),
+
+ ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO14)),
+ ?match({'TimeBase_IntervalT',3,3},'CosTime_TIO':'_get_time_interval'(TIO15)),
+ ?match({'TimeBase_IntervalT',2,3},'CosTime_TIO':'_get_time_interval'(TIO16)),
+ ?match({'TimeBase_IntervalT',3,5},'CosTime_TIO':'_get_time_interval'(TIO17)),
+ ?match({'TimeBase_IntervalT',5,8},'CosTime_TIO':'_get_time_interval'(TIO18)),
+ ?match({'TimeBase_IntervalT',2,5},'CosTime_TIO':'_get_time_interval'(TIO19)),
cosTime:stop_time_service(TS),
@@ -233,66 +229,64 @@ time_api(_Config) ->
%%-----------------------------------------------------------------
%% CosTimerEvent API tests
%%-----------------------------------------------------------------
-timerevent_api(doc) -> ["CosTimerEvent API tests.", ""];
-timerevent_api(suite) -> [];
timerevent_api(_Config) ->
%% Init cosTime apps.
- ?line ?match(ok, application:start(cosTime)),
- ?line TS=cosTime:start_time_service(0, 500),
- ?line TES=cosTime:start_timerevent_service(TS),
+ ?match(ok, application:start(cosTime)),
+ TS=cosTime:start_time_service(0, 500),
+ TES=cosTime:start_timerevent_service(TS),
%%----- Initialize the cosNotification application. -----
- ?line cosNotificationApp:start(),
- ?line Fac = (catch cosNotificationApp:start_factory([])),
- ?line {Ch, _Id1} = (catch 'CosNotifyChannelAdmin_EventChannelFactory':create_channel(Fac, [], [])),
+ cosNotificationApp:start(),
+ Fac = (catch cosNotificationApp:start_factory([])),
+ {Ch, _Id1} = (catch 'CosNotifyChannelAdmin_EventChannelFactory':create_channel(Fac, [], [])),
%% Create the Admin objects
- ?line {AdminSupplier, _ASID}= ?match({{_,key,_,_,_,_},_},
+ {AdminSupplier, _ASID}= ?match({{_,key,_,_,_,_},_},
'CosNotifyChannelAdmin_EventChannel':new_for_suppliers(Ch,'OR_OP')),
- ?line {AdminConsumer, _ACID}= ?match({{_,key,_,_,_,_},_},
+ {AdminConsumer, _ACID}= ?match({{_,key,_,_,_,_},_},
'CosNotifyChannelAdmin_EventChannel':new_for_consumers(Ch,'OR_OP')),
%% Create a push consumer TimerEventService will push events to.
- ?line {ProxyPushConsumer,_ID10}= ?match({{_,key,_,_,_,_},_},
+ {ProxyPushConsumer,_ID10}= ?match({{_,key,_,_,_,_},_},
'CosNotifyChannelAdmin_SupplierAdmin':obtain_notification_push_consumer(AdminSupplier, 'ANY_EVENT')),
%% Create a pull suppliers so we can check we actually got the event.
- ?line {ProxyPullSupplier,_ID1} = ?match({{_,key,_,_,_,_},_},
+ {ProxyPullSupplier,_ID1} = ?match({{_,key,_,_,_,_},_},
'CosNotifyChannelAdmin_ConsumerAdmin':obtain_notification_pull_supplier(AdminConsumer, 'ANY_EVENT')),
AnyEvent = any:create(orber_tc:long(), 100),
- ?line UTO=?match({_,pseudo,_,_,_,_}, 'CosTime_TimeService':new_universal_time(TS, 10*10000000,1,1)),
- ?line EH=?match({_,key,_,_,_,_}, 'CosTimerEvent_TimerEventService':register(TES, ProxyPushConsumer, AnyEvent)),
-
- ?line ?match('ESTimeCleared','CosTimerEvent_TimerEventHandler':'_get_status'(EH)),
- ?line ?match({false,_},'CosTimerEvent_TimerEventHandler':time_set(EH)),
- ?line ?match(ok,'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTRelative', UTO)),
- ?line ?match({true,_},'CosTimerEvent_TimerEventHandler':time_set(EH)),
- ?line ?match('ESTimeSet','CosTimerEvent_TimerEventHandler':'_get_status'(EH)),
+ UTO=?match({_,pseudo,_,_,_,_}, 'CosTime_TimeService':new_universal_time(TS, 10*10000000,1,1)),
+ EH=?match({_,key,_,_,_,_}, 'CosTimerEvent_TimerEventService':register(TES, ProxyPushConsumer, AnyEvent)),
+
+ ?match('ESTimeCleared','CosTimerEvent_TimerEventHandler':'_get_status'(EH)),
+ ?match({false,_},'CosTimerEvent_TimerEventHandler':time_set(EH)),
+ ?match(ok,'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTRelative', UTO)),
+ ?match({true,_},'CosTimerEvent_TimerEventHandler':time_set(EH)),
+ ?match('ESTimeSet','CosTimerEvent_TimerEventHandler':'_get_status'(EH)),
- ?line ?match({{any,tk_null,null}, false},
+ ?match({{any,tk_null,null}, false},
'CosNotifyChannelAdmin_ProxyPullSupplier':try_pull(ProxyPullSupplier)),
- ?line ?match(AnyEvent, 'CosNotifyChannelAdmin_ProxyPullSupplier':pull(ProxyPullSupplier)),
- ?line ?match('ESTriggered','CosTimerEvent_TimerEventHandler':'_get_status'(EH)),
+ ?match(AnyEvent, 'CosNotifyChannelAdmin_ProxyPullSupplier':pull(ProxyPullSupplier)),
+ ?match('ESTriggered','CosTimerEvent_TimerEventHandler':'_get_status'(EH)),
%% It's allowed to send an UTO with time eq. to 0 if the server is TTRelative.
%% When TTAbsolute BAD_PARAM is raised.
- ?line UTO2=?match({_,pseudo,_,_,_,_}, 'CosTime_TimeService':new_universal_time(TS, 0,1,1)),
- ?line ?match({'EXCEPTION',_},'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTAbsolute', UTO2)),
- ?line ?match(ok,'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTRelative', UTO2)),
- ?line ?match(AnyEvent, 'CosNotifyChannelAdmin_ProxyPullSupplier':pull(ProxyPullSupplier)),
+ UTO2=?match({_,pseudo,_,_,_,_}, 'CosTime_TimeService':new_universal_time(TS, 0,1,1)),
+ ?match({'EXCEPTION',_},'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTAbsolute', UTO2)),
+ ?match(ok,'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTRelative', UTO2)),
+ ?match(AnyEvent, 'CosNotifyChannelAdmin_ProxyPullSupplier':pull(ProxyPullSupplier)),
%% TTPeriodic is defined to be relative, i.e., we can use the tactic as above.
- ?line ?match(ok,'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTPeriodic', UTO2)),
+ ?match(ok,'CosTimerEvent_TimerEventHandler':set_timer(EH, 'TTPeriodic', UTO2)),
%% Sleep for UTO*2+4 secs. At this point the Timer should have delivered 2 events.
timer:sleep(24000),
%% Cancel the timer so no more events will be delivered.
- ?line ?match(true,'CosTimerEvent_TimerEventHandler':cancel_timer(EH)),
+ ?match(true,'CosTimerEvent_TimerEventHandler':cancel_timer(EH)),
- ?line ?match({AnyEvent, true}, 'CosNotifyChannelAdmin_ProxyPullSupplier':try_pull(ProxyPullSupplier)),
- ?line ?match({AnyEvent, true}, 'CosNotifyChannelAdmin_ProxyPullSupplier':try_pull(ProxyPullSupplier)),
- ?line ?match({{any,tk_null,null}, false},
+ ?match({AnyEvent, true}, 'CosNotifyChannelAdmin_ProxyPullSupplier':try_pull(ProxyPullSupplier)),
+ ?match({AnyEvent, true}, 'CosNotifyChannelAdmin_ProxyPullSupplier':try_pull(ProxyPullSupplier)),
+ ?match({{any,tk_null,null}, false},
'CosNotifyChannelAdmin_ProxyPullSupplier':try_pull(ProxyPullSupplier)),
diff --git a/lib/cosTime/vsn.mk b/lib/cosTime/vsn.mk
index 39b457b53b..7c9cae2d2f 100644
--- a/lib/cosTime/vsn.mk
+++ b/lib/cosTime/vsn.mk
@@ -1,2 +1,2 @@
-COSTIME_VSN = 1.2.1
+COSTIME_VSN = 1.2.2
diff --git a/lib/cosTransactions/doc/src/notes.xml b/lib/cosTransactions/doc/src/notes.xml
index b681330391..85ace1208b 100644
--- a/lib/cosTransactions/doc/src/notes.xml
+++ b/lib/cosTransactions/doc/src/notes.xml
@@ -33,7 +33,22 @@
<file>notes.xml</file>
</header>
- <section><title>cosTransactions 1.3.1</title>
+ <section><title>cosTransactions 1.3.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosTransactions 1.3.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosTransactions/test/generated_SUITE.erl b/lib/cosTransactions/test/generated_SUITE.erl
index e4a7a5bf27..52b850b189 100644
--- a/lib/cosTransactions/test/generated_SUITE.erl
+++ b/lib/cosTransactions/test/generated_SUITE.erl
@@ -30,7 +30,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/include/corba.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
-define(match(ExpectedRes, Expr),
fun() ->
@@ -41,7 +41,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -52,7 +52,7 @@
Not ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS);
+ exit(AcTuAlReS);
_ ->
AcTuAlReS
end
@@ -64,7 +64,7 @@
case orber_tc:check_tc(TC) of
false ->
io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]),
- ?line exit(TC);
+ exit(TC);
true ->
true
end
@@ -133,22 +133,18 @@ end_per_group(_GroupName, Config) ->
%% Init and cleanup functions.
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
-
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
-
%%-----------------------------------------------------------------
%% Test Case: 'CosTransactions_HeuristicCommit'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_HeuristicCommit'(doc) -> ["CosTransactions_HeuristicCommit"];
-'CosTransactions_HeuristicCommit'(suite) -> [];
'CosTransactions_HeuristicCommit'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_HeuristicCommit':tc())),
?match("IDL:omg.org/CosTransactions/HeuristicCommit:1.0",
@@ -162,8 +158,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_HeuristicHazard'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_HeuristicHazard'(doc) -> ["CosTransactions_HeuristicHazard"];
-'CosTransactions_HeuristicHazard'(suite) -> [];
'CosTransactions_HeuristicHazard'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_HeuristicHazard':tc())),
?match("IDL:omg.org/CosTransactions/HeuristicHazard:1.0",
@@ -177,8 +171,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_HeuristicMixed'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_HeuristicMixed'(doc) -> ["CosTransactions_HeuristicMixed"];
-'CosTransactions_HeuristicMixed'(suite) -> [];
'CosTransactions_HeuristicMixed'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_HeuristicMixed':tc())),
?match("IDL:omg.org/CosTransactions/HeuristicMixed:1.0",
@@ -192,8 +184,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_HeuristicRollback'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_HeuristicRollback'(doc) -> ["CosTransactions_HeuristicRollback"];
-'CosTransactions_HeuristicRollback'(suite) -> [];
'CosTransactions_HeuristicRollback'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_HeuristicRollback':tc())),
?match("IDL:omg.org/CosTransactions/HeuristicRollback:1.0",
@@ -207,8 +197,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_Inactive'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_Inactive'(doc) -> ["CosTransactions_Inactive"];
-'CosTransactions_Inactive'(suite) -> [];
'CosTransactions_Inactive'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_Inactive':tc())),
?match("IDL:omg.org/CosTransactions/Inactive:1.0",
@@ -222,8 +210,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_InvalidControl'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_InvalidControl'(doc) -> ["CosTransactions_InvalidControl"];
-'CosTransactions_InvalidControl'(suite) -> [];
'CosTransactions_InvalidControl'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_InvalidControl':tc())),
?match("IDL:omg.org/CosTransactions/InvalidControl:1.0",
@@ -237,8 +223,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_NoTransaction'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_NoTransaction'(doc) -> ["CosTransactions_NoTransaction"];
-'CosTransactions_NoTransaction'(suite) -> [];
'CosTransactions_NoTransaction'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_NoTransaction':tc())),
?match("IDL:omg.org/CosTransactions/NoTransaction:1.0",
@@ -252,8 +236,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_NotPrepared'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_NotPrepared'(doc) -> ["CosTransactions_NotPrepared"];
-'CosTransactions_NotPrepared'(suite) -> [];
'CosTransactions_NotPrepared'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_NotPrepared':tc())),
?match("IDL:omg.org/CosTransactions/NotPrepared:1.0",
@@ -267,8 +249,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_NotSubtransaction'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_NotSubtransaction'(doc) -> ["CosTransactions_NotSubtransaction"];
-'CosTransactions_NotSubtransaction'(suite) -> [];
'CosTransactions_NotSubtransaction'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_NotSubtransaction':tc())),
?match("IDL:omg.org/CosTransactions/NotSubtransaction:1.0",
@@ -282,8 +262,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_SubtransactionsUnavailable'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_SubtransactionsUnavailable'(doc) -> ["CosTransactions_SubtransactionsUnavailable"];
-'CosTransactions_SubtransactionsUnavailable'(suite) -> [];
'CosTransactions_SubtransactionsUnavailable'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_SubtransactionsUnavailable':tc())),
?match("IDL:omg.org/CosTransactions/SubtransactionsUnavailable:1.0",
@@ -297,8 +275,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_Unavailable'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_Unavailable'(doc) -> ["CosTransactions_Unavailable"];
-'CosTransactions_Unavailable'(suite) -> [];
'CosTransactions_Unavailable'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_Unavailable':tc())),
?match("IDL:omg.org/CosTransactions/Unavailable:1.0",
@@ -312,8 +288,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_SynchronizationUnavailable'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_SynchronizationUnavailable'(doc) -> ["CosTransactions_SynchronizationUnavailable"];
-'CosTransactions_SynchronizationUnavailable'(suite) -> [];
'CosTransactions_SynchronizationUnavailable'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_SynchronizationUnavailable':tc())),
?match("IDL:omg.org/CosTransactions/SynchronizationUnavailable:1.0",
@@ -326,8 +300,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_TransIdentity'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_TransIdentity'(doc) -> ["CosTransactions_TransIdentity"];
-'CosTransactions_TransIdentity'(suite) -> [];
'CosTransactions_TransIdentity'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_TransIdentity':tc())),
?match("IDL:omg.org/CosTransactions/TransIdentity:1.0",
@@ -340,8 +312,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_PropagationContext'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_PropagationContext'(doc) -> ["CosTransactions_PropagationContext"];
-'CosTransactions_PropagationContext'(suite) -> [];
'CosTransactions_PropagationContext'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_PropagationContext':tc())),
?match("IDL:omg.org/CosTransactions/PropagationContext:1.0",
@@ -354,8 +324,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_otid_t'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_otid_t'(doc) -> ["CosTransactions_otid_t"];
-'CosTransactions_otid_t'(suite) -> [];
'CosTransactions_otid_t'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_otid_t':tc())),
?match("IDL:omg.org/CosTransactions/otid_t:1.0",
@@ -368,8 +336,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_WrongTransaction'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_WrongTransaction'(doc) -> ["CosTransactions_WrongTransaction"];
-'CosTransactions_WrongTransaction'(suite) -> [];
'CosTransactions_WrongTransaction'(_) ->
?match(true, orber_tc:check_tc('CosTransactions_WrongTransaction':tc())),
?match("IDL:omg.org/CosTransactions/WrongTransaction:1.0",
@@ -383,8 +349,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_Control'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_Control'(doc) -> ["CosTransactions_Control"];
-'CosTransactions_Control'(suite) -> [];
'CosTransactions_Control'(_) ->
?nomatch(undefined, 'CosTransactions_Control':oe_tc(get_terminator)),
?nomatch(undefined, 'CosTransactions_Control':oe_tc(get_coordinator)),
@@ -402,8 +366,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_Coordinator'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_Coordinator'(doc) -> ["CosTransactions_Coordinator"];
-'CosTransactions_Coordinator'(suite) -> [];
'CosTransactions_Coordinator'(_) ->
?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(get_status)),
?nomatch(undefined, 'CosTransactions_Coordinator':oe_tc(get_parent_status)),
@@ -435,8 +397,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_RecoveryCoordinator'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_RecoveryCoordinator'(doc) -> ["CosTransactions_RecoveryCoordinator"];
-'CosTransactions_RecoveryCoordinator'(suite) -> [];
'CosTransactions_RecoveryCoordinator'(_) ->
?nomatch(undefined, 'CosTransactions_RecoveryCoordinator':oe_tc(replay_completion)),
?match(undefined, 'CosTransactions_RecoveryCoordinator':oe_tc(undefined)),
@@ -453,8 +413,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_Resource'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_Resource'(doc) -> ["CosTransactions_Resource"];
-'CosTransactions_Resource'(suite) -> [];
'CosTransactions_Resource'(_) ->
?nomatch(undefined, 'CosTransactions_Resource':oe_tc(prepare)),
?nomatch(undefined, 'CosTransactions_Resource':oe_tc(rollback)),
@@ -475,8 +433,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_SubtransactionAwareResource'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_SubtransactionAwareResource'(doc) -> ["CosTransactions_SubtransactionAwareResource"];
-'CosTransactions_SubtransactionAwareResource'(suite) -> [];
'CosTransactions_SubtransactionAwareResource'(_) ->
?nomatch(undefined, 'CosTransactions_SubtransactionAwareResource':oe_tc(commit_subtransaction)),
?nomatch(undefined, 'CosTransactions_SubtransactionAwareResource':oe_tc(rollback_subtransaction)),
@@ -500,8 +456,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_Terminator'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_Terminator'(doc) -> ["CosTransactions_Terminator"];
-'CosTransactions_Terminator'(suite) -> [];
'CosTransactions_Terminator'(_) ->
?nomatch(undefined, 'CosTransactions_Terminator':oe_tc(commit)),
?nomatch(undefined, 'CosTransactions_Terminator':oe_tc(rollback)),
@@ -519,8 +473,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'CosTransactions_TransactionFactory'
%% Description:
%%-----------------------------------------------------------------
-'CosTransactions_TransactionFactory'(doc) -> ["CosTransactions_TransactionFactory"];
-'CosTransactions_TransactionFactory'(suite) -> [];
'CosTransactions_TransactionFactory'(_) ->
?nomatch(undefined, 'CosTransactions_TransactionFactory':oe_tc(create)),
?nomatch(undefined, 'CosTransactions_TransactionFactory':oe_tc(recreate)),
@@ -538,8 +490,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: 'ETraP_Server'
%% Description:
%%-----------------------------------------------------------------
-'ETraP_Server'(doc) -> ["ETraP_Server"];
-'ETraP_Server'(suite) -> [];
'ETraP_Server'(_) ->
?nomatch(undefined, 'ETraP_Server':oe_tc(get_status)),
?nomatch(undefined, 'ETraP_Server':oe_tc(get_parent_status)),
diff --git a/lib/cosTransactions/test/transactions_SUITE.erl b/lib/cosTransactions/test/transactions_SUITE.erl
index 0d270c1f07..00753a4e6e 100644
--- a/lib/cosTransactions/test/transactions_SUITE.erl
+++ b/lib/cosTransactions/test/transactions_SUITE.erl
@@ -31,7 +31,7 @@
-include_lib("common_test/include/ct.hrl").
--define(default_timeout, ?t:minutes(20)).
+-define(default_timeout, test_server:minutes(20)).
%%-----------------------------------------------------------------
@@ -63,19 +63,16 @@ end_per_group(_GroupName, Config) ->
cases() ->
[etrap_api, resource_api, app_test].
-
-
%%-----------------------------------------------------------------
%% Init and cleanup functions.
%%-----------------------------------------------------------------
-
init_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
'oe_CosTransactions':'oe_register'(),
'oe_etrap_test':'oe_register'(),
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
@@ -84,7 +81,7 @@ end_per_testcase(_Case, Config) ->
'oe_CosTransactions':'oe_unregister'(),
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -110,8 +107,6 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% Tests app file
%%-----------------------------------------------------------------
-app_test(doc) -> [];
-app_test(suite) -> [];
app_test(_Config) ->
ok=test_server:app_test(cosTransactions),
ok.
@@ -119,12 +114,10 @@ app_test(_Config) ->
%%-----------------------------------------------------------------
%% API tests
%%-----------------------------------------------------------------
-etrap_api(doc) -> ["ETraP_Server tests", ""];
-etrap_api(suite) -> [];
etrap_api(_Config) ->
- ?line ?match(ok, application:start(cosTransactions),
+ ?match(ok, application:start(cosTransactions),
"Starting the cosTransactions application"),
- ?line TrFac = cosTransactions:start_factory(),
+ TrFac = cosTransactions:start_factory(),
%% Start a new transaction:
%% RootCoord
%% / \
@@ -139,28 +132,28 @@ etrap_api(_Config) ->
%%------ Test CosTransactions::Coordinator ------
- ?line ?match(true,
+ ?match(true,
'CosTransactions_Coordinator':is_same_transaction(Coord, Coord),
"'CosTransactions_Coordinator':is_same_transaction"),
- ?line ?match(false,
+ ?match(false,
'CosTransactions_Coordinator':is_same_transaction(Coord, SubCoord1),
"'CosTransactions_Coordinator':is_same_transaction"),
- ?line ?match(true,
+ ?match(true,
'CosTransactions_Coordinator':is_descendant_transaction(Coord, Coord),
"'CosTransactions_Coordinator':is_descendant_transaction"),
- ?line ?match(false,
+ ?match(false,
'CosTransactions_Coordinator':is_descendant_transaction(Coord, SubCoord1),
"'CosTransactions_Coordinator':is_descendant_transaction"),
- ?line ?match(true,
+ ?match(true,
'CosTransactions_Coordinator':is_descendant_transaction(SubCoord1, Coord),
"'CosTransactions_Coordinator':is_descendant_transaction"),
- ?line ?match(false,
+ ?match(false,
'CosTransactions_Coordinator':is_descendant_transaction(SubCoord1, SubCoord2),
"'CosTransactions_Coordinator':is_descendant_transaction"),
- ?line ?match(true,
+ ?match(true,
'CosTransactions_Coordinator':is_top_level_transaction(Coord),
"'CosTransactions_Coordinator':is_top_level_transaction"),
- ?line ?match(false,
+ ?match(false,
'CosTransactions_Coordinator':is_top_level_transaction(SubCoord2),
"'CosTransactions_Coordinator':is_top_level_transaction"),
@@ -169,31 +162,31 @@ etrap_api(_Config) ->
RootHash2 = 'CosTransactions_Coordinator':hash_top_level_tran(SubCoord1),
RootHash3 = 'CosTransactions_Coordinator':hash_top_level_tran(Coord),
_SubHash = 'CosTransactions_Coordinator':hash_transaction(SubCoord2),
- ?line ?match(RootHash, RepeatHash,
+ ?match(RootHash, RepeatHash,
"'CosTransactions_Coordinator':hash_transaction"),
- ?line ?match(RootHash, RootHash2,
+ ?match(RootHash, RootHash2,
"'CosTransactions_Coordinator':hash_top_level_tran"),
- ?line ?match(RootHash, RootHash3,
+ ?match(RootHash, RootHash3,
"'CosTransactions_Coordinator':hash_top_level_tran"),
-% ?line ?match_inverse(RootHash, SubHash,
+% ?match_inverse(RootHash, SubHash,
% "'CosTransactions_Coordinator':hash_transaction"),
- ?line ?match('StatusActive',
+ ?match('StatusActive',
'CosTransactions_Coordinator':get_status(Coord),
"'CosTransactions_Coordinator':get_status"),
- ?line ?match('StatusActive',
+ ?match('StatusActive',
'CosTransactions_Coordinator':get_status(SubCoord1),
"'CosTransactions_Coordinator':get_status"),
- ?line ?match('StatusActive',
+ ?match('StatusActive',
'CosTransactions_Coordinator':get_parent_status(Coord),
"'CosTransactions_Coordinator':get_parent_status"),
- ?line ?match('StatusActive',
+ ?match('StatusActive',
'CosTransactions_Coordinator':get_parent_status(SubCoord1),
"'CosTransactions_Coordinator':get_parent_status"),
- ?line ?match('StatusActive',
+ ?match('StatusActive',
'CosTransactions_Coordinator':get_top_level_status(Coord),
"'CosTransactions_Coordinator':get_top_level_status"),
- ?line ?match('StatusActive',
+ ?match('StatusActive',
'CosTransactions_Coordinator':get_top_level_status(SubCoord1),
"'CosTransactions_Coordinator':get_top_level_status"),
@@ -209,21 +202,21 @@ etrap_api(_Config) ->
_RC1 = 'CosTransactions_Coordinator':register_resource(SubCoord1, O1),
% 'CosTransactions_Coordinator':register_synchronization(SubCoord1, O1),
- ?line ?match('VoteCommit',
+ ?match('VoteCommit',
'CosTransactions_Resource':prepare(SubCoord1),
"'CosTransactions_Coordinator':prepare"),
%% The Transaction are no longer in 'StatusActive' state. No new
%% "members" allowed.
- ?line ?match('StatusPrepared',
+ ?match('StatusPrepared',
'CosTransactions_Coordinator':get_status(SubCoord1),
"'CosTransactions_Coordinator':get_status"),
-% ?line ?match({'EXCEPTION', ?tr_inactive},
+% ?match({'EXCEPTION', ?tr_inactive},
% 'CosTransactions_Coordinator':register_synchronization(SubCoord1, O1),
% "'CosTransactions_Coordinator':register_synchronization"),
- ?line ?match({'EXCEPTION', ?tr_inactive},
+ ?match({'EXCEPTION', ?tr_inactive},
'CosTransactions_Coordinator':register_resource(SubCoord1, O1),
"'CosTransactions_Coordinator':register_resource"),
- ?line ?match({'EXCEPTION', ?tr_inactive},
+ ?match({'EXCEPTION', ?tr_inactive},
'CosTransactions_Coordinator':create_subtransaction(SubCoord1),
"'CosTransactions_Coordinator':create_subtransaction"),
@@ -236,108 +229,106 @@ etrap_api(_Config) ->
catch corba:dispose(Coord),
catch corba:dispose(O1),
- ?line cosTransactions:stop_factory(TrFac),
- ?line application:stop(cosTransactions),
+ cosTransactions:stop_factory(TrFac),
+ application:stop(cosTransactions),
ok.
%%-----------------------------------------------------------------
%% API tests
%%-----------------------------------------------------------------
-resource_api(doc) -> ["cosTransactions API tests", ""];
-resource_api(suite) -> [];
resource_api(_Config) ->
- ?line ?match(ok, application:start(cosTransactions),
+ ?match(ok, application:start(cosTransactions),
"Starting the cosTransactions application"),
- ?line TrFac = cosTransactions:start_factory([{typecheck, true}]),
+ TrFac = cosTransactions:start_factory([{typecheck, true}]),
- ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}},
+ ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}},
run(TrFac, 0, {?nop, ?nop, ?nop, ?prepare_rollback}),
"TESTCASE #1: Prepare rollback Resource 4"),
- ?line ?match({'EXCEPTION', ?tr_mixed},
+ ?match({'EXCEPTION', ?tr_mixed},
run(TrFac, 0, {?nop, ?nop, ?commit_mix, ?nop}),
"TESTCASE #2: Heuristic Mixed exception Resource 3"),
- ?line ?match(ok,
+ ?match(ok,
run(TrFac, 0, {?nop, ?nop, ?nop, ?nop}),
"TESTCASE #3: Normal completion. No errors."),
- ?line ?match(ok,
+ ?match(ok,
run(TrFac, 0, {?nop, ?nop, ?nop, ?commit_cm}),
"TESTCASE #4: Heuristic Commit Exception Resource 4"),
- ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}},
+ ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}},
run(TrFac, 0, {?nop, ?rollback_rb, ?nop, ?prepare_rollback}),
"TESTCASE #5: Heuristic Rollbac Resource 2, Resource 4 reply 'VoteRollback'"),
- ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}},
+ ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}},
run(TrFac, 0, {?nop, ?nop, ?prepare_rollback, ?rollback_rb}),
"TESTCASE #6: Heuristic Rollbac Resource 4, Resource 3 reply 'VoteRollback'"),
- ?line ?match(ok,
+ ?match(ok,
run(TrFac, 0, {?nop, ?nop, ?commit_delay, ?nop}),
"TESTCASE #7: Resource 3 delay during commit. No timeout."),
- ?line ?match(ok,
+ ?match(ok,
run(TrFac, 0, {?nop, ?nop, ?prepare_delay, ?nop}),
"TESTCASE #8: Resource 3 delay during prepare. No timeout."),
- ?line ?match(ok,
+ ?match(ok,
run(TrFac, ?TIMEOUT, {?nop, ?commit_delay, ?nop, ?nop}),
"TESTCASE #9: Resource 3 delay during commit. Timeout."),
- ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}},
+ ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}},
run(TrFac, ?TIMEOUT, {?nop, ?prepare_delay, ?nop, ?nop}),
"TESTCASE #10: Resource 3 delay during prepare. Timeout."),
case ?is_debug_compiled of
true ->
%% Testing the Coordinators (root and sub).
- ?line ?match(ok,
+ ?match(ok,
run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?nop, ?nop,?crash_transient(commit), ?nop]}),
"TESTCASE #11: SubCoord 3 crash transient during commit."),
- ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}},
+ ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}},
run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?nop, ?nop,?crash_transient(send_prepare), ?nop]}),
"TESTCASE #12: SubCoord 3 crash transient during send prepare."),
- ?line ?match({'EXCEPTION', ?tr_hazard},
+ ?match({'EXCEPTION', ?tr_hazard},
run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?nop, ?nop,?crash_permanent(commit), ?nop]}),
"TESTCASE #13: SubCoord 3 crash permanent during commit."),
- ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}},
+ ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}},
run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?nop, ?nop,?crash_permanent(send_prepare), ?nop]}),
"TESTCASE #14: SubCoord 3 crash permanent during prepare."),
- ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}},
+ ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}},
run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?nop, ?crash_transient(send_prepare), ?crash_transient(commit), ?nop]}),
"TESTCASE #15: SubCoord 2 crash transient during prepare. SubCoord 3 crash transient during commit"),
- ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}},
+ ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}},
run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?crash_transient(send_prepare), ?nop, ?nop, ?nop]}),
"TESTCASE #16: RootCoord crash transient during send prepare."),
- ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}},
+ ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{}},
run(TrFac, 0, {?nop, ?nop, ?nop, ?nop, [?nop, ?crash_transient(prepare1), ?nop, ?nop]}),
"TESTCASE #17: SubCoord 1 crash transient during prepare1."),
- ?line ?match({'EXCEPTION', ?tr_mixed},
+ ?match({'EXCEPTION', ?tr_mixed},
run(TrFac, 0, {?nop, ?prepare_mix, ?nop, ?nop, [?nop, ?nop, ?crash_transient(prepare2), ?nop]}),
"TESTCASE #18: SubCoord 3 crash transient during prepare2. Resource 2 raise Heuristic Mixed during prepare"),
- ?line ?match({'EXCEPTION', ?tr_mixed},
+ ?match({'EXCEPTION', ?tr_mixed},
run(TrFac, 0, {?nop, ?commit_mix, ?nop, ?nop, [?nop, ?nop, ?crash_transient(commit2), ?nop]}),
"TESTCASE #19: Resource 2 raise Heurist mixed during commit. SubCoord crash transient commit2"),
- ?line ?match({'EXCEPTION', ?tr_mixed},
+ ?match({'EXCEPTION', ?tr_mixed},
run(TrFac, 0, {?nop, ?rollback_cm, ?nop, ?prepare_rollback, [?nop, ?crash_transient(rollback2), ?nop, ?nop]}),
"TESTCASE #20: Resource 2 raise Heuristic Commit during rollback. Resource 4 'VoteRollback'. SubCoord 2 crash transient rollback2."),
- ?line ?match({'EXCEPTION', ?tr_mixed},
+ ?match({'EXCEPTION', ?tr_mixed},
run(TrFac, 0, {?nop, ?nop, ?nop, ?commit_mix, [?nop, ?nop, ?crash_transient(send_forget1), ?nop]}),
"TESTCASE #21: Resource 4 raise Heuristic Mixed during commit. SubCoord 2 crash transient send_forget1."),
- ?line ?match({'EXCEPTION', ?tr_mixed},
+ ?match({'EXCEPTION', ?tr_mixed},
run(TrFac, 0, {?nop, ?nop, ?nop, ?commit_mix, [?crash_transient(send_forget1), ?nop, ?nop, ?nop]}),
"TESTCASE #22: Resource 4 raise Heuristic Mixed during commit. Root Coord crash transient send_forget1."),
- ?line ?match({'EXCEPTION', ?tr_mixed},
+ ?match({'EXCEPTION', ?tr_mixed},
run(TrFac, 0, {?nop, ?nop, ?nop, ?commit_mix, [?crash_transient(send_forget3), ?nop, ?crash_transient(send_forget1), ?nop]}),
"TESTCASE #23: Resource 4 raise Heuristic Mixed during commit. Root Coord crash transient send_forget3. SubCoord 3 crash transient send_forget1."),
- ?line ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}},
+ ?match({'EXCEPTION', #'TRANSACTION_ROLLEDBACK'{completion_status=?COMPLETED_YES}},
run(TrFac, ?TIMEOUT, {?nop, ?nop, ?nop, ?nop, [?delay_transient(root_delay, ?TIMEOUT*2), ?nop, ?nop, ?nop]}),
"TESTCASE #24: Delay RootCoord. Timeout."),
%% Testing the Terminator.
- ?line ?match({'EXCEPTION', ?tr_mixed},
+ ?match({'EXCEPTION', ?tr_mixed},
run(TrFac, ?TIMEOUT, {?nop, ?prepare_mix, ?nop, ?nop, [?nop, ?nop, ?nop, ?crash_transient(commit_heuristic1)]}),
"TESTCASE #25: Terminator crash transient after received and logged Heuristic mix."),
- ?line ?match(ok,
+ ?match(ok,
run(TrFac, ?TIMEOUT, {?nop, ?nop, ?nop, ?nop, [?nop, ?nop, ?nop, ?crash_transient(commit_ok2)]}),
"TESTCASE #26: Terminator crash transient after received and logged 'ok'.");
_ ->
ok
end,
- ?line cosTransactions:stop_factory(TrFac),
- ?line application:stop(cosTransactions),
+ cosTransactions:stop_factory(TrFac),
+ application:stop(cosTransactions),
ok.
%%-----------------------------------------------------------------
@@ -390,8 +381,6 @@ run(TrFac, Time, Spec) ->
catch corba:dispose(O4),
Reply.
-
-
start_resources({A1, A2, A3, A4})->
start_resources({A1, A2, A3, A4, ?no_context});
start_resources({A1, A2, A3, A4, Ctx})->
diff --git a/lib/cosTransactions/vsn.mk b/lib/cosTransactions/vsn.mk
index 3a18cae384..ab163d83c2 100644
--- a/lib/cosTransactions/vsn.mk
+++ b/lib/cosTransactions/vsn.mk
@@ -1 +1 @@
-COSTRANSACTIONS_VSN = 1.3.1
+COSTRANSACTIONS_VSN = 1.3.2
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index 7183c395ae..d0044fe723 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -749,7 +749,7 @@ static ERL_NIF_TERM algo_hash[8]; /* increase when extending the list */
static int algo_pubkey_cnt;
static ERL_NIF_TERM algo_pubkey[7]; /* increase when extending the list */
static int algo_cipher_cnt;
-static ERL_NIF_TERM algo_cipher[20]; /* increase when extending the list */
+static ERL_NIF_TERM algo_cipher[21]; /* increase when extending the list */
static void init_algorithms_types(ErlNifEnv* env)
{
diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml
index 6c76a0d7b0..7d3a85326f 100644
--- a/lib/crypto/doc/src/notes.xml
+++ b/lib/crypto/doc/src/notes.xml
@@ -31,6 +31,52 @@
</header>
<p>This document describes the changes made to the Crypto application.</p>
+<section><title>Crypto 3.7</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Refactor <c>crypto</c> to use the EVP interface of
+ OpenSSL, which is the recommended interface that also
+ enables access to hardware acceleration for some
+ operations.</p>
+ <p>
+ Own Id: OTP-12217</p>
+ </item>
+ <item>
+ <p>
+ Add support for 192-bit keys for the <c>aes_cbc</c>
+ cipher.</p>
+ <p>
+ Own Id: OTP-13206 Aux Id: pr 832 </p>
+ </item>
+ <item>
+ <p>
+ Add support for 192-bit keys for <c>aes_ecb</c>.</p>
+ <p>
+ Own Id: OTP-13207 Aux Id: pr829 </p>
+ </item>
+ <item>
+ <p>
+ Deprecate the function <c>crypto:rand_bytes</c> and make
+ sure that <c>crypto:strong_rand_bytes</c> is used in all
+ places that are cryptographically significant.</p>
+ <p>
+ Own Id: OTP-13214</p>
+ </item>
+ <item>
+ <p>
+ Enable AES-GCM encryption/decryption to change the tag
+ length between 1 to 16 bytes.</p>
+ <p>
+ Own Id: OTP-13483 Aux Id: PR-998 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Crypto 3.6.3</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk
index 6dcb28ec8a..96466869d1 100644
--- a/lib/crypto/vsn.mk
+++ b/lib/crypto/vsn.mk
@@ -1 +1 @@
-CRYPTO_VSN = 3.6.3
+CRYPTO_VSN = 3.7
diff --git a/lib/debugger/doc/src/notes.xml b/lib/debugger/doc/src/notes.xml
index 3028d8dd41..2e0d834269 100644
--- a/lib/debugger/doc/src/notes.xml
+++ b/lib/debugger/doc/src/notes.xml
@@ -33,6 +33,22 @@
<p>This document describes the changes made to the Debugger
application.</p>
+<section><title>Debugger 4.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>When the debugger searches for source files, it will
+ also use the location of the source in the compilation
+ information part of the BEAM file.</p>
+ <p>
+ Own Id: OTP-13375</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Debugger 4.1.2</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/debugger/vsn.mk b/lib/debugger/vsn.mk
index cf8ffd3272..dd496013cd 100644
--- a/lib/debugger/vsn.mk
+++ b/lib/debugger/vsn.mk
@@ -1 +1 @@
-DEBUGGER_VSN = 4.1.2
+DEBUGGER_VSN = 4.2
diff --git a/lib/dialyzer/doc/src/notes.xml b/lib/dialyzer/doc/src/notes.xml
index d9af2cb4cd..6400072b1f 100644
--- a/lib/dialyzer/doc/src/notes.xml
+++ b/lib/dialyzer/doc/src/notes.xml
@@ -32,6 +32,102 @@
<p>This document describes the changes made to the Dialyzer
application.</p>
+<section><title>Dialyzer 3.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>Fix a map related bug.</p>
+ <p>
+ Own Id: OTP-13709 Aux Id: ERL-177, PR-1115 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Dialyzer 3.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> Fix a bug in the translation of forms to types. </p>
+ <p>
+ Own Id: OTP-13520</p>
+ </item>
+ <item>
+ <p>Correct misspelling in Dialyzer's acronym definition.
+ </p>
+ <p>
+ Own Id: OTP-13544 Aux Id: PR-1007 </p>
+ </item>
+ <item>
+ <p>Dialyzer no longer crashes when there is an invalid
+ function call such as <c>42(7)</c> in a module being
+ analyzed. The compiler will now warn for invalid function
+ calls such as <c>X = 42, x(7)</c>.</p>
+ <p>
+ Own Id: OTP-13552 Aux Id: ERL-138 </p>
+ </item>
+ <item>
+ <p> Fix a bug that caused Dialyzer to go into an infinite
+ loop. </p>
+ <p>
+ Own Id: OTP-13653 Aux Id: ERL-157 </p>
+ </item>
+ <item>
+ <p>Fix a bug in Dialyzer related to call-site
+ analysis.</p>
+ <p>
+ Own Id: OTP-13655 Aux Id: PR-1092 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The evaluation of SCCs in <c>dialyzer_typesig</c> is
+ optimized. </p> <p> Maps are used instead of Dicts to
+ further optimize the evaluation. </p>
+ <p>
+ Own Id: OTP-10349</p>
+ </item>
+ <item>
+ <p> Since Erlang/OTP R14A, when support for parameterized
+ modules was added, <c>module()</c> has included
+ <c>tuple()</c>, but that part is removed; the type
+ <c>module()</c> is now the same as <c>atom()</c>, as
+ documented in the Reference Manual. </p>
+ <p>
+ Own Id: OTP-13244</p>
+ </item>
+ <item>
+ <p> The type specification syntax for Maps is improved:
+ </p> <list> <item> <p> The association type <c>KeyType :=
+ ValueType</c> denotes an association that must be
+ present. </p> </item> <item> <p> The shorthand <c>...</c>
+ stands for the association type <c>any() => any()</c>.
+ </p> </item> </list> <p> An incompatible change is that
+ <c>#{}</c> stands for the empty map. The type
+ <c>map()</c> (a map of any size) can be written as
+ <c>#{...}</c>. </p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-13542 Aux Id: PR-1014 </p>
+ </item>
+ <item>
+ <p>The translation of forms to types is improved. </p>
+ <p>
+ Own Id: OTP-13547</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Dialyzer 2.9</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/dialyzer/src/dialyzer.erl b/lib/dialyzer/src/dialyzer.erl
index bcac8afe64..7f86520c06 100644
--- a/lib/dialyzer/src/dialyzer.erl
+++ b/lib/dialyzer/src/dialyzer.erl
@@ -282,7 +282,7 @@ cl_check_log(none) ->
cl_check_log(Output) ->
io:format(" Check output file `~s' for details\n", [Output]).
--spec format_warning(raw_warning()) -> string().
+-spec format_warning(raw_warning() | dial_warning()) -> string().
format_warning(W) ->
format_warning(W, basename).
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl
index 9399789464..963c953447 100644
--- a/lib/dialyzer/src/dialyzer_dataflow.erl
+++ b/lib/dialyzer/src/dialyzer_dataflow.erl
@@ -978,12 +978,21 @@ handle_case(Tree, Map, State) ->
false -> State1
end,
Map2 = join_maps_begin(Map1),
- {MapList, State3, Type} =
+ {MapList, State3, Type, Warns} =
handle_clauses(Clauses, Arg, ArgType, ArgType, State2,
- [], Map2, [], []),
+ [], Map2, [], [], []),
+ %% Non-Erlang BEAM languages, such as Elixir, expand language constructs
+ %% into case statements. In that case, we do not want to warn on
+ %% individual clauses not matching unless none of them can.
+ SupressForced = is_compiler_generated(cerl:get_ann(Tree))
+ andalso not (t_is_none(Type)),
+ State4 = lists:foldl(fun({T,R,M,F}, S) ->
+ state__add_warning(
+ S,T,R,M,F andalso (not SupressForced))
+ end, State3, Warns),
Map3 = join_maps_end(MapList, Map2),
debug_pp_map(Map3),
- {State3, Map3, Type}
+ {State4, Map3, Type}
end.
%%----------------------------------------
@@ -1082,22 +1091,24 @@ handle_receive(Tree, Map, State) ->
RaceListSize + 1, State);
false -> State
end,
- {MapList, State2, ReceiveType} =
+ {MapList, State2, ReceiveType, Warns} =
handle_clauses(Clauses, ?no_arg, t_any(), t_any(), State1, [], Map,
- [], []),
+ [], [], []),
+ State3 = lists:foldl(fun({T,R,M,F}, S) -> state__add_warning(S,T,R,M,F) end,
+ State2, Warns),
Map1 = join_maps(MapList, Map),
- {State3, Map2, TimeoutType} = traverse(Timeout, Map1, State2),
- Opaques = State3#state.opaques,
+ {State4, Map2, TimeoutType} = traverse(Timeout, Map1, State3),
+ Opaques = State4#state.opaques,
case (t_is_atom(TimeoutType, Opaques) andalso
(t_atom_vals(TimeoutType, Opaques) =:= ['infinity'])) of
true ->
- {State3, Map2, ReceiveType};
+ {State4, Map2, ReceiveType};
false ->
Action = cerl:receive_action(Tree),
- {State4, Map3, ActionType} = traverse(Action, Map, State3),
+ {State5, Map3, ActionType} = traverse(Action, Map, State4),
Map4 = join_maps([Map3, Map1], Map),
Type = t_sup(ReceiveType, ActionType),
- {State4, Map4, Type}
+ {State5, Map4, Type}
end.
%%----------------------------------------
@@ -1245,7 +1256,7 @@ handle_tuple(Tree, Map, State) ->
%% Clauses
%%
handle_clauses([C|Left], Arg, ArgType, OrigArgType, State, CaseTypes, MapIn,
- Acc, ClauseAcc) ->
+ Acc, ClauseAcc, WarnAcc0) ->
IsRaceAnalysisEnabled = is_race_analysis_enabled(State),
State1 =
case IsRaceAnalysisEnabled of
@@ -1258,8 +1269,8 @@ handle_clauses([C|Left], Arg, ArgType, OrigArgType, State, CaseTypes, MapIn,
State);
false -> State
end,
- {State2, ClauseMap, BodyType, NewArgType} =
- do_clause(C, Arg, ArgType, OrigArgType, MapIn, State1),
+ {State2, ClauseMap, BodyType, NewArgType, WarnAcc} =
+ do_clause(C, Arg, ArgType, OrigArgType, MapIn, State1, WarnAcc0),
{NewClauseAcc, State3} =
case IsRaceAnalysisEnabled of
true ->
@@ -1277,9 +1288,9 @@ handle_clauses([C|Left], Arg, ArgType, OrigArgType, State, CaseTypes, MapIn,
false -> {[BodyType|CaseTypes], [ClauseMap|Acc]}
end,
handle_clauses(Left, Arg, NewArgType, OrigArgType, State3,
- NewCaseTypes, MapIn, NewAcc, NewClauseAcc);
+ NewCaseTypes, MapIn, NewAcc, NewClauseAcc, WarnAcc);
handle_clauses([], _Arg, _ArgType, _OrigArgType, State, CaseTypes, _MapIn, Acc,
- ClauseAcc) ->
+ ClauseAcc, WarnAcc) ->
State1 =
case is_race_analysis_enabled(State) of
true ->
@@ -1289,9 +1300,9 @@ handle_clauses([], _Arg, _ArgType, _OrigArgType, State, CaseTypes, _MapIn, Acc,
RaceListSize + 1, State);
false -> State
end,
- {lists:reverse(Acc), State1, t_sup(CaseTypes)}.
+ {lists:reverse(Acc), State1, t_sup(CaseTypes), WarnAcc}.
-do_clause(C, Arg, ArgType0, OrigArgType, Map, State) ->
+do_clause(C, Arg, ArgType0, OrigArgType, Map, State, Warns) ->
Pats = cerl:clause_pats(C),
Guard = cerl:clause_guard(C),
Body = cerl:clause_body(C),
@@ -1323,7 +1334,7 @@ do_clause(C, Arg, ArgType0, OrigArgType, Map, State) ->
[cerl_prettypr:format(C), format_type(ArgType0, State1)]),
case state__warning_mode(State1) of
false ->
- {State1, Map, t_none(), ArgType0};
+ {State1, Map, t_none(), ArgType0, Warns};
true ->
{Msg, Force} =
case t_is_none(ArgType0) of
@@ -1403,8 +1414,7 @@ do_clause(C, Arg, ArgType0, OrigArgType, Map, State) ->
{record_match, _} -> ?WARN_MATCHING;
{pattern_match_cov, _} -> ?WARN_MATCHING
end,
- {state__add_warning(State1, WarnType, C, Msg, Force),
- Map, t_none(), ArgType0}
+ {State1, Map, t_none(), ArgType0, [{WarnType, C, Msg, Force}|Warns]}
end;
{Map2, PatTypes} ->
Map3 =
@@ -1437,9 +1447,9 @@ do_clause(C, Arg, ArgType0, OrigArgType, Map, State) ->
false ->
{guard_fail_pat, [PatString, format_type(ArgType0, State1)]}
end,
- State2 =
+ Warn =
case Reason of
- none -> state__add_warning(State1, ?WARN_MATCHING, C, DefaultMsg);
+ none -> {?WARN_MATCHING, C, DefaultMsg, false};
{FailGuard, Msg} ->
case is_compiler_generated(cerl:get_ann(FailGuard)) of
false ->
@@ -1448,15 +1458,15 @@ do_clause(C, Arg, ArgType0, OrigArgType, Map, State) ->
{neg_guard_fail, _} -> ?WARN_MATCHING;
{opaque_guard, _} -> ?WARN_OPAQUE
end,
- state__add_warning(State1, WarnType, FailGuard, Msg);
+ {WarnType, FailGuard, Msg, false};
true ->
- state__add_warning(State1, ?WARN_MATCHING, C, Msg)
+ {?WARN_MATCHING, C, Msg, false}
end
end,
- {State2, Map, t_none(), NewArgType};
+ {State1, Map, t_none(), NewArgType, [Warn|Warns]};
Map4 ->
{RetState, RetMap, BodyType} = traverse(Body, Map4, State1),
- {RetState, RetMap, BodyType, NewArgType}
+ {RetState, RetMap, BodyType, NewArgType, Warns}
end
end.
diff --git a/lib/dialyzer/test/Makefile b/lib/dialyzer/test/Makefile
index f43e04dd59..0d8fba438c 100644
--- a/lib/dialyzer/test/Makefile
+++ b/lib/dialyzer/test/Makefile
@@ -12,6 +12,7 @@ AUXILIARY_FILES=\
dialyzer_common.erl\
file_utils.erl\
dialyzer_SUITE.erl\
+ abstract_SUITE.erl\
plt_SUITE.erl
# ----------------------------------------------------
diff --git a/lib/dialyzer/test/abstract_SUITE.erl b/lib/dialyzer/test/abstract_SUITE.erl
new file mode 100644
index 0000000000..269db3e836
--- /dev/null
+++ b/lib/dialyzer/test/abstract_SUITE.erl
@@ -0,0 +1,102 @@
+%% This suite contains cases that cannot be written
+%% in Erlang itself and must be done via the abstract
+%% format.
+
+-module(abstract_SUITE).
+
+-include_lib("common_test/include/ct.hrl").
+-include("dialyzer_test_constants.hrl").
+
+-export([suite/0, all/0, init_per_suite/0, init_per_suite/1]).
+-export([generated_case/1]).
+
+suite() ->
+ [{timetrap, {minutes, 1}}].
+all() ->
+ [generated_case].
+
+init_per_suite() ->
+ [{timetrap, ?plt_timeout}].
+init_per_suite(Config) ->
+ OutDir = ?config(priv_dir, Config),
+ case dialyzer_common:check_plt(OutDir) of
+ fail -> {skip, "Plt creation/check failed."};
+ ok -> [{dialyzer_options, []}|Config]
+ end.
+
+generated_case(Config) when is_list(Config) ->
+ %% Equivalent to:
+ %%
+ %% -module(foo).
+ %% -export(bar).
+ %% bar() ->
+ %% Arg = sample,
+ %% case Arg of
+ %% #{} -> map;
+ %% _ -> Arg:fn()
+ %% end.
+ %%
+ %% Except the case statement and its clauses are marked as autogenerated.
+ [] =
+ test([{attribute,1,module,foo},
+ {attribute,2,export,[{bar,0}]},
+ {function,3,bar,0,
+ [{clause,3,[],[],
+ [{match,4,{var,4,'Arg'},{atom,4,sample}},
+ {'case',[{location,5},{generated,true}],{var,5,'Arg'},
+ [{clause,[{location,6},{generated,true}],[{map,6,[]}],[],
+ [{atom,6,map}]},
+ {clause,[{location,7},{generated,true}],[{var,7,'_'}],[],
+ [{call,7,{remote,7,{var,7,'Arg'},{atom,7,fn}},[]}]}]}]}]}],
+ Config, [], []),
+ %% With the first clause not auto-generated
+ [{warn_matching,{_,6},_}] =
+ test([{attribute,1,module,foo},
+ {attribute,2,export,[{bar,0}]},
+ {function,3,bar,0,
+ [{clause,3,[],[],
+ [{match,4,{var,4,'Arg'},{atom,4,sample}},
+ {'case',[{location,5},{generated,true}],{var,5,'Arg'},
+ [{clause,6,[{map,6,[]}],[],
+ [{atom,6,map}]},
+ {clause,[{location,7},{generated,true}],[{var,7,'_'}],[],
+ [{call,7,{remote,7,{var,7,'Arg'},{atom,7,fn}},[]}]}]}]}]}],
+ Config, [], []),
+ %% With Arg set to [] so neither clause matches
+ [{warn_return_no_exit,{_,3},_},
+ {warn_matching,{_,6},_},
+ {warn_failing_call,{_,7},_}] =
+ test([{attribute,1,module,foo},
+ {attribute,2,export,[{bar,0}]},
+ {function,3,bar,0,
+ [{clause,3,[],[],
+ [{match,4,{var,4,'Arg'},{nil,4}},
+ {'case',[{location,5},{generated,true}],{var,5,'Arg'},
+ [{clause,[{location,6},{generated,true}],[{map,6,[]}],[],
+ [{atom,6,map}]},
+ {clause,[{location,7},{generated,true}],[{var,7,'_'}],[],
+ [{call,7,{remote,7,{var,7,'Arg'},{atom,7,fn}},[]}]}]}]}]}],
+ Config, [], []),
+ ok.
+
+test(Prog, Config, COpts, DOpts) ->
+ {ok, BeamFile} = compile(Config, Prog, COpts),
+ run_dialyzer(Config, succ_typings, [BeamFile], DOpts).
+
+compile(Config, Prog, CompileOpts) ->
+ OutDir = ?config(priv_dir, Config),
+ Opts = [{outdir, OutDir}, debug_info, return_errors | CompileOpts],
+ {ok, Module, Source} = compile:forms(Prog, Opts),
+ BeamFile = filename:join([OutDir, lists:concat([Module, ".beam"])]),
+ ok = file:write_file(BeamFile, Source),
+ {ok, BeamFile}.
+
+run_dialyzer(Config, Analysis, Files, Opts) ->
+ OutDir = ?config(priv_dir, Config),
+ PltFilename = dialyzer_common:plt_file(OutDir),
+ dialyzer:run([{analysis_type, Analysis},
+ {files, Files},
+ {init_plt, PltFilename},
+ {check_plt, false},
+ {from, byte_code} |
+ Opts]).
diff --git a/lib/dialyzer/test/dialyzer_common.erl b/lib/dialyzer/test/dialyzer_common.erl
index d2b1026c06..48083a2731 100644
--- a/lib/dialyzer/test/dialyzer_common.erl
+++ b/lib/dialyzer/test/dialyzer_common.erl
@@ -7,7 +7,7 @@
-module(dialyzer_common).
--export([check_plt/1, check/4, create_all_suites/0, new_tests/2]).
+-export([check_plt/1, check/4, create_all_suites/0, new_tests/2, plt_file/1]).
-include_lib("kernel/include/file.hrl").
@@ -39,7 +39,7 @@
check_plt(OutDir) ->
io:format("Checking plt:"),
- PltFilename = filename:join(OutDir, ?plt_filename),
+ PltFilename = plt_file(OutDir),
case file:read_file_info(PltFilename) of
{ok, _} -> dialyzer_check_plt(PltFilename);
{error, _ } ->
@@ -63,6 +63,11 @@ check_plt(OutDir) ->
end
end.
+-spec plt_file(string()) -> string().
+
+plt_file(OutDir) ->
+ filename:join(OutDir, ?plt_filename).
+
dialyzer_check_plt(PltFilename) ->
try dialyzer:run([{analysis_type, plt_check},
{init_plt, PltFilename}]) of
@@ -119,7 +124,7 @@ build_plt(PltFilename) ->
'same' | {differ, [term()]}.
check(TestCase, Opts, Dir, OutDir) ->
- PltFilename = filename:join(OutDir, ?plt_filename),
+ PltFilename = plt_file(OutDir),
SrcDir = filename:join(Dir, ?input_files_directory),
ResDir = filename:join(Dir, ?result_files_directory),
Filename = filename:join(SrcDir, atom_to_list(TestCase)),
diff --git a/lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/a.erl b/lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/a.erl
new file mode 100644
index 0000000000..827984b20b
--- /dev/null
+++ b/lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/a.erl
@@ -0,0 +1,9 @@
+-module(a).
+-export([to_map/1, to_map/2]).
+-type t() :: #{type := b:t()}.
+
+-spec to_map(t()) -> map().
+to_map(Resource) -> to_map(Resource, #{}).
+
+-spec to_map(t(), map()) -> map().
+to_map(_, Map) when is_map(Map) -> #{}.
diff --git a/lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/b.erl b/lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/b.erl
new file mode 100644
index 0000000000..31f9bb6b3e
--- /dev/null
+++ b/lib/dialyzer/test/map_SUITE_data/src/mand_remote_val/b.erl
@@ -0,0 +1,3 @@
+-module(b).
+-export_type([t/0]).
+-type t() :: binary().
diff --git a/lib/dialyzer/vsn.mk b/lib/dialyzer/vsn.mk
index 077fe01e85..b9a28afdd9 100644
--- a/lib/dialyzer/vsn.mk
+++ b/lib/dialyzer/vsn.mk
@@ -1 +1 @@
-DIALYZER_VSN = 3.0
+DIALYZER_VSN = 3.0.1
diff --git a/lib/diameter/doc/src/notes.xml b/lib/diameter/doc/src/notes.xml
index 82448e7f51..b1be7bdcf7 100644
--- a/lib/diameter/doc/src/notes.xml
+++ b/lib/diameter/doc/src/notes.xml
@@ -43,6 +43,41 @@ first.</p>
<!-- ===================================================================== -->
+<section><title>diameter 1.12</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Ensure listening socket is closed at transport removal.</p>
+ <p>
+ Transport removal did not immediately close a
+ <c>diameter_tcp/sctp</c> listening socket, and a
+ subsequent peer connection caused it to remain open.</p>
+ <p>
+ Own Id: OTP-13611</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add <c>diameter:peer_info/1</c>.</p>
+ <p>
+ That retrieves information in the style of
+ <c>diameter:service_info/2</c>, but for a single peer
+ connection.</p>
+ <p>
+ Own Id: OTP-13508</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>diameter 1.11.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/edoc/doc/src/notes.xml b/lib/edoc/doc/src/notes.xml
index 130a5a850e..ae8147c564 100644
--- a/lib/edoc/doc/src/notes.xml
+++ b/lib/edoc/doc/src/notes.xml
@@ -32,6 +32,20 @@
<p>This document describes the changes made to the EDoc
application.</p>
+<section><title>Edoc 0.7.19</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> Handle typed record fields. </p>
+ <p>
+ Own Id: OTP-13558</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Edoc 0.7.18</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/edoc/src/edoc_extract.erl b/lib/edoc/src/edoc_extract.erl
index e7a4c36ca4..2d6cb04a6d 100644
--- a/lib/edoc/src/edoc_extract.erl
+++ b/lib/edoc/src/edoc_extract.erl
@@ -32,9 +32,9 @@
%% %% @headerfile "edoc.hrl" (disabled until it can be made private)
-include("edoc.hrl").
-%% @type filename() = file:filename().
-%% @type proplist() = proplists:property().
-%% @type syntaxTree() = erl_syntax:syntaxTree().
+%% @type filename() = //kernel/file:filename().
+%% @type proplist() = //stdlib/proplists:property().
+%% @type syntaxTree() = //syntax_tools/erl_syntax:syntaxTree().
%% @spec source(File::filename(), Env::edoc_env(), Options::proplist())
%% -> {ModuleName, edoc:edoc_module()}
@@ -639,11 +639,11 @@ file_macros(_Context, Env) ->
%%
%% The idea is to mimic how the @type tag works.
%% Using @type:
-%% @type t() = t1(). Some docs of t/0;
-%% Further docs of t/0.
+%%```@type t() = t1(). Some docs of t/0;
+%% Further docs of t/0.'''
%% The same thing using -type:
-%% -type t() :: t1(). % Some docs of t/0;
-%% Further docs of t/0.
+%%```-type t() :: t1(). % Some docs of t/0;
+%% Further docs of t/0.'''
find_type_docs(Forms0, Comments, Env, File) ->
Tree = erl_recomment:recomment_forms(Forms0, Comments),
Forms = preprocess_forms(Tree),
diff --git a/lib/edoc/src/edoc_lib.erl b/lib/edoc/src/edoc_lib.erl
index dcc239f6b4..cc0a8d0b94 100644
--- a/lib/edoc/src/edoc_lib.erl
+++ b/lib/edoc/src/edoc_lib.erl
@@ -935,7 +935,7 @@ get_doc_env(Opts) ->
%% Modules = [atom()]
%% proplist() = [term()]
%%
-%% @type proplist() = proplists:property().
+%% @type proplist() = //stdlib/proplists:property().
%% @type edoc_env(). Environment information needed by EDoc for
%% generating references. The data representation is not documented.
%%
diff --git a/lib/edoc/src/edoc_tags.erl b/lib/edoc/src/edoc_tags.erl
index 9e2e41e902..93f423b906 100644
--- a/lib/edoc/src/edoc_tags.erl
+++ b/lib/edoc/src/edoc_tags.erl
@@ -213,8 +213,10 @@ filter_tags([#tag{name = N, line = L} = T | Ts], Tags, Where, Ts1) ->
true ->
filter_tags(Ts, Tags, Where, [T | Ts1]);
false ->
- [warning(L, Where, "tag @~s not recognized.", [N]) ||
- Where =/= no],
+ case Where of
+ no -> ok;
+ _ -> warning(L, Where, "tag @~s not recognized.", [N])
+ end,
filter_tags(Ts, Tags, Where, Ts1)
end;
filter_tags([], _, _, Ts) ->
@@ -451,7 +453,7 @@ check_type(#tag{line = L, data = Data}, P0, Ls, Ts) ->
check_type(#t_def{type = Type}, P, Ls, Ts) ->
check_type(Type, P, Ls, Ts);
check_type(#t_type{name = Name, args = Args}, P, Ls, Ts) ->
- _ = check_used_type(Name, Args, P, Ls),
+ check_used_type(Name, Args, P, Ls),
check_types3(Args++Ts, P, Ls);
check_type(#t_var{}, P, Ls, Ts) ->
check_types3(Ts, P, Ls);
@@ -503,7 +505,8 @@ check_used_type(#t_name{name = N, module = Mod}=Name, Args, P, LocalTypes) ->
false ->
#parms{warn = W, line = L, file = File} = P,
%% true = ets:insert(DT, TypeName),
- [type_warning(L, File, "missing type", N, NArgs) || W]
+ _ = [type_warning(L, File, "missing type", N, NArgs) || W],
+ ok
end.
type_warning(Line, File, S, N, NArgs) ->
diff --git a/lib/edoc/vsn.mk b/lib/edoc/vsn.mk
index 83514ac94f..f38800b3e0 100644
--- a/lib/edoc/vsn.mk
+++ b/lib/edoc/vsn.mk
@@ -1 +1 @@
-EDOC_VSN = 0.7.18
+EDOC_VSN = 0.7.19
diff --git a/lib/eldap/doc/src/notes.xml b/lib/eldap/doc/src/notes.xml
index aa3e3137ae..7aad745f67 100644
--- a/lib/eldap/doc/src/notes.xml
+++ b/lib/eldap/doc/src/notes.xml
@@ -31,6 +31,39 @@
</header>
<p>This document describes the changes made to the Eldap application.</p>
+<section><title>Eldap 1.2.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ If the underlying tcp connection is closed and an LDAP
+ operation returned tcp_error, the client applications
+ tend to close the ldap handle with eldap:close. This will
+ cause a <c>{nocatch, {gen_tcp_error, ...}}</c> exception.</p>
+ <p>
+ Such errors are now ignored during close, because the
+ socket will be closed anyway.</p>
+ <p>
+ Own Id: OTP-13590 Aux Id: PR-1048 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Modernize test suites</p>
+ <p>
+ Own Id: OTP-13566</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Eldap 1.2.1</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/erl_docgen/doc/src/notes.xml b/lib/erl_docgen/doc/src/notes.xml
index be94c0a7a0..21dc617d55 100644
--- a/lib/erl_docgen/doc/src/notes.xml
+++ b/lib/erl_docgen/doc/src/notes.xml
@@ -31,7 +31,52 @@
</header>
<p>This document describes the changes made to the <em>erl_docgen</em> application.</p>
- <section><title>Erl_Docgen 0.4.2</title>
+ <section><title>Erl_Docgen 0.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> Generate HTML anchors for data types without
+ <c>name</c> attribute. </p>
+ <p>
+ Own Id: OTP-13600 Aux Id: Jira: ERL-141 </p>
+ </item>
+ <item>
+ <p> Updated make rules so it's possible to use the
+ xmllint target for checking the system
+ documentation.<br/> Removed usage of non defined DTD tag
+ (output) from the system documentation and corrected a
+ number of xml faults. </p> <p> Added support for quote
+ tag and a new level of header formatting in erl_docgen.
+ </p> <p> A fault when generating html for manual set
+ markers for section headings is corrected so now is the
+ title visible after hyperlink jump. </p>
+ <p>
+ Own Id: OTP-13638</p>
+ </item>
+ <item>
+ <p> Corrected the space handling for the seealso tag.
+ </p>
+ <p>
+ Own Id: OTP-13639</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> Sort the modules function index alphabetically. </p>
+ <p>
+ Own Id: OTP-13668 Aux Id: PR-543 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Docgen 0.4.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/erl_docgen/priv/bin/xref_mod_app.escript b/lib/erl_docgen/priv/bin/xref_mod_app.escript
index ac4278bf22..4a418fe144 100755
--- a/lib/erl_docgen/priv/bin/xref_mod_app.escript
+++ b/lib/erl_docgen/priv/bin/xref_mod_app.escript
@@ -84,7 +84,7 @@ preloaded(TopDir) ->
%% It's OK if too much data is generated as long as all applications
%% and all modules are mentioned.
appmods(D) ->
- ErlFiles = filelib:wildcard(filename:join([D,"src","*.erl"])),
+ ErlFiles = filelib:wildcard(filename:join([D,"src","**","*.erl"])),
AppV = filename:basename(D),
App = case string:rstr(AppV, "-") of
0 -> AppV;
diff --git a/lib/erl_docgen/priv/dtd/erlref.dtd b/lib/erl_docgen/priv/dtd/erlref.dtd
index 835407520a..615b88b61a 100644
--- a/lib/erl_docgen/priv/dtd/erlref.dtd
+++ b/lib/erl_docgen/priv/dtd/erlref.dtd
@@ -29,7 +29,7 @@
<!-- `name' is used in common.refs.dtd and must therefore
be defined in each *ref. dtd -->
-<!ELEMENT name (#PCDATA) >
+<!ELEMENT name (#PCDATA|seealso)* >
<!ATTLIST name name CDATA #IMPLIED
arity CDATA #IMPLIED
clause_i CDATA #IMPLIED
diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl
index fe6c7d3c28..edab8e1c7e 100644
--- a/lib/erl_docgen/priv/xsl/db_html.xsl
+++ b/lib/erl_docgen/priv/xsl/db_html.xsl
@@ -2007,10 +2007,10 @@
</xsl:variable>
<xsl:choose>
<xsl:when test="ancestor::datatype">
- <a name="type-{$fname}"><span class="bold_code"><xsl:value-of select="."/></span></a><br/>
+ <a name="type-{$fname}"></a><span class="bold_code"><xsl:apply-templates/></span><br/>
</xsl:when>
<xsl:otherwise>
- <a name="{$fname}-{$arity}"><span class="bold_code"><xsl:value-of select="."/></span></a><br/>
+ <a name="{$fname}-{$arity}"></a><span class="bold_code"><xsl:apply-templates/></span><br/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
diff --git a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
index 0ac7985a48..4f3af1f767 100644
--- a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
+++ b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -563,7 +563,14 @@ otp_xmlify_a_fileref(FileRef1, AppS) ->
true ->
case split(Marker0, "-") of
[Func,Arity] ->
- Func++"/"++Arity;
+ try list_to_integer(Arity) of
+ _ ->
+ Func++"/"++Arity
+ catch
+ _:_ ->
+ %% This is "type-"<a-type>.
+ Marker0
+ end;
_ ->
Marker0
end
@@ -831,19 +838,49 @@ local_types([]) -> [];
local_types(Es) ->
local_defs2(get_elem(localdef, Es)).
+-define(LOCAL_TYPES, edoc_local_defs).
+
local_defs2([]) -> [];
local_defs2(Es) ->
+ case collect_local_types(Es) of
+ [] -> local_defs3(Es);
+ LocalTypes ->
+ ?LOCAL_TYPES = ets:new(?LOCAL_TYPES, [named_table]),
+ true = ets:insert(?LOCAL_TYPES, LocalTypes),
+ try
+ local_defs3(Es)
+ after
+ ets:delete(?LOCAL_TYPES)
+ end
+ end.
+
+local_defs3(Es) ->
{type,[?NL | [{v, localdef2(E)} || E <- Es]]}.
+%% Does not work well for parametrized types.
+collect_local_types(Es) ->
+ lists:append([collect_local_type(E) || E <- Es]).
+
+collect_local_type(#xmlElement{content = Es}) ->
+ case get_elem(typevar, Es) of
+ [] ->
+ [{t_abstype(get_content(abstype, Es))}];
+ [_] ->
+ []
+ end.
+
%% Like localdef/1, but does not use label_anchor/2 -- we don't want any
%% markers or em tags in <v> tag, plain text only!
+%% When used stand-alone, EDoc generates links to local types. An ETS
+%% table holds local types, to avoid generating links to them.
localdef2(#xmlElement{content = Es}) ->
- case get_elem(typevar, Es) of
- [] ->
- t_utype(get_elem(type, Es));
- [V] ->
- t_var(V) ++ [" = "] ++ t_utype(get_elem(type, Es))
- end.
+ Var = case get_elem(typevar, Es) of
+ [] ->
+ [t_abstype(get_content(abstype, Es))];
+ [V] ->
+ t_var(V)
+ end,
+ Var ++ [" = "] ++ t_utype(get_elem(type, Es)).
type_name(#xmlElement{content = Es}) ->
t_name(get_elem(erlangName, get_content(typedef, Es))).
@@ -855,10 +892,9 @@ types(Ts) ->
typedecl(Name, #xmlElement{content = Es}) ->
TypedefEs = get_content(typedef, Es),
Id = "type-"++Name,
- [{tag, typedef(TypedefEs)},
+ [{tag, [{marker,[{id,Id}],[]}] ++ typedef(TypedefEs)},
?NL,
- {item, [{marker,[{id,Id}],[]} |
- local_defs(get_elem(localdef, TypedefEs)) ++ fulldesc(Es)]},
+ {item, local_defs(get_elem(localdef, TypedefEs)) ++ fulldesc(Es)},
?NL].
typedef(Es) ->
@@ -866,14 +902,14 @@ typedef(Es) ->
++ seq(fun t_utype_elem/1, get_content(argtypes, Es), [")"])),
case get_elem(type, Es) of
[] ->
- [{tt, Name}];
+ Name;
Type ->
- [{tt, Name ++ [" = "] ++ t_utype(Type)}]
+ Name ++ [" = "] ++ t_utype(Type)
end.
-local_defs([]) -> [];
+local_defs([]) -> [{p,[]}];
local_defs(Es) ->
- [?NL, {ul, [{li, [{tt, localdef(E)}]} || E <- Es]}].
+ [?NL, {ul, [{li, [{p, localdef(E)}]} || E <- Es]}].
localdef(E = #xmlElement{content = Es}) ->
Var = case get_elem(typevar, Es) of
@@ -917,6 +953,7 @@ seealso_module(Es) ->
Es1 ->
{section,[{title,["See also"]},{p,seq(fun see/1, Es1, [])}]}
end.
+
seealso_function(Es) ->
case get_elem(see, Es) of
[] -> [];
@@ -988,7 +1025,14 @@ t_name([E]) ->
end.
t_utype([E]) ->
- t_utype_elem(E).
+ flatten_type(t_utype_elem(E)).
+
+%% Make sure see also are top elements of lists.
+flatten_type(T) ->
+ [case is_integer(E) of
+ true -> [E];
+ false -> E
+ end || E <- lists:flatten(T)].
t_utype_elem(E=#xmlElement{content = Es}) ->
case get_attrval(name, E) of
@@ -1021,16 +1065,14 @@ t_type([#xmlElement{name = tuple, content = Es}]) ->
t_tuple(Es);
t_type([#xmlElement{name = 'fun', content = Es}]) ->
t_fun(Es);
-t_type([#xmlElement{name = abstype, content = Es}]) ->
- t_abstype(Es);
+t_type([E = #xmlElement{name = abstype, content = Es}]) ->
+ t_abstype(E, Es);
t_type([#xmlElement{name = union, content = Es}]) ->
t_union(Es);
t_type([#xmlElement{name = record, content = Es}]) ->
t_record(Es);
t_type([#xmlElement{name = map, content = Es}]) ->
- t_map(Es);
-t_type([#xmlElement{name = map_field, content = Es}]) ->
- t_map_field(Es).
+ t_map(Es).
t_var(E) ->
[get_attrval(name, E)].
@@ -1065,35 +1107,53 @@ t_fun(Es) ->
t_record([E|Es]) ->
["#", get_attrval(value, E), "{"++ seq(fun t_field/1, Es) ++"}"].
+
t_field(#xmlElement{name=field, content=[Atom,Type]}) ->
[get_attrval(value, Atom), "="] ++ t_utype_elem(Type).
t_map(Es) ->
- ["#{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
+ ["#{"] ++ seq(fun t_map_field/1, Es, ["}"]).
+
+t_map_field(E = #xmlElement{name = map_field, content = [K,V]}) ->
+ KElem = t_utype_elem(K),
+ VElem = t_utype_elem(V),
+ AS = case get_attrval(assoc_type, E) of
+ "assoc" -> " => ";
+ "exact" -> " := "
+ end,
+ [KElem ++ AS ++ VElem].
-t_map_field([K,V]) ->
- [t_utype_elem(K) ++ " => " ++ t_utype_elem(V)].
+t_abstype(E, Es) ->
+ see_type(E, t_abstype(Es)).
t_abstype(Es) ->
- case split_at_colon(t_name(get_elem(erlangName, Es)),[]) of
- {Mod,Type} ->
- [Type, "("] ++
- seq(fun t_utype_elem/1, get_elem(type, Es), [")"]) ++
- [" (see module ", Mod, ")"];
- Type ->
- [Type, "("] ++
- seq(fun t_utype_elem/1, get_elem(type, Es), [")"])
+ Name = t_name(get_elem(erlangName, Es)),
+ [Name, "("] ++ seq(fun t_utype_elem/1, get_elem(type, Es), [")"]).
+
+see_type(E, Es0) ->
+ case get_attrval(href, E) of
+ [] -> Es0;
+ Href0 ->
+ try
+ false = is_local_type(Es0),
+ %% Fails for parametrized types:
+ Text = #xmlText{value = lists:append(Es0)},
+ {Href, Es} = otp_xmlify_a_href(Href0, [Text]),
+ [{seealso, [{marker, Href}], Es}]
+ catch
+ _:_ ->
+ Es0
+ end
end.
-%% Split at one colon, but not at two (or more)
-split_at_colon([$:,$:|_]=Rest,Acc) ->
- lists:reverse(Acc)++Rest;
-split_at_colon([$:|Type],Acc) ->
- {lists:reverse(Acc),Type};
-split_at_colon([Char|Rest],Acc) ->
- split_at_colon(Rest,[Char|Acc]);
-split_at_colon([],Acc) ->
- lists:reverse(Acc).
+is_local_type(Es) ->
+ try
+ [_] = ets:lookup(?LOCAL_TYPES, Es),
+ true
+ catch
+ _:_->
+ false
+ end.
t_union(Es) ->
seq(fun t_utype_elem/1, Es, " | ", []).
diff --git a/lib/erl_docgen/test/erl_docgen_SUITE.erl b/lib/erl_docgen/test/erl_docgen_SUITE.erl
index a202fefa9d..972fda5762 100644
--- a/lib/erl_docgen/test/erl_docgen_SUITE.erl
+++ b/lib/erl_docgen/test/erl_docgen_SUITE.erl
@@ -40,12 +40,10 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
-app() ->
- [{doc, "Test that the erl_docgen app file is ok"}].
+%% Test that the erl_docgen app file is ok
app(Config) when is_list(Config) ->
- ok = ?t:app_test(erl_docgen).
+ ok = test_server:app_test(erl_docgen).
-appup() ->
- [{doc, "Test that the erl_docgen appup file is ok"}].
+%% Test that the erl_docgen appup file is ok
appup(Config) when is_list(Config) ->
- ok = ?t:appup_test(erl_docgen).
+ ok = test_server:appup_test(erl_docgen).
diff --git a/lib/erl_docgen/vsn.mk b/lib/erl_docgen/vsn.mk
index 3188b926ff..98d1c3f7be 100644
--- a/lib/erl_docgen/vsn.mk
+++ b/lib/erl_docgen/vsn.mk
@@ -1 +1 @@
-ERL_DOCGEN_VSN = 0.4.2
+ERL_DOCGEN_VSN = 0.5
diff --git a/lib/erl_interface/doc/src/notes.xml b/lib/erl_interface/doc/src/notes.xml
index 9420beaf43..a69c5aac11 100644
--- a/lib/erl_interface/doc/src/notes.xml
+++ b/lib/erl_interface/doc/src/notes.xml
@@ -31,6 +31,48 @@
</header>
<p>This document describes the changes made to the Erl_interface application.</p>
+<section><title>Erl_Interface 3.9</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix decoding of LLONG_MIN in erl_decode</p>
+ <p>
+ Own Id: OTP-13666 Aux Id: ERL-158 </p>
+ </item>
+ <item>
+ <p>
+ On windows <c>ei_decode_ulong</c> and
+ <c>ei_decode_long</c> now correctly returns an error when
+ trying to decode a number that does not fit in a long.
+ Fixed a bug on windows where enabling ei tracing would
+ cause a segmentation fault.</p>
+ <p>
+ Own Id: OTP-13673</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Handle terms (pids,ports and refs) from nodes with a
+ 'creation' value larger than 3. This is a preparation of
+ the distribution protocol to allow OTP 19 nodes to
+ correctly communicate with future nodes (20 or higher).
+ The 'creation' value differentiates different
+ incarnations of the same node (name).</p>
+ <p>
+ Own Id: OTP-13488</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Erl_Interface 3.8.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/erl_interface/vsn.mk b/lib/erl_interface/vsn.mk
index 56dbdbac9f..33705d1e8b 100644
--- a/lib/erl_interface/vsn.mk
+++ b/lib/erl_interface/vsn.mk
@@ -1,2 +1,2 @@
-EI_VSN = 3.8.2
+EI_VSN = 3.9
ERL_INTERFACE_VSN = $(EI_VSN)
diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml
index ee9e34d14d..5300d2e4ef 100644
--- a/lib/et/doc/src/notes.xml
+++ b/lib/et/doc/src/notes.xml
@@ -37,6 +37,22 @@
one section in this document. The title of each section is the
version number of <c>Event Tracer (ET)</c>.</p>
+<section><title>ET 1.6</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Update selector to utilize new garbage collection trace
+ tags.</p>
+ <p>
+ Own Id: OTP-13545</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>ET 1.5.1</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/et/vsn.mk b/lib/et/vsn.mk
index 0af7bf75e1..a37fec083b 100644
--- a/lib/et/vsn.mk
+++ b/lib/et/vsn.mk
@@ -1 +1 @@
-ET_VSN = 1.5.1
+ET_VSN = 1.6
diff --git a/lib/eunit/doc/src/notes.xml b/lib/eunit/doc/src/notes.xml
index b513caf95b..88602e8222 100644
--- a/lib/eunit/doc/src/notes.xml
+++ b/lib/eunit/doc/src/notes.xml
@@ -33,6 +33,21 @@
</header>
<p>This document describes the changes made to the EUnit application.</p>
+<section><title>Eunit 2.3</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>There is a new <c>debugVal/2</c> that gives control
+ over the truncation depth.</p>
+ <p>
+ Own Id: OTP-13612</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Eunit 2.2.13</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/eunit/vsn.mk b/lib/eunit/vsn.mk
index dcb7fad699..b551ee6eb6 100644
--- a/lib/eunit/vsn.mk
+++ b/lib/eunit/vsn.mk
@@ -1 +1 @@
-EUNIT_VSN = 2.2.13
+EUNIT_VSN = 2.3
diff --git a/lib/gs/doc/src/notes.xml b/lib/gs/doc/src/notes.xml
index 3ceae98bc5..20188c75e2 100644
--- a/lib/gs/doc/src/notes.xml
+++ b/lib/gs/doc/src/notes.xml
@@ -31,7 +31,22 @@
</header>
<p>This document describes the changes made to the GS application.</p>
- <section><title>GS 1.6</title>
+ <section><title>GS 1.6.1</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>GS 1.6</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/gs/vsn.mk b/lib/gs/vsn.mk
index 345f0f37f2..c762507bab 100644
--- a/lib/gs/vsn.mk
+++ b/lib/gs/vsn.mk
@@ -1,2 +1,2 @@
-GS_VSN = 1.6
+GS_VSN = 1.6.1
diff --git a/lib/hipe/cerl/cerl_pmatch.erl b/lib/hipe/cerl/cerl_pmatch.erl
index 594f2bf81c..ca27fff1dd 100644
--- a/lib/hipe/cerl/cerl_pmatch.erl
+++ b/lib/hipe/cerl/cerl_pmatch.erl
@@ -231,12 +231,9 @@ match_typegroup(T, V, Vs, Gs, Else, Env) ->
Else, Env),
typetest_clause(T, V, Body, Env).
-match_congroup({?binary_id, Segs}, Vs, Cs, _Else, Env) ->
- Ref = get_unique(),
- Guard = cerl:c_primop(cerl:c_atom(set_label), [cerl:c_int(Ref)]),
- NewElse = cerl:c_primop(cerl:c_atom(goto_label), [cerl:c_int(Ref)]),
- Body = match(Vs, Cs, NewElse, Env),
- cerl:c_clause([make_pat(?binary_id, Segs)], Guard, Body);
+match_congroup({?binary_id, Segs}, Vs, Cs, Else, Env) ->
+ Body = match(Vs, Cs, Else, Env),
+ cerl:c_clause([make_pat(?binary_id, Segs)], Body);
match_congroup({D, A}, Vs, Cs, Else, Env) ->
Vs1 = new_vars(A, Env),
@@ -415,6 +412,15 @@ make_let(Vs, A, B) ->
expr(E, Env) ->
case cerl:type(E) of
+ binary ->
+ Es = expr_list(cerl:binary_segments(E), Env),
+ cerl:update_c_binary(E, Es);
+ bitstr ->
+ V = expr(cerl:bitstr_val(E), Env),
+ Sz = expr(cerl:bitstr_size(E), Env),
+ Unit = expr(cerl:bitstr_unit(E), Env),
+ Type = expr(cerl:bitstr_type(E), Env),
+ cerl:update_c_bitstr(E, V, Sz, Unit, Type, cerl:bitstr_flags(E));
literal ->
E;
var ->
@@ -584,16 +590,6 @@ is_simple(E) ->
end.
-get_unique() ->
- case get(unique_label) of
- undefined ->
- put(unique_label, 1),
- 0;
- N ->
- put(unique_label, N+1),
- N
- end.
-
%% ---------------------------------------------------------------------
%% Abstract datatype: environment()
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index 7826dada9d..243bb6e25d 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -1664,10 +1664,12 @@ t_map(Pairs0, DefK0, DefV0) ->
%% define(DEBUG, true).
try
validate_map_elements(Pairs)
- catch error:badarg -> error(badarg, [Pairs0,DefK0,DefV0]);
- error:{badarg, E} -> error({badarg, E}, [Pairs0,DefK0,DefV0])
+ catch error:badarg -> error(badarg, [Pairs0,DefK0,DefV0])
end,
- ?map(Pairs, DefK, DefV).
+ case map_pairs_are_none(Pairs) of
+ true -> ?none;
+ false -> ?map(Pairs, DefK, DefV)
+ end.
normalise_map_optionals([], _, _) -> [];
normalise_map_optionals([E={K,?opt,?none}|T], DefK, DefV) ->
@@ -1684,7 +1686,6 @@ normalise_map_optionals([E={K,?opt,V}|T], DefK, DefV) ->
normalise_map_optionals([E|T], DefK, DefV) ->
[E|normalise_map_optionals(T, DefK, DefV)].
-validate_map_elements([{_,?mand,?none}|_]) -> error({badarg, none_in_mand});
validate_map_elements([{K1,_,_}|Rest=[{K2,_,_}|_]]) ->
case is_singleton_type(K1) andalso K1 < K2 of
false -> error(badarg);
@@ -1697,6 +1698,10 @@ validate_map_elements([{K,_,_}]) ->
end;
validate_map_elements([]) -> true.
+map_pairs_are_none([]) -> false;
+map_pairs_are_none([{_,?mand,?none}|_]) -> true;
+map_pairs_are_none([_|Ps]) -> map_pairs_are_none(Ps).
+
-spec t_is_map(erl_type()) -> boolean().
t_is_map(Type) ->
@@ -2833,12 +2838,7 @@ t_inf(?map(_, ADefK, ADefV) = A, ?map(_, BDefK, BDefV) = B, _Opaques) ->
%% becomes mandatory in the infinumum
(K, _, V1, _, V2) -> {K, ?mand, t_inf(V1, V2)}
end, A, B),
- %% If the infinimum of any mandatory values is ?none, the entire map infinimum
- %% is ?none.
- case lists:any(fun({_,?mand,?none})->true; ({_,_,_}) -> false end, Pairs) of
- true -> t_none();
- false -> t_map(Pairs, t_inf(ADefK, BDefK), t_inf(ADefV, BDefV))
- end;
+ t_map(Pairs, t_inf(ADefK, BDefK), t_inf(ADefV, BDefV));
t_inf(?matchstate(Pres1, Slots1), ?matchstate(Pres2, Slots2), _Opaques) ->
?matchstate(t_inf(Pres1, Pres2), t_inf(Slots1, Slots2));
t_inf(?nil, ?nil, _Opaques) -> ?nil;
diff --git a/lib/hipe/doc/src/notes.xml b/lib/hipe/doc/src/notes.xml
index 4ebd4b817c..e2a1524be6 100644
--- a/lib/hipe/doc/src/notes.xml
+++ b/lib/hipe/doc/src/notes.xml
@@ -31,6 +31,46 @@
</header>
<p>This document describes the changes made to HiPE.</p>
+<section><title>Hipe 3.15.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ HiPE compiler crashed, during compilation, in some cases
+ that involved inlining of float operations on complicated
+ control flow graphs.</p>
+ <p>
+ Own Id: OTP-13407 Aux Id: PR-984 </p>
+ </item>
+ <item>
+ <p>
+ Various fixes and improvements to the HiPE LLVM backend.
+ <list> <item>Add support for LLVM 3.7 and 3.8 in the
+ HiPE/LLVM x86_64 backend</item> <item>Reinstate support
+ for the LLVM backend on x86 (works OK for LLVM 3.5 to 3.7
+ -- LLVM 3.8 has a bug that prevents it from generating
+ correct native code on x86)</item> </list></p>
+ <p>
+ Own Id: OTP-13626</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Elimination of <c>maps:is_key/2</c> calls to HiPE</p>
+ <p>
+ Own Id: OTP-13625 Aux Id: PR-1069 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Hipe 3.15</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/hipe/vsn.mk b/lib/hipe/vsn.mk
index 2edfd790ed..e61c1a042c 100644
--- a/lib/hipe/vsn.mk
+++ b/lib/hipe/vsn.mk
@@ -1 +1 @@
-HIPE_VSN = 3.15
+HIPE_VSN = 3.15.1
diff --git a/lib/ic/doc/src/notes.xml b/lib/ic/doc/src/notes.xml
index 4b73aa5509..08b02bc4a4 100644
--- a/lib/ic/doc/src/notes.xml
+++ b/lib/ic/doc/src/notes.xml
@@ -31,7 +31,22 @@
<file>notes.xml</file>
</header>
- <section><title>IC 4.4</title>
+ <section><title>IC 4.4.1</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>IC 4.4</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/ic/test/c_client_erl_server_SUITE.erl b/lib/ic/test/c_client_erl_server_SUITE.erl
index 7668300b58..b6e100e102 100644
--- a/lib/ic/test/c_client_erl_server_SUITE.erl
+++ b/lib/ic/test/c_client_erl_server_SUITE.erl
@@ -49,7 +49,7 @@
%% Add/remove code path and watchdog before/after each test case.
%%
init_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
code:add_patha(DataDir),
%% Since other test suites use the module m_i, we have
@@ -61,9 +61,9 @@ init_per_testcase(_Case, Config) ->
[{watchdog, WatchDog}| Config].
end_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
code:del_path(DataDir),
- WatchDog = ?config(watchdog, Config),
+ WatchDog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(WatchDog).
suite() -> [{ct_hooks,[ts_install_cth]}].
@@ -95,173 +95,105 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
-array1_test(doc) -> "";
-array1_test(suite) -> [];
array1_test(Config) ->
do_test(array1_test, Config).
-array2_test(doc) -> "";
-array2_test(suite) -> [];
array2_test(Config) ->
do_test(array2_test, Config).
-bool_test(doc) -> "";
-bool_test(suite) -> [];
bool_test(Config) ->
do_test(bool_test, Config).
-char_test(doc) -> "";
-char_test(suite) -> [];
char_test(Config) ->
do_test(char_test, Config).
-double_test(doc) -> "";
-double_test(suite) -> [];
double_test(Config) ->
do_test(double_test, Config).
-enum_test(doc) -> "";
-enum_test(suite) -> [];
enum_test(Config) ->
do_test(enum_test, Config).
-inline_sequence_test(doc) -> "";
-inline_sequence_test(suite) -> [];
inline_sequence_test(Config) ->
do_test(inline_sequence_test, Config).
-long_long_test(doc) -> "";
-long_long_test(suite) -> [];
long_long_test(Config) ->
do_test(long_long_test, Config).
-long_test(doc) -> "";
-long_test(suite) -> [];
long_test(Config) ->
do_test(long_test, Config).
-octet_test(doc) -> "";
-octet_test(suite) -> [];
octet_test(Config) ->
do_test(octet_test, Config).
-pid_test(doc) -> "";
-pid_test(suite) -> [];
pid_test(Config) ->
do_test(pid_test, Config).
-port_test(doc) -> "";
-port_test(suite) -> [];
port_test(Config) ->
do_test(port_test, Config).
-ref_test(doc) -> "";
-ref_test(suite) -> [];
ref_test(Config) ->
do_test(ref_test, Config).
-seq1_test(doc) -> "";
-seq1_test(suite) -> [];
seq1_test(Config) ->
do_test(seq1_test, Config).
-seq2_test(doc) -> "";
-seq2_test(suite) -> [];
seq2_test(Config) ->
do_test(seq2_test, Config).
-seq3_test(doc) -> "";
-seq3_test(suite) -> [];
seq3_test(Config) ->
do_test(seq3_test, Config).
-seq4_test(doc) -> "";
-seq4_test(suite) -> [];
seq4_test(Config) ->
do_test(seq4_test, Config).
-seq5_test(doc) -> "";
-seq5_test(suite) -> [];
seq5_test(Config) ->
do_test(seq5_test, Config).
-string1_test(doc) -> "";
-string1_test(suite) -> [];
string1_test(Config) ->
do_test(string1_test, Config).
-string2_test(doc) -> "";
-string2_test(suite) -> [];
string2_test(Config) ->
do_test(string2_test, Config).
-string3_test(doc) -> "";
-string3_test(suite) -> [];
string3_test(Config) ->
do_test(string3_test, Config).
-string4_test(doc) -> "";
-string4_test(suite) -> [];
string4_test(Config) ->
do_test(string4_test, Config).
-struct2_test(doc) -> "";
-struct2_test(suite) -> [];
struct2_test(Config) ->
do_test(struct2_test, Config).
-struct_test(doc) -> "";
-struct_test(suite) -> [];
struct_test(Config) ->
do_test(struct_test, Config).
-term_sequence_test(doc) -> "";
-term_sequence_test(suite) -> [];
term_sequence_test(Config) ->
do_test(term_sequence_test, Config).
-term_struct_test(doc) -> "";
-term_struct_test(suite) -> [];
term_struct_test(Config) ->
do_test(term_struct_test, Config).
-term_test(doc) -> "";
-term_test(suite) -> [];
term_test(Config) ->
do_test(term_test, Config).
-typedef_test(doc) -> "";
-typedef_test(suite) -> [];
typedef_test(Config) ->
do_test(typedef_test, Config).
-unsigned_long_long_test(doc) -> "";
-unsigned_long_long_test(suite) -> [];
unsigned_long_long_test(Config) ->
do_test(unsigned_long_long_test, Config).
-unsigned_long_test(doc) -> "";
-unsigned_long_test(suite) -> [];
unsigned_long_test(Config) ->
do_test(unsigned_long_test, Config).
-unsigned_short_test(doc) -> "";
-unsigned_short_test(suite) -> [];
unsigned_short_test(Config) ->
do_test(unsigned_short_test, Config).
-void_test(doc) -> "";
-void_test(suite) -> [];
void_test(Config) ->
do_test(void_test, Config).
-wchar_test(doc) -> "";
-wchar_test(suite) -> [];
wchar_test(Config) ->
do_test(wchar_test, Config).
-wstring1_test(doc) -> "";
-wstring1_test(suite) -> [];
wstring1_test(Config) ->
do_test(wstring1_test, Config).
@@ -275,7 +207,7 @@ do_test(Case, Config) ->
%% Start the server
{ok, _Pid} = m_i:oe_create_link([], {local, ?ERLANG_SERVER_NAME}),
Node = atom_to_list(node()),
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
%% io:format("~p: data directory: ~p~n", [?MODULE, DataDir]),
Cookie = atom_to_list(erlang:get_cookie()),
%% Start C-client node as a port program.
diff --git a/lib/ic/test/c_client_erl_server_SUITE_data/c_client.c b/lib/ic/test/c_client_erl_server_SUITE_data/c_client.c
index 6953227824..af189a74f7 100644
--- a/lib/ic/test/c_client_erl_server_SUITE_data/c_client.c
+++ b/lib/ic/test/c_client_erl_server_SUITE_data/c_client.c
@@ -854,7 +854,6 @@ static int array1_test(IC_Env *env)
print_arr1(alr);
fprintf(stdout, "\n");
}
- free(alo);
free(alr);
return -1;
}
diff --git a/lib/ic/test/c_client_erl_server_proto_SUITE.erl b/lib/ic/test/c_client_erl_server_proto_SUITE.erl
index 2336a8417c..c15617ea3f 100644
--- a/lib/ic/test/c_client_erl_server_proto_SUITE.erl
+++ b/lib/ic/test/c_client_erl_server_proto_SUITE.erl
@@ -48,7 +48,7 @@
%% Add/remove code path and watchdog before/after each test case.
%%
init_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
code:add_patha(DataDir),
%% Since other test suites use the module m_i, we have
@@ -60,9 +60,9 @@ init_per_testcase(_Case, Config) ->
[{watchdog, WatchDog}| Config].
end_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
code:del_path(DataDir),
- WatchDog = ?config(watchdog, Config),
+ WatchDog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(WatchDog).
suite() -> [{ct_hooks,[ts_install_cth]}].
@@ -94,173 +94,105 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
-array1_test(doc) -> "";
-array1_test(suite) -> [];
array1_test(Config) ->
do_test(array1_test, Config).
-array2_test(doc) -> "";
-array2_test(suite) -> [];
array2_test(Config) ->
do_test(array2_test, Config).
-bool_test(doc) -> "";
-bool_test(suite) -> [];
bool_test(Config) ->
do_test(bool_test, Config).
-char_test(doc) -> "";
-char_test(suite) -> [];
char_test(Config) ->
do_test(char_test, Config).
-double_test(doc) -> "";
-double_test(suite) -> [];
double_test(Config) ->
do_test(double_test, Config).
-enum_test(doc) -> "";
-enum_test(suite) -> [];
enum_test(Config) ->
do_test(enum_test, Config).
-inline_sequence_test(doc) -> "";
-inline_sequence_test(suite) -> [];
inline_sequence_test(Config) ->
do_test(inline_sequence_test, Config).
-long_long_test(doc) -> "";
-long_long_test(suite) -> [];
long_long_test(Config) ->
do_test(long_long_test, Config).
-long_test(doc) -> "";
-long_test(suite) -> [];
long_test(Config) ->
do_test(long_test, Config).
-octet_test(doc) -> "";
-octet_test(suite) -> [];
octet_test(Config) ->
do_test(octet_test, Config).
-pid_test(doc) -> "";
-pid_test(suite) -> [];
pid_test(Config) ->
do_test(pid_test, Config).
-port_test(doc) -> "";
-port_test(suite) -> [];
port_test(Config) ->
do_test(port_test, Config).
-ref_test(doc) -> "";
-ref_test(suite) -> [];
ref_test(Config) ->
do_test(ref_test, Config).
-seq1_test(doc) -> "";
-seq1_test(suite) -> [];
seq1_test(Config) ->
do_test(seq1_test, Config).
-seq2_test(doc) -> "";
-seq2_test(suite) -> [];
seq2_test(Config) ->
do_test(seq2_test, Config).
-seq3_test(doc) -> "";
-seq3_test(suite) -> [];
seq3_test(Config) ->
do_test(seq3_test, Config).
-seq4_test(doc) -> "";
-seq4_test(suite) -> [];
seq4_test(Config) ->
do_test(seq4_test, Config).
-seq5_test(doc) -> "";
-seq5_test(suite) -> [];
seq5_test(Config) ->
do_test(seq5_test, Config).
-string1_test(doc) -> "";
-string1_test(suite) -> [];
string1_test(Config) ->
do_test(string1_test, Config).
-string2_test(doc) -> "";
-string2_test(suite) -> [];
string2_test(Config) ->
do_test(string2_test, Config).
-string3_test(doc) -> "";
-string3_test(suite) -> [];
string3_test(Config) ->
do_test(string3_test, Config).
-string4_test(doc) -> "";
-string4_test(suite) -> [];
string4_test(Config) ->
do_test(string4_test, Config).
-struct2_test(doc) -> "";
-struct2_test(suite) -> [];
struct2_test(Config) ->
do_test(struct2_test, Config).
-struct_test(doc) -> "";
-struct_test(suite) -> [];
struct_test(Config) ->
do_test(struct_test, Config).
-term_sequence_test(doc) -> "";
-term_sequence_test(suite) -> [];
term_sequence_test(Config) ->
do_test(term_sequence_test, Config).
-term_struct_test(doc) -> "";
-term_struct_test(suite) -> [];
term_struct_test(Config) ->
do_test(term_struct_test, Config).
-term_test(doc) -> "";
-term_test(suite) -> [];
term_test(Config) ->
do_test(term_test, Config).
-typedef_test(doc) -> "";
-typedef_test(suite) -> [];
typedef_test(Config) ->
do_test(typedef_test, Config).
-unsigned_long_long_test(doc) -> "";
-unsigned_long_long_test(suite) -> [];
unsigned_long_long_test(Config) ->
do_test(unsigned_long_long_test, Config).
-unsigned_long_test(doc) -> "";
-unsigned_long_test(suite) -> [];
unsigned_long_test(Config) ->
do_test(unsigned_long_test, Config).
-unsigned_short_test(doc) -> "";
-unsigned_short_test(suite) -> [];
unsigned_short_test(Config) ->
do_test(unsigned_short_test, Config).
-void_test(doc) -> "";
-void_test(suite) -> [];
void_test(Config) ->
do_test(void_test, Config).
-wchar_test(doc) -> "";
-wchar_test(suite) -> [];
wchar_test(Config) ->
do_test(wchar_test, Config).
-wstring1_test(doc) -> "";
-wstring1_test(suite) -> [];
wstring1_test(Config) ->
do_test(wstring1_test, Config).
@@ -275,7 +207,7 @@ do_test(Case, Config) ->
{ok, _Pid} = m_i:oe_create_link([], {local, ?ERLANG_SERVER_NAME}),
Node = atom_to_list(node()),
%% [NodeName, HostName] = string:tokens(Node, "@"),
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
%% io:format("~p: data directory: ~p~n", [?MODULE, DataDir]),
Cookie = atom_to_list(erlang:get_cookie()),
%% Start C-client node as a port program.
diff --git a/lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl b/lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl
index ed45b7fd82..334db7c1da 100644
--- a/lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl
+++ b/lib/ic/test/c_client_erl_server_proto_tmo_SUITE.erl
@@ -48,7 +48,7 @@
%% Add/remove code path and watchdog before/after each test case.
%%
init_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
code:add_patha(DataDir),
%% Since other test suites use the module m_i, we have
@@ -60,9 +60,9 @@ init_per_testcase(_Case, Config) ->
[{watchdog, WatchDog}| Config].
end_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
code:del_path(DataDir),
- WatchDog = ?config(watchdog, Config),
+ WatchDog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(WatchDog).
suite() -> [{ct_hooks,[ts_install_cth]}].
@@ -94,175 +94,105 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
-
-
-array1_test(doc) -> "";
-array1_test(suite) -> [];
array1_test(Config) ->
do_test(array1_test, Config).
-array2_test(doc) -> "";
-array2_test(suite) -> [];
array2_test(Config) ->
do_test(array2_test, Config).
-bool_test(doc) -> "";
-bool_test(suite) -> [];
bool_test(Config) ->
do_test(bool_test, Config).
-char_test(doc) -> "";
-char_test(suite) -> [];
char_test(Config) ->
do_test(char_test, Config).
-double_test(doc) -> "";
-double_test(suite) -> [];
double_test(Config) ->
do_test(double_test, Config).
-enum_test(doc) -> "";
-enum_test(suite) -> [];
enum_test(Config) ->
do_test(enum_test, Config).
-inline_sequence_test(doc) -> "";
-inline_sequence_test(suite) -> [];
inline_sequence_test(Config) ->
do_test(inline_sequence_test, Config).
-long_long_test(doc) -> "";
-long_long_test(suite) -> [];
long_long_test(Config) ->
do_test(long_long_test, Config).
-long_test(doc) -> "";
-long_test(suite) -> [];
long_test(Config) ->
do_test(long_test, Config).
-octet_test(doc) -> "";
-octet_test(suite) -> [];
octet_test(Config) ->
do_test(octet_test, Config).
-pid_test(doc) -> "";
-pid_test(suite) -> [];
pid_test(Config) ->
do_test(pid_test, Config).
-port_test(doc) -> "";
-port_test(suite) -> [];
port_test(Config) ->
do_test(port_test, Config).
-ref_test(doc) -> "";
-ref_test(suite) -> [];
ref_test(Config) ->
do_test(ref_test, Config).
-seq1_test(doc) -> "";
-seq1_test(suite) -> [];
seq1_test(Config) ->
do_test(seq1_test, Config).
-seq2_test(doc) -> "";
-seq2_test(suite) -> [];
seq2_test(Config) ->
do_test(seq2_test, Config).
-seq3_test(doc) -> "";
-seq3_test(suite) -> [];
seq3_test(Config) ->
do_test(seq3_test, Config).
-seq4_test(doc) -> "";
-seq4_test(suite) -> [];
seq4_test(Config) ->
do_test(seq4_test, Config).
-seq5_test(doc) -> "";
-seq5_test(suite) -> [];
seq5_test(Config) ->
do_test(seq5_test, Config).
-string1_test(doc) -> "";
-string1_test(suite) -> [];
string1_test(Config) ->
do_test(string1_test, Config).
-string2_test(doc) -> "";
-string2_test(suite) -> [];
string2_test(Config) ->
do_test(string2_test, Config).
-string3_test(doc) -> "";
-string3_test(suite) -> [];
string3_test(Config) ->
do_test(string3_test, Config).
-string4_test(doc) -> "";
-string4_test(suite) -> [];
string4_test(Config) ->
do_test(string4_test, Config).
-struct2_test(doc) -> "";
-struct2_test(suite) -> [];
struct2_test(Config) ->
do_test(struct2_test, Config).
-struct_test(doc) -> "";
-struct_test(suite) -> [];
struct_test(Config) ->
do_test(struct_test, Config).
-term_sequence_test(doc) -> "";
-term_sequence_test(suite) -> [];
term_sequence_test(Config) ->
do_test(term_sequence_test, Config).
-term_struct_test(doc) -> "";
-term_struct_test(suite) -> [];
term_struct_test(Config) ->
do_test(term_struct_test, Config).
-term_test(doc) -> "";
-term_test(suite) -> [];
term_test(Config) ->
do_test(term_test, Config).
-typedef_test(doc) -> "";
-typedef_test(suite) -> [];
typedef_test(Config) ->
do_test(typedef_test, Config).
-unsigned_long_long_test(doc) -> "";
-unsigned_long_long_test(suite) -> [];
unsigned_long_long_test(Config) ->
do_test(unsigned_long_long_test, Config).
-unsigned_long_test(doc) -> "";
-unsigned_long_test(suite) -> [];
unsigned_long_test(Config) ->
do_test(unsigned_long_test, Config).
-unsigned_short_test(doc) -> "";
-unsigned_short_test(suite) -> [];
unsigned_short_test(Config) ->
do_test(unsigned_short_test, Config).
-void_test(doc) -> "";
-void_test(suite) -> [];
void_test(Config) ->
do_test(void_test, Config).
-wchar_test(doc) -> "";
-wchar_test(suite) -> [];
wchar_test(Config) ->
do_test(wchar_test, Config).
-wstring1_test(doc) -> "";
-wstring1_test(suite) -> [];
wstring1_test(Config) ->
do_test(wstring1_test, Config).
@@ -277,7 +207,7 @@ do_test(Case, Config) ->
{ok, _Pid} = m_i:oe_create_link([], {local, ?ERLANG_SERVER_NAME}),
Node = atom_to_list(node()),
%% [NodeName, HostName] = string:tokens(Node, "@"),
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
%% io:format("~p: data directory: ~p~n", [?MODULE, DataDir]),
Cookie = atom_to_list(erlang:get_cookie()),
%% Start C-client node as a port program.
diff --git a/lib/ic/test/erl_client_c_server_SUITE.erl b/lib/ic/test/erl_client_c_server_SUITE.erl
index cc0dbfda74..d592a611f7 100644
--- a/lib/ic/test/erl_client_c_server_SUITE.erl
+++ b/lib/ic/test/erl_client_c_server_SUITE.erl
@@ -47,7 +47,7 @@
%% Add/remove code path and watchdog before/after each test case.
%%
init_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
code:add_patha(DataDir),
%% Since other test suites use the module m_i, we have
@@ -59,9 +59,9 @@ init_per_testcase(_Case, Config) ->
[{watchdog, WatchDog}| Config].
end_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
code:del_path(DataDir),
- WatchDog = ?config(watchdog, Config),
+ WatchDog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(WatchDog).
suite() -> [{ct_hooks,[ts_install_cth]}].
@@ -93,174 +93,105 @@ end_per_group(_GroupName, Config) ->
Config.
-
-array1_test(doc) -> "";
-array1_test(suite) -> [];
array1_test(Config) ->
do_test(array1_test, Config).
-array2_test(doc) -> "";
-array2_test(suite) -> [];
array2_test(Config) ->
do_test(array2_test, Config).
-bool_test(doc) -> "";
-bool_test(suite) -> [];
bool_test(Config) ->
do_test(bool_test, Config).
-char_test(doc) -> "";
-char_test(suite) -> [];
char_test(Config) ->
do_test(char_test, Config).
-double_test(doc) -> "";
-double_test(suite) -> [];
double_test(Config) ->
do_test(double_test, Config).
-enum_test(doc) -> "";
-enum_test(suite) -> [];
enum_test(Config) ->
do_test(enum_test, Config).
-inline_sequence_test(doc) -> "";
-inline_sequence_test(suite) -> [];
inline_sequence_test(Config) ->
do_test(inline_sequence_test, Config).
-longlong_test(doc) -> "";
-longlong_test(suite) -> [];
longlong_test(Config) ->
do_test(longlong_test, Config).
-long_test(doc) -> "";
-long_test(suite) -> [];
long_test(Config) ->
do_test(long_test, Config).
-octet_test(doc) -> "";
-octet_test(suite) -> [];
octet_test(Config) ->
do_test(octet_test, Config).
-pid_test(doc) -> "";
-pid_test(suite) -> [];
pid_test(Config) ->
do_test(pid_test, Config).
-port_test(doc) -> "";
-port_test(suite) -> [];
port_test(Config) ->
do_test(port_test, Config).
-ref_test(doc) -> "";
-ref_test(suite) -> [];
ref_test(Config) ->
do_test(ref_test, Config).
-seq1_test(doc) -> "";
-seq1_test(suite) -> [];
seq1_test(Config) ->
do_test(seq1_test, Config).
-seq2_test(doc) -> "";
-seq2_test(suite) -> [];
seq2_test(Config) ->
do_test(seq2_test, Config).
-seq3_test(doc) -> "";
-seq3_test(suite) -> [];
seq3_test(Config) ->
do_test(seq3_test, Config).
-seq4_test(doc) -> "";
-seq4_test(suite) -> [];
seq4_test(Config) ->
do_test(seq4_test, Config).
-seq5_test(doc) -> "";
-seq5_test(suite) -> [];
seq5_test(Config) ->
do_test(seq5_test, Config).
-string1_test(doc) -> "";
-string1_test(suite) -> [];
string1_test(Config) ->
do_test(string1_test, Config).
-string2_test(doc) -> "";
-string2_test(suite) -> [];
string2_test(Config) ->
do_test(string2_test, Config).
-string3_test(doc) -> "";
-string3_test(suite) -> [];
string3_test(Config) ->
do_test(string3_test, Config).
-string4_test(doc) -> "";
-string4_test(suite) -> [];
string4_test(Config) ->
do_test(string4_test, Config).
-struct2_test(doc) -> "";
-struct2_test(suite) -> [];
struct2_test(Config) ->
do_test(struct2_test, Config).
-struct_test(doc) -> "";
-struct_test(suite) -> [];
struct_test(Config) ->
do_test(struct_test, Config).
-term_sequence_test(doc) -> "";
-term_sequence_test(suite) -> [];
term_sequence_test(Config) ->
do_test(term_sequence_test, Config).
-term_struct_test(doc) -> "";
-term_struct_test(suite) -> [];
term_struct_test(Config) ->
do_test(term_struct_test, Config).
-term_test(doc) -> "";
-term_test(suite) -> [];
term_test(Config) ->
do_test(term_test, Config).
-typedef_test(doc) -> "";
-typedef_test(suite) -> [];
typedef_test(Config) ->
do_test(typedef_test, Config).
-ulonglong_test(doc) -> "";
-ulonglong_test(suite) -> [];
ulonglong_test(Config) ->
do_test(ulonglong_test, Config).
-ulong_test(doc) -> "";
-ulong_test(suite) -> [];
ulong_test(Config) ->
do_test(ulong_test, Config).
-ushort_test(doc) -> "";
-ushort_test(suite) -> [];
ushort_test(Config) ->
do_test(ushort_test, Config).
-void_test(doc) -> "";
-void_test(suite) -> [];
void_test(Config) ->
do_test(void_test, Config).
-wchar_test(doc) -> "";
-wchar_test(suite) -> [];
wchar_test(Config) ->
do_test(wchar_test, Config).
-wstring1_test(doc) -> "";
-wstring1_test(suite) -> [];
wstring1_test(Config) ->
do_test(wstring1_test, Config).
@@ -270,7 +201,7 @@ do_test(Case, Config) ->
process_flag(trap_exit, true),
Node = atom_to_list(node()),
[_NodeName, HostName] = string:tokens(Node, "@"),
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
%% io:format("~p: data directory: ~p~n", [?MODULE, DataDir]),
Cookie = atom_to_list(erlang:get_cookie()),
ServerNodeName = atom_to_list(?C_SERVER_NODE_NAME),
diff --git a/lib/ic/test/erl_client_c_server_proto_SUITE.erl b/lib/ic/test/erl_client_c_server_proto_SUITE.erl
index 48330b95a8..99eeed01ad 100644
--- a/lib/ic/test/erl_client_c_server_proto_SUITE.erl
+++ b/lib/ic/test/erl_client_c_server_proto_SUITE.erl
@@ -47,7 +47,7 @@
%% Add/remove code path and watchdog before/after each test case.
%%
init_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
code:add_patha(DataDir),
%% Since other test suites use the module m_i, we have
@@ -59,9 +59,9 @@ init_per_testcase(_Case, Config) ->
[{watchdog, WatchDog}| Config].
end_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
code:del_path(DataDir),
- WatchDog = ?config(watchdog, Config),
+ WatchDog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(WatchDog).
suite() -> [{ct_hooks,[ts_install_cth]}].
@@ -93,174 +93,105 @@ end_per_group(_GroupName, Config) ->
Config.
-
-array1_test(doc) -> "";
-array1_test(suite) -> [];
array1_test(Config) ->
do_test(array1_test, Config).
-array2_test(doc) -> "";
-array2_test(suite) -> [];
array2_test(Config) ->
do_test(array2_test, Config).
-bool_test(doc) -> "";
-bool_test(suite) -> [];
bool_test(Config) ->
do_test(bool_test, Config).
-char_test(doc) -> "";
-char_test(suite) -> [];
char_test(Config) ->
do_test(char_test, Config).
-double_test(doc) -> "";
-double_test(suite) -> [];
double_test(Config) ->
do_test(double_test, Config).
-enum_test(doc) -> "";
-enum_test(suite) -> [];
enum_test(Config) ->
do_test(enum_test, Config).
-inline_sequence_test(doc) -> "";
-inline_sequence_test(suite) -> [];
inline_sequence_test(Config) ->
do_test(inline_sequence_test, Config).
-longlong_test(doc) -> "";
-longlong_test(suite) -> [];
longlong_test(Config) ->
do_test(longlong_test, Config).
-long_test(doc) -> "";
-long_test(suite) -> [];
long_test(Config) ->
do_test(long_test, Config).
-octet_test(doc) -> "";
-octet_test(suite) -> [];
octet_test(Config) ->
do_test(octet_test, Config).
-pid_test(doc) -> "";
-pid_test(suite) -> [];
pid_test(Config) ->
do_test(pid_test, Config).
-port_test(doc) -> "";
-port_test(suite) -> [];
port_test(Config) ->
do_test(port_test, Config).
-ref_test(doc) -> "";
-ref_test(suite) -> [];
ref_test(Config) ->
do_test(ref_test, Config).
-seq1_test(doc) -> "";
-seq1_test(suite) -> [];
seq1_test(Config) ->
do_test(seq1_test, Config).
-seq2_test(doc) -> "";
-seq2_test(suite) -> [];
seq2_test(Config) ->
do_test(seq2_test, Config).
-seq3_test(doc) -> "";
-seq3_test(suite) -> [];
seq3_test(Config) ->
do_test(seq3_test, Config).
-seq4_test(doc) -> "";
-seq4_test(suite) -> [];
seq4_test(Config) ->
do_test(seq4_test, Config).
-seq5_test(doc) -> "";
-seq5_test(suite) -> [];
seq5_test(Config) ->
do_test(seq5_test, Config).
-string1_test(doc) -> "";
-string1_test(suite) -> [];
string1_test(Config) ->
do_test(string1_test, Config).
-string2_test(doc) -> "";
-string2_test(suite) -> [];
string2_test(Config) ->
do_test(string2_test, Config).
-string3_test(doc) -> "";
-string3_test(suite) -> [];
string3_test(Config) ->
do_test(string3_test, Config).
-string4_test(doc) -> "";
-string4_test(suite) -> [];
string4_test(Config) ->
do_test(string4_test, Config).
-struct2_test(doc) -> "";
-struct2_test(suite) -> [];
struct2_test(Config) ->
do_test(struct2_test, Config).
-struct_test(doc) -> "";
-struct_test(suite) -> [];
struct_test(Config) ->
do_test(struct_test, Config).
-term_sequence_test(doc) -> "";
-term_sequence_test(suite) -> [];
term_sequence_test(Config) ->
do_test(term_sequence_test, Config).
-term_struct_test(doc) -> "";
-term_struct_test(suite) -> [];
term_struct_test(Config) ->
do_test(term_struct_test, Config).
-term_test(doc) -> "";
-term_test(suite) -> [];
term_test(Config) ->
do_test(term_test, Config).
-typedef_test(doc) -> "";
-typedef_test(suite) -> [];
typedef_test(Config) ->
do_test(typedef_test, Config).
-ulonglong_test(doc) -> "";
-ulonglong_test(suite) -> [];
ulonglong_test(Config) ->
do_test(ulonglong_test, Config).
-ulong_test(doc) -> "";
-ulong_test(suite) -> [];
ulong_test(Config) ->
do_test(ulong_test, Config).
-ushort_test(doc) -> "";
-ushort_test(suite) -> [];
ushort_test(Config) ->
do_test(ushort_test, Config).
-void_test(doc) -> "";
-void_test(suite) -> [];
void_test(Config) ->
do_test(void_test, Config).
-wchar_test(doc) -> "";
-wchar_test(suite) -> [];
wchar_test(Config) ->
do_test(wchar_test, Config).
-wstring1_test(doc) -> "";
-wstring1_test(suite) -> [];
wstring1_test(Config) ->
do_test(wstring1_test, Config).
@@ -270,7 +201,7 @@ do_test(Case, Config) ->
process_flag(trap_exit, true),
Node = atom_to_list(node()),
[_NodeName, HostName] = string:tokens(Node, "@"),
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
%% io:format("~p: data directory: ~p~n", [?MODULE, DataDir]),
Cookie = atom_to_list(erlang:get_cookie()),
ServerNodeName = atom_to_list(?C_SERVER_NODE_NAME),
diff --git a/lib/ic/test/ic_SUITE.erl b/lib/ic/test/ic_SUITE.erl
index 1d436eda2b..42c1dbb415 100644
--- a/lib/ic/test/ic_SUITE.erl
+++ b/lib/ic/test/ic_SUITE.erl
@@ -83,7 +83,7 @@
%% Standard options to the ic compiler, NOTE unholy use of OutDir
--define(OUT(X), filename:join([?config(priv_dir, Config), gen, to_list(X)])).
+-define(OUT(X), filename:join([proplists:get_value(priv_dir, Config), gen, to_list(X)])).
%% Top of cases
@@ -129,9 +129,6 @@ end_per_group(_GroupName, Config) ->
Config.
-
-app_test(doc) -> [];
-app_test(suite) -> [];
app_test(_Config) ->
ok=test_server:app_test(ic),
ok.
@@ -141,89 +138,72 @@ app_test(_Config) ->
%% Test of constant expressions.
%%
-
-
-const_norm(doc) ->
- ["Checks normal constant types and values"];
-const_norm(suite) -> [];
+%% Checks normal constant types and values
const_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(const_norm),
File = filename:join(DataDir, c_norm),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, const_norm_files()),
+ ok = ic:gen(File, stdopts(OutDir)),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, const_norm_files()),
ok.
-const_bad_tk(doc) ->
- ["Checks when the constant value doesn't match the declared type"];
-const_bad_tk(suite) -> [];
+%% Checks when the constant value doesn't match the declared type
const_bad_tk(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, c_err1),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(18, bad_tk_match, R),
ok.
-const_bad_type(doc) ->
- ["Checks operands of ops are of correct type"];
-const_bad_type(suite) -> [];
+%% Checks operands of ops are of correct type
const_bad_type(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, c_err2),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(4, bad_type, R),
ok.
-const_bad_comb(doc) ->
- ["Checks operands of ops are of conflicting types"];
-const_bad_comb(suite) -> [];
+%% Checks operands of ops are of conflicting types
const_bad_comb(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, c_err3),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(3, bad_type_combination, R),
ok.
-
-
-
-union_norm(doc) ->
- ["Checks that normal union declarations works."];
-union_norm(suite) -> [];
+%% Checks that normal union declarations works.
union_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(union_norm),
File = filename:join(DataDir, u_norm),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, union_norm_files()),
+ ok = ic:gen(File, stdopts(OutDir)),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, union_norm_files()),
ok.
%% Checks OTP-2007
-union_default(doc) ->
- ["Checks that default cases are correct in type code."];
-union_default(suite) -> [];
+%% Checks that default cases are correct in type code.
union_default(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(union_default),
File = filename:join(DataDir, u_default),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, union_default_files(), [load]),
+ ok = ic:gen(File, stdopts(OutDir)),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, union_default_files(), [load]),
TkList = i1:oe_get_interface(),
check_label("op0", 0, TkList),
check_label("op1", 1, TkList),
@@ -256,50 +236,41 @@ check_label(Id, N, List) ->
test_server:fail({'no_such_op!', Id, List})
end.
-union_type(doc) ->
- ["Checks that errors are detected. Check that mismatch between case ",
- "value and declared discriminator type is detected."];
-union_type(suite) -> [];
+%% Checks that errors are detected. Check that mismatch between case
+%% value and declared discriminator type is detected.
union_type(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, u_type),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(28, bad_case_type, R),
ok.
-union_mult_err(doc) ->
- ["Check that multiple declared declarators are caught.",
- "Also check that if the discriminator is an enum, then the enum name",
- "must not be used as a declarator in the union switch (declarator",
- "as opposed to label)."];
-union_mult_err(suite) -> [];
+%% Check that multiple declared declarators are caught.
+%% Also check that if the discriminator is an enum, then the enum name
+%% must not be used as a declarator in the union switch (declarator
+%% as opposed to label).
union_mult_err(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, u_mult),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(8, multiply_defined, R),
ok.
-%% Checking mult cases. Now check that other errors are found in the
-%% correct order XXXX
-
-
-union_case_mult(doc) ->
- ["Check that multiply defined case labels are found and reported."];
-union_case_mult(suite) -> [];
+%% Check that multiply defined case labels are found in the
+%% correct order
union_case_mult(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, u_case_mult),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(7, multiple_cases, R),
ok.
@@ -309,19 +280,15 @@ union_case_mult(Config) when is_list(Config) ->
%%
%% Enum cases
%%
-
-
-enum_norm(doc) ->
- ["Checks that normal enum declarations works."];
-enum_norm(suite) -> [];
+%%Checks that normal enum declarations works.
enum_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(enum_norm),
File = filename:join(DataDir, enum),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, enum_norm_files()),
+ ok = ic:gen(File, stdopts(OutDir)),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, enum_norm_files()),
ok.
@@ -329,27 +296,23 @@ enum_norm(Config) when is_list(Config) ->
%%
%% Struct cases
%%
-
-
-struct_norm(doc) ->
- ["Checks that normal struct declarations works."];
-struct_norm(suite) -> [];
+%% Checks that normal struct declarations works.
struct_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(struct_norm),
File = filename:join(DataDir, struct),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, struct_norm_files()),
+ ok = ic:gen(File, stdopts(OutDir)),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, struct_norm_files()),
Mod = ridiculous_name_to_avoid_clash_svenne,
TestFile = filename:join(OutDir, Mod),
- ?line ok = gen_struct_file(TestFile, Mod),
- ?line ok = compile(OutDir, [Mod], [load]),
-%% ?line {ok, Mod, []} = compile:file(TestFile,
+ ok = gen_struct_file(TestFile, Mod),
+ ok = compile(OutDir, [Mod], [load]),
+%% {ok, Mod, []} = compile:file(TestFile,
%% [{i, OutDir}, {outdir, OutDir},
%% return, load]),
- ?line ok = Mod:test(),
+ ok = Mod:test(),
ok.
@@ -359,36 +322,30 @@ struct_norm(Config) when is_list(Config) ->
%%
%% coss (add sometimes, takes 440 seconds!)
-
-typeid(doc) ->
- ["Check that type id's are generated correctly"];
-typeid(suite) -> [];
+%% Check that type id's are generated correctly
typeid(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(typeid),
File = filename:join(DataDir, typeid),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, typeid_files(), [load]),
- ?line "IDL:I1:1.0" = 'I1':'typeID'(),
- ?line "IDL:M1/I1:1.0" = 'M1_I1':'typeID'(),
- ?line "IDL:M2/M1/I1:1.0" = 'M2_M1_I1':'typeID'(),
- ?line "IDL:M3/M2/M1/I1:1.0" = 'M3_M2_M1_I1':'typeID'(),
+ ok = ic:gen(File, stdopts(OutDir)),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, typeid_files(), [load]),
+ "IDL:I1:1.0" = 'I1':'typeID'(),
+ "IDL:M1/I1:1.0" = 'M1_I1':'typeID'(),
+ "IDL:M2/M1/I1:1.0" = 'M2_M1_I1':'typeID'(),
+ "IDL:M3/M2/M1/I1:1.0" = 'M3_M2_M1_I1':'typeID'(),
ok.
%%% This test case is removed because there's no way to test this from
%%% an automated test suite.
-dir(doc) ->
- ["Check that relative directories work, absolute is used in",
- "all other cases in the suite."];
-%%% xxxxxx
-dir(suite) -> [];
+%% Check that relative directories work, absolute is used in
+%% all other cases in the suite.
dir(Config) when is_list(Config) ->
-ok;
+ ok;
dir(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
%% Needs a unique directory (any better way?)
OutDir = mk_unique("oe_the_dir"),
@@ -402,94 +359,82 @@ dir(Config) ->
%% Generate a unique IDL file with a single constant
gen_file(File, Const),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line ok = compile(OutDir, [load]),
- ?line 19955 = Mod:Func(),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, [load]),
- ?line 19955 = Mod:Func(),
+ ok = ic:gen(File, stdopts(OutDir)),
+ ok = compile(OutDir, [load]),
+ 19955 = Mod:Func(),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, [load]),
+ 19955 = Mod:Func(),
- ?line ok = ic:gen(File),
-%%% ?line ok = compile(".", [load]),
+ ok = ic:gen(File),
+%%% ok = compile(".", [load]),
ok.
-undef_id(doc) ->
- ["Check that various undefied id's are detected correctly"];
-undef_id(suite) -> [];
+%% Check that various undefied id's are detected correctly
undef_id(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, undef_id),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(16, tk_not_found, R),
ok.
-mult_ids(doc) ->
- ["Check that multiply defined ids are caught."];
-mult_ids(suite) -> [];
+%% Check that multiply defined ids are caught.
mult_ids(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, mult_ids),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(22, multiply_defined, R),
ok.
-nasty_names(doc) ->
- ["Check that various nasty names can be generated.",
- "Try to provoke name clashes and name conflicts with",
- "Erlang and IDL"];
-nasty_names(suite) -> [];
+%% Check that various nasty names can be generated.
+%% Try to provoke name clashes and name conflicts with
+%% Erlang and IDL
nasty_names(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(nasty_names),
File = filename:join(DataDir, nasty),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, nasty_names_files(), [load]),
+ ok = ic:gen(File, stdopts(OutDir)),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, nasty_names_files(), [load]),
ok.
-coss(doc) ->
- ["Check that the Coss standard specification works."];
-coss(suite) -> [];
+%% Check that the Coss standard specification works.
coss(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(coss),
File = filename:join(DataDir, 'Coss'),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line {ok, [_W1]} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, []),
+ ok = ic:gen(File, stdopts(OutDir)),
+ {ok, [_W1]} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, []),
ok.
-forward(doc) ->
- ["Check that forward declaratios work."];
-forward(suite) -> [];
+%% Check that forward declaratios work.
forward(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(forward),
File = filename:join(DataDir, forward),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, forward_files(), [load]),
+ ok = ic:gen(File, stdopts(OutDir)),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, forward_files(), [load]),
ok.
-include(doc) ->
- ["Check that various undefied id's are detected correctly"];
-include(suite) -> [];
+%% Check that various undefied id's are detected correctly
include(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, include),
- ?line error = ic:gen(File, stdopts(OutDir)++[{preproc_flags,"-I" ++ DataDir}]),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)++[{preproc_flags,"-I" ++ DataDir}]),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[{preproc_flags,"-I" ++ DataDir},silent2]),
case lists:map(fun(D) ->
filename:rootname(filename:basename(element(3, D)))
@@ -513,228 +458,198 @@ include(Config) when is_list(Config) ->
%% Inhertit cases
%%
-
-inherit_norm(doc) ->
- ["Checks that normal inheritance works."];
-inherit_norm(suite) -> [];
+%% Checks that normal inheritance works.
inherit_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(inherit_norm),
File = filename:join(DataDir, inherit),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line {ok, _Ws} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, inherit_norm_files(), [load]),
+ ok = ic:gen(File, stdopts(OutDir)),
+ {ok, _Ws} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, inherit_norm_files(), [load]),
%% Now check constant values:
- ?line 9 = m1_I1:c1(),
+ 9 = m1_I1:c1(),
- ?line 9 = m1_I2:c1(),
- ?line 14 = m1_I2:c2(),
- ?line 27 = m1_I2:c3(),
+ 9 = m1_I2:c1(),
+ 14 = m1_I2:c2(),
+ 27 = m1_I2:c3(),
- ?line 50 = m1_I3:c1(),
- ?line 14 = m1_I3:c2(),
- ?line 27 = m1_I3:c3(),
- ?line 91 = m1_I3:c4(),
- ?line 100 = m1_I3:c5(),
+ 50 = m1_I3:c1(),
+ 14 = m1_I3:c2(),
+ 27 = m1_I3:c3(),
+ 91 = m1_I3:c4(),
+ 100 = m1_I3:c5(),
ok.
-inherit_warn(doc) ->
- ["Check that various inheritance shadowing is detected"];
-inherit_warn(suite) -> [];
+%% Check that various inheritance shadowing is detected
inherit_warn(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, inherit_warn),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line {ok, R} =
+ ok = ic:gen(File, stdopts(OutDir)),
+ {ok, R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(7, inherit_name_shadow, R),
ok.
-inherit_err(doc) ->
- ["Check that various inheritance errors is detected"];
-inherit_err(suite) -> [];
+%% Check that various inheritance errors is detected
inherit_err(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, inherit_err),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, _Ws, R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, _Ws, R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(21, inherit_name_collision, R),
ok.
-
-oneway_norm(doc) ->
- ["Checks that normal oneway operations works."];
-oneway_norm(suite) -> [];
+%% Checks that normal oneway operations works.
oneway_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(oneway_norm),
File = filename:join(DataDir, one),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line ok = compile(OutDir, oneway_norm_files(), [load]),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, oneway_norm_files(), [load]),
+ ok = ic:gen(File, stdopts(OutDir)),
+ ok = compile(OutDir, oneway_norm_files(), [load]),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, oneway_norm_files(), [load]),
ok.
-oneway_void(doc) ->
- ["Check that non-void oneways are detected."];
-oneway_void(suite) -> [];
+%% Check that non-void oneways are detected.
oneway_void(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, one_void),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(2, bad_oneway_type, R),
ok.
-oneway_raises(doc) ->
- ["Check that oneways cannot raise exceptions."];
-oneway_raises(suite) -> [];
+%% Check that oneways cannot raise exceptions.
oneway_raises(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, one_raises),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(3, oneway_raises, R),
ok.
-oneway_out(doc) ->
- ["Check that illegal out parameters are detected"];
-oneway_out(suite) -> [];
+%% Check that illegal out parameters are detected
oneway_out(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, one_out),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(2, oneway_outparams, R),
ok.
-oneway_followed(doc) ->
- ["Checks that normal oneways, followed by other operations."];
-oneway_followed(suite) -> [];
+%% Checks that normal oneways, followed by other operations.
oneway_followed(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(oneway_followed),
File = filename:join(DataDir, one_followed),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line ok = compile(OutDir, oneway_followed_files(), [load]),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, oneway_followed_files(), [load]),
+ ok = ic:gen(File, stdopts(OutDir)),
+ ok = compile(OutDir, oneway_followed_files(), [load]),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, oneway_followed_files(), [load]),
ok.
-attr_norm(doc) ->
- ["Checks that normal attr operations works."];
-attr_norm(suite) -> [];
+%% Checks that normal attr operations works.
attr_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(attr_norm),
File = filename:join(DataDir, attr),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line ok = compile(OutDir, attr_norm_files(), [load]),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, attr_norm_files(), [load]),
+ ok = ic:gen(File, stdopts(OutDir)),
+ ok = compile(OutDir, attr_norm_files(), [load]),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, attr_norm_files(), [load]),
ok.
-type_norm(doc) ->
- ["Checks all types are handled."];
-type_norm(suite) -> [];
+%% Checks all types are handled.
type_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(type_norm),
File = filename:join(DataDir, type),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line ok = compile(OutDir, type_norm_files(), [load]),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, type_norm_files(), [load]),
+ ok = ic:gen(File, stdopts(OutDir)),
+ ok = compile(OutDir, type_norm_files(), [load]),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, type_norm_files(), [load]),
ok.
-
-
-syntax1(suite) -> [];
syntax1(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, syntax1),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(1, parse_error, R),
ok.
-syntax2(suite) -> [];
syntax2(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, syntax2),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(1, parse_error, R),
ok.
-syntax3(suite) -> [];
syntax3(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, syntax3),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(1, parse_error, R),
ok.
-syntax4(suite) -> [];
syntax4(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, syntax4),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(1, parse_error, R),
ok.
-syntax5(suite) -> [];
syntax5(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, syntax5),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(1, parse_error, R),
ok.
-syntax6(suite) -> [];
syntax6(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, syntax6),
- ?line error = ic:gen(File, stdopts(OutDir)),
- ?line {error, [], R} =
+ error = ic:gen(File, stdopts(OutDir)),
+ {error, [], R} =
ic:gen(File, stdopts(OutDir)++[silent2]),
check_errors(1, parse_error, R),
ok.
@@ -747,17 +662,15 @@ syntax6(Config) when is_list(Config) ->
%% ( OTP-2102 )
%%
-raises_reg(doc) ->
- ["Check that exceptions are really registered to operations."];
-raises_reg(suite) -> [];
+%% Check that exceptions are really registered to operations.
raises_reg(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(raises_reg_check),
File = filename:join(DataDir, raises_reg),
- ?line ok = ic:gen(File, stdopts(OutDir)),
- ?line {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
- ?line ok = compile(OutDir, raises_reg_files(), [load]),
+ ok = ic:gen(File, stdopts(OutDir)),
+ {ok, []} = ic:gen(File, stdopts(OutDir)++[silent2]),
+ ok = compile(OutDir, raises_reg_files(), [load]),
set_up('oe_raises_reg'),
@@ -924,7 +837,7 @@ to_list(X) -> X.
%% File must be an atom
gen_struct_file(File, Mod) ->
- ?line {ok, Fd} = file:open(to_list(File)++".erl", [write]),
+ {ok, Fd} = file:open(to_list(File)++".erl", [write]),
io:format(Fd, "~n", []),
io:format(Fd, "-module(~p).~n", [Mod]),
io:format(Fd, "-export([test/0]).~n", []),
diff --git a/lib/ic/test/ic_be_SUITE.erl b/lib/ic/test/ic_be_SUITE.erl
index 2fa28fc103..d5d3038a6e 100644
--- a/lib/ic/test/ic_be_SUITE.erl
+++ b/lib/ic/test/ic_be_SUITE.erl
@@ -30,7 +30,7 @@
init_per_group/2,end_per_group/2,plain/1]).
--define(OUT(X), filename:join([?config(priv_dir, Config), gen, to_list(X)])).
+-define(OUT(X), filename:join([proplists:get_value(priv_dir, Config), gen, to_list(X)])).
%% Top of cases
@@ -56,35 +56,20 @@ end_per_group(_GroupName, Config) ->
Config.
-
-
-plain(doc) ->
- ["Checking code for the plain backend."];
-plain(suite) -> [];
+%% Checking code for the plain backend.
plain(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(slask),
File = filename:join(DataDir, plain),
-
- ?line ok = ic:gen(File,stdopts(OutDir)++[{be,erl_plain}]),
-
+ ok = ic:gen(File,stdopts(OutDir)++[{be,erl_plain}]),
ok.
-
-
-
%%--------------------------------------------------------------------
%%
%% Utilities
-
-
stdopts(OutDir) ->
[{outdir, OutDir}, {maxerrs, infinity}].
-
-
-
-
to_list(X) when is_atom(X) -> atom_to_list(X);
to_list(X) -> X.
diff --git a/lib/ic/test/ic_pp_SUITE.erl b/lib/ic/test/ic_pp_SUITE.erl
index 38e936f9bc..be37953126 100644
--- a/lib/ic/test/ic_pp_SUITE.erl
+++ b/lib/ic/test/ic_pp_SUITE.erl
@@ -29,7 +29,7 @@
%% Standard options to the ic compiler, NOTE unholy use of OutDir
--define(OUT(X), filename:join([?config(priv_dir, Config), gen, to_list(X)])).
+-define(OUT(X), filename:join([proplists:get_value(priv_dir, Config), gen, to_list(X)])).
-define(GCC, "g++").
-define(GCC_VER, "2.95.3").
@@ -146,121 +146,100 @@ cases() ->
%%--------------------------------------------------------------------
%% arg
%%--------------------------------------------------------------------
-
-
-arg_norm(doc) -> ["Checks arguments for #define."];
-arg_norm(suite) -> [];
+%% Checks arguments for #define.
arg_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(arg_norm),
File = filename:join(DataDir, arg),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% cascade
%%--------------------------------------------------------------------
-
-
-cascade_norm(doc) -> ["Check cascade #define."];
-cascade_norm(suite) -> [];
+%% Check cascade #define.
cascade_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(cascade_norm),
File = filename:join(DataDir, cascade),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% comment
%%--------------------------------------------------------------------
-
-
-comment_norm(doc) -> ["Check comments."];
-comment_norm(suite) -> [];
+%% Check comments.
comment_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(comment_norm),
File = filename:join(DataDir, comment),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% concat
%%--------------------------------------------------------------------
-
-
-concat_norm(doc) -> ["Check concatinations, i.e ## ."];
-concat_norm(suite) -> [];
+%% Check concatinations, i.e ## .
concat_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(concat_norm),
File = filename:join(DataDir, concat),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% define
%%--------------------------------------------------------------------
-
-
-define_norm(doc) -> ["Check misceleaneous #define."];
-define_norm(suite) -> [];
+%% Check misceleaneous #define.
define_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(define_norm),
File = filename:join(DataDir, define),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% if
%%--------------------------------------------------------------------
-
-if_norm(doc) -> ["Check #if, #elif, and #endif. ."];
-if_norm(suite) -> [];
+%% Check #if, #elif, and #endif.
if_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(if_norm),
File = filename:join(DataDir, 'if'),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
-if_zero(doc) -> ["Check #if 0"];
-if_zero(suite) -> [];
+%% Check #if 0
if_zero(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(if_zero),
File = filename:join(DataDir, if_zero),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% inc
%%--------------------------------------------------------------------
-
-
-inc_norm(doc) -> ["Check #include."];
-inc_norm(suite) -> [];
+%% Check #include.
inc_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(inc_norm),
File = filename:join(DataDir, inc),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
@@ -268,166 +247,133 @@ inc_norm(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
%% improp_nest_constr
%%--------------------------------------------------------------------
-
-
-improp_nest_constr_norm(doc) -> ["Check improperly nested constructs."];
-improp_nest_constr_norm(suite) -> [];
+%% Check improperly nested constructs.
improp_nest_constr_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(improp_nest_constr_norm),
File = filename:join(DataDir, improp_nest_constr),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% misc
%%--------------------------------------------------------------------
-
-
-misc_norm(doc) -> ["Misceleaneous checks."];
-misc_norm(suite) -> [];
+%% Misceleaneous checks.
misc_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(misc_norm),
File = filename:join(DataDir, misc),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% line
%%--------------------------------------------------------------------
-
-
-line_norm(doc) -> ["Checks #line."];
-line_norm(suite) -> [];
+%% Checks #line.
line_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(line_norm),
File = filename:join(DataDir, line),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% nopara
%%--------------------------------------------------------------------
-
-
-nopara_norm(doc) -> ["Checks #define with no parameters."];
-nopara_norm(suite) -> [];
+%% Checks #define with no parameters.
nopara_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(nopara_norm),
File = filename:join(DataDir, nopara),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% predef
%%--------------------------------------------------------------------
-
-
-predef_norm(doc) -> ["Checks predefined macros. Note: not __TIME__ and __DATE__."];
-predef_norm(suite) -> [];
+%% Checks predefined macros. Note: not __TIME__ and __DATE__.
predef_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(predef_norm),
File = filename:join(DataDir, predef),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% predef_time
%%--------------------------------------------------------------------
-
-
-predef_time_norm(doc) -> ["Checks the predefined macros __TIME__ and __DATE__."];
-predef_time_norm(suite) -> [];
+%% Checks the predefined macros __TIME__ and __DATE__.
predef_time_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(predef_time_norm),
File = filename:join(DataDir, predef_time),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% self_ref
%%--------------------------------------------------------------------
-
-
-self_ref_norm(doc) -> ["Checks self referring macros."];
-self_ref_norm(suite) -> [];
+%% Checks self referring macros.
self_ref_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(self_ref_norm),
File = filename:join(DataDir, self_ref),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% separate
%%--------------------------------------------------------------------
-
-
-separate_norm(doc) -> ["Checks separete expansion of macro arguments."];
-separate_norm(suite) -> [];
+%% Checks separete expansion of macro arguments.
separate_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(separate_norm),
File = filename:join(DataDir, separate),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% swallow_sc
%%--------------------------------------------------------------------
-
-
-swallow_sc_norm(doc) -> ["Checks swallowing an undesirable semicolon."];
-swallow_sc_norm(suite) -> [];
+%% Checks swallowing an undesirable semicolon.
swallow_sc_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(swallow_sc_norm),
File = filename:join(DataDir, swallow_sc),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
%%--------------------------------------------------------------------
%% unintended_grp
%%--------------------------------------------------------------------
-
-
-unintended_grp_norm(doc) -> ["Checks unintended grouping of arithmetic."];
-unintended_grp_norm(suite) -> [];
+%% Checks unintended grouping of arithmetic.
unintended_grp_norm(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
_OutDir = ?OUT(unintended_grp_norm),
File = filename:join(DataDir, unintended_grp),
- ?line ok = test_file(File, DataDir),
+ ok = test_file(File, DataDir),
ok.
-
-
-
test_file(FileT, DataDir) ->
case test_file_1(FileT, DataDir) of
ok -> ok;
@@ -441,39 +387,39 @@ test_file_1(FileT, DataDir) ->
FileName = lists:last(Tok),
File = FileT++".idl",
- ?line test_server:format("File ~p~n",[File]),
- ?line test_server:format("FileName ~p~n",[FileName]),
+ test_server:format("File ~p~n",[File]),
+ test_server:format("FileName ~p~n",[FileName]),
Flags = "-I"++DataDir,
- ?line test_server:format("Flags ~p~n",[Flags]),
+ test_server:format("Flags ~p~n",[Flags]),
- ?line Erl = pp_erl(File, Flags),
- ?line Gcc = pp_gcc(File, Flags),
+ Erl = pp_erl(File, Flags),
+ Gcc = pp_gcc(File, Flags),
- ?line case Erl of
+ case Erl of
{error,_ErlError} ->
- ?line test_server:format("Internal_pp Result ~n==================~n~p~n~n",[Erl]);
+ test_server:format("Internal_pp Result ~n==================~n~p~n~n",[Erl]);
{warning, _ErlWar} ->
- ?line test_server:format("Internal_pp Result ~n==================~n~p~n~n",[Erl]);
+ test_server:format("Internal_pp Result ~n==================~n~p~n~n",[Erl]);
_ ->
- ?line test_server:format("Internal_pp Result ~n==================~n~s~n~n",[Erl])
+ test_server:format("Internal_pp Result ~n==================~n~s~n~n",[Erl])
end,
- ?line case Gcc of
+ case Gcc of
{error,GccError} ->
Error = string:tokens(GccError, "\n"),
- ?line test_server:format(?GCC" Result ~n==========~n~p~n~n",
+ test_server:format(?GCC" Result ~n==========~n~p~n~n",
[Error]);
_ ->
- ?line test_server:format(?GCC" Result ~n==========~n~s~n~n",[Gcc])
+ test_server:format(?GCC" Result ~n==========~n~s~n~n",[Gcc])
end,
- ?line case {Erl,Gcc} of
+ case {Erl,Gcc} of
{{warning,W}, {error,X}} ->
- ?line case is_ok(W,X) of
+ case is_ok(W,X) of
yes ->
ok;
no ->
@@ -487,7 +433,7 @@ test_file_1(FileT, DataDir) ->
"Internal_pp found the following Warning = ~p~n",[W]);
{{error,E}, {error,X}} ->
- ?line case is_ok(E,X) of
+ case is_ok(E,X) of
yes ->
ok;
no ->
@@ -496,9 +442,9 @@ test_file_1(FileT, DataDir) ->
end;
{{error,E}, _} ->
- ?line case FileName of
+ case FileName of
"if" ->
- ?line case if_res(E) of
+ case if_res(E) of
ok ->
ok;
_ ->
@@ -516,18 +462,18 @@ test_file_1(FileT, DataDir) ->
_ ->
- ?line file:write_file("/tmp/Erl.pp",list_to_binary(Erl)),
- ?line file:write_file("/tmp/Gcc.pp",list_to_binary(Gcc)),
+ file:write_file("/tmp/Erl.pp",list_to_binary(Erl)),
+ file:write_file("/tmp/Gcc.pp",list_to_binary(Gcc)),
- ?line Res = os:cmd("diff -b -w /tmp/Erl.pp /tmp/Gcc.pp"),
- ?line test_server:format("///////////{error,E} E ~p FileName~p~n",[Res,FileName]),
- ?line case {Res, FileName} of
+ Res = os:cmd("diff -b -w /tmp/Erl.pp /tmp/Gcc.pp"),
+ test_server:format("///////////{error,E} E ~p FileName~p~n",[Res,FileName]),
+ case {Res, FileName} of
{[], _} ->
- ?line test_server:format("Diff = [] OK!!!!!!~n"),
+ test_server:format("Diff = [] OK!!!!!!~n"),
ok;
{_, "predef_time"} ->
Tokens = string:tokens(Res,"\n"),
- ?line test_server:format("///////////{error,E} Tokens~p~n",[Tokens]),
+ test_server:format("///////////{error,E} Tokens~p~n",[Tokens]),
case Tokens of
["3c3",_,"---",_,"5c5",_,"---",_,"9c9",_,"---",_] ->
ok;
diff --git a/lib/ic/test/ic_pragma_SUITE.erl b/lib/ic/test/ic_pragma_SUITE.erl
index 61becf74bf..bb95e59109 100644
--- a/lib/ic/test/ic_pragma_SUITE.erl
+++ b/lib/ic/test/ic_pragma_SUITE.erl
@@ -47,7 +47,7 @@
end).
%% Standard options to the ic compiler, NOTE unholy use of OutDir
--define(OUT(X), filename:join([?config(priv_dir, Config), gen, to_list(X)])).
+-define(OUT(X), filename:join([proplists:get_value(priv_dir, Config), gen, to_list(X)])).
%%-----------------------------------------------------------------
@@ -105,23 +105,21 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% Test Case: IFR registration with pragmas
%%-----------------------------------------------------------------
-ifr_pragma_reg(doc) ->
- ["Checks that IFR object is correctly registered under pragma engagement."];
-ifr_pragma_reg(suite) -> [];
+%% Checks that IFR object is correctly registered under pragma engagement.
ifr_pragma_reg(Config) when is_list(Config) ->
?REMAP_EXCEPT(ifr_pragma_reg_run(Config)).
ifr_pragma_reg_run(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(ifr_pragma_reg),
File0 = filename:join(DataDir, reg_m0),
- ?line ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = compile(OutDir, ifr_pragma_files()),
+ ok = compile(OutDir, ifr_pragma_files()),
code:add_pathz(OutDir),
%% OE_register for all files
- ?line ok = 'oe_reg_m0':'oe_register'(),
+ ok = 'oe_reg_m0':'oe_register'(),
%% Pragma registration test
OE_IFR = orber_ifr:find_repository(),
@@ -132,7 +130,7 @@ ifr_pragma_reg_run(Config) ->
check_pragma_effect(OE_IFR,"IDL:P1/M2/T4:2.4"),
%% OE_unregister for all files
- ?line ok = 'oe_reg_m0':'oe_unregister'(),
+ ok = 'oe_reg_m0':'oe_unregister'(),
code:del_path(OutDir),
ok.
@@ -157,14 +155,12 @@ check_pragma_effect(OE_IFR,ID) ->
%%-----------------------------------------------------------------
%% Test Case: Syntactical / Semantical error pragma definitions
%%-----------------------------------------------------------------
-pragma_error(doc) ->
- ["Finds errornous pragma definitions under compilation."];
-pragma_error(suite) -> [];
+%% Finds errornous pragma definitions under compilation.
pragma_error(Config) when is_list(Config) ->
?REMAP_EXCEPT(pragma_error_run(Config)).
pragma_error_run(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(pragma_error),
File1 = filename:join(DataDir, reg_m1),
File2 = filename:join(DataDir, reg_m2),
@@ -173,22 +169,22 @@ pragma_error_run(Config) ->
File5 = filename:join(DataDir, reg_m5),
File6 = filename:join(DataDir, reg_m6),
- ?line error = ic:gen(File1, stdopts(OutDir)++[{preproc_flags,
+ error = ic:gen(File1, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line error = ic:gen(File2, stdopts(OutDir)++[{preproc_flags,
+ error = ic:gen(File2, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line error = ic:gen(File3, stdopts(OutDir)++[{preproc_flags,
+ error = ic:gen(File3, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line error = ic:gen(File5, stdopts(OutDir)++[{preproc_flags,
+ error = ic:gen(File5, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line error = ic:gen(File6, stdopts(OutDir)++[{preproc_flags,
+ error = ic:gen(File6, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
ok.
@@ -198,25 +194,23 @@ pragma_error_run(Config) ->
%%-----------------------------------------------------------------
%% Test Case: IFR registration with realy uggly placed pragmas
%%-----------------------------------------------------------------
-uggly_pragmas(doc) ->
- ["Checks that IFR object is correctly registered under really uggly pragma engagement."];
-uggly_pragmas(suite) -> [];
+%% Checks that IFR object is correctly registered under really uggly pragma engagement.
uggly_pragmas(Config) when is_list(Config) ->
?REMAP_EXCEPT(uggly_pragmas_run(Config)).
uggly_pragmas_run(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(ifr_pragma_reg),
File0 = filename:join(DataDir, uggly),
- ?line ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = compile(OutDir, uggly_pragma_files()),
+ ok = compile(OutDir, uggly_pragma_files()),
code:add_pathz(OutDir),
%% OE_register for all files
- ?line ok = 'oe_uggly':'oe_register'(),
+ ok = 'oe_uggly':'oe_register'(),
%% Pragma registration test
OE_IFR = orber_ifr:find_repository(),
@@ -234,7 +228,7 @@ uggly_pragmas_run(Config) ->
check_pragma_effect(OE_IFR, "LOCAL:SomeLocalId:23"),
%% OE_unregister for all files
- ?line ok = 'oe_uggly':'oe_unregister'(),
+ ok = 'oe_uggly':'oe_unregister'(),
code:del_path(OutDir),
ok.
diff --git a/lib/ic/test/ic_register_SUITE.erl b/lib/ic/test/ic_register_SUITE.erl
index 5eb50202d7..69eb923f85 100644
--- a/lib/ic/test/ic_register_SUITE.erl
+++ b/lib/ic/test/ic_register_SUITE.erl
@@ -51,7 +51,7 @@
end).
%% Standard options to the ic compiler, NOTE unholy use of OutDir
--define(OUT(X), filename:join([?config(priv_dir, Config), gen, to_list(X)])).
+-define(OUT(X), filename:join([proplists:get_value(priv_dir, Config), gen, to_list(X)])).
%%-----------------------------------------------------------------
@@ -111,39 +111,37 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% Test Case: IFR type registration
%%-----------------------------------------------------------------
-ifr_reg_unreg(doc) ->
- ["Checks that the generated register/unregister "
- "code for the IFR is correct."];
-ifr_reg_unreg(suite) -> [];
+%% Checks that the generated register/unregister
+%% code for the IFR is correct.
ifr_reg_unreg(Config) when is_list(Config) ->
?REMAP_EXCEPT(ifr_reg_unregt_run(Config)).
ifr_reg_unregt_run(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(ifr_reg_unreg),
File0 = filename:join(DataDir, reg_m8),
File1 = filename:join(DataDir, reg_m9),
File2 = filename:join(DataDir, reg_m10),
- ?line ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File0, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File0, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = compile(OutDir, ifr_reg_unreg_files()),
+ ok = compile(OutDir, ifr_reg_unreg_files()),
code:add_pathz(OutDir),
- ?line ok = 'oe_reg_m8':'oe_register'(),
- ?line ok = 'oe_reg_m9':'oe_register'(),
- ?line ok = 'oe_reg_m10':'oe_register'(),
- ?line ok = 'oe_reg_m10':'oe_unregister'(),
- ?line ok = 'oe_reg_m9':'oe_unregister'(),
- ?line ok = 'oe_reg_m8':'oe_unregister'(),
+ ok = 'oe_reg_m8':'oe_register'(),
+ ok = 'oe_reg_m9':'oe_register'(),
+ ok = 'oe_reg_m10':'oe_register'(),
+ ok = 'oe_reg_m10':'oe_unregister'(),
+ ok = 'oe_reg_m9':'oe_unregister'(),
+ ok = 'oe_reg_m8':'oe_unregister'(),
code:del_path(OutDir),
ok.
@@ -155,58 +153,56 @@ ifr_reg_unreg_files() -> ['oe_reg_m8', 'oe_reg_m9', 'oe_reg_m10'].
%% Test Case: IFR registration when object inheritence
%% is applied and registered.
%%-----------------------------------------------------------------
-ifr_reg_unreg_with_inheritence(doc) ->
- ["Checks that the generated register/unregister "
- "code for the IFR is correct, and works even when"
- "the object inheritence is registered. This fixes"
- "two bugs in ifr that caused crash when trying to"
- "use OE_register/OE_unregister in a sequence of"
- "compiled files that contained interfaces who"
- "inherited others in sequence."];
-ifr_reg_unreg_with_inheritence(suite) -> [];
+%% Checks that the generated register/unregister
+%% code for the IFR is correct, and works even when
+%% the object inheritence is registered. This fixes
+%% two bugs in ifr that caused crash when trying to
+%% use OE_register/OE_unregister in a sequence of
+%% compiled files that contained interfaces who
+%% inherited others in sequence.
ifr_reg_unreg_with_inheritence(Config) when is_list(Config) ->
?REMAP_EXCEPT(ifr_reg_unreg_with_inheritence_run(Config)).
ifr_reg_unreg_with_inheritence_run(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(ifr_reg_unreg),
File0 = filename:join(DataDir, reg_m8),
File1 = filename:join(DataDir, reg_m9),
File2 = filename:join(DataDir, reg_m10),
File3 = filename:join(DataDir, reg_m11),
File4 = filename:join(DataDir, reg_m12),
- ?line ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File0, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File0, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = ic:gen(File3, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File3, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File3, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File3, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File4, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File4, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = compile(OutDir, ifr_reg_unreg_with_inheritence_files()),
+ ok = compile(OutDir, ifr_reg_unreg_with_inheritence_files()),
code:add_pathz(OutDir),
- ?line ok = 'oe_reg_m8':'oe_register'(),
- ?line ok = 'oe_reg_m9':'oe_register'(),
- ?line ok = 'oe_reg_m10':'oe_register'(),
- ?line ok = 'oe_reg_m11':'oe_register'(),
- ?line ok = 'oe_reg_m12':'oe_register'(),
- ?line ok = 'oe_reg_m8':'oe_unregister'(),
- ?line ok = 'oe_reg_m9':'oe_unregister'(),
- ?line ok = 'oe_reg_m10':'oe_unregister'(),
- ?line ok = 'oe_reg_m11':'oe_unregister'(),
- ?line ok = 'oe_reg_m12':'oe_unregister'(),
+ ok = 'oe_reg_m8':'oe_register'(),
+ ok = 'oe_reg_m9':'oe_register'(),
+ ok = 'oe_reg_m10':'oe_register'(),
+ ok = 'oe_reg_m11':'oe_register'(),
+ ok = 'oe_reg_m12':'oe_register'(),
+ ok = 'oe_reg_m8':'oe_unregister'(),
+ ok = 'oe_reg_m9':'oe_unregister'(),
+ ok = 'oe_reg_m10':'oe_unregister'(),
+ ok = 'oe_reg_m11':'oe_unregister'(),
+ ok = 'oe_reg_m12':'oe_unregister'(),
code:del_path(OutDir),
ok.
@@ -224,35 +220,28 @@ ifr_reg_unreg_with_inheritence_files() ->
%% are not allready registered when the current
%% object is getting registered.
%%-----------------------------------------------------------------
-ifr_reg_unreg_with_inheritence_bad_order(doc) ->
- ["This tests that ifr registration is done with
- the right write order."
- "Modules included and used from an ifr object"
- "are tested if allready registered when the "
- "current object is getting registered."];
-ifr_reg_unreg_with_inheritence_bad_order(suite) -> [];
ifr_reg_unreg_with_inheritence_bad_order(Config) when is_list(Config) ->
?REMAP_EXCEPT(ifr_reg_unreg_with_inheritence_bad_order_run(Config)).
ifr_reg_unreg_with_inheritence_bad_order_run(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(ifr_reg_unreg),
File1 = filename:join(DataDir, reg_m9),
File2 = filename:join(DataDir, reg_m10),
File4 = filename:join(DataDir, reg_m12),
- ?line ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File4, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File4, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = compile(OutDir, ifr_reg_unreg_with_inheritence_files()),
+ ok = compile(OutDir, ifr_reg_unreg_with_inheritence_files()),
code:add_pathz(OutDir),
case catch 'oe_reg_m12':'oe_register'() of
{'EXIT',Reason1} ->
@@ -261,7 +250,7 @@ ifr_reg_unreg_with_inheritence_bad_order_run(Config) ->
_ ->
test_server:fail("Failed to detect object missing : IDL:M1:1.0~n")
end,
- ?line ok = 'oe_reg_m9':'oe_register'(),
+ ok = 'oe_reg_m9':'oe_register'(),
case catch 'oe_reg_m10':'oe_register'() of
{'EXIT',Reason2} ->
io:format("IFR object missing detected : ~p~n",[Reason2]),
@@ -269,75 +258,70 @@ ifr_reg_unreg_with_inheritence_bad_order_run(Config) ->
_ ->
test_server:fail("Failed to detect object missing : IDL:M0:1.0~n")
end,
- ?line ok = 'oe_reg_m9':'oe_unregister'(),
+ ok = 'oe_reg_m9':'oe_unregister'(),
code:del_path(OutDir),
ok.
-
-
%%-----------------------------------------------------------------
-%% Test Case: IFR registration with inheritence
+%% Test Case: IFR registration with inheritence is correctly registered
%%-----------------------------------------------------------------
-ifr_inheritence_reg(doc) ->
- ["Checks that IFR object inheritence is correctly registered."];
-ifr_inheritence_reg(suite) -> [];
ifr_inheritence_reg(Config) when is_list(Config) ->
?REMAP_EXCEPT(ifr_inh_reg_run(Config)).
ifr_inh_reg_run(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OutDir = ?OUT(ifr_reg_unreg),
File0 = filename:join(DataDir, reg_m8),
File1 = filename:join(DataDir, reg_m9),
File2 = filename:join(DataDir, reg_m10),
File3 = filename:join(DataDir, reg_m11),
File4 = filename:join(DataDir, reg_m12),
- ?line ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File0, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File0, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File0, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File1, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File1, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File2, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File2, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = ic:gen(File3, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File3, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File3, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File3, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags,
+ ok = ic:gen(File4, stdopts(OutDir)++[{preproc_flags,
"-I" ++ DataDir}] ),
- ?line {ok, []} = ic:gen(File4, stdopts(OutDir)++[silent2, {preproc_flags,
+ {ok, []} = ic:gen(File4, stdopts(OutDir)++[silent2, {preproc_flags,
"-I" ++ DataDir}]),
- ?line ok = compile(OutDir, ifr_reg_unreg_with_inheritence_files()),
+ ok = compile(OutDir, ifr_reg_unreg_with_inheritence_files()),
code:add_pathz(OutDir),
%% OE_register for all files
- ?line ok = 'oe_reg_m8':'oe_register'(),
- ?line ok = 'oe_reg_m9':'oe_register'(),
- ?line ok = 'oe_reg_m10':'oe_register'(),
- ?line ok = 'oe_reg_m11':'oe_register'(),
- ?line ok = 'oe_reg_m12':'oe_register'(),
+ ok = 'oe_reg_m8':'oe_register'(),
+ ok = 'oe_reg_m9':'oe_register'(),
+ ok = 'oe_reg_m10':'oe_register'(),
+ ok = 'oe_reg_m11':'oe_register'(),
+ ok = 'oe_reg_m12':'oe_register'(),
%% Inheritence registration test
OE_IFR = orber_ifr:find_repository(),
%% Interfaces that not inherit from other interfaces
- ?line [] = get_inh(OE_IFR, "IDL:m0/i0:1.0"),
- ?line [] = get_inh(OE_IFR, "IDL:m1/i1:1.0"),
- ?line [] = get_inh(OE_IFR, "IDL:m3/i3:1.0"),
+ [] = get_inh(OE_IFR, "IDL:m0/i0:1.0"),
+ [] = get_inh(OE_IFR, "IDL:m1/i1:1.0"),
+ [] = get_inh(OE_IFR, "IDL:m3/i3:1.0"),
%% Interfaces that inherit from other interfaces
- ?line ["IDL:m1/i1:1.0"] = get_inh(OE_IFR, "IDL:m2/i2:1.0"),
- ?line ["IDL:m1/i1:1.0","IDL:m2/i2:1.0"] = get_inh(OE_IFR, "IDL:m4/i4:1.0"),
- ?line ["IDL:m3/i3:1.0"] = get_inh(OE_IFR, "IDL:m4/i5:1.0"),
+ ["IDL:m1/i1:1.0"] = get_inh(OE_IFR, "IDL:m2/i2:1.0"),
+ ["IDL:m1/i1:1.0","IDL:m2/i2:1.0"] = get_inh(OE_IFR, "IDL:m4/i4:1.0"),
+ ["IDL:m3/i3:1.0"] = get_inh(OE_IFR, "IDL:m4/i5:1.0"),
%% OE_unregister for all files
- ?line ok = 'oe_reg_m8':'oe_unregister'(),
- ?line ok = 'oe_reg_m9':'oe_unregister'(),
- ?line ok = 'oe_reg_m10':'oe_unregister'(),
- ?line ok = 'oe_reg_m11':'oe_unregister'(),
- ?line ok = 'oe_reg_m12':'oe_unregister'(),
+ ok = 'oe_reg_m8':'oe_unregister'(),
+ ok = 'oe_reg_m9':'oe_unregister'(),
+ ok = 'oe_reg_m10':'oe_unregister'(),
+ ok = 'oe_reg_m11':'oe_unregister'(),
+ ok = 'oe_reg_m12':'oe_unregister'(),
code:del_path(OutDir),
ok.
diff --git a/lib/ic/test/java_client_erl_server_SUITE.erl b/lib/ic/test/java_client_erl_server_SUITE.erl
index 50ea3f43ca..9fe52249ba 100644
--- a/lib/ic/test/java_client_erl_server_SUITE.erl
+++ b/lib/ic/test/java_client_erl_server_SUITE.erl
@@ -99,7 +99,7 @@ end_per_suite(Config) -> Config.
%% Add/remove code path and watchdog before/after each test case.
%%
init_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
code:add_patha(DataDir),
%% Since other test suites use the module m_i et,al, we have
@@ -115,9 +115,9 @@ init_per_testcase(_Case, Config) ->
[{watchdog, WatchDog}| Config].
end_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
code:del_path(DataDir),
- WatchDog = ?config(watchdog, Config),
+ WatchDog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(WatchDog).
@@ -126,127 +126,104 @@ end_per_testcase(_Case, Config) ->
%%
%% Test cases
-marshal_ll(doc) ->
- ["Testing marshalling of IDL long long"];
-marshal_ll(suite) -> [];
+%% Testing marshalling of IDL long long
marshal_ll(Config) when is_list(Config) ->
- ?line DataDir = ?config(data_dir, Config),
- ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_ll}),
- ?line ok = java(?config(java, Config), DataDir, "JavaClient",
+ DataDir = proplists:get_value(data_dir, Config),
+ {ok,Server} = m_i:oe_create_link([], {local,marshal_ll}),
+ ok = java(proplists:get_value(java, Config), DataDir, "JavaClient",
["JavaClient",node(),erlang:get_cookie(),marshal_ll]),
- ?line ok = m_i:stop(Server),
+ ok = m_i:stop(Server),
ok.
-marshal_ull(doc) ->
- ["Testing marshalling of IDL unsigned long long"];
-marshal_ull(suite) -> [];
+%% Testing marshalling of IDL unsigned long long
marshal_ull(Config) when is_list(Config) ->
- ?line DataDir = ?config(data_dir, Config),
- ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_ull}),
- ?line ok = java(?config(java, Config), DataDir, "JavaClient",
+ DataDir = proplists:get_value(data_dir, Config),
+ {ok,Server} = m_i:oe_create_link([], {local,marshal_ull}),
+ ok = java(proplists:get_value(java, Config), DataDir, "JavaClient",
["JavaClient",node(),erlang:get_cookie(),marshal_ull]),
- ?line ok = m_i:stop(Server),
+ ok = m_i:stop(Server),
ok.
-marshal_l(doc) ->
- ["Testing marshalling of IDL long"];
-marshal_l(suite) -> [];
+%% Testing marshalling of IDL long
marshal_l(Config) when is_list(Config) ->
- ?line DataDir = ?config(data_dir, Config),
- ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_l}),
- ?line ok = java(?config(java, Config), DataDir, "JavaClient",
+ DataDir = proplists:get_value(data_dir, Config),
+ {ok,Server} = m_i:oe_create_link([], {local,marshal_l}),
+ ok = java(proplists:get_value(java, Config), DataDir, "JavaClient",
["JavaClient",node(),erlang:get_cookie(),marshal_l]),
- ?line ok = m_i:stop(Server),
+ ok = m_i:stop(Server),
ok.
-marshal_ul(doc) ->
- ["Testing marshalling of IDL unsigned long"];
-marshal_ul(suite) -> [];
+%% Testing marshalling of IDL unsigned long
marshal_ul(Config) when is_list(Config) ->
- ?line DataDir = ?config(data_dir, Config),
- ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_ul}),
- ?line ok = java(?config(java, Config), DataDir, "JavaClient",
+ DataDir = proplists:get_value(data_dir, Config),
+ {ok,Server} = m_i:oe_create_link([], {local,marshal_ul}),
+ ok = java(proplists:get_value(java, Config), DataDir, "JavaClient",
["JavaClient",node(),erlang:get_cookie(),marshal_ul]),
- ?line ok = m_i:stop(Server),
+ ok = m_i:stop(Server),
ok.
-marshal_s(doc) ->
- ["Testing marshalling of IDL short"];
-marshal_s(suite) -> [];
+%% Testing marshalling of IDL short
marshal_s(Config) when is_list(Config) ->
- ?line DataDir = ?config(data_dir, Config),
- ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_s}),
- ?line ok = java(?config(java, Config), DataDir, "JavaClient",
+ DataDir = proplists:get_value(data_dir, Config),
+ {ok,Server} = m_i:oe_create_link([], {local,marshal_s}),
+ ok = java(proplists:get_value(java, Config), DataDir, "JavaClient",
["JavaClient",node(),erlang:get_cookie(),marshal_s]),
- ?line ok = m_i:stop(Server),
+ ok = m_i:stop(Server),
ok.
-marshal_us(doc) ->
- ["Testing marshalling of IDL unsigned short"];
-marshal_us(suite) -> [];
+%% Testing marshalling of IDL unsigned short
marshal_us(Config) when is_list(Config) ->
- ?line DataDir = ?config(data_dir, Config),
- ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_us}),
- ?line ok = java(?config(java, Config), DataDir, "JavaClient",
+ DataDir = proplists:get_value(data_dir, Config),
+ {ok,Server} = m_i:oe_create_link([], {local,marshal_us}),
+ ok = java(proplists:get_value(java, Config), DataDir, "JavaClient",
["JavaClient",node(),erlang:get_cookie(),marshal_us]),
- ?line ok = m_i:stop(Server),
+ ok = m_i:stop(Server),
ok.
-marshal_c(doc) ->
- ["Testing marshalling of IDL char"];
-marshal_c(suite) -> [];
+%% Testing marshalling of IDL char
marshal_c(Config) when is_list(Config) ->
- ?line DataDir = ?config(data_dir, Config),
- ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_c}),
- ?line ok = java(?config(java, Config), DataDir, "JavaClient",
+ DataDir = proplists:get_value(data_dir, Config),
+ {ok,Server} = m_i:oe_create_link([], {local,marshal_c}),
+ ok = java(proplists:get_value(java, Config), DataDir, "JavaClient",
["JavaClient",node(),erlang:get_cookie(),marshal_c]),
- ?line ok = m_i:stop(Server),
+ ok = m_i:stop(Server),
ok.
-marshal_wc(doc) ->
- ["Testing marshalling of IDL char"];
-marshal_wc(suite) -> [];
+%% Testing marshalling of IDL char
marshal_wc(Config) when is_list(Config) ->
- ?line DataDir = ?config(data_dir, Config),
- ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_wc}),
- ?line ok = java(?config(java, Config), DataDir, "JavaClient",
+ DataDir = proplists:get_value(data_dir, Config),
+ {ok,Server} = m_i:oe_create_link([], {local,marshal_wc}),
+ ok = java(proplists:get_value(java, Config), DataDir, "JavaClient",
["JavaClient",node(),erlang:get_cookie(),marshal_wc]),
- ?line ok = m_i:stop(Server),
+ ok = m_i:stop(Server),
ok.
-marshal_str(doc) ->
- ["Testing marshalling of IDL string"];
-marshal_str(suite) -> [];
+%% Testing marshalling of IDL string
marshal_str(Config) when is_list(Config) ->
- ?line DataDir = ?config(data_dir, Config),
- ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_str}),
- ?line ok = java(?config(java, Config), DataDir,
+ DataDir = proplists:get_value(data_dir, Config),
+ {ok,Server} = m_i:oe_create_link([], {local,marshal_str}),
+ ok = java(proplists:get_value(java, Config), DataDir,
%%% "-DOtpConnection.trace=4 "
"JavaClient",
["JavaClient",node(),erlang:get_cookie(),marshal_str]),
- ?line ok = m_i:stop(Server),
+ ok = m_i:stop(Server),
ok.
-marshal_any_3(doc) ->
- ["Testing marshalling of IDL any"];
-marshal_any_3(suite) -> [];
+%% Testing marshalling of IDL any
marshal_any_3(Config) when is_list(Config) ->
- ?line DataDir = ?config(data_dir, Config),
- ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_any_3}),
- ?line ok = java(?config(java, Config), DataDir, "JavaClient",
+ DataDir = proplists:get_value(data_dir, Config),
+ {ok,Server} = m_i:oe_create_link([], {local,marshal_any_3}),
+ ok = java(proplists:get_value(java, Config), DataDir, "JavaClient",
["JavaClient",node(),erlang:get_cookie(),marshal_any_3]),
- ?line ok = m_i:stop(Server),
+ ok = m_i:stop(Server),
ok.
-marshal_any_2(doc) ->
- ["Testing marshalling of IDL any"];
-marshal_any_2(suite) -> [];
marshal_any_2(Config) when is_list(Config) ->
- ?line DataDir = ?config(data_dir, Config),
- ?line {ok,Server} = m_i:oe_create_link([], {local,marshal_any_2}),
- ?line ok = java(?config(java, Config), DataDir, "JavaClient",
+ DataDir = proplists:get_value(data_dir, Config),
+ {ok,Server} = m_i:oe_create_link([], {local,marshal_any_2}),
+ ok = java(proplists:get_value(java, Config), DataDir, "JavaClient",
["JavaClient",node(),erlang:get_cookie(),marshal_any_2]),
- ?line ok = m_i:stop(Server),
+ ok = m_i:stop(Server),
ok.
%%--------------------------------------------------------------------
diff --git a/lib/ic/vsn.mk b/lib/ic/vsn.mk
index 272c306799..7d00ae0170 100644
--- a/lib/ic/vsn.mk
+++ b/lib/ic/vsn.mk
@@ -1 +1 @@
-IC_VSN = 4.4
+IC_VSN = 4.4.1
diff --git a/lib/inets/doc/src/mod_esi.xml b/lib/inets/doc/src/mod_esi.xml
index deef010e54..006fca1bdf 100644
--- a/lib/inets/doc/src/mod_esi.xml
+++ b/lib/inets/doc/src/mod_esi.xml
@@ -42,8 +42,7 @@
<taglist>
<tag><c>env() = </c></tag>
<item> <p><c>{EnvKey()::atom(), Value::term()}</c></p>
- </item>
-
+
<p>Currently supported key value pairs</p>
<taglist>
@@ -59,11 +58,12 @@
<tag><c>{server_protocol, string()}</c></tag>
<item><p> HTTP version, currently "HTTP/1.1"</p></item>
- <tag>{server_port, integer()}</tag>
+ <tag><c>{server_port, integer()}</c></tag>
<item><p>Servers port number.</p></item>
- <tag><c>{request_method, "GET | "PUT" | "DELETE | "POST" | "PATCH"}</c></tag>
-
+ <tag><c>{request_method, "GET | "PUT" | "DELETE" | "POST" | "PATCH"}</c></tag>
+ <item><p>HTTP request method.</p></item>
+
<tag><c>{remote_adress, inet:ip_address()} </c></tag>
<item><p>The clients ip address.</p></item>
@@ -81,94 +81,97 @@
<tag><c>{http_LowerCaseHTTPHeaderName, string()}</c></tag>
<item><p>example: {http_content_type, "text/html"}</p></item>
- </taglist>
-
+ </taglist>
+ </item>
</taglist>
+ </section>
- <funcs>
- <func>
- <name>deliver(SessionID, Data) -> ok | {error, Reason}</name>
- <fsummary>Sends <c>Data</c> back to client.</fsummary>
- <type>
+ <funcs>
+ <func>
+ <name>deliver(SessionID, Data) -> ok | {error, Reason}</name>
+ <fsummary>Sends <c>Data</c> back to client.</fsummary>
+ <type>
<v>SessionID = term()</v>
<v>Data = string() | io_list() | binary()</v>
<v>Reason = term()</v>
- </type>
- <desc>
- <marker id="deliver"></marker>
- <p>This function is <em>only</em> intended to be used from
- functions called by the Erl Scheme interface to deliver
- parts of the content to the user.</p>
- <p>Sends data from an Erl Scheme script back to the client.</p>
+ </type>
+ <desc>
+ <marker id="deliver"></marker>
+ <p>This function is <em>only</em> intended to be used from
+ functions called by the Erl Scheme interface to deliver
+ parts of the content to the user.</p>
+ <p>Sends data from an Erl Scheme script back to the client.</p>
- <note>
- <p>If any HTTP header fields are added by the
- script, they must be in the first call to <c>deliver/2</c>,
- and the data in the call must be a string. Calls after the headers
- are complete can contain binary data to reduce copying
- overhead. Do not assume anything about the data type of
- <c>SessionID</c>. <c>SessionID</c> must be the value given
- as input to the ESI callback function that you implemented.</p>
- </note>
- </desc>
- </func>
- </funcs>
- </section>
- <section>
- <title>ESI Callback Functions</title>
- </section>
- <funcs>
- <func>
- <name>Module:Function(SessionID, Env, Input)-> _ </name>
- <fsummary>Creates a dynamic web page and returns it chunk by chunk
- to the server process by calling <c>mod_esi:deliver/2</c>.</fsummary>
- <type>
- <v>SessionID = term()</v>
- <v>Env = env()</v>
- <v>Input = string()</v>
- </type>
+ <note>
+ <p>If any HTTP header fields are added by the
+ script, they must be in the first call to <c>deliver/2</c>,
+ and the data in the call must be a string. Calls after the headers
+ are complete can contain binary data to reduce copying
+ overhead. Do not assume anything about the data type of
+ <c>SessionID</c>. <c>SessionID</c> must be the value given
+ as input to the ESI callback function that you implemented.</p>
+ </note>
+ </desc>
+ </func>
+ </funcs>
+
+ <section>
+ <title>ESI Callback Functions</title>
+ </section>
+
+ <funcs>
+ <func>
+ <name>Module:Function(SessionID, Env, Input)-> _ </name>
+ <fsummary>Creates a dynamic web page and returns it chunk by chunk
+ to the server process by calling <c>mod_esi:deliver/2</c>.</fsummary>
+ <type>
+ <v>SessionID = term()</v>
+ <v>Env = env()</v>
+ <v>Input = string()</v>
+ </type>
<desc>
<p><c>Module</c> must be found in the code path and export
- <c>Function</c> with an arity of three. An <c>erlScriptAlias</c> must
- also be set up in the configuration file for the web server.</p>
+ <c>Function</c> with an arity of three. An <c>erlScriptAlias</c> must
+ also be set up in the configuration file for the web server.</p>
<p>If the HTTP request is a 'post' request and a body is sent,
- <c>content_length</c> is the length of the posted
- data. If 'get' is used, <c>query_string</c> is the data after
- <em>?</em> in the URL.</p>
+ <c>content_length</c> is the length of the posted
+ data. If 'get' is used, <c>query_string</c> is the data after
+ <em>?</em> in the URL.</p>
<p><c>ParsedHeader</c> is the HTTP request as a key-value tuple
- list. The keys in <c>ParsedHeader</c> are in lower case.</p>
+ list. The keys in <c>ParsedHeader</c> are in lower case.</p>
<p><c>SessionID</c> is an identifier
- the server uses when <c>deliver/2</c> is called. Do not
- assume anything about the datatype.</p>
+ the server uses when <c>deliver/2</c> is called. Do not
+ assume anything about the datatype.</p>
<p>Use this callback function to generate dynamic web
- content dynamically. When a part of the page is generated, send the
- data back to the client through <c>deliver/2</c>. Notice
- that the first chunk of data sent to the client must at
- least contain all HTTP header fields that the response
- will generate. If the first chunk does not contain the
- <em>end of HTTP header</em>, that is, <c>"\r\n\r\n",</c>
- the server assumes that no HTTP header fields will be generated.</p>
+ content dynamically. When a part of the page is generated, send the
+ data back to the client through <c>deliver/2</c>. Notice
+ that the first chunk of data sent to the client must at
+ least contain all HTTP header fields that the response
+ will generate. If the first chunk does not contain the
+ <em>end of HTTP header</em>, that is, <c>"\r\n\r\n",</c>
+ the server assumes that no HTTP header fields will be generated.</p>
</desc>
- </func>
- <func>
- <name>Module:Function(Env, Input)-> Response </name>
- <fsummary>Creates a dynamic web page and returns it as a list.
- This function is deprecated and is only kept for backwards compatibility.</fsummary>
- <type>
- <v>Env = env()</v>
- <v>Input = string()</v>
- <v>Response = string()</v>
- </type>
+ </func>
+
+ <func>
+ <name>Module:Function(Env, Input)-> Response </name>
+ <fsummary>Creates a dynamic web page and returns it as a list.
+ This function is deprecated and is only kept for backwards compatibility.</fsummary>
+ <type>
+ <v>Env = env()</v>
+ <v>Input = string()</v>
+ <v>Response = string()</v>
+ </type>
<desc>
<p>This callback format consumes much memory, as the
- whole response must be generated before it is sent to the
- user. This function is deprecated and is only kept for backwards
- compatibility.
- For new development, use <c>Module:Function/3</c>.</p>
+ whole response must be generated before it is sent to the
+ user. This function is deprecated and is only kept for backwards
+ compatibility.
+ For new development, use <c>Module:Function/3</c>.</p>
</desc>
- </func>
- </funcs>
-
+ </func>
+ </funcs>
+
</erlref>
diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml
index ab2cc5ab21..caa5a083a3 100644
--- a/lib/inets/doc/src/notes.xml
+++ b/lib/inets/doc/src/notes.xml
@@ -33,7 +33,90 @@
<file>notes.xml</file>
</header>
- <section><title>Inets 6.2.4</title>
+ <section><title>Inets 6.3.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ PUT and DELETE support has been added to mod_esi</p>
+ <p>
+ Own Id: OTP-13688 Aux Id: seq13149 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 6.3.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ A debug message was accidently left enabled in the ftp
+ client.</p>
+ <p>
+ Own Id: OTP-13712 Aux Id: seq13143 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 6.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Ftp client fixes: 1) Corrected a bug that the ftp client
+ gen_server crashed if the listening data socket was
+ closed.</p>
+ <p>
+ 2) Corrections of ftp client error codes so they are as
+ defined in the reference manual</p>
+ <p>
+ Own Id: OTP-13644</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> Remove usage of erlang:now(). </p>
+ <p>
+ Own Id: OTP-12441</p>
+ </item>
+ <item>
+ <p> Add handling of DELETE Body to http client. </p>
+ <p>
+ Own Id: OTP-13383 Aux Id: PR-972 </p>
+ </item>
+ <item>
+ <p>
+ Removed references to mod_include and webtool from
+ examples and tests.</p>
+ <p>
+ Own Id: OTP-13445 Aux Id: PR-988 </p>
+ </item>
+ <item>
+ <p>
+ Remove module inets_regexp. Module re should be used
+ instead.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-13561</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 6.2.4</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl
index bbf25f8e90..8bad91bf98 100644
--- a/lib/inets/src/ftp/ftp.erl
+++ b/lib/inets/src/ftp/ftp.erl
@@ -106,8 +106,8 @@
-type common_reason() :: 'econn' | 'eclosed' | term().
-type file_write_error_reason() :: term(). % See file:write for more info
-%%-define(DBG(F,A), 'n/a').
--define(DBG(F,A), io:format(F,A)).
+-define(DBG(F,A), 'n/a').
+%%-define(DBG(F,A), io:format(F,A)).
%%%=========================================================================
%%% API - CLIENT FUNCTIONS
@@ -2099,7 +2099,7 @@ handle_ctrl_result({pos_prel, _}, #state{caller = {transfer_data, Bin}}
%%--------------------------------------------------------------------------
%% Default
-handle_ctrl_result({Status, Lines}, #state{client = From} = State)
+handle_ctrl_result({Status, _Lines}, #state{client = From} = State)
when From =/= undefined ->
ctrl_result_response(Status, State, {error, Status}).
diff --git a/lib/inets/src/http_server/httpd_conf.erl b/lib/inets/src/http_server/httpd_conf.erl
index e5182ca23c..9e54f2b2c5 100644
--- a/lib/inets/src/http_server/httpd_conf.erl
+++ b/lib/inets/src/http_server/httpd_conf.erl
@@ -395,7 +395,8 @@ validate_properties(Properties) ->
%% That is, if property A depends on property B.
%% The only sunch preperty at this time is bind_address that depends
%% on ipfamily.
-validate_properties2(Properties) ->
+validate_properties2(Properties0) ->
+ Properties = fix_ipfamily(Properties0),
case proplists:get_value(bind_address, Properties) of
undefined ->
case proplists:get_value(sock_type, Properties, ip_comm) of
@@ -422,6 +423,15 @@ validate_properties2(Properties) ->
end
end.
+fix_ipfamily(Properties) ->
+ case proplists:get_value(ipfamily, Properties) of
+ undefined ->
+ Properties;
+ IpFamily ->
+ NewProps = proplists:delete(ipfamily, Properties),
+ [{ipfamily, validate_ipfamily(IpFamily)} | NewProps]
+ end.
+
add_inet_defaults(Properties) ->
case proplists:get_value(ipfamily, Properties) of
undefined ->
diff --git a/lib/inets/src/http_server/httpd_example.erl b/lib/inets/src/http_server/httpd_example.erl
index 424d269859..c893b10dca 100644
--- a/lib/inets/src/http_server/httpd_example.erl
+++ b/lib/inets/src/http_server/httpd_example.erl
@@ -20,7 +20,7 @@
%%
-module(httpd_example).
-export([print/1]).
--export([get/2, post/2, yahoo/2, test1/2, get_bin/2, peer/2]).
+-export([get/2, put/2, post/2, yahoo/2, test1/2, get_bin/2, peer/2]).
-export([newformat/3]).
%% These are used by the inets test-suite
@@ -59,6 +59,11 @@ get(_Env,[]) ->
get(Env,Input) ->
default(Env,Input).
+put(Env,{Input,_Body}) ->
+ default(Env,Input);
+put(Env,Input) ->
+ default(Env,Input).
+
get_bin(_Env,_Input) ->
[list_to_binary(header()),
list_to_binary(top("GET Example")),
@@ -94,7 +99,7 @@ default(Env,Input) ->
io_lib:format("~p",[httpd:parse_query(Input)]),"\n",
footer()].
-peer(Env, Input) ->
+peer(Env, _Input) ->
Header =
case proplists:get_value(peer_cert, Env) of
undefined ->
@@ -161,7 +166,7 @@ sleep(T) -> receive after T -> ok end.
%% ------------------------------------------------------
-chunk_timeout(SessionID, _, StrInt) ->
+chunk_timeout(SessionID, _, _StrInt) ->
mod_esi:deliver(SessionID, "Tranfer-Encoding:chunked/html\r\n\r\n"),
mod_esi:deliver(SessionID, top("Test chunk encoding timeout")),
timer:sleep(20000),
diff --git a/lib/inets/src/http_server/mod_esi.erl b/lib/inets/src/http_server/mod_esi.erl
index 2800250727..b21af1418c 100644
--- a/lib/inets/src/http_server/mod_esi.erl
+++ b/lib/inets/src/http_server/mod_esi.erl
@@ -241,7 +241,7 @@ alias_match_str(Alias, eval_script_alias) ->
%%------------------------ Erl mechanism --------------------------------
erl(#mod{method = Method} = ModData, ESIBody, Modules)
- when (Method =:= "GET") orelse (Method =:= "HEAD") ->
+ when (Method =:= "GET") orelse (Method =:= "HEAD") orelse (Method =:= "DELETE") ->
?hdrt("erl", [{method, Method}]),
case httpd_util:split(ESIBody,":|%3A|/",2) of
{ok, [ModuleName, FuncAndInput]} ->
@@ -264,35 +264,32 @@ erl(#mod{method = Method} = ModData, ESIBody, Modules)
{proceed, [{status,{400, none, BadRequest}} | ModData#mod.data]}
end;
-erl(#mod{request_uri = ReqUri,
- method = "PUT",
- http_version = Version,
- data = Data}, _ESIBody, _Modules) ->
- ?hdrt("erl", [{method, put}]),
- {proceed, [{status,{501,{"PUT", ReqUri, Version},
- ?NICE("Erl mechanism doesn't support method PUT")}}|
- Data]};
-
-erl(#mod{request_uri = ReqUri,
- method = "DELETE",
- http_version = Version,
- data = Data}, _ESIBody, _Modules) ->
- ?hdrt("erl", [{method, delete}]),
- {proceed,[{status,{501,{"DELETE", ReqUri, Version},
- ?NICE("Erl mechanism doesn't support method DELETE")}}|
- Data]};
-
-erl(#mod{request_uri = ReqUri,
- method = "PATCH",
- http_version = Version,
- data = Data}, _ESIBody, _Modules) ->
- ?hdrt("erl", [{method, patch}]),
- {proceed, [{status,{501,{"PATCH", ReqUri, Version},
- ?NICE("Erl mechanism doesn't support method PATCH")}}|
- Data]};
+erl(#mod{method = "PUT", entity_body = Body} = ModData,
+ ESIBody, Modules) ->
+ case httpd_util:split(ESIBody,":|%3A|/",2) of
+ {ok, [ModuleName, FuncAndInput]} ->
+ case httpd_util:split(FuncAndInput,"[\?/]",2) of
+ {ok, [FunctionName, Input]} ->
+ generate_webpage(ModData, ESIBody, Modules,
+ list_to_atom(ModuleName),
+ FunctionName, {Input,Body},
+ [{entity_body, Body} |
+ script_elements(FuncAndInput, Input)]);
+ {ok, [FunctionName]} ->
+ generate_webpage(ModData, ESIBody, Modules,
+ list_to_atom(ModuleName),
+ FunctionName, {undefined,Body},
+ [{entity_body, Body} |
+ script_elements(FuncAndInput, "")]);
+ {ok, BadRequest} ->
+ {proceed,[{status,{400,none, BadRequest}} |
+ ModData#mod.data]}
+ end;
+ {ok, BadRequest} ->
+ {proceed, [{status,{400, none, BadRequest}} | ModData#mod.data]}
+ end;
-erl(#mod{method = "POST",
- entity_body = Body} = ModData, ESIBody, Modules) ->
+erl(#mod{method = "POST", entity_body = Body} = ModData, ESIBody, Modules) ->
?hdrt("erl", [{method, post}]),
case httpd_util:split(ESIBody,":|%3A|/",2) of
{ok,[ModuleName, Function]} ->
@@ -301,7 +298,16 @@ erl(#mod{method = "POST",
Function, Body, [{entity_body, Body}]);
{ok, BadRequest} ->
{proceed,[{status, {400, none, BadRequest}} | ModData#mod.data]}
- end.
+ end;
+
+erl(#mod{request_uri = ReqUri,
+ method = "PATCH",
+ http_version = Version,
+ data = Data}, _ESIBody, _Modules) ->
+ ?hdrt("erl", [{method, patch}]),
+ {proceed, [{status,{501,{"PATCH", ReqUri, Version},
+ ?NICE("Erl mechanism doesn't support method PATCH")}}|
+ Data]}.
generate_webpage(ModData, ESIBody, [all], Module, FunctionName,
Input, ScriptElements) ->
diff --git a/lib/inets/src/inets_app/inets.appup.src b/lib/inets/src/inets_app/inets.appup.src
index 3a31daeb20..d4d21f6774 100644
--- a/lib/inets/src/inets_app/inets.appup.src
+++ b/lib/inets/src/inets_app/inets.appup.src
@@ -18,10 +18,16 @@
%% %CopyrightEnd%
{"%VSN%",
[
+ {<<"6.3.1">>,
+ [{load_module, mod_esi, soft_purge, soft_purge, []}
+ ]},
{<<"6\\..*">>,[{restart_application, inets}]},
{<<"5\\..*">>,[{restart_application, inets}]}
],
[
+ {<<"6.3.1">>,
+ [{load_module, mod_esi, soft_purge, soft_purge, []}
+ ]},
{<<"6\\..*">>,[{restart_application, inets}]},
{<<"5\\..*">>,[{restart_application, inets}]}
]
diff --git a/lib/inets/test/httpd_SUITE.erl b/lib/inets/test/httpd_SUITE.erl
index 3194b5ad3d..28e77151f2 100644
--- a/lib/inets/test/httpd_SUITE.erl
+++ b/lib/inets/test/httpd_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -119,8 +119,10 @@ groups() ->
]},
{htaccess, [], [htaccess_1_1, htaccess_1_0, htaccess_0_9]},
{security, [], [security_1_1, security_1_0]}, %% Skip 0.9 as causes timing issus in test code
- {http_1_1, [], [host, chunked, expect, cgi, cgi_chunked_encoding_test,
- trace, range, if_modified_since, mod_esi_chunk_timeout] ++ http_head() ++ http_get() ++ load()},
+ {http_1_1, [],
+ [host, chunked, expect, cgi, cgi_chunked_encoding_test,
+ trace, range, if_modified_since, mod_esi_chunk_timeout,
+ esi_put] ++ http_head() ++ http_get() ++ load()},
{http_1_0, [], [host, cgi, trace] ++ http_head() ++ http_get() ++ load()},
{http_0_9, [], http_head() ++ http_get() ++ load()}
].
@@ -283,20 +285,50 @@ init_per_testcase(Case, Config) when Case == host; Case == trace ->
http_1_1 ->
httpd_1_1
end,
- [{version_cb, Cb} | proplists:delete(version_cb, Config)];
+ dbg(
+ Case,
+ [{version_cb, Cb} | proplists:delete(version_cb, Config)],
+ init);
init_per_testcase(range, Config) ->
ct:timetrap({seconds, 20}),
DocRoot = proplists:get_value(doc_root, Config),
create_range_data(DocRoot),
- Config;
+ dbg(range, Config, init);
-init_per_testcase(_, Config) ->
+init_per_testcase(Case, Config) ->
ct:timetrap({seconds, 20}),
- Config.
-
-end_per_testcase(_Case, _Config) ->
- ok.
+ dbg(Case, Config, init).
+
+end_per_testcase(Case, Config) ->
+ dbg(Case, Config, 'end').
+
+
+dbg(Case, Config, Status) ->
+ Cases = [esi_put],
+ case lists:member(Case, Cases) of
+ true ->
+ case Status of
+ init ->
+ dbg:tracer(),
+ dbg:p(all, c),
+ dbg:tpl(httpd_example, cx),
+ dbg:tpl(mod_esi, generate_webpage, cx),
+ io:format("dbg: started~n"),
+ Config;
+ 'end' ->
+ io:format("dbg: stopped~n"),
+ dbg:stop_clear(),
+ ok
+ end;
+ false ->
+ case Status of
+ init ->
+ Config;
+ 'end' ->
+ ok
+ end
+ end.
%%-------------------------------------------------------------------------
%% Test cases starts here.
@@ -765,6 +797,14 @@ esi(Config) when is_list(Config) ->
ok = http_status("GET /cgi-bin/erl/httpd_example:peer ",
Config, [{statuscode, 200},
{header, "peer-cert-exist", peer(Config)}]).
+
+%%-------------------------------------------------------------------------
+esi_put() ->
+ [{doc, "Test mod_esi PUT"}].
+
+esi_put(Config) when is_list(Config) ->
+ ok = http_status("PUT /cgi-bin/erl/httpd_example/put/123342234123 ",
+ Config, [{statuscode, 200}]).
%%-------------------------------------------------------------------------
mod_esi_chunk_timeout(Config) when is_list(Config) ->
diff --git a/lib/inets/test/inets_SUITE.erl b/lib/inets/test/inets_SUITE.erl
index 5eaf3a28a0..38b8229389 100644
--- a/lib/inets/test/inets_SUITE.erl
+++ b/lib/inets/test/inets_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2015. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -212,11 +212,19 @@ start_httpd(Config) when is_list(Config) ->
Pids0 = [ServicePid || {_, ServicePid} <- inets:services()],
true = lists:member(Pid0, Pids0),
[_|_] = inets:services_info(),
-
inets:stop(httpd, Pid0),
ct:sleep(500),
+ Pids1 = [ServicePid || {_, ServicePid} <- inets:services()],
+ false = lists:member(Pid0, Pids1),
+ {ok, Pid0b} =
+ inets:start(httpd, [{port, 0}, {ipfamily, inet6fb4} | HttpdConf]),
+ Pids0b = [ServicePid || {_, ServicePid} <- inets:services()],
+ true = lists:member(Pid0b, Pids0b),
+ [_|_] = inets:services_info(),
+ inets:stop(httpd, Pid0b),
+ ct:sleep(500),
Pids1 = [ServicePid || {_, ServicePid} <- inets:services()],
- false = lists:member(Pid0, Pids1),
+ false = lists:member(Pid0b, Pids1),
{ok, Pid1} =
inets:start(httpd, [{port, 0}, {ipfamily, inet} | HttpdConf],
stand_alone),
diff --git a/lib/inets/test/inets_sup_SUITE.erl b/lib/inets/test/inets_sup_SUITE.erl
index 5b8b1463c8..1e664337e6 100644
--- a/lib/inets/test/inets_sup_SUITE.erl
+++ b/lib/inets/test/inets_sup_SUITE.erl
@@ -33,7 +33,7 @@ suite() ->
all() ->
[default_tree, ftpc_worker, tftpd_worker,
- httpd_subtree, httpd_subtree_profile,
+ httpd_config, httpd_subtree, httpd_subtree_profile,
httpc_subtree].
groups() ->
@@ -52,9 +52,32 @@ end_per_suite(_) ->
inets:stop(),
ok.
-init_per_testcase(httpd_subtree, Config) ->
+init_per_testcase(httpd_config = TC, Config) ->
+ PrivDir = proplists:get_value(priv_dir, Config),
+ Dir = filename:join(PrivDir, TC),
+ ok = file:make_dir(Dir),
+
+ FallbackConfig = [{port, 0},
+ {server_name,"www.test"},
+ {modules, [mod_get]},
+ {server_root, Dir},
+ {document_root, Dir},
+ {bind_address, any},
+ {ipfamily, inet6fb4}],
+ try
+ inets:stop(),
+ inets:start(),
+ inets:start(httpd, FallbackConfig),
+ Config
+ catch
+ _:Reason ->
+ inets:stop(),
+ exit({failed_starting_inets, Reason})
+ end;
+
+init_per_testcase(httpd_subtree = TC, Config) ->
PrivDir = proplists:get_value(priv_dir, Config),
- Dir = filename:join(PrivDir, "root"),
+ Dir = filename:join(PrivDir, TC),
ok = file:make_dir(Dir),
SimpleConfig = [{port, 0},
@@ -75,9 +98,9 @@ init_per_testcase(httpd_subtree, Config) ->
exit({failed_starting_inets, Reason})
end;
-init_per_testcase(httpd_subtree_profile, Config) ->
+init_per_testcase(httpd_subtree_profile = TC, Config) ->
PrivDir = proplists:get_value(priv_dir, Config),
- Dir = filename:join(PrivDir, "root"),
+ Dir = filename:join(PrivDir, TC),
ok = file:make_dir(Dir),
SimpleConfig = [{port, 0},
@@ -193,6 +216,11 @@ tftpd_worker(Config) when is_list(Config) ->
[] = supervisor:which_children(tftp_sup),
ok.
+httpd_config() ->
+ [{doc, "Makes sure the httpd config works for inet6fb4."}].
+httpd_config(Config) when is_list(Config) ->
+ do_httpd_subtree(Config, default).
+
httpd_subtree() ->
[{doc, "Makes sure the httpd sub tree is correct."}].
httpd_subtree(Config) when is_list(Config) ->
diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk
index 543e0d44fd..747724a86b 100644
--- a/lib/inets/vsn.mk
+++ b/lib/inets/vsn.mk
@@ -19,6 +19,6 @@
# %CopyrightEnd%
APPLICATION = inets
-INETS_VSN = 6.3
+INETS_VSN = 6.3.2
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)"
diff --git a/lib/jinterface/doc/src/notes.xml b/lib/jinterface/doc/src/notes.xml
index c1b7c027ed..3151fc4b5e 100644
--- a/lib/jinterface/doc/src/notes.xml
+++ b/lib/jinterface/doc/src/notes.xml
@@ -31,6 +31,38 @@
</header>
<p>This document describes the changes made to the Jinterface application.</p>
+<section><title>Jinterface 1.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix Jinterface build on Maven</p>
+ <p>
+ Own Id: OTP-13482</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Handle terms (pids,ports and refs) from nodes with a
+ 'creation' value larger than 3. This is a preparation of
+ the distribution protocol to allow OTP 19 nodes to
+ correctly communicate with future nodes (20 or higher).
+ The 'creation' value differentiates different
+ incarnations of the same node (name).</p>
+ <p>
+ Own Id: OTP-13488</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Jinterface 1.6.1</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/jinterface/vsn.mk b/lib/jinterface/vsn.mk
index 41e670528a..752b34e78c 100644
--- a/lib/jinterface/vsn.mk
+++ b/lib/jinterface/vsn.mk
@@ -1 +1 @@
-JINTERFACE_VSN = 1.6.1
+JINTERFACE_VSN = 1.7
diff --git a/lib/kernel/doc/src/notes.xml b/lib/kernel/doc/src/notes.xml
index d0540768de..0e3914b083 100644
--- a/lib/kernel/doc/src/notes.xml
+++ b/lib/kernel/doc/src/notes.xml
@@ -31,6 +31,221 @@
</header>
<p>This document describes the changes made to the Kernel application.</p>
+<section><title>Kernel 5.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix a os:cmd bug where creating a background job using
+ &amp; would cause os:cmd to hang until the background job
+ terminated or closed its stdout and stderr file
+ descriptors. This bug has existed from kernel 5.0.</p>
+ <p>
+ Own Id: OTP-13741</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Kernel 5.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>The handling of <c>on_load</c> functions has been
+ improved. The major improvement is that if a code upgrade
+ fails because the <c>on_load</c> function fails, the
+ previous version of the module will now be retained.</p>
+ <p>
+ Own Id: OTP-12593</p>
+ </item>
+ <item>
+ <p><c>rpc:call()</c> and <c>rpc:block_call()</c> would
+ sometimes cause an exception (which was not mentioned in
+ the documentation). This has been corrected so that
+ <c>{badrpc,Reason}</c> will be returned instead.</p>
+ <p>
+ Own Id: OTP-13409</p>
+ </item>
+ <item>
+ <p>On Windows, for modules that were loaded early (such
+ as the <c>lists</c> module), <c>code:which/1</c> would
+ return the path with mixed slashes and backslashes, for
+ example: <c>"C:\\Program
+ Files\\erl8.0/lib/stdlib-2.7/ebin/lists.beam"</c>. This
+ has been corrected.</p>
+ <p>
+ Own Id: OTP-13410</p>
+ </item>
+ <item>
+ <p>
+ Make file:datasync use fsync instead of fdatasync on Mac
+ OSX.</p>
+ <p>
+ Own Id: OTP-13411</p>
+ </item>
+ <item>
+ <p>
+ The default chunk size for the fallback sendfile
+ implementation, used on platforms that do not have a
+ native sendfile, has been decreased in order to reduce
+ connectivity issues.</p>
+ <p>
+ Own Id: OTP-13444</p>
+ </item>
+ <item>
+ <p>
+ Large file writes (2Gb or more) could fail on some Unix
+ platforms (for example, OS X and FreeBSD).</p>
+ <p>
+ Own Id: OTP-13461</p>
+ </item>
+ <item>
+ <p>
+ A bug has been fixed where the DNS resolver inet_res did
+ not refresh its view of the contents of for example
+ resolv.conf immediately after start and hence then failed
+ name resolution. Reported and fix suggested by Michal
+ Ptaszek in GitHUB pull req #949.</p>
+ <p>
+ Own Id: OTP-13470 Aux Id: Pull #969 </p>
+ </item>
+ <item>
+ <p>
+ Fix process leak from global_group.</p>
+ <p>
+ Own Id: OTP-13516 Aux Id: PR-1008 </p>
+ </item>
+ <item>
+ <p>
+ The function <c>inet:gethostbyname/1</c> now honors the
+ resolver option <c>inet6</c> instead of always looking up
+ IPv4 addresses.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-13622 Aux Id: PR-1065 </p>
+ </item>
+ <item>
+ <p>
+ The <c>Status</c> argument to <c>init:stop/1</c> is now
+ sanity checked to make sure <c>erlang:halt</c> does not
+ fail.</p>
+ <p>
+ Own Id: OTP-13631 Aux Id: PR-911 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add {line_delim, byte()} option to inet:setopts/2 and
+ decode_packet/3</p>
+ <p>
+ Own Id: OTP-12837</p>
+ </item>
+ <item>
+ <p>
+ Added <seealso
+ marker="kernel:os#perf_counter/1">os:perf_counter/1</seealso>.</p>
+ <p>
+ The perf_counter is a very very cheap and high resolution
+ timer that can be used to timestamp system events. It
+ does not have monoticity guarantees, but should on most
+ OS's expose a monotonous time.</p>
+ <p>
+ Own Id: OTP-12908</p>
+ </item>
+ <item>
+ <p>
+ The os:cmd call has been optimized on unix platforms to
+ be scale better with the number of schedulers.</p>
+ <p>
+ Own Id: OTP-13089</p>
+ </item>
+ <item>
+ <p>New functions that can load multiple modules at once
+ have been added to the '<c>code</c>' module. The
+ functions are <c>code:atomic_load/1</c>,
+ <c>code:prepare_loading/1</c>,
+ <c>code:finish_loading/1</c>, and
+ <c>code:ensure_modules_loaded/1</c>.</p>
+ <p>
+ Own Id: OTP-13111</p>
+ </item>
+ <item>
+ <p>
+ The code path cache feature turned out not to be very
+ useful in practice and has been removed. If an attempt is
+ made to enable the code path cache, there will be a
+ warning report informing the user that the feature has
+ been removed.</p>
+ <p>
+ Own Id: OTP-13191</p>
+ </item>
+ <item>
+ <p>When an attempt is made to start a distributed Erlang
+ node with the same name as an existing node, the error
+ message will be much shorter and easier to read than
+ before. Example:</p>
+ <p><c>Protocol 'inet_tcp': the name somename@somehost
+ seems to be in use by another Erlang node</c></p>
+ <p>
+ Own Id: OTP-13294</p>
+ </item>
+ <item>
+ <p>
+ The output of the default error logger is somewhat
+ prettier and easier to read. The default error logger is
+ used during start-up of the OTP system. If the start-up
+ fails, the output will be easier to read.</p>
+ <p>
+ Own Id: OTP-13325</p>
+ </item>
+ <item>
+ <p>The functions <c>rpc:safe_multi_server_call/2,3</c>
+ that were deprecated in R12B have been removed.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-13449</p>
+ </item>
+ <item>
+ <p>
+ Update the error reasons in dist_util, and show them in
+ the logs if net_kernel:verbose(1) has been called.</p>
+ <p>
+ Own Id: OTP-13458</p>
+ </item>
+ <item>
+ <p>
+ Experimental support for Unix Domain Sockets has been
+ implemented. Read the sources if you want to try it out.
+ Example: <c>gen_udp:open(0,
+ [{ifaddr,{local,"/tmp/socket"}}])</c>. Documentation will
+ be written after user feedback on the experimental API.</p>
+ <p>
+ Own Id: OTP-13572 Aux Id: PR-612 </p>
+ </item>
+ <item>
+ <p>
+ Allow heart to be configured to not kill the previous
+ emulator before calling the HEART_COMMAND. This is done
+ by setting the environment variable HEART_NO_KILL to
+ TRUE.</p>
+ <p>
+ Own Id: OTP-13650</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Kernel 4.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index 6174136507..1792f9e908 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -933,14 +933,20 @@ del_ebin(Dir) ->
filename:join(del_ebin_1(filename:split(Dir))).
del_ebin_1([Parent,App,"ebin"]) ->
- Ext = archive_extension(),
- case filename:basename(Parent, Ext) of
- Parent ->
- %% Plain directory.
+ case filename:basename(Parent) of
+ [] ->
+ %% Parent is the root directory
[Parent,App];
- Archive ->
- %% Archive.
- [Archive]
+ _ ->
+ Ext = archive_extension(),
+ case filename:basename(Parent, Ext) of
+ Parent ->
+ %% Plain directory.
+ [Parent,App];
+ Archive ->
+ %% Archive.
+ [Archive]
+ end
end;
del_ebin_1([H|T]) ->
[H|del_ebin_1(T)];
diff --git a/lib/kernel/src/erl_epmd.erl b/lib/kernel/src/erl_epmd.erl
index f8ef4a475d..7bc9e2ede3 100644
--- a/lib/kernel/src/erl_epmd.erl
+++ b/lib/kernel/src/erl_epmd.erl
@@ -103,6 +103,10 @@ names(EpmdAddr) ->
register_node(Name, PortNo) ->
register_node(Name, PortNo, inet).
+register_node(Name, PortNo, inet_tcp) ->
+ register_node(Name, PortNo, inet);
+register_node(Name, PortNo, inet6_tcp) ->
+ register_node(Name, PortNo, inet6);
register_node(Name, PortNo, Family) ->
gen_server:call(erl_epmd, {register, Name, PortNo, Family}, infinity).
@@ -403,8 +407,6 @@ select_best_version(L1, _H1, _L2, H2) when L1 > H2 ->
0;
select_best_version(_L1, H1, L2, _H2) when L2 > H1 ->
0;
-select_best_version(_L1, H1, L2, _H2) when L2 > H1 ->
- 0;
select_best_version(_L1, H1, _L2, H2) ->
erlang:min(H1, H2).
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl
index 9fc685e728..a91a6ed517 100644
--- a/lib/kernel/src/inet.erl
+++ b/lib/kernel/src/inet.erl
@@ -1344,18 +1344,12 @@ open(FdO, Addr, Port, Opts, Protocol, Family, Type, Module)
case prim_inet:open(Protocol, Family, Type, OpenOpts) of
{ok,S} ->
case prim_inet:setopts(S, Opts) of
+ ok when Addr =:= undefined ->
+ inet_db:register_socket(S, Module),
+ {ok,S};
ok ->
- case
- case Addr of
- undefined ->
- {ok, undefined};
- _ when is_list(Addr) ->
- bindx(S, Addr, Port);
- _ ->
- prim_inet:bind(S, Addr, Port)
- end
- of
- {ok, _} ->
+ case bind(S, Addr, Port) of
+ {ok, _} ->
inet_db:register_socket(S, Module),
{ok,S};
Error ->
@@ -1373,6 +1367,11 @@ open(Fd, Addr, Port, Opts, Protocol, Family, Type, Module)
when is_integer(Fd) ->
fdopen(Fd, Addr, Port, Opts, Protocol, Family, Type, Module).
+bind(S, Addr, Port) when is_list(Addr) ->
+ bindx(S, Addr, Port);
+bind(S, Addr, Port) ->
+ prim_inet:bind(S, Addr, Port).
+
bindx(S, [Addr], Port0) ->
{IP, Port} = set_bindx_port(Addr, Port0),
prim_inet:bind(S, IP, Port);
@@ -1413,34 +1412,36 @@ fdopen(Fd, Opts, Protocol, Family, Type, Module) ->
fdopen(Fd, any, 0, Opts, Protocol, Family, Type, Module).
fdopen(Fd, Addr, Port, Opts, Protocol, Family, Type, Module) ->
- IsAnyAddr = (Addr == {0,0,0,0} orelse Addr == {0,0,0,0,0,0,0,0}
- orelse Addr == any),
- Bound = Port == 0 andalso IsAnyAddr,
+ Bound =
+ %% We do not do any binding if default port+addr options
+ %% were given, in order to keep backwards compatability
+ %% with pre Erlang/OTP 17
+ case Addr of
+ {0,0,0,0} when Port =:= 0 -> true;
+ {0,0,0,0,0,0,0,0} when Port =:= 0 -> true;
+ any when Port =:= 0 -> true;
+ _ -> false
+ end,
case prim_inet:fdopen(Protocol, Family, Type, Fd, Bound) of
{ok, S} ->
case prim_inet:setopts(S, Opts) of
+ ok
+ when Addr =:= undefined;
+ Bound ->
+ inet_db:register_socket(S, Module),
+ {ok, S};
ok ->
- case if
- Bound ->
- %% We do not do any binding if default
- %% port+addr options where given in order
- %% to keep backwards compatability with
- %% pre Erlang/TOP 17
- {ok, ok};
- is_list(Addr) ->
- bindx(S, Addr, Port);
- true ->
- prim_inet:bind(S, Addr, Port)
- end of
- {ok, _} ->
- inet_db:register_socket(S, Module),
- {ok, S};
- Error ->
- prim_inet:close(S),
- Error
+ case bind(S, Addr, Port) of
+ {ok, _} ->
+ inet_db:register_socket(S, Module),
+ {ok, S};
+ Error ->
+ prim_inet:close(S),
+ Error
end;
Error ->
- prim_inet:close(S), Error
+ prim_inet:close(S),
+ Error
end;
Error -> Error
end.
diff --git a/lib/kernel/src/inet_tcp_dist.erl b/lib/kernel/src/inet_tcp_dist.erl
index f91d7ef7c3..94bde55133 100644
--- a/lib/kernel/src/inet_tcp_dist.erl
+++ b/lib/kernel/src/inet_tcp_dist.erl
@@ -74,7 +74,7 @@ gen_listen(Driver, Name) ->
TcpAddress = get_tcp_address(Driver, Socket),
{_,Port} = TcpAddress#net_address.address,
ErlEpmd = net_kernel:epmd_module(),
- case ErlEpmd:register_node(Name, Port) of
+ case ErlEpmd:register_node(Name, Port, Driver) of
{ok, Creation} ->
{ok, {Socket, TcpAddress, Creation}};
Error ->
diff --git a/lib/kernel/src/local_tcp.erl b/lib/kernel/src/local_tcp.erl
index e3c67dfbb7..90e0fa2162 100644
--- a/lib/kernel/src/local_tcp.erl
+++ b/lib/kernel/src/local_tcp.erl
@@ -175,4 +175,4 @@ accept(L, Timeout) ->
%% Create a port/socket from a file descriptor
%%
fdopen(Fd, Opts) ->
- inet:fdopen(Fd, Opts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE).
+ inet:open(Fd, undefined, 0, Opts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE).
diff --git a/lib/kernel/src/os.erl b/lib/kernel/src/os.erl
index f0ad26b1f2..81b70a7fee 100644
--- a/lib/kernel/src/os.erl
+++ b/lib/kernel/src/os.erl
@@ -226,11 +226,13 @@ extensions() ->
Command :: atom() | io_lib:chars().
cmd(Cmd) ->
validate(Cmd),
- {SpawnCmd, SpawnOpts, SpawnInput} = mk_cmd(os:type(), Cmd),
+ {SpawnCmd, SpawnOpts, SpawnInput, Eot} = mk_cmd(os:type(), Cmd),
Port = open_port({spawn, SpawnCmd}, [binary, stderr_to_stdout,
- stream, in, eof, hide | SpawnOpts]),
+ stream, in, hide | SpawnOpts]),
+ MonRef = erlang:monitor(port, Port),
true = port_command(Port, SpawnInput),
- Bytes = get_data(Port, []),
+ Bytes = get_data(Port, MonRef, Eot, []),
+ demonitor(MonRef, [flush]),
String = unicode:characters_to_list(Bytes),
if %% Convert to unicode list if possible otherwise return bytes
is_list(String) -> String;
@@ -243,7 +245,7 @@ mk_cmd({win32,Wtype}, Cmd) ->
{false,_} -> lists:concat(["cmd /c", Cmd]);
{Cspec,_} -> lists:concat([Cspec," /c",Cmd])
end,
- {Command, [], []};
+ {Command, [], [], <<>>};
mk_cmd(OsType,Cmd) when is_atom(Cmd) ->
mk_cmd(OsType, atom_to_list(Cmd));
mk_cmd(_,Cmd) ->
@@ -252,7 +254,8 @@ mk_cmd(_,Cmd) ->
{"/bin/sh -s unix:cmd", [out],
%% We insert a new line after the command, in case the command
%% contains a comment character.
- ["(", unicode:characters_to_binary(Cmd), "\n); exit\n"]}.
+ ["(", unicode:characters_to_binary(Cmd), "\n); echo \"\^D\"\n"],
+ <<$\^D>>}.
validate(Atom) when is_atom(Atom) ->
ok;
@@ -267,16 +270,18 @@ validate1([List|Rest]) when is_list(List) ->
validate1([]) ->
ok.
-get_data(Port, Sofar) ->
+get_data(Port, MonRef, Eot, Sofar) ->
receive
{Port, {data, Bytes}} ->
- get_data(Port, [Sofar,Bytes]);
- {Port, eof} ->
- Port ! {self(), close},
- receive
- {Port, closed} ->
- true
- end,
+ case eot(Bytes, Eot) of
+ more ->
+ get_data(Port, MonRef, Eot, [Sofar,Bytes]);
+ Last ->
+ Port ! {self(), close},
+ flush_until_closed(Port),
+ iolist_to_binary([Sofar, Last])
+ end;
+ {'DOWN', MonRef, _, _ , _} ->
receive
{'EXIT', Port, _} ->
ok
@@ -285,3 +290,20 @@ get_data(Port, Sofar) ->
end,
iolist_to_binary(Sofar)
end.
+
+eot(_Bs, <<>>) ->
+ more;
+eot(Bs, Eot) ->
+ case binary:match(Bs, Eot) of
+ nomatch -> more;
+ {Pos, _} ->
+ binary:part(Bs,{0, Pos})
+ end.
+
+flush_until_closed(Port) ->
+ receive
+ {Port, {data, _Bytes}} ->
+ flush_until_closed(Port);
+ {Port, closed} ->
+ true
+ end.
diff --git a/lib/kernel/test/gen_sctp_SUITE.erl b/lib/kernel/test/gen_sctp_SUITE.erl
index f836b2aa94..620ab235a0 100644
--- a/lib/kernel/test/gen_sctp_SUITE.erl
+++ b/lib/kernel/test/gen_sctp_SUITE.erl
@@ -117,7 +117,11 @@ xfer_min(Config) when is_list(Config) ->
Stream = 0,
Data = <<"The quick brown fox jumps over a lazy dog 0123456789">>,
Loopback = {127,0,0,1},
+ StatOpts =
+ [recv_avg,recv_cnt,recv_max,recv_oct,
+ send_avg,send_cnt,send_max,send_oct],
{ok,Sb} = gen_sctp:open([{type,seqpacket}]),
+ {ok,SbStat1} = inet:getstat(Sb, StatOpts),
{ok,Pb} = inet:port(Sb),
ok = gen_sctp:listen(Sb, true),
@@ -212,6 +216,8 @@ xfer_min(Config) when is_list(Config) ->
assoc_id=SbAssocId}} =
recv_event(log_ok(gen_sctp:recv(Sb, infinity))),
ok = gen_sctp:close(Sa),
+ {ok,SbStat2} = inet:getstat(Sb, StatOpts),
+ [] = filter_stat_eq(SbStat1, SbStat2),
ok = gen_sctp:close(Sb),
receive
@@ -220,6 +226,18 @@ xfer_min(Config) when is_list(Config) ->
end,
ok.
+filter_stat_eq([], []) ->
+ [];
+filter_stat_eq([{Tag,Val1}=Stat|SbStat1], [{Tag,Val2}|SbStat2]) ->
+ if
+ Val1 == Val2 ->
+ [Stat|filter_stat_eq(SbStat1, SbStat2)];
+ true ->
+ filter_stat_eq(SbStat1, SbStat2)
+ end.
+
+
+
%% Minimal data transfer in active mode.
xfer_active(Config) when is_list(Config) ->
Timeout = 2000,
@@ -383,26 +401,28 @@ def_sndrcvinfo(Config) when is_list(Config) ->
assoc_id=S2AssocId} = S2AssocChange =
log_ok(gen_sctp:connect(S2, Loopback, P1, [])),
?LOGVAR(S2AssocChange),
- case recv_event(log_ok(gen_sctp:recv(S1))) of
- {Loopback,P2,
- #sctp_assoc_change{
- state=comm_up,
- error=0,
- assoc_id=S1AssocId}} ->
- ?LOGVAR(S1AssocId);
- {Loopback,P2,
- #sctp_paddr_change{
- state=addr_confirmed,
- error=0,
- assoc_id=S1AssocId}} ->
- ?LOGVAR(S1AssocId),
+ S1AssocId =
+ case recv_event(log_ok(gen_sctp:recv(S1))) of
{Loopback,P2,
#sctp_assoc_change{
state=comm_up,
error=0,
- assoc_id=S1AssocId}} =
- recv_event(log_ok(gen_sctp:recv(S1)))
- end,
+ assoc_id=AssocId}} ->
+ AssocId;
+ {Loopback,P2,
+ #sctp_paddr_change{
+ state=addr_confirmed,
+ error=0,
+ assoc_id=AssocId}} ->
+ {Loopback,P2,
+ #sctp_assoc_change{
+ state=comm_up,
+ error=0,
+ assoc_id=AssocId}} =
+ recv_event(log_ok(gen_sctp:recv(S1))),
+ AssocId
+ end,
+ ?LOGVAR(S1AssocId),
#sctp_sndrcvinfo{
ppid=17, context=0, timetolive=0} = %, assoc_id=S1AssocId} =
@@ -1055,6 +1075,7 @@ peeloff(Config, SockOpts) when is_list(Config) ->
Addr = {127,0,0,1},
Stream = 0,
Timeout = 333,
+ StartTime = timestamp(),
S1 = socket_open([{ifaddr,Addr}|SockOpts], Timeout),
?LOGVAR(S1),
P1 = socket_call(S1, get_port),
@@ -1077,7 +1098,7 @@ peeloff(Config, SockOpts) when is_list(Config) ->
state=comm_up,
assoc_id=AssocId2}}} -> AssocId2
after Timeout ->
- socket_bailout([S1,S2])
+ socket_bailout([S1,S2], StartTime)
end,
?LOGVAR(S2Ai),
S1Ai =
@@ -1087,7 +1108,7 @@ peeloff(Config, SockOpts) when is_list(Config) ->
state=comm_up,
assoc_id=AssocId1}}} -> AssocId1
after Timeout ->
- socket_bailout([S1,S2])
+ socket_bailout([S1,S2], StartTime)
end,
?LOGVAR(S1Ai),
%%
@@ -1095,13 +1116,13 @@ peeloff(Config, SockOpts) when is_list(Config) ->
receive
{S1,{Addr,P2,S1Ai,Stream,<<"Number one">>}} -> ok
after Timeout ->
- socket_bailout([S1,S2])
+ socket_bailout([S1,S2], StartTime)
end,
socket_call(S2, {send,Socket1,S1Ai,Stream,<<"Number two">>}),
receive
{S2,{Addr,P1,S2Ai,Stream,<<"Number two">>}} -> ok
after Timeout ->
- socket_bailout([S1,S2])
+ socket_bailout([S1,S2], StartTime)
end,
%%
S3 = socket_peeloff(Socket1, S1Ai, SockOpts, Timeout),
@@ -1120,31 +1141,31 @@ peeloff(Config, SockOpts) when is_list(Config) ->
receive
{S2,{Addr,P3,S2Ai,Stream,<<"Number three">>}} -> ok
after Timeout ->
- socket_bailout([S1,S2,S3])
+ socket_bailout([S1,S2,S3], StartTime)
end,
socket_call(S3, {send,Socket2,S2Ai,Stream,<<"Number four">>}),
receive
{S3,{Addr,P2,S3Ai,Stream,<<"Number four">>}} -> ok
after Timeout ->
- socket_bailout([S1,S2,S3])
+ socket_bailout([S1,S2,S3], StartTime)
end,
%%
inet:i(sctp),
- socket_close_verbose(S1),
- socket_close_verbose(S2),
+ socket_close_verbose(S1, StartTime),
+ socket_close_verbose(S2, StartTime),
receive
{S3,{Addr,P2,#sctp_shutdown_event{assoc_id=S3Ai_X}}} ->
match_unless_solaris(S3Ai, S3Ai_X)
after Timeout ->
- socket_bailout([S3])
+ socket_bailout([S3], StartTime)
end,
receive
{S3,{Addr,P2,#sctp_assoc_change{state=shutdown_comp,
assoc_id=S3Ai}}} -> ok
after Timeout ->
- socket_bailout([S3])
+ socket_bailout([S3], StartTime)
end,
- socket_close_verbose(S3),
+ socket_close_verbose(S3, StartTime),
[] = flush(),
ok.
@@ -1156,6 +1177,7 @@ buffers(Config) when is_list(Config) ->
Addr = {127,0,0,1},
Stream = 1,
Timeout = 3333,
+ StartTime = timestamp(),
S1 = socket_open([{ip,Addr}], Timeout),
?LOGVAR(S1),
P1 = socket_call(S1, get_port),
@@ -1174,7 +1196,7 @@ buffers(Config) when is_list(Config) ->
state=comm_up,
assoc_id=AssocId2}}} -> AssocId2
after Timeout ->
- socket_bailout([S1,S2])
+ socket_bailout([S1,S2], StartTime)
end,
S1Ai =
receive
@@ -1183,7 +1205,7 @@ buffers(Config) when is_list(Config) ->
state=comm_up,
assoc_id=AssocId1}}} -> AssocId1
after Timeout ->
- socket_bailout([S1,S2])
+ socket_bailout([S1,S2], StartTime)
end,
%%
socket_call(S1, {setopts,[{recbuf,Limit}]}),
@@ -1197,22 +1219,22 @@ buffers(Config) when is_list(Config) ->
receive
{S1,{Addr,P2,S1Ai,Stream,Data}} -> ok
after Timeout ->
- socket_bailout([S1,S2])
+ socket_bailout([S1,S2], StartTime)
end,
%%
- socket_close_verbose(S1),
+ socket_close_verbose(S1, StartTime),
receive
{S2,{Addr,P1,#sctp_shutdown_event{assoc_id=S2Ai}}} -> ok
after Timeout ->
- socket_bailout([S2])
+ socket_bailout([S2], StartTime)
end,
receive
{S2,{Addr,P1,#sctp_assoc_change{state=shutdown_comp,
assoc_id=S2Ai}}} -> ok
after Timeout ->
- socket_bailout([S2])
+ socket_bailout([S2], StartTime)
end,
- socket_close_verbose(S2),
+ socket_close_verbose(S2, StartTime),
[] = flush(),
ok.
@@ -1521,8 +1543,8 @@ socket_peeloff(Socket, AssocId, SocketOpts, Timeout) ->
end,
s_start(Starter, Timeout).
-socket_close_verbose(S) ->
- History = socket_history(socket_close(S)),
+socket_close_verbose(S, StartTime) ->
+ History = socket_history(socket_close(S), StartTime),
io:format("socket_close ~p:~n ~p.~n", [S,History]),
History.
@@ -1535,19 +1557,19 @@ socket_call(S, Request) ->
%% socket_get(S, Key) ->
%% s_req(S, {get,Key}).
-socket_bailout([S|Ss]) ->
- History = socket_history(socket_close(S)),
+socket_bailout([S|Ss], StartTime) ->
+ History = socket_history(socket_close(S), StartTime),
io:format("bailout ~p:~n ~p.~n", [S,History]),
- socket_bailout(Ss);
-socket_bailout([]) ->
+ socket_bailout(Ss, StartTime);
+socket_bailout([], _) ->
io:format("flush: ~p.~n", [flush()]),
ct:fail(socket_bailout).
-socket_history({State,Flush}) ->
+socket_history({State,Flush}, StartTime) ->
{lists:keysort(
2,
lists:flatten(
- [[{Key,Val} || Val <- Vals]
+ [[{Key,{TS-StartTime,Val}} || {TS,Val} <- Vals]
|| {Key,Vals} <- gb_trees:to_list(State)])),
Flush}.
@@ -1610,14 +1632,12 @@ s_loop(Socket, Timeout, Parent, Handler, State) ->
{Parent,Ref,exit} ->
ok = gen_sctp:close(Socket),
Key = exit,
- Val = {now(),Socket},
- NewState = gb_push(Key, Val, State),
+ NewState = gb_push(Key, Socket, State),
Parent ! {self(),Ref,{NewState,flush()}};
{Parent,Ref,{Msg}} ->
Result = Handler(Msg),
Key = req,
- Val = {now(),{Msg,Result}},
- NewState = gb_push(Key, Val, State),
+ NewState = gb_push(Key, {Msg,Result}, State),
Parent ! {self(),Ref,Result},
s_loop(Socket, Timeout, Parent, Handler, NewState);
%% {Parent,Ref,{get,Key}} ->
@@ -1627,16 +1647,15 @@ s_loop(Socket, Timeout, Parent, Handler, State) ->
{[#sctp_sndrcvinfo{stream=Stream,assoc_id=AssocId}=SRI],Data}}
when not is_tuple(Data) ->
case gb_get({assoc_change,AssocId}, State) of
- [{_,{Addr,Port,
- #sctp_assoc_change{
- state=comm_up,
- inbound_streams=Is}}}|_]
+ [{Addr,Port,
+ #sctp_assoc_change{
+ state=comm_up,
+ inbound_streams=Is}}|_]
when 0 =< Stream, Stream < Is-> ok;
[] -> ok
end,
Key = {msg,AssocId,Stream},
- Val = {now(),{Addr,Port,SRI,Data}},
- NewState = gb_push(Key, Val, State),
+ NewState = gb_push(Key, {Addr,Port,SRI,Data}, State),
Parent ! {self(),{Addr,Port,AssocId,Stream,Data}},
again(Socket),
s_loop(Socket, Timeout, Parent, Handler, NewState);
@@ -1647,13 +1666,12 @@ s_loop(Socket, Timeout, Parent, Handler, State) ->
[] -> ok
end,
Key = {assoc_change,AssocId},
- Val = {now(),{Addr,Port,SAC}},
case {gb_get(Key, State),St} of
{[],_} -> ok;
- {[{_,{Addr,Port,#sctp_assoc_change{state=comm_up}}}|_],_}
+ {[{Addr,Port,#sctp_assoc_change{state=comm_up}}|_],_}
when St =:= comm_lost; St =:= shutdown_comp -> ok
end,
- NewState = gb_push(Key, Val, State),
+ NewState = gb_push(Key, {Addr,Port,SAC}, State),
Parent ! {self(),{Addr,Port,SAC}},
again(Socket),
s_loop(Socket, Timeout, Parent, Handler, NewState);
@@ -1667,14 +1685,13 @@ s_loop(Socket, Timeout, Parent, Handler, State) ->
[] -> ok
end,
case {gb_get({assoc_change,AssocId}, State),St} of
- {[{_,{Addr,Port,#sctp_assoc_change{state=comm_up}}}|_],_}
+ {[{Addr,Port,#sctp_assoc_change{state=comm_up}}|_],_}
when St =:= addr_available;
St =:= addr_confirmed -> ok;
{[],addr_confirmed} -> ok
end,
Key = {paddr_change,AssocId},
- Val = {now(),{Addr,Port,SPC}},
- NewState = gb_push(Key, Val, State),
+ NewState = gb_push(Key, {Addr,Port,SPC}, State),
again(Socket),
s_loop(Socket, Timeout, Parent, Handler, NewState);
{sctp,Socket,Addr,Port,
@@ -1684,12 +1701,11 @@ s_loop(Socket, Timeout, Parent, Handler, State) ->
[] -> ok
end,
case gb_get({assoc_change,AssocId}, State) of
- [{_,{Addr,Port,#sctp_assoc_change{state=comm_up}}}|_] -> ok;
+ [{Addr,Port,#sctp_assoc_change{state=comm_up}}|_] -> ok;
[] -> ok
end,
Key = {shutdown_event,AssocId},
- Val = {now(),{Addr,Port}},
- NewState = gb_push(Key, Val, State),
+ NewState = gb_push(Key, {Addr,Port}, State),
Parent ! {self(), {Addr,Port,SSE}},
again(Socket),
s_loop(Socket, Timeout, Parent, Handler, NewState);
@@ -1707,11 +1723,12 @@ again(Socket) ->
end.
gb_push(Key, Val, GBT) ->
+ TS = timestamp(),
case gb_trees:lookup(Key, GBT) of
none ->
- gb_trees:insert(Key, [Val], GBT);
+ gb_trees:insert(Key, [{TS,Val}], GBT);
{value,V} ->
- gb_trees:update(Key, [Val|V], GBT)
+ gb_trees:update(Key, [{TS,Val}|V], GBT)
end.
gb_get(Key, GBT) ->
@@ -1719,7 +1736,7 @@ gb_get(Key, GBT) ->
none ->
[];
{value,V} ->
- V
+ [Val || {_TS,Val} <- V]
end.
match_unless_solaris(A, B) ->
@@ -1727,3 +1744,6 @@ match_unless_solaris(A, B) ->
{unix,sunos} -> B;
_ -> A = B
end.
+
+timestamp() ->
+ erlang:monotonic_time().
diff --git a/lib/kernel/test/gen_tcp_api_SUITE.erl b/lib/kernel/test/gen_tcp_api_SUITE.erl
index 54298e6309..77ec89b4f4 100644
--- a/lib/kernel/test/gen_tcp_api_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_api_SUITE.erl
@@ -34,7 +34,11 @@
t_recv_timeout/1, t_recv_eof/1, t_recv_delim/1,
t_shutdown_write/1, t_shutdown_both/1, t_shutdown_error/1,
t_shutdown_async/1,
- t_fdopen/1, t_fdconnect/1, t_implicit_inet6/1]).
+ t_fdopen/1, t_fdconnect/1, t_implicit_inet6/1,
+ t_local_basic/1, t_local_unbound/1, t_local_fdopen/1,
+ t_local_fdopen_listen/1, t_local_fdopen_listen_unbound/1,
+ t_local_fdopen_connect/1, t_local_fdopen_connect_unbound/1,
+ t_local_abstract/1]).
-export([getsockfd/0,closesockfd/1]).
@@ -45,12 +49,18 @@ suite() ->
all() ->
[{group, t_accept}, {group, t_connect}, {group, t_recv},
t_shutdown_write, t_shutdown_both, t_shutdown_error,
- t_shutdown_async, t_fdopen, t_fdconnect, t_implicit_inet6].
+ t_shutdown_async, t_fdopen, t_fdconnect, t_implicit_inet6,
+ {group, t_local}].
groups() ->
[{t_accept, [], [t_accept_timeout]},
{t_connect, [], [t_connect_timeout, t_connect_bad]},
- {t_recv, [], [t_recv_timeout, t_recv_eof, t_recv_delim]}].
+ {t_recv, [], [t_recv_timeout, t_recv_eof, t_recv_delim]},
+ {t_local, [],
+ [t_local_basic, t_local_unbound, t_local_fdopen,
+ t_local_fdopen_listen, t_local_fdopen_listen_unbound,
+ t_local_fdopen_connect, t_local_fdopen_connect_unbound,
+ t_local_abstract]}].
@@ -60,17 +70,36 @@ init_per_suite(Config) ->
end_per_suite(_Config) ->
ok.
+init_per_group(t_local, Config) ->
+ case gen_tcp:connect({local,<<"/">>}, 0, []) of
+ {error,eafnosupport} ->
+ {skip, "AF_LOCAL not supported"};
+ {error,_} ->
+ Config
+ end;
init_per_group(_GroupName, Config) ->
Config.
-end_per_group(_,_Config) ->
+end_per_group(t_local, _Config) ->
+ delete_local_filenames();
+end_per_group(_, _Config) ->
ok.
+
+init_per_testcase(Func, Config)
+ when Func =:= undefined -> % Insert your testcase name here
+ dbg:tracer(),
+ dbg:p(self(), c),
+ dbg:tpl(prim_inet, cx),
+ dbg:tpl(local_tcp, cx),
+ dbg:tpl(inet, cx),
+ dbg:tpl(gen_tcp, cx),
+ Config;
init_per_testcase(_Func, Config) ->
Config.
end_per_testcase(_Func, _Config) ->
- ok.
+ dbg:stop().
%%% gen_tcp:accept/1,2
@@ -279,9 +308,7 @@ t_implicit_inet6(Host, Addr) ->
implicit_inet6(S1, Loopback),
ok = gen_tcp:close(S1),
%%
- Localhost = "localhost",
- Localaddr = ok(inet:getaddr(Localhost, inet6)),
- io:format("~s ~p~n", [Localhost,Localaddr]),
+ Localaddr = ok(get_localaddr()),
S2 = ok(gen_tcp:listen(0, [{ip,Localaddr}])),
implicit_inet6(S2, Localaddr),
ok = gen_tcp:close(S2),
@@ -308,6 +335,192 @@ implicit_inet6(S, Addr) ->
ok = gen_tcp:close(S1).
+
+t_local_basic(_Config) ->
+ SFile = local_filename(server),
+ SAddr = {local,bin_filename(SFile)},
+ CFile = local_filename(client),
+ CAddr = {local,bin_filename(CFile)},
+ _ = file:delete(SFile),
+ _ = file:delete(CFile),
+ %%
+ L =
+ ok(
+ gen_tcp:listen(0, [{ifaddr,{local,SFile}},{active,false}])),
+ C =
+ ok(
+ gen_tcp:connect(
+ {local,SFile}, 0, [{ifaddr,{local,CFile}},{active,false}])),
+ S = ok(gen_tcp:accept(L)),
+ SAddr = ok(inet:sockname(L)),
+ {error,enotconn} = inet:peername(L),
+ local_handshake(S, SAddr, C, CAddr),
+ ok = gen_tcp:close(L),
+ ok = gen_tcp:close(S),
+ ok = gen_tcp:close(C),
+ %%
+ ok = file:delete(SFile),
+ ok = file:delete(CFile),
+ ok.
+
+t_local_unbound(_Config) ->
+ SFile = local_filename(server),
+ SAddr = {local,bin_filename(SFile)},
+ _ = file:delete(SFile),
+ %%
+ L = ok(gen_tcp:listen(0, [{ifaddr,SAddr},{active,false}])),
+ C = ok(gen_tcp:connect(SAddr, 0, [{active,false}])),
+ S = ok(gen_tcp:accept(L)),
+ SAddr = ok(inet:sockname(L)),
+ {error,enotconn} = inet:peername(L),
+ local_handshake(S, SAddr, C, {local,<<>>}),
+ ok = gen_tcp:close(L),
+ ok = gen_tcp:close(S),
+ ok = gen_tcp:close(C),
+ ok = file:delete(SFile),
+ ok.
+
+t_local_fdopen(_Config) ->
+ SFile = local_filename(server),
+ SAddr = {local,bin_filename(SFile)},
+ _ = file:delete(SFile),
+ %%
+ L = ok(gen_tcp:listen(0, [{ifaddr,SAddr},{active,false}])),
+ C0 = ok(gen_tcp:connect(SAddr, 0, [{active,false}])),
+ Fd = ok(prim_inet:getfd(C0)),
+ ok = prim_inet:ignorefd(C0, true),
+ C = ok(gen_tcp:fdopen(Fd, [local])),
+ S = ok(gen_tcp:accept(L)),
+ SAddr = ok(inet:sockname(L)),
+ {error,enotconn} = inet:peername(L),
+ local_handshake(S, SAddr, C, {local,<<>>}),
+ ok = gen_tcp:close(L),
+ ok = gen_tcp:close(S),
+ ok = gen_tcp:close(C),
+ ok = gen_tcp:close(C0),
+ ok = file:delete(SFile),
+ ok.
+
+t_local_fdopen_listen(_Config) ->
+ SFile = local_filename(server),
+ SAddr = {local,bin_filename(SFile)},
+ _ = file:delete(SFile),
+ L0 = ok(gen_tcp:listen(0, [{ifaddr,SAddr},{active,false}])),
+ Fd = ok(prim_inet:getfd(L0)),
+ L = ok(gen_tcp:listen(0, [{fd,Fd},local,{active,false}])),
+ C = ok(gen_tcp:connect(SAddr, 0, [{active,false}])),
+ S = ok(gen_tcp:accept(L)),
+ SAddr = ok(inet:sockname(L)),
+ {error,enotconn} = inet:peername(L),
+ local_handshake(S, SAddr, C, {local,<<>>}),
+ ok = gen_tcp:close(L),
+ ok = gen_tcp:close(L0),
+ ok = gen_tcp:close(S),
+ ok = gen_tcp:close(C),
+ ok = file:delete(SFile),
+ ok.
+
+t_local_fdopen_listen_unbound(_Config) ->
+ SFile = local_filename(server),
+ SAddr = {local,bin_filename(SFile)},
+ _ = file:delete(SFile),
+ P = ok(prim_inet:open(tcp, local, stream)),
+ Fd = ok(prim_inet:getfd(P)),
+ L =
+ ok(gen_tcp:listen(
+ 0, [{fd,Fd},{ifaddr,SAddr},{active,false}])),
+ C = ok(gen_tcp:connect(SAddr, 0, [{active,false}])),
+ S = ok(gen_tcp:accept(L)),
+ SAddr = ok(inet:sockname(L)),
+ {error,enotconn} = inet:peername(L),
+ local_handshake(S, SAddr, C, {local,<<>>}),
+ ok = gen_tcp:close(L),
+ ok = gen_tcp:close(P),
+ ok = gen_tcp:close(S),
+ ok = gen_tcp:close(C),
+ ok = file:delete(SFile),
+ ok.
+
+t_local_fdopen_connect(_Config) ->
+ SFile = local_filename(server),
+ SAddr = {local,bin_filename(SFile)},
+ CFile = local_filename(client),
+ CAddr = {local,bin_filename(CFile)},
+ _ = file:delete(SFile),
+ _ = file:delete(CFile),
+ L = ok(gen_tcp:listen(0, [{ifaddr,SAddr},{active,false}])),
+ P = ok(prim_inet:open(tcp, local, stream)),
+ Fd = ok(prim_inet:getfd(P)),
+ C =
+ ok(gen_tcp:connect(
+ SAddr, 0, [{fd,Fd},{ifaddr,CAddr},{active,false}])),
+ S = ok(gen_tcp:accept(L)),
+ SAddr = ok(inet:sockname(L)),
+ {error,enotconn} = inet:peername(L),
+ local_handshake(S, SAddr, C, CAddr),
+ ok = gen_tcp:close(L),
+ ok = gen_tcp:close(S),
+ ok = gen_tcp:close(C),
+ ok = gen_tcp:close(P),
+ ok = file:delete(SFile),
+ ok.
+
+t_local_fdopen_connect_unbound(_Config) ->
+ SFile = local_filename(server),
+ SAddr = {local,bin_filename(SFile)},
+ _ = file:delete(SFile),
+ L = ok(gen_tcp:listen(0, [{ifaddr,SAddr},{active,false}])),
+ P = ok(prim_inet:open(tcp, local, stream)),
+ Fd = ok(prim_inet:getfd(P)),
+ C = ok(gen_tcp:connect(SAddr, 0, [{fd,Fd},{active,false}])),
+ S = ok(gen_tcp:accept(L)),
+ SAddr = ok(inet:sockname(L)),
+ {error,enotconn} = inet:peername(L),
+ local_handshake(S, SAddr, C, {local,<<>>}),
+ ok = gen_tcp:close(L),
+ ok = gen_tcp:close(S),
+ ok = gen_tcp:close(C),
+ ok = gen_tcp:close(P),
+ ok = file:delete(SFile),
+ ok.
+
+t_local_abstract(_Config) ->
+ case os:type() of
+ {unix,linux} ->
+ AbstAddr = {local,<<>>},
+ L =
+ ok(gen_tcp:listen(
+ 0, [{ifaddr,AbstAddr},{active,false}])),
+ {local,_} = SAddr = ok(inet:sockname(L)),
+ C =
+ ok(gen_tcp:connect(
+ SAddr, 0, [{ifaddr,AbstAddr},{active,false}])),
+ {local,_} = CAddr = ok(inet:sockname(C)),
+ S = ok(gen_tcp:accept(L)),
+ {error,enotconn} = inet:peername(L),
+ local_handshake(S, SAddr, C, CAddr),
+ ok = gen_tcp:close(L),
+ ok = gen_tcp:close(S),
+ ok = gen_tcp:close(C),
+ ok;
+ _ ->
+ {skip,"AF_LOCAL Abstract Addresses only supported on Linux"}
+ end.
+
+
+local_handshake(S, SAddr, C, CAddr) ->
+ SData = "9876543210",
+ CData = "0123456789",
+ SAddr = ok(inet:sockname(S)),
+ CAddr = ok(inet:sockname(C)),
+ CAddr = ok(inet:peername(S)),
+ SAddr = ok(inet:peername(C)),
+ ok = gen_tcp:send(C, CData),
+ ok = gen_tcp:send(S, SData),
+ CData = ok(gen_tcp:recv(S, length(CData))),
+ SData = ok(gen_tcp:recv(C, length(SData))),
+ ok.
+
%%% Utilities
%% Calls M:F/length(A), which should return a timeout error, and complete
@@ -369,8 +582,42 @@ unused_ip(A, B, C, D) ->
{error, _} -> {ok, {A, B, C, D}}
end.
-ok({ok,V}) -> V.
+ok({ok,V}) -> V;
+ok(NotOk) ->
+ try throw(not_ok)
+ catch
+ Thrown ->
+ erlang:raise(
+ error, {Thrown, NotOk}, tl(erlang:get_stacktrace()))
+ end.
+get_localaddr() ->
+ get_localaddr(["localhost", "localhost6", "ip6-localhost"]).
+
+get_localaddr([]) ->
+ {error, localaddr_not_found};
+get_localaddr([Localhost|Ls]) ->
+ case inet:getaddr(Localhost, inet6) of
+ {ok, LocalAddr} ->
+ io:format("~s ~p~n", [Localhost, LocalAddr]),
+ {ok, LocalAddr};
+ _ ->
+ get_localaddr(Ls)
+ end.
getsockfd() -> undefined.
closesockfd(_FD) -> undefined.
+
+local_filename(Tag) ->
+ "/tmp/" ?MODULE_STRING "_" ++ os:getpid() ++ "_" ++ atom_to_list(Tag).
+
+bin_filename(String) ->
+ unicode:characters_to_binary(String, file:native_name_encoding()).
+
+delete_local_filenames() ->
+ _ =
+ [file:delete(F) ||
+ F <-
+ filelib:wildcard(
+ "/tmp/" ?MODULE_STRING "_" ++ os:getpid() ++ "_*")],
+ ok.
diff --git a/lib/kernel/test/gen_udp_SUITE.erl b/lib/kernel/test/gen_udp_SUITE.erl
index 85dc6312ea..1029d7ef0a 100644
--- a/lib/kernel/test/gen_udp_SUITE.erl
+++ b/lib/kernel/test/gen_udp_SUITE.erl
@@ -35,7 +35,9 @@
-export([send_to_closed/1, active_n/1,
buffer_size/1, binary_passive_recv/1, bad_address/1,
- read_packets/1, open_fd/1, connect/1, implicit_inet6/1]).
+ read_packets/1, open_fd/1, connect/1, implicit_inet6/1,
+ local_basic/1, local_unbound/1,
+ local_fdopen/1, local_fdopen_unbound/1, local_abstract/1]).
suite() ->
[{ct_hooks,[ts_install_cth]},
@@ -44,10 +46,13 @@ suite() ->
all() ->
[send_to_closed, buffer_size, binary_passive_recv,
bad_address, read_packets, open_fd, connect,
- implicit_inet6, active_n].
+ implicit_inet6, active_n,
+ {group, local}].
groups() ->
- [].
+ [{local, [],
+ [local_basic, local_unbound,
+ local_fdopen, local_fdopen_unbound, local_abstract]}].
init_per_suite(Config) ->
Config.
@@ -55,9 +60,19 @@ init_per_suite(Config) ->
end_per_suite(_Config) ->
ok.
+init_per_group(local, Config) ->
+ case gen_udp:open(0, [local]) of
+ {ok,S} ->
+ ok = gen_udp:close(S),
+ Config;
+ {error,eafnosupport} ->
+ {skip, "AF_LOCAL not supported"}
+ end;
init_per_group(_GroupName, Config) ->
Config.
+end_per_group(local, _Config) ->
+ delete_local_filenames();
end_per_group(_GroupName, Config) ->
Config.
@@ -65,7 +80,7 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(_Case, Config) ->
Config.
-end_per_testcase(_Case, Config) ->
+end_per_testcase(_Case, _Config) ->
ok.
%%-------------------------------------------------------------
@@ -550,6 +565,116 @@ active_n(Config) when is_list(Config) ->
ok = gen_udp:close(S1),
ok.
+
+local_basic(_Config) ->
+ SFile = local_filename(server),
+ SAddr = {local,bin_filename(SFile)},
+ CFile = local_filename(client),
+ CAddr = {local,bin_filename(CFile)},
+ _ = file:delete(SFile),
+ _ = file:delete(CFile),
+ %%
+ S = ok(gen_udp:open(0, [{ifaddr,{local,SFile}},{active,false}])),
+ C = ok(gen_udp:open(0, [{ifaddr,{local,CFile}},{active,false}])),
+ SAddr = ok(inet:sockname(S)),
+ CAddr = ok(inet:sockname(C)),
+ local_handshake(S, SAddr, C, CAddr),
+ ok = gen_udp:close(S),
+ ok = gen_udp:close(C),
+ %%
+ ok = file:delete(SFile),
+ ok = file:delete(CFile),
+ ok.
+
+local_unbound(_Config) ->
+ SFile = local_filename(server),
+ SAddr = {local,bin_filename(SFile)},
+ _ = file:delete(SFile),
+ %%
+ S = ok(gen_udp:open(0, [{ifaddr,SAddr},{active,false}])),
+ C = ok(gen_udp:open(0, [local,{active,false}])),
+ SAddr = ok(inet:sockname(S)),
+ local_handshake(S, SAddr, C, undefined),
+ ok = gen_udp:close(S),
+ ok = gen_udp:close(C),
+ %%
+ ok = file:delete(SFile),
+ ok.
+
+local_fdopen(_Config) ->
+ SFile = local_filename(server),
+ SAddr = {local,bin_filename(SFile)},
+ CFile = local_filename(client),
+ CAddr = {local,bin_filename(CFile)},
+ _ = file:delete(SFile),
+ _ = file:delete(CFile),
+ %%
+ S0 = ok(gen_udp:open(0, [{ifaddr,SAddr},{active,false}])),
+ C = ok(gen_udp:open(0, [{ifaddr,{local,CFile}},{active,false}])),
+ SAddr = ok(inet:sockname(S0)),
+ CAddr = ok(inet:sockname(C)),
+ Fd = ok(prim_inet:getfd(S0)),
+ S = ok(gen_udp:open(0, [{fd,Fd},local,{active,false}])),
+ SAddr = ok(inet:sockname(S)),
+ local_handshake(S, SAddr, C, CAddr),
+ ok = gen_udp:close(S),
+ ok = gen_udp:close(S0),
+ ok = gen_udp:close(C),
+ %%
+ ok = file:delete(SFile),
+ ok = file:delete(CFile),
+ ok.
+
+local_fdopen_unbound(_Config) ->
+ SFile = local_filename(server),
+ SAddr = {local,bin_filename(SFile)},
+ _ = file:delete(SFile),
+ %%
+ S = ok(gen_udp:open(0, [{ifaddr,SAddr},{active,false}])),
+ C0 = ok(gen_udp:open(0, [local,{active,false}])),
+ SAddr = ok(inet:sockname(S)),
+ Fd = ok(prim_inet:getfd(C0)),
+ C = ok(gen_udp:open(0, [{fd,Fd},local,{active,false}])),
+ local_handshake(S, SAddr, C, undefined),
+ ok = gen_udp:close(S),
+ ok = gen_udp:close(C),
+ ok = gen_udp:close(C0),
+ %%
+ ok = file:delete(SFile),
+ ok.
+
+local_abstract(_Config) ->
+ case os:type() of
+ {unix,linux} ->
+ S = ok(gen_udp:open(0, [{ifaddr,{local,<<>>}},{active,false}])),
+ C = ok(gen_udp:open(0, [{ifaddr,{local,<<>>}},{active,false}])),
+ {local,_} = SAddr = ok(inet:sockname(S)),
+ {local,_} = CAddr = ok(inet:sockname(C)),
+ local_handshake(S, SAddr, C, CAddr),
+ ok = gen_udp:close(S),
+ ok = gen_udp:close(C),
+ ok;
+ _ ->
+ {skip,"AF_LOCAL Abstract Addresses only supported on Linux"}
+ end.
+
+
+local_handshake(S, SAddr, C, CAddr) ->
+ SData = "9876543210",
+ CData = "0123456789",
+ ok = gen_udp:send(C, SAddr, 0, CData),
+ case ok(gen_tcp:recv(S, 112)) of
+ {{unspec,<<>>}, 0, CData} when CAddr =:= undefined ->
+ ok;
+ {{local,<<>>}, 0, CData} when CAddr =:= undefined ->
+ ok;
+ {CAddr, 0, CData} when CAddr =/= undefined ->
+ ok = gen_udp:send(S, CAddr, 0, SData),
+ {SAddr, 0, SData} = ok(gen_tcp:recv(C, 112)),
+ ok
+
+ end.
+
%%
%% Utils
%%
@@ -572,7 +697,7 @@ connect(Config) when is_list(Config) ->
ok = gen_udp:close(S1),
ok = gen_udp:connect(S2, Addr, P1),
ok = gen_udp:send(S2, <<16#deadbeef:32>>),
- ok = case gen_udp:recv(S2, 0, 5) of
+ ok = case gen_udp:recv(S2, 0, 500) of
{error,econnrefused} -> ok;
{error,econnreset} -> ok;
Other -> Other
@@ -599,9 +724,7 @@ implicit_inet6(Host, Addr) ->
implicit_inet6(S1, Active, Loopback),
ok = gen_udp:close(S1),
%%
- Localhost = "localhost",
- Localaddr = ok(inet:getaddr(Localhost, inet6)),
- io:format("~s ~p~n", [Localhost,Localaddr]),
+ Localaddr = ok(get_localaddr()),
S2 = ok(gen_udp:open(0, [{ip,Localaddr},Active])),
implicit_inet6(S2, Active, Localaddr),
ok = gen_udp:close(S2),
@@ -630,4 +753,40 @@ implicit_inet6(S1, Active, Addr) ->
{Addr,P2,"pong"} = ok(gen_udp:recv(S1, 1024)),
ok = gen_udp:close(S2).
-ok({ok,V}) -> V.
+ok({ok,V}) -> V;
+ok(NotOk) ->
+ try throw(not_ok)
+ catch
+ Thrown ->
+ erlang:raise(
+ error, {Thrown, NotOk}, tl(erlang:get_stacktrace()))
+ end.
+
+
+local_filename(Tag) ->
+ "/tmp/" ?MODULE_STRING "_" ++ os:getpid() ++ "_" ++ atom_to_list(Tag).
+
+bin_filename(String) ->
+ unicode:characters_to_binary(String, file:native_name_encoding()).
+
+delete_local_filenames() ->
+ _ =
+ [file:delete(F) ||
+ F <-
+ filelib:wildcard(
+ "/tmp/" ?MODULE_STRING "_" ++ os:getpid() ++ "_*")],
+ ok.
+
+get_localaddr() ->
+ get_localaddr(["localhost", "localhost6", "ip6-localhost"]).
+
+get_localaddr([]) ->
+ {error, localaddr_not_found};
+get_localaddr([Localhost|Ls]) ->
+ case inet:getaddr(Localhost, inet6) of
+ {ok, LocalAddr} ->
+ io:format("~s ~p~n", [Localhost, LocalAddr]),
+ {ok, LocalAddr};
+ _ ->
+ get_localaddr(Ls)
+ end.
diff --git a/lib/kernel/test/init_SUITE.erl b/lib/kernel/test/init_SUITE.erl
index a332e7966b..1370e23195 100644
--- a/lib/kernel/test/init_SUITE.erl
+++ b/lib/kernel/test/init_SUITE.erl
@@ -298,7 +298,7 @@ many_restarts() ->
many_restarts(Config) when is_list(Config) ->
{ok, Node} = loose_node:start(init_test, "", ?DEFAULT_TIMEOUT_SEC),
- loop_restart(30,Node,rpc:call(Node,erlang,whereis,[error_logger])),
+ loop_restart(50,Node,rpc:call(Node,erlang,whereis,[error_logger])),
loose_node:stop(Node),
ok.
diff --git a/lib/kernel/test/loose_node.erl b/lib/kernel/test/loose_node.erl
index 93530c2735..cc3f9bbea0 100644
--- a/lib/kernel/test/loose_node.erl
+++ b/lib/kernel/test/loose_node.erl
@@ -57,9 +57,16 @@
%%
stop(Node) when is_atom(Node) ->
+ erlang:monitor_node(Node, true),
rpc:cast(Node, erlang, halt, []),
- io:format("Stopped loose node ~p~n", [Node]),
- ok.
+ receive
+ {nodedown, Node} ->
+ io:format("Stopped loose node ~p~n", [Node]),
+ ok
+ after 10000 ->
+ io:format("Failed to stop loose node: ~p~n", [Node]),
+ {error, node_not_stopped}
+ end.
start(Name, Args) ->
start(Name, Args, -1).
diff --git a/lib/kernel/test/os_SUITE.erl b/lib/kernel/test/os_SUITE.erl
index 2a1e5016ec..8f3e511941 100644
--- a/lib/kernel/test/os_SUITE.erl
+++ b/lib/kernel/test/os_SUITE.erl
@@ -24,7 +24,8 @@
init_per_testcase/2,end_per_testcase/2]).
-export([space_in_cwd/1, quoting/1, cmd_unicode/1, space_in_name/1, bad_command/1,
find_executable/1, unix_comment_in_command/1, deep_list_command/1,
- large_output_command/1, perf_counter_api/1]).
+ large_output_command/1, background_command/0, background_command/1,
+ perf_counter_api/1]).
-include_lib("common_test/include/ct.hrl").
@@ -35,7 +36,7 @@ suite() ->
all() ->
[space_in_cwd, quoting, cmd_unicode, space_in_name, bad_command,
find_executable, unix_comment_in_command, deep_list_command,
- large_output_command, perf_counter_api].
+ large_output_command, background_command, perf_counter_api].
groups() ->
[].
@@ -52,6 +53,13 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
+init_per_testcase(background_command, Config) ->
+ case os:type() of
+ {win32, _} ->
+ {skip,"Should not work on windows"};
+ _ ->
+ Config
+ end;
init_per_testcase(_TC,Config) ->
Config.
@@ -261,13 +269,21 @@ deep_list_command(Config) when is_list(Config) ->
%% FYI: [$e, $c, "ho"] =:= io_lib:format("ec~s", ["ho"])
ok.
-%% Test to take sure that the correct data is
+%% Test to make sure that the correct data is
%% received when doing large commands.
large_output_command(Config) when is_list(Config) ->
%% Maximum allowed on windows is 8192, so we test well below that
AAA = lists:duplicate(7000, $a),
comp(AAA,os:cmd("echo " ++ AAA)).
+%% Test that it is possible on unix to start a background task using os:cmd.
+background_command() ->
+ [{timetrap, {seconds, 5}}].
+background_command(_Config) ->
+ %% This testcase fails when the os:cmd takes
+ %% longer then the 5 second timeout
+ os:cmd("sleep 10&").
+
%% Test that the os:perf_counter api works as expected
perf_counter_api(_Config) ->
diff --git a/lib/kernel/vsn.mk b/lib/kernel/vsn.mk
index e7d422d03c..e88e4f9170 100644
--- a/lib/kernel/vsn.mk
+++ b/lib/kernel/vsn.mk
@@ -1 +1 @@
-KERNEL_VSN = 5.0
+KERNEL_VSN = 5.0.1
diff --git a/lib/megaco/doc/src/notes.xml b/lib/megaco/doc/src/notes.xml
index 7deafc79e9..a05a339003 100644
--- a/lib/megaco/doc/src/notes.xml
+++ b/lib/megaco/doc/src/notes.xml
@@ -37,7 +37,22 @@
section is the version number of Megaco.</p>
- <section><title>Megaco 3.18</title>
+ <section><title>Megaco 3.18.1</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Megaco 3.18</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/megaco/vsn.mk b/lib/megaco/vsn.mk
index 2e850f2917..b95cd66a81 100644
--- a/lib/megaco/vsn.mk
+++ b/lib/megaco/vsn.mk
@@ -19,6 +19,6 @@
# %CopyrightEnd%
APPLICATION = megaco
-MEGACO_VSN = 3.18
+MEGACO_VSN = 3.18.1
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(MEGACO_VSN)$(PRE_VSN)"
diff --git a/lib/mnesia/doc/src/notes.xml b/lib/mnesia/doc/src/notes.xml
index 4a68e76d50..7d8e8d0c44 100644
--- a/lib/mnesia/doc/src/notes.xml
+++ b/lib/mnesia/doc/src/notes.xml
@@ -39,7 +39,28 @@
thus constitutes one section in this document. The title of each
section is the version number of Mnesia.</p>
- <section><title>Mnesia 4.13.4</title>
+ <section><title>Mnesia 4.14</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Added experimental external backend plugin api. This adds
+ the possibility for the user to write other storage
+ backends for data, for example by using shared memory or
+ ram-cached disk storage.</p>
+ <p>
+ The plugin api may change in future versions after being
+ battle tested.</p>
+ <p>
+ Own Id: OTP-13058</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Mnesia 4.13.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/mnesia/vsn.mk b/lib/mnesia/vsn.mk
index 194bc439a0..fb4200f62d 100644
--- a/lib/mnesia/vsn.mk
+++ b/lib/mnesia/vsn.mk
@@ -1 +1 @@
-MNESIA_VSN = 4.13.4
+MNESIA_VSN = 4.14
diff --git a/lib/observer/doc/src/notes.xml b/lib/observer/doc/src/notes.xml
index c3bd0d33b9..f79f75fead 100644
--- a/lib/observer/doc/src/notes.xml
+++ b/lib/observer/doc/src/notes.xml
@@ -32,6 +32,68 @@
<p>This document describes the changes made to the Observer
application.</p>
+<section><title>Observer 2.2.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed a crash happening when observing another node, who
+ have a different number of schedulers than the current
+ one.</p>
+ <p>
+ Own Id: OTP-13702 Aux Id: ERL-171 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Observer 2.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Update observer GUI to support tracing on ports, and to
+ set matchspecs for send/receive. This required some minor
+ bugfixes in runtime_tools/dbg.</p>
+ <p>
+ Own Id: OTP-13481</p>
+ </item>
+ <item>
+ <p>
+ Update dbg and ttb to work with a tracer module as tracer
+ and tracing on ports.</p>
+ <p>
+ Own Id: OTP-13500</p>
+ </item>
+ <item>
+ <p>
+ Added possibility to change update frequency and length
+ of the graph windows.</p>
+ <p>
+ Own Id: OTP-13555</p>
+ </item>
+ <item>
+ <p>
+ Improved background coloring to work with dark themes and
+ other visual improvements.</p>
+ <p>
+ Own Id: OTP-13556</p>
+ </item>
+ <item>
+ <p>
+ Crashdump viewer now allows port info "Port controls
+ forker process..."</p>
+ <p>
+ Own Id: OTP-13647</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Observer 2.1.2</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/observer/src/observer_perf_wx.erl b/lib/observer/src/observer_perf_wx.erl
index 1010a6af4c..6a1aac92c7 100644
--- a/lib/observer/src/observer_perf_wx.erl
+++ b/lib/observer/src/observer_perf_wx.erl
@@ -235,12 +235,14 @@ terminate(_Event, #state{appmon=Pid}) ->
code_change(_, _, State) ->
State.
-restart_fetcher(Node, #state{appmon=Old, panel=Panel, time=#ti{fetch=Freq}=Ti}=State) ->
+restart_fetcher(Node, #state{appmon=Old, panel=Panel, time=#ti{fetch=Freq}=Ti, wins=Wins0}=State) ->
catch Old ! exit,
Me = self(),
Pid = spawn_link(Node, observer_backend, fetch_stats, [Me, round(1000/Freq)]),
wxWindow:refresh(Panel),
- precalc(State#state{active=true, appmon=Pid, samples=reset_data(), time=Ti#ti{tick=0}}).
+ Wins = [W#win{state=undefined} || W <- Wins0],
+ precalc(State#state{active=true, appmon=Pid, samples=reset_data(),
+ wins=Wins, time=Ti#ti{tick=0}}).
reset_data() ->
{0, queue:new()}.
@@ -253,18 +255,25 @@ add_data(Stats, {N, Q}, Wins, _, Active) ->
add_data_1([#win{state={_,St}}|_]=Wins0, Last, N, {Drop, Q}, Active)
when St /= undefined ->
- {Wins, Stat} =
- lists:mapfoldl(fun(Win0, Entry) ->
- {Win1,Stat} = add_data_2(Win0, Last, Entry),
- case Active of
- true ->
- Win = add_data_3(Win1, N, Drop, Stat, Q),
- {Win, Stat};
- false ->
- {Win1, Stat}
- end
- end, #{}, Wins0),
- {Wins, {N,queue:in(Stat#{}, Q)}};
+ try
+ {Wins, Stat} =
+ lists:mapfoldl(fun(Win0, Entry) ->
+ {Win1,Stat} = add_data_2(Win0, Last, Entry),
+ case Active of
+ true ->
+ Win = add_data_3(Win1, N, Drop, Stat, Q),
+ {Win, Stat};
+ false ->
+ {Win1, Stat}
+ end
+ end, #{}, Wins0),
+ {Wins, {N,queue:in(Stat#{}, Q)}}
+ catch no_scheduler_change ->
+ {[Win#win{state=init_data(Id, Last),
+ info = info(Id, Last)}
+ || #win{name=Id}=Win <- Wins0], {0,queue:new()}}
+ end;
+
add_data_1(Wins, Stats, 1, {_, Q}, _) ->
{[Win#win{state=init_data(Id, Stats),
info = info(Id, Stats)}
@@ -409,7 +418,8 @@ collect_data(utilz, MemInfo, Max) ->
calc_delta([{Id, WN, TN}|Ss], [{Id, WP, TP}|Ps]) ->
[100*(WN-WP) div (TN-TP)|calc_delta(Ss, Ps)];
-calc_delta([], []) -> [].
+calc_delta([], []) -> [];
+calc_delta(_, _) -> throw(no_scheduler_change).
precalc(#state{samples=Data0, paint=Paint, time=Ti, wins=Wins0}=State) ->
Wins = [precalc(Ti, Data0, Paint, Win) || Win <- Wins0],
diff --git a/lib/observer/vsn.mk b/lib/observer/vsn.mk
index aede0858d6..9a7c6a546f 100644
--- a/lib/observer/vsn.mk
+++ b/lib/observer/vsn.mk
@@ -1 +1 @@
-OBSERVER_VSN = 2.1.2
+OBSERVER_VSN = 2.2.1
diff --git a/lib/odbc/configure.in b/lib/odbc/configure.in
index cb2b23d534..d26daa5eda 100644
--- a/lib/odbc/configure.in
+++ b/lib/odbc/configure.in
@@ -147,7 +147,7 @@ AC_SUBST(THR_LIBS)
odbc_lib_link_success=no
AC_SUBST(TARGET_FLAGS)
case $host_os in
- darwin1[[0-4]].*|darwin[[0-9]].*)
+ darwin1[[0-5]].*|darwin[[0-9]].*)
TARGET_FLAGS="-DUNIX"
if test ! -d "$with_odbc" || test "$with_odbc" = "yes"; then
ODBC_LIB= -L"/usr/lib"
diff --git a/lib/odbc/doc/src/notes.xml b/lib/odbc/doc/src/notes.xml
index ac3c99badc..d3dd39616f 100644
--- a/lib/odbc/doc/src/notes.xml
+++ b/lib/odbc/doc/src/notes.xml
@@ -32,7 +32,23 @@
<p>This document describes the changes made to the odbc application.
</p>
- <section><title>ODBC 2.11.1</title>
+ <section><title>ODBC 2.11.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Configure enhancement for better handling program paths
+ used in the build process</p>
+ <p>
+ Own Id: OTP-13559</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>ODBC 2.11.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/odbc/test/odbc_connect_SUITE.erl b/lib/odbc/test/odbc_connect_SUITE.erl
index 5727c1ca50..261dfc6f20 100644
--- a/lib/odbc/test/odbc_connect_SUITE.erl
+++ b/lib/odbc/test/odbc_connect_SUITE.erl
@@ -89,6 +89,7 @@ init_per_suite(Config) when is_list(Config) ->
[{auto_commit, off}] ++ odbc_test_lib:platform_options()) of
{ok, Ref} ->
odbc:disconnect(Ref),
+ ct:timetrap(?default_timeout),
[{tableName, odbc_test_lib:unique_table_name()} | Config];
_ ->
{skip, "ODBC is not properly setup"}
@@ -129,11 +130,8 @@ init_per_testcase(_TestCase, Config) ->
init_per_testcase_common(Config).
init_per_testcase_common(Config) ->
- test_server:format("ODBCINI = ~p~n", [os:getenv("ODBCINI")]),
- Dog = test_server:timetrap(?default_timeout),
- Temp = lists:keydelete(connection_ref, 1, Config),
- NewConfig = lists:keydelete(watchdog, 1, Temp),
- [{watchdog, Dog} | NewConfig].
+ ct:pal("ODBCINI = ~p~n", [os:getenv("ODBCINI")]),
+ lists:keydelete(connection_ref, 1, Config).
%%--------------------------------------------------------------------
%% Function: end_per_testcase(Case, Config) -> _
@@ -153,25 +151,22 @@ end_per_testcase(_TestCase, Config) ->
end_per_testcase_common(Config).
end_per_testcase_common(Config) ->
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
{ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()),
Result = odbc:sql_query(Ref, "DROP TABLE " ++ Table),
io:format("Drop table: ~p ~p~n", [Table, Result]),
- odbc:disconnect(Ref),
- Dog = ?config(watchdog, Config),
- test_server:timetrap_cancel(Dog).
+ odbc:disconnect(Ref).
%%-------------------------------------------------------------------------
%% Test cases starts here.
%%-------------------------------------------------------------------------
-commit(doc)->
- ["Test the use of explicit commit"];
-commit(suite) -> [];
+commit()->
+ [{doc,"Test the use of explicit commit"}].
commit(Config) ->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(),
[{auto_commit, off}] ++ odbc_test_lib:platform_options()),
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
TransStr = transaction_support_str(?RDBMS),
{updated, _} =
@@ -205,14 +200,13 @@ commit(Config) ->
ok = odbc:disconnect(Ref).
%%-------------------------------------------------------------------------
-rollback(doc)->
- ["Test the use of explicit rollback"];
-rollback(suite) -> [];
+rollback()->
+ [{doc,"Test the use of explicit rollback"}].
rollback(Config) ->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(),
[{auto_commit, off}] ++ odbc_test_lib:platform_options()),
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
TransStr = transaction_support_str(?RDBMS),
@@ -245,9 +239,8 @@ rollback(Config) ->
ok = odbc:disconnect(Ref).
%%-------------------------------------------------------------------------
-not_explicit_commit(doc) ->
- ["Test what happens if you try using commit on a auto_commit connection."];
-not_explicit_commit(suite) -> [];
+not_explicit_commit() ->
+ [{doc,"Test what happens if you try using commit on a auto_commit connection."}].
not_explicit_commit(_Config) ->
{ok, Ref} =
odbc:connect(?RDBMS:connection_string(), [{auto_commit, on}] ++
@@ -256,19 +249,17 @@ not_explicit_commit(_Config) ->
ok = odbc:disconnect(Ref).
%%-------------------------------------------------------------------------
-not_exist_db(doc) ->
- ["Tests valid data format but invalid data in the connection parameters."];
-not_exist_db(suite) -> [];
+not_exist_db() ->
+ [{doc,"Tests valid data format but invalid data in the connection parameters."}].
not_exist_db(_Config) ->
{error, _} = odbc:connect("DSN=foo;UID=bar;PWD=foobar",
odbc_test_lib:platform_options()),
%% So that the odbc control server can be stoped "in the correct way"
- test_server:sleep(100).
+ ct:sleep(100).
%%-------------------------------------------------------------------------
-no_c_executable(doc) ->
- "Test what happens if the port-program can not be found";
-no_c_executable(suite) -> [];
+no_c_executable() ->
+ [{doc,"Test what happens if the port-program can not be found"}].
no_c_executable(_Config) ->
process_flag(trap_exit, true),
Dir = filename:nativename(filename:join(code:priv_dir(odbc),
@@ -293,9 +284,8 @@ no_c_executable(_Config) ->
end.
%%------------------------------------------------------------------------
-port_dies(doc) ->
- "Tests what happens if the port program dies";
-port_dies(suite) -> [];
+port_dies() ->
+ [{doc,"Tests what happens if the port program dies"}].
port_dies(_Config) ->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()),
{status, _} = process_info(Ref, status),
@@ -307,7 +297,7 @@ port_dies(_Config) ->
%% Wait for exit_status from port 5000 ms (will not get a exit
%% status in this case), then wait a little longer to make sure
%% the port and the controlprocess has had time to terminate.
- test_server:sleep(10000),
+ ct:sleep(10000),
undefined = process_info(Ref, status);
[] ->
ct:fail([erlang:port_info(P, name) || P <- erlang:ports()])
@@ -315,9 +305,8 @@ port_dies(_Config) ->
%%-------------------------------------------------------------------------
-control_process_dies(doc) ->
- "Tests what happens if the Erlang control process dies";
-control_process_dies(suite) -> [];
+control_process_dies() ->
+ [{doc,"Tests what happens if the Erlang control process dies"}].
control_process_dies(_Config) ->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()),
process_flag(trap_exit, true),
@@ -326,7 +315,7 @@ control_process_dies(_Config) ->
[Port] ->
{connected, Ref} = erlang:port_info(Port, connected),
exit(Ref, kill),
- test_server:sleep(500),
+ ct:sleep(500),
undefined = erlang:port_info(Port, connected);
%% Check for c-program still running, how?
[] ->
@@ -334,9 +323,8 @@ control_process_dies(_Config) ->
end.
%%-------------------------------------------------------------------------
-client_dies_normal(doc) ->
- ["Client dies with reason normal."];
-client_dies_normal(suite) -> [];
+client_dies_normal() ->
+ [{doc,"Client dies with reason normal."}].
client_dies_normal(Config) when is_list(Config) ->
Pid = spawn(?MODULE, client_normal, [self()]),
@@ -352,7 +340,7 @@ client_dies_normal(Config) when is_list(Config) ->
{'DOWN', MonitorReference, _Type, _Object, _Info} ->
ok
after 5000 ->
- test_server:fail(control_process_not_stopped)
+ ct:fail(control_process_not_stopped)
end.
client_normal(Pid) ->
@@ -366,9 +354,8 @@ client_normal(Pid) ->
%%-------------------------------------------------------------------------
-client_dies_timeout(doc) ->
- ["Client dies with reason timeout."];
-client_dies_timeout(suite) -> [];
+client_dies_timeout() ->
+ [{doc,"Client dies with reason timeout."}].
client_dies_timeout(Config) when is_list(Config) ->
Pid = spawn(?MODULE, client_timeout, [self()]),
@@ -384,7 +371,7 @@ client_dies_timeout(Config) when is_list(Config) ->
{'DOWN', MonitorReference, _Type, _Object, _Info} ->
ok
after 5000 ->
- test_server:fail(control_process_not_stopped)
+ ct:fail(control_process_not_stopped)
end.
client_timeout(Pid) ->
@@ -398,9 +385,8 @@ client_timeout(Pid) ->
%%-------------------------------------------------------------------------
-client_dies_error(doc) ->
- ["Client dies with reason error."];
-client_dies_error(suite) -> [];
+client_dies_error() ->
+ [{doc,"Client dies with reason error."}].
client_dies_error(Config) when is_list(Config) ->
Pid = spawn(?MODULE, client_error, [self()]),
@@ -416,7 +402,7 @@ client_dies_error(Config) when is_list(Config) ->
{'DOWN', MonitorReference, _Type, _Object, _Info} ->
ok
after 5000 ->
- test_server:fail(control_process_not_stopped)
+ ct:fail(control_process_not_stopped)
end.
client_error(Pid) ->
@@ -430,9 +416,8 @@ client_error(Pid) ->
%%-------------------------------------------------------------------------
-connect_timeout(doc) ->
- ["Test the timeout for the connect function."];
-connect_timeout(suite) -> [];
+connect_timeout() ->
+ [{doc,"Test the timeout for the connect function."}].
connect_timeout(Config) when is_list(Config) ->
{'EXIT',timeout} = (catch odbc:connect(?RDBMS:connection_string(),
[{timeout, 0}] ++
@@ -442,10 +427,9 @@ connect_timeout(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-connect_port_timeout(doc) ->
- ["Test the timeout for the port program to connect back to the odbc "
- "application within the connect function."];
-connect_port_timeout(suite) -> [];
+connect_port_timeout() ->
+ [{"Test the timeout for the port program to connect back to the odbc "
+ "application within the connect function."}].
connect_port_timeout(Config) when is_list(Config) ->
%% Application environment var 'port_timeout' has been set to 0 by
%% init_per_testcase/2.
@@ -453,15 +437,14 @@ connect_port_timeout(Config) when is_list(Config) ->
odbc_test_lib:platform_options()).
%%-------------------------------------------------------------------------
-timeout(doc) ->
- ["Test that timeouts don't cause unwanted behavior sush as receiving"
- " an anwser to a previously tiemed out query."];
-timeout(suite) -> [];
+timeout() ->
+ [{"Test that timeouts don't cause unwanted behavior sush as receiving"
+ " an anwser to a previously tiemed out query."}].
timeout(Config) when is_list(Config) ->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(),
[{auto_commit, off}]),
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
TransStr = transaction_support_str(?RDBMS),
@@ -512,7 +495,7 @@ update_table_timeout(Table, TimeOut, Pid) ->
{'EXIT', timeout} ->
Pid ! timout_occurred;
{updated, 1} ->
- test_server:fail(database_locker_failed)
+ ct:fail(database_locker_failed)
end,
receive
@@ -537,15 +520,14 @@ update_table_timeout(Table, TimeOut, Pid) ->
ok = odbc:disconnect(Ref).
%%-------------------------------------------------------------------------
-many_timeouts(doc) ->
- ["Tests that many consecutive timeouts lead to that the connection "
- "is shutdown."];
-many_timeouts(suite) -> [];
+many_timeouts() ->
+ [{doc, "Tests that many consecutive timeouts lead to that the connection "
+ "is shutdown."}].
many_timeouts(Config) when is_list(Config) ->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(),
[{auto_commit, off}] ++ odbc_test_lib:platform_options()),
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
TransStr = transaction_support_str(?RDBMS),
{updated, _} =
@@ -592,19 +574,18 @@ loop_many_timouts(Ref, UpdateQuery, TimeOut) ->
{'EXIT',timeout} ->
loop_many_timouts(Ref, UpdateQuery, TimeOut);
{updated, 1} ->
- test_server:fail(database_locker_failed);
+ ct:fail(database_locker_failed);
{error, connection_closed} ->
ok
end.
%%-------------------------------------------------------------------------
-timeout_reset(doc) ->
- ["Check that the number of consecutive timouts is reset to 0 when "
- "a successful call to the database is made."];
-timeout_reset(suite) -> [];
+timeout_reset() ->
+ [{doc, "Check that the number of consecutive timouts is reset to 0 when "
+ "a successful call to the database is made."}].
timeout_reset(Config) when is_list(Config) ->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(),
[{auto_commit, off}] ++ odbc_test_lib:platform_options()),
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
TransStr = transaction_support_str(?RDBMS),
{updated, _} =
@@ -688,21 +669,20 @@ loop_timout_reset(Ref, UpdateQuery, TimeOut, NumTimeouts) ->
loop_timout_reset(Ref, UpdateQuery,
TimeOut, NumTimeouts - 1);
{updated, 1} ->
- test_server:fail(database_locker_failed);
+ ct:fail(database_locker_failed);
{error, connection_closed} ->
- test_server:fail(connection_closed_premature)
+ ct:fail(connection_closed_premature)
end.
%%-------------------------------------------------------------------------
-disconnect_on_timeout(doc) ->
- ["Check that disconnect after a time out works properly"];
-disconnect_on_timeout(suite) -> [];
+disconnect_on_timeout() ->
+ [{doc,"Check that disconnect after a time out works properly"}].
disconnect_on_timeout(Config) when is_list(Config) ->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(),
[{auto_commit, off}] ++ odbc_test_lib:platform_options()),
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
TransStr = transaction_support_str(?RDBMS),
{updated, _} =
@@ -726,7 +706,7 @@ disconnect_on_timeout(Config) when is_list(Config) ->
ok ->
ok = odbc:commit(Ref, commit);
nok ->
- test_server:fail(database_locker_failed)
+ ct:fail(database_locker_failed)
end.
update_table_disconnect_on_timeout(Table, TimeOut, Pid) ->
@@ -744,14 +724,13 @@ update_table_disconnect_on_timeout(Table, TimeOut, Pid) ->
end.
%%-------------------------------------------------------------------------
-connection_closed(doc) ->
- ["Checks that you get an appropriate error message if you try to"
- " use a connection that has been closed"];
-connection_closed(suite) -> [];
+connection_closed() ->
+ [{doc, "Checks that you get an appropriate error message if you try to"
+ " use a connection that has been closed"}].
connection_closed(Config) when is_list(Config) ->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()),
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
"CREATE TABLE " ++ Table ++
@@ -771,14 +750,13 @@ connection_closed(Config) when is_list(Config) ->
{error, connection_closed} = odbc:commit(Ref, commit).
%%-------------------------------------------------------------------------
-disable_scrollable_cursors(doc) ->
- ["Test disabling of scrollable cursors."];
-disable_scrollable_cursors(suite) -> [];
+disable_scrollable_cursors() ->
+ [{doc,"Test disabling of scrollable cursors."}].
disable_scrollable_cursors(Config) when is_list(Config) ->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(),
[{scrollable_cursors, off}]),
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -792,10 +770,10 @@ disable_scrollable_cursors(Config) when is_list(Config) ->
NextResult = ?RDBMS:selected_ID(1, next),
- test_server:format("Expected: ~p~n", [NextResult]),
+ ct:pal("Expected: ~p~n", [NextResult]),
Result = odbc:next(Ref),
- test_server:format("Got: ~p~n", [Result]),
+ ct:pal("Got: ~p~n", [Result]),
NextResult = Result,
{error, scrollable_cursors_disabled} = odbc:first(Ref),
@@ -809,15 +787,14 @@ disable_scrollable_cursors(Config) when is_list(Config) ->
{selected, _ColNames,[]} = odbc:select(Ref, next, 1).
%%-------------------------------------------------------------------------
-return_rows_as_lists(doc)->
- ["Test the option that a row may be returned as a list instead "
- "of a tuple. Too be somewhat backward compatible."];
-return_rows_as_lists(suite) -> [];
+return_rows_as_lists()->
+ [{doc,"Test the option that a row may be returned as a list instead "
+ "of a tuple. Too be somewhat backward compatible."}].
return_rows_as_lists(Config) when is_list(Config) ->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(),
[{tuple_row, off}] ++ odbc_test_lib:platform_options()),
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -854,29 +831,28 @@ return_rows_as_lists(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-api_missuse(doc)->
- ["Test that behaviour of the control process if the api is abused"];
-api_missuse(suite) -> [];
+api_missuse()->
+ [{doc,"Test that behaviour of the control process if the api is abused"}].
api_missuse(Config) when is_list(Config)->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()),
%% Serious programming fault, connetion will be shut down
gen_server:call(Ref, {self(), foobar, 10}, infinity),
- test_server:sleep(10),
+ ct:sleep(10),
undefined = process_info(Ref, status),
{ok, Ref2} = odbc:connect(?RDBMS:connection_string(),
odbc_test_lib:platform_options()),
%% Serious programming fault, connetion will be shut down
gen_server:cast(Ref2, {self(), foobar, 10}),
- test_server:sleep(10),
+ ct:sleep(10),
undefined = process_info(Ref2, status),
{ok, Ref3} = odbc:connect(?RDBMS:connection_string(),
odbc_test_lib:platform_options()),
%% Could be an innocent misstake the connection lives.
Ref3 ! foobar,
- test_server:sleep(10),
+ ct:sleep(10),
{status, _} = process_info(Ref3, status).
transaction_support_str(mysql) ->
@@ -886,13 +862,13 @@ transaction_support_str(_) ->
%%-------------------------------------------------------------------------
-extended_errors(doc)->
- ["Test the extended errors connection option: When off; the old behaviour of just an error "
- "string is returned on error. When on, the error string is replaced by a 3 element tuple "
- "that also exposes underlying ODBC provider error codes."];
-extended_errors(suite) -> [];
+extended_errors()->
+ [{doc,
+ "Test the extended errors connection option: When off; the old behaviour of just an error "
+ "string is returned on error. When on, the error string is replaced by a 3 element tuple "
+ "that also exposes underlying ODBC provider error codes."}].
extended_errors(Config) when is_list(Config)->
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
{ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()),
{updated, _} = odbc:sql_query(Ref, "create table " ++ Table ++" ( id integer, data varchar(10))"),
diff --git a/lib/odbc/test/odbc_data_type_SUITE.erl b/lib/odbc/test/odbc_data_type_SUITE.erl
index c88c00725e..a3a4bc78eb 100644
--- a/lib/odbc/test/odbc_data_type_SUITE.erl
+++ b/lib/odbc/test/odbc_data_type_SUITE.erl
@@ -120,6 +120,7 @@ init_per_suite(Config) when is_list(Config) ->
false ->
case (catch odbc:start()) of
ok ->
+ ct:timetrap(?default_timeout),
[{tableName, odbc_test_lib:unique_table_name()}| Config];
_ ->
{skip, "ODBC not startable"}
@@ -191,23 +192,22 @@ init_per_testcase(Case, Config) ->
common_init_per_testcase(Case, Config) ->
PlatformOptions = odbc_test_lib:platform_options(),
- case atom_to_list(Case) of
- "binary" ++ _ ->
- {ok, Ref} = odbc:connect(?RDBMS:connection_string(),
- [{binary_strings, on}] ++ PlatformOptions);
- LCase when LCase == "utf8";
- LCase == "nchar";
- LCase == "nvarchar" ->
- {ok, Ref} = odbc:connect(?RDBMS:connection_string(),
- [{binary_strings, on}] ++ PlatformOptions);
- _ ->
- {ok, Ref} = odbc:connect(?RDBMS:connection_string(), PlatformOptions)
- end,
+ {ok, Ref} =
+ case atom_to_list(Case) of
+ "binary" ++ _ ->
+ odbc:connect(?RDBMS:connection_string(),
+ [{binary_strings, on}] ++ PlatformOptions);
+ LCase when LCase == "utf8";
+ LCase == "nchar";
+ LCase == "nvarchar" ->
+ odbc:connect(?RDBMS:connection_string(),
+ [{binary_strings, on}] ++ PlatformOptions);
+ _ ->
+ odbc:connect(?RDBMS:connection_string(), PlatformOptions)
+ end,
odbc_test_lib:strict(Ref, ?RDBMS),
- Dog = test_server:timetrap(?default_timeout),
- Temp = lists:keydelete(connection_ref, 1, Config),
- NewConfig = lists:keydelete(watchdog, 1, Temp),
- [{watchdog, Dog}, {connection_ref, Ref} | NewConfig].
+ NewConfig = lists:keydelete(connection_ref, 1, Config),
+ [{connection_ref, Ref} | NewConfig].
is_fixed_upper_limit(mysql) ->
false;
@@ -231,28 +231,23 @@ is_supported_bit(_) ->
%% Description: Cleanup after each test case
%%--------------------------------------------------------------------
end_per_testcase(_TestCase, Config) ->
- Ref = ?config(connection_ref, Config),
+ Ref = proplists:get_value(connection_ref, Config),
ok = odbc:disconnect(Ref),
%% Clean up if needed
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
{ok, NewRef} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()),
odbc:sql_query(NewRef, "DROP TABLE " ++ Table),
- odbc:disconnect(NewRef),
- Dog = ?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
- ok.
+ odbc:disconnect(NewRef).
%%-------------------------------------------------------------------------
%% Test cases starts here.
%%-------------------------------------------------------------------------
-char_fixed_lower_limit(doc) ->
- ["Tests fixed length char data type lower boundaries."];
-char_fixed_lower_limit(suite) ->
- [];
+char_fixed_lower_limit() ->
+ [{doc,"Tests fixed length char data type lower boundaries."}].
char_fixed_lower_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
%% Below limit
{error, _} =
@@ -287,18 +282,16 @@ char_fixed_lower_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-char_fixed_upper_limit(doc) ->
- ["Tests fixed length char data type upper boundaries."];
-char_fixed_upper_limit(suite) ->
- [];
+char_fixed_upper_limit() ->
+ [{doc,"Tests fixed length char data type upper boundaries."}].
char_fixed_upper_limit(Config) when is_list(Config) ->
case ?RDBMS of
postgres ->
{skip, "Limit unknown"};
_ ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
%% Upper limit
{updated, _} = % Value == 0 || -1 driver dependent!
@@ -337,14 +330,12 @@ char_fixed_upper_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-char_fixed_padding(doc) ->
- ["Tests that data that is shorter than the given size is padded "
- "with blanks."];
-char_fixed_padding(suite) ->
- [];
+char_fixed_padding() ->
+ [{doc, "Tests that data that is shorter than the given size is padded "
+ "with blanks."}].
char_fixed_padding(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
%% Data should be padded with blanks
{updated, _} = % Value == 0 || -1 driver dependent!
@@ -365,13 +356,11 @@ char_fixed_padding(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-varchar_lower_limit(doc) ->
- ["Tests variable length char data type lower boundaries."];
-varchar_lower_limit(suite) ->
- [];
+varchar_lower_limit() ->
+ [{doc,"Tests variable length char data type lower boundaries."}].
varchar_lower_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
%% Below limit
{error, _} =
@@ -405,13 +394,11 @@ varchar_lower_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-varchar_upper_limit(doc) ->
- ["Tests variable length char data type upper boundaries."];
-varchar_upper_limit(suite) ->
- [];
+varchar_upper_limit() ->
+ [{doc,"Tests variable length char data type upper boundaries."}].
varchar_upper_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
case ?RDBMS of
oracle ->
@@ -455,14 +442,12 @@ varchar_upper_limit(Config) when is_list(Config) ->
end.
%%-------------------------------------------------------------------------
-varchar_no_padding(doc) ->
- ["Tests that data that is shorter than the given max size is not padded "
- "with blanks."];
-varchar_no_padding(suite) ->
- [];
+varchar_no_padding() ->
+ [{doc, "Tests that data that is shorter than the given max size is not padded "
+ "with blanks."}].
varchar_no_padding(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
%% Data should NOT be padded with blanks
{updated, _} = % Value == 0 || -1 driver dependent!
@@ -481,13 +466,11 @@ varchar_no_padding(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-text_lower_limit(doc) ->
- ["Tests 'long' char data type lower boundaries."];
-text_lower_limit(suite) ->
- [];
+text_lower_limit() ->
+ [{doc,"Tests 'long' char data type lower boundaries."}].
text_lower_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -504,15 +487,13 @@ text_lower_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-text_upper_limit(doc) ->
- [];
-text_upper_limit(suite) ->
- [];
+text_upper_limit() ->
+ [{doc,"Tests 'text' char data type upper boundaries."}].
text_upper_limit(Config) when is_list(Config) ->
{skip,"Consumes too much resources" }.
-%% Ref = ?config(connection_ref, Config),
-%% Table = ?config(tableName, Config),
+%% Ref = proplists:get_value(connection_ref, Config),
+%% Table = proplists:get_value(tableName, Config),
%% {updated, _} = % Value == 0 || -1 driver dependent!
%% odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -534,13 +515,11 @@ text_upper_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-binary_char_fixed_lower_limit(doc) ->
- ["Tests fixed length char data type lower boundaries."];
-binary_char_fixed_lower_limit(suite) ->
- [];
+binary_char_fixed_lower_limit() ->
+ [{doc,"Tests fixed length char data type lower boundaries."}].
binary_char_fixed_lower_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
%% Below limit
{error, _} =
@@ -579,18 +558,16 @@ binary_char_fixed_lower_limit(Config) when is_list(Config) ->
++ "')").
%%-------------------------------------------------------------------------
-binary_char_fixed_upper_limit(doc) ->
- ["Tests fixed length char data type upper boundaries."];
-binary_char_fixed_upper_limit(suite) ->
- [];
+binary_char_fixed_upper_limit() ->
+ [{doc,"Tests fixed length char data type upper boundaries."}].
binary_char_fixed_upper_limit(Config) when is_list(Config) ->
case ?RDBMS of
postgres ->
{skip, "Limit unknown"};
_ ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
%% Upper limit
{updated, _} = % Value == 0 || -1 driver dependent!
@@ -630,14 +607,12 @@ binary_char_fixed_upper_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-binary_char_fixed_padding(doc) ->
- ["Tests that data that is shorter than the given size is padded "
- "with blanks."];
-binary_char_fixed_padding(suite) ->
- [];
+binary_char_fixed_padding() ->
+ [{doc, "Tests that data that is shorter than the given size is padded "
+ "with blanks."}].
binary_char_fixed_padding(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
%% Data should be padded with blanks
{updated, _} = % Value == 0 || -1 driver dependent!
@@ -658,13 +633,11 @@ binary_char_fixed_padding(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-binary_varchar_lower_limit(doc) ->
- ["Tests variable length char data type lower boundaries."];
-binary_varchar_lower_limit(suite) ->
- [];
+binary_varchar_lower_limit() ->
+ [{doc,"Tests variable length char data type lower boundaries."}].
binary_varchar_lower_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
%% Below limit
{error, _} =
@@ -701,13 +674,11 @@ binary_varchar_lower_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-binary_varchar_upper_limit(doc) ->
- ["Tests variable length char data type upper boundaries."];
-binary_varchar_upper_limit(suite) ->
- [];
+binary_varchar_upper_limit() ->
+ [{doc,"Tests variable length char data type upper boundaries."}].
binary_varchar_upper_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
case ?RDBMS of
oracle ->
@@ -750,14 +721,12 @@ binary_varchar_upper_limit(Config) when is_list(Config) ->
end.
%%-------------------------------------------------------------------------
-binary_varchar_no_padding(doc) ->
- ["Tests that data that is shorter than the given max size is not padded "
- "with blanks."];
-binary_varchar_no_padding(suite) ->
- [];
+binary_varchar_no_padding() ->
+ [{doc,"Tests that data that is shorter than the given max size is not padded "
+ "with blanks."}].
binary_varchar_no_padding(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
%% Data should NOT be padded with blanks
{updated, _} = % Value == 0 || -1 driver dependent!
@@ -776,13 +745,11 @@ binary_varchar_no_padding(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-binary_text_lower_limit(doc) ->
- ["Tests 'long' char data type lower boundaries."];
-binary_text_lower_limit(suite) ->
- [];
+binary_text_lower_limit() ->
+ [{doc,"Tests 'long' char data type lower boundaries."}].
binary_text_lower_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -799,15 +766,13 @@ binary_text_lower_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-binary_text_upper_limit(doc) ->
- [];
-binary_text_upper_limit(suite) ->
- [];
+binary_text_upper_limit() ->
+ [{doc,"Tests text char data type upper boundaries."}].
binary_text_upper_limit(Config) when is_list(Config) ->
{skip,"Consumes too much resources" }.
-%% Ref = ?config(connection_ref, Config),
-%% Table = ?config(tableName, Config),
+%% Ref = proplists:get_value(connection_ref, Config),
+%% Table = proplists:get_value(tableName, Config),
%% {updated, _} = % Value == 0 || -1 driver dependent!
%% odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -830,17 +795,15 @@ binary_text_upper_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-tiny_int_lower_limit(doc) ->
- ["Tests integer of type tinyint."];
-tiny_int_lower_limit(suite) ->
- [];
+tiny_int_lower_limit() ->
+ [{doc,"Tests integer of type tinyint."}].
tiny_int_lower_limit(Config) when is_list(Config) ->
case ?RDBMS of
postgres ->
{skip, "Type tiniyint not supported"};
_ ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -864,17 +827,15 @@ tiny_int_lower_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-tiny_int_upper_limit(doc) ->
- ["Tests integer of type tinyint."];
-tiny_int_upper_limit(suite) ->
- [];
+tiny_int_upper_limit() ->
+ [{doc,"Tests integer of type tinyint."}].
tiny_int_upper_limit(Config) when is_list(Config) ->
case ?RDBMS of
postgres ->
{skip, "Type tiniyint not supported"};
_ ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -898,13 +859,11 @@ tiny_int_upper_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-small_int_lower_limit(doc) ->
- ["Tests integer of type smallint."];
-small_int_lower_limit(suite) ->
- [];
+small_int_lower_limit() ->
+ [{doc,"Tests integer of type smallint."}].
small_int_lower_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -927,13 +886,11 @@ small_int_lower_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-small_int_upper_limit(doc) ->
- ["Tests integer of type smallint."];
-small_int_upper_limit(suite) ->
- [];
+small_int_upper_limit() ->
+ [{doc,"Tests integer of type smallint."}].
small_int_upper_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -955,13 +912,11 @@ small_int_upper_limit(Config) when is_list(Config) ->
++ "')").
%%-------------------------------------------------------------------------
-int_lower_limit(doc) ->
- ["Tests integer of type int."];
-int_lower_limit(suite) ->
- [];
+int_lower_limit() ->
+ [{doc,"Tests integer of type int."}].
int_lower_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -983,13 +938,11 @@ int_lower_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-int_upper_limit(doc) ->
- ["Tests integer of type int."];
-int_upper_limit(suite) ->
- [];
+int_upper_limit() ->
+ [{doc,"Tests integer of type int."}].
int_upper_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1011,13 +964,11 @@ int_upper_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-big_int_lower_limit(doc) ->
- ["Tests integer of type bigint"];
-big_int_lower_limit(suite) ->
- [];
+big_int_lower_limit() ->
+ [{doc,"Tests integer of type bigint"}].
big_int_lower_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1040,13 +991,11 @@ big_int_lower_limit(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-big_int_upper_limit(doc) ->
- ["Tests integer of type bigint."];
-big_int_upper_limit(suite) ->
- [];
+big_int_upper_limit() ->
+ [{doc,"Tests integer of type bigint."}].
big_int_upper_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1068,17 +1017,13 @@ big_int_upper_limit(Config) when is_list(Config) ->
++ "')").
%%-------------------------------------------------------------------------
-bit_false(doc) ->
- [""];
-bit_false(suite) ->
- [];
bit_false(Config) when is_list(Config) ->
case ?RDBMS of
oracle ->
{skip, "Not supported by driver"};
_ ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1102,17 +1047,13 @@ bit_false(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-bit_true(doc) ->
- [""];
-bit_true(suite) ->
- [];
bit_true(Config) when is_list(Config) ->
case ?RDBMS of
oracle ->
{skip, "Not supported by driver"};
_ ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
@@ -1136,14 +1077,11 @@ bit_true(Config) when is_list(Config) ->
end.
%%-------------------------------------------------------------------------
-float_lower_limit(doc) ->
- [""];
-float_lower_limit(suite) ->
- [];
+
float_lower_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
case ?RDBMS of
mysql ->
@@ -1186,13 +1124,10 @@ float_lower_limit(Config) when is_list(Config) ->
end.
%%-------------------------------------------------------------------------
-float_upper_limit(doc) ->
- [""];
-float_upper_limit(suite) ->
- [];
+
float_upper_limit(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
case ?RDBMS of
mysql ->
@@ -1218,13 +1153,11 @@ float_upper_limit(Config) when is_list(Config) ->
end.
%%-------------------------------------------------------------------------
-float_zero(doc) ->
- ["Test the float value zero."];
-float_zero(suite) ->
- [];
+float_zero() ->
+ [{doc,"Test the float value zero."}].
float_zero(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1237,13 +1170,11 @@ float_zero(Config) when is_list(Config) ->
SelectResult =
odbc:sql_query(Ref,"SELECT FIELD FROM " ++ Table).
%%-------------------------------------------------------------------------
-real_zero(doc) ->
- ["Test the real value zero."];
-real_zero(suite) ->
- [];
+real_zero() ->
+ [{doc,"Test the real value zero."}].
real_zero(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
case ?RDBMS of
oracle ->
@@ -1262,13 +1193,11 @@ real_zero(Config) when is_list(Config) ->
odbc:sql_query(Ref,"SELECT FIELD FROM " ++ Table)
end.
%%------------------------------------------------------------------------
-dec_long(doc) ->
- [""];
dec_long(suit) ->
[];
dec_long(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1281,13 +1210,11 @@ dec_long(Config) when is_list(Config) ->
odbc:sql_query(Ref,"SELECT FIELD FROM " ++ Table),
["FIELD"] = odbc_test_lib:to_upper(Fields).
%%------------------------------------------------------------------------
-dec_double(doc) ->
- [""];
dec_double(suit) ->
[];
dec_double(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1329,13 +1256,11 @@ dec_double(Config) when is_list(Config) ->
["FIELD"] = odbc_test_lib:to_upper(Fields2).
%%------------------------------------------------------------------------
-dec_bignum(doc) ->
- [""];
dec_bignum(suit) ->
[];
dec_bignum(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1361,13 +1286,11 @@ dec_bignum(Config) when is_list(Config) ->
odbc:sql_query(Ref,"SELECT FIELD FROM " ++ Table),
["FIELD"] = odbc_test_lib:to_upper(Fields1).
%%------------------------------------------------------------------------
-num_long(doc) ->
- [""];
num_long(suit) ->
[];
num_long(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1380,13 +1303,11 @@ num_long(Config) when is_list(Config) ->
odbc:sql_query(Ref,"SELECT FIELD FROM " ++ Table),
["FIELD"] = odbc_test_lib:to_upper(Fields).
%%------------------------------------------------------------------------
-num_double(doc) ->
- [""];
num_double(suit) ->
[];
num_double(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1426,13 +1347,11 @@ num_double(Config) when is_list(Config) ->
odbc:sql_query(Ref,"SELECT FIELD FROM " ++ Table),
["FIELD"] = odbc_test_lib:to_upper(Fields2).
%%------------------------------------------------------------------------
-num_bignum(doc) ->
- [""];
num_bignum(suit) ->
[];
num_bignum(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1459,13 +1378,13 @@ num_bignum(Config) when is_list(Config) ->
["FIELD"] = odbc_test_lib:to_upper(Fields1).
%%------------------------------------------------------------------------
-utf8(doc) ->
- ["Test unicode support"];
+utf8() ->
+ [{doc,"Test unicode support"}].
utf8(suit) ->
[];
utf8(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ "(FIELD text)"),
@@ -1487,30 +1406,30 @@ utf8(Config) when is_list(Config) ->
end,
Latin1Data),
- test_server:format("UnicodeIn: ~p ~n",[UnicodeIn]),
+ ct:pal("UnicodeIn: ~p ~n",[UnicodeIn]),
{updated, _} = odbc:param_query(Ref,"INSERT INTO " ++ Table ++ "(FIELD) values(?)",
[{{sql_varchar,50}, UnicodeIn}]),
{selected,_,UnicodeOut} = odbc:sql_query(Ref,"SELECT * FROM " ++ Table),
- test_server:format("UnicodeOut: ~p~n", [UnicodeOut]),
+ ct:pal("UnicodeOut: ~p~n", [UnicodeOut]),
Result = lists:map(fun({Char}) ->
unicode:characters_to_list(Char,utf8)
end, UnicodeOut),
- test_server:format("Result: ~p ~n", [Result]),
+ ct:pal("Result: ~p ~n", [Result]),
Latin1Data = Result.
%%------------------------------------------------------------------------
-nchar(doc) ->
- ["Test unicode nchar support in sqlserver"];
+nchar() ->
+ [{doc,"Test unicode nchar support in sqlserver"}].
nchar(suit) ->
[];
nchar(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1520,13 +1439,13 @@ nchar(Config) when is_list(Config) ->
%%------------------------------------------------------------------------
-nvarchar(doc) ->
- ["Test 'unicode' nvarchar support"];
+nvarchar() ->
+ [{doc,"Test 'unicode' nvarchar support"}].
nvarchar(suit) ->
[];
nvarchar(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1535,13 +1454,11 @@ nvarchar(Config) when is_list(Config) ->
w_char_support(Ref, Table, sql_wlongvarchar, 50).
%%------------------------------------------------------------------------
-timestamp(doc) ->
- [""];
timestamp(suit) ->
[];
timestamp(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1582,21 +1499,21 @@ w_char_support(Ref, Table, CharType, Size) ->
end,
Latin1Data),
- test_server:format("UnicodeIn (utf 16): ~p ~n",[UnicodeIn]),
+ ct:pal("UnicodeIn (utf 16): ~p ~n",[UnicodeIn]),
{updated, _} = odbc:param_query(Ref, "INSERT INTO " ++ Table ++ "(FIELD) values(?)",
[{{CharType, Size},UnicodeIn}]),
{selected,_,UnicodeOut} = odbc:sql_query(Ref,"SELECT * FROM " ++ Table),
- test_server:format("UnicodeOut: ~p~n", [UnicodeOut]),
+ ct:pal("UnicodeOut: ~p~n", [UnicodeOut]),
PadResult = lists:map(fun({Unicode}) ->
unicode:characters_to_list(Unicode,{utf16,little})
end,
UnicodeOut),
- test_server:format("Result: ~p~n", [PadResult]),
+ ct:pal("Result: ~p~n", [PadResult]),
Result = lists:map(fun(Str) -> string:strip(Str) end, PadResult),
diff --git a/lib/odbc/test/odbc_query_SUITE.erl b/lib/odbc/test/odbc_query_SUITE.erl
index 5f719b7287..c283872965 100644
--- a/lib/odbc/test/odbc_query_SUITE.erl
+++ b/lib/odbc/test/odbc_query_SUITE.erl
@@ -113,6 +113,7 @@ init_per_suite(Config) when is_list(Config) ->
false ->
case (catch odbc:start()) of
ok ->
+ ct:timetrap(?default_timeout),
[{tableName, odbc_test_lib:unique_table_name()}| Config];
_ ->
{skip, "ODBC not startable"}
@@ -144,10 +145,10 @@ end_per_suite(_Config) ->
init_per_testcase(_Case, Config) ->
{ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()),
odbc_test_lib:strict(Ref, ?RDBMS),
- Dog = test_server:timetrap(?default_timeout),
- Temp = lists:keydelete(connection_ref, 1, Config),
- NewConfig = lists:keydelete(watchdog, 1, Temp),
- [{watchdog, Dog}, {connection_ref, Ref} | NewConfig].
+
+ NewConfig = lists:keydelete(connection_ref, 1, Config),
+
+ [{connection_ref, Ref} | NewConfig].
%%--------------------------------------------------------------------
%% Function: end_per_testcase(Case, Config) -> _
@@ -158,27 +159,23 @@ init_per_testcase(_Case, Config) ->
%% Description: Cleanup after each test case
%%--------------------------------------------------------------------
end_per_testcase(_Case, Config) ->
- Ref = ?config(connection_ref, Config),
+ Ref = proplists:get_value(connection_ref, Config),
ok = odbc:disconnect(Ref),
%% Clean up if needed
- Table = ?config(tableName, Config),
+ Table = proplists:get_value(tableName, Config),
{ok, NewRef} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()),
odbc:sql_query(NewRef, "DROP TABLE " ++ Table),
- odbc:disconnect(NewRef),
- Dog = ?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
- ok.
+ odbc:disconnect(NewRef).
%%-------------------------------------------------------------------------
%% Test cases starts here.
%%-------------------------------------------------------------------------
-stored_proc(doc)->
- ["Test stored proc with OUT param"];
-stored_proc(suite) -> [];
+stored_proc()->
+ [{doc, "Test stored proc with OUT param"}].
stored_proc(Config) when is_list(Config) ->
case ?RDBMS of
X when X == oracle; X == postgres->
- Ref = ?config(connection_ref, Config),
+ Ref = proplists:get_value(connection_ref, Config),
{updated, _} =
odbc:sql_query(Ref,
?RDBMS:stored_proc_integer_out()),
@@ -192,12 +189,11 @@ stored_proc(Config) when is_list(Config) ->
{skip, "stored proc not yet supported"}
end.
-sql_query(doc)->
- ["Test the common cases"];
-sql_query(suite) -> [];
+sql_query()->
+ [{doc, "Test the common cases"}].
sql_query(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -235,14 +231,14 @@ sql_query(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-select_count(doc) ->
- ["Tests select_count/[2,3]'s timeout, "
- " select_count's functionality will be better tested by other tests "
- " such as first."];
+select_count() ->
+ [{doc, "Tests select_count/[2,3]'s timeout, "
+ " select_count's functionality will be better tested by other tests "
+ " such as first."}].
select_count(sute) -> [];
select_count(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = odbc:sql_query(Ref,
"CREATE TABLE " ++ Table ++
@@ -257,12 +253,11 @@ select_count(Config) when is_list(Config) ->
(catch odbc:select_count(Ref, "SELECT * FROM ", -1)),
ok.
%%-------------------------------------------------------------------------
-first(doc) ->
- ["Tests first/[1,2]"];
-first(suite) -> [];
+first() ->
+ [doc, {"Tests first/[1,2]"}].
first(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = odbc:sql_query(Ref,
"CREATE TABLE " ++ Table ++
@@ -284,12 +279,11 @@ first(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-last(doc) ->
- ["Tests last/[1,2]"];
-last(suite) -> [];
+last() ->
+ [{doc, "Tests last/[1,2]"}].
last(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = odbc:sql_query(Ref,
"CREATE TABLE " ++ Table ++
@@ -311,12 +305,11 @@ last(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-next(doc) ->
- ["Tests next/[1,2]"];
-next(suite) -> [];
+next() ->
+ [{doc, "Tests next/[1,2]"}].
next(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = odbc:sql_query(Ref,
"CREATE TABLE " ++ Table ++
@@ -337,12 +330,11 @@ next(Config) when is_list(Config) ->
{'EXIT', {function_clause, _}} = (catch odbc:next(Ref, -1)),
ok.
%%-------------------------------------------------------------------------
-prev(doc) ->
- ["Tests prev/[1,2]"];
-prev(suite) -> [];
+prev() ->
+ [{doc, "Tests prev/[1,2]"}].
prev(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = odbc:sql_query(Ref,
"CREATE TABLE " ++ Table ++
@@ -366,12 +358,12 @@ prev(Config) when is_list(Config) ->
{'EXIT', {function_clause, _}} = (catch odbc:prev(Ref, -1)),
ok.
%%-------------------------------------------------------------------------
-select_next(doc) ->
- ["Tests select/[4,5] with CursorRelation = next "];
+select_next() ->
+ [{doc, "Tests select/[4,5] with CursorRelation = next "}].
select_next(suit) -> [];
select_next(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = odbc:sql_query(Ref,
"CREATE TABLE " ++ Table ++
@@ -407,12 +399,12 @@ select_next(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-select_relative(doc) ->
- ["Tests select/[4,5] with CursorRelation = relative "];
+select_relative() ->
+ [{doc, "Tests select/[4,5] with CursorRelation = relative "}].
select_relative(suit) -> [];
select_relative(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = odbc:sql_query(Ref,
"CREATE TABLE " ++ Table ++
@@ -448,12 +440,12 @@ select_relative(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-select_absolute(doc) ->
- ["Tests select/[4,5] with CursorRelation = absolute "];
+select_absolute() ->
+ [{doc, "Tests select/[4,5] with CursorRelation = absolute "}].
select_absolute(suit) -> [];
select_absolute(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = odbc:sql_query(Ref,
"CREATE TABLE " ++ Table ++
@@ -482,12 +474,11 @@ select_absolute(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-create_table_twice(doc) ->
- ["Test what happens if you try to create the same table twice."];
-create_table_twice(suite) -> [];
+create_table_twice() ->
+ [{doc, "Test what happens if you try to create the same table twice."}].
create_table_twice(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -501,12 +492,11 @@ create_table_twice(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-delete_table_twice(doc) ->
- ["Test what happens if you try to delete the same table twice."];
-delete_table_twice(suite) -> [];
+delete_table_twice() ->
+ [{doc, "Test what happens if you try to delete the same table twice."}].
delete_table_twice(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -518,12 +508,12 @@ delete_table_twice(Config) when is_list(Config) ->
ok.
%-------------------------------------------------------------------------
-duplicate_key(doc) ->
- ["Test what happens if you try to use the same key twice"];
+duplicate_key() ->
+ [{doc, "Test what happens if you try to use the same key twice"}].
duplicate_key(suit) -> [];
duplicate_key(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -539,13 +529,12 @@ duplicate_key(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-not_connection_owner(doc) ->
- ["Test what happens if a process that did not start the connection"
- " tries to acess it."];
-not_connection_owner(suite) -> [];
+not_connection_owner() ->
+ [{doc, "Test what happens if a process that did not start the connection"
+ " tries to acess it."}].
not_connection_owner(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
spawn_link(?MODULE, not_owner, [self(), Ref, Table]),
@@ -564,12 +553,11 @@ not_owner(Pid, Ref, Table) ->
Pid ! continue.
%%-------------------------------------------------------------------------
-no_result_set(doc) ->
- ["Tests what happens if you try to use a function that needs an "
- "associated result set when there is none."];
-no_result_set(suite) -> [];
+no_result_set() ->
+ [{doc, "Tests what happens if you try to use a function that needs an "
+ "associated result set when there is none."}].
no_result_set(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
+ Ref = proplists:get_value(connection_ref, Config),
{error, result_set_does_not_exist} = odbc:first(Ref),
{error, result_set_does_not_exist} = odbc:last(Ref),
@@ -582,13 +570,11 @@ no_result_set(Config) when is_list(Config) ->
odbc:select(Ref, {relative, 2}, 1),
ok.
%%-------------------------------------------------------------------------
-query_error(doc) ->
- ["Test what happens if there is an error in the query."];
-query_error(suite) ->
- [];
+query_error() ->
+ [{doc, "Test what happens if there is an error in the query."}].
query_error(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -605,15 +591,13 @@ query_error(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-multiple_select_result_sets(doc) ->
- ["Test what happens if you have a batch of select queries."];
-multiple_select_result_sets(suite) ->
- [];
+multiple_select_result_sets() ->
+ [{doc, "Test what happens if you have a batch of select queries."}].
multiple_select_result_sets(Config) when is_list(Config) ->
case ?RDBMS of
sqlserver ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -640,16 +624,14 @@ multiple_select_result_sets(Config) when is_list(Config) ->
end.
%%-------------------------------------------------------------------------
-multiple_mix_result_sets(doc) ->
- ["Test what happens if you have a batch of select and other type of"
- " queries."];
-multiple_mix_result_sets(suite) ->
- [];
+multiple_mix_result_sets() ->
+ [{doc, "Test what happens if you have a batch of select and other type of"
+ " queries."}].
multiple_mix_result_sets(Config) when is_list(Config) ->
case ?RDBMS of
sqlserver ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -674,15 +656,13 @@ multiple_mix_result_sets(Config) when is_list(Config) ->
{skip, "multiple result_set not supported"}
end.
%%-------------------------------------------------------------------------
-multiple_result_sets_error(doc) ->
- ["Test what happens if one of the batched queries fails."];
-multiple_result_sets_error(suite) ->
- [];
+multiple_result_sets_error() ->
+ [{doc, "Test what happens if one of the batched queries fails."}].
multiple_result_sets_error(Config) when is_list(Config) ->
case ?RDBMS of
sqlserver ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -709,15 +689,13 @@ multiple_result_sets_error(Config) when is_list(Config) ->
end.
%%-------------------------------------------------------------------------
-param_insert_tiny_int(doc)->
- ["Test insertion of tiny ints by parameterized queries."];
-param_insert_tiny_int(suite) ->
- [];
+param_insert_tiny_int()->
+ [{doc,"Test insertion of tiny ints by parameterized queries."}].
param_insert_tiny_int(Config) when is_list(Config) ->
case ?RDBMS of
sqlserver ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -746,13 +724,11 @@ param_insert_tiny_int(Config) when is_list(Config) ->
{skip, "Type tiniyint not supported"}
end.
%%-------------------------------------------------------------------------
-param_insert_small_int(doc)->
- ["Test insertion of small ints by parameterized queries."];
-param_insert_small_int(suite) ->
- [];
+param_insert_small_int()->
+ [{doc,"Test insertion of small ints by parameterized queries."}].
param_insert_small_int(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -778,13 +754,11 @@ param_insert_small_int(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_insert_int(doc)->
- ["Test insertion of ints by parameterized queries."];
-param_insert_int(suite) ->
- [];
+param_insert_int()->
+ [{doc,"Test insertion of ints by parameterized queries."}].
param_insert_int(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -810,13 +784,11 @@ param_insert_int(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_insert_integer(doc)->
- ["Test insertion of integers by parameterized queries."];
-param_insert_integer(suite) ->
- [];
+param_insert_integer()->
+ [{doc,"Test insertion of integers by parameterized queries."}].
param_insert_integer(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -842,13 +814,11 @@ param_insert_integer(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_insert_decimal(doc)->
- ["Test insertion of decimal numbers by parameterized queries."];
-param_insert_decimal(suite) ->
- [];
+param_insert_decimal()->
+ [{doc,"Test insertion of decimal numbers by parameterized queries."}].
param_insert_decimal(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -893,13 +863,11 @@ param_insert_decimal(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_insert_numeric(doc)->
- ["Test insertion of numeric numbers by parameterized queries."];
-param_insert_numeric(suite) ->
- [];
+param_insert_numeric()->
+ [{doc,"Test insertion of numeric numbers by parameterized queries."}].
param_insert_numeric(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -944,13 +912,11 @@ param_insert_numeric(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_insert_char(doc)->
- ["Test insertion of fixed length string by parameterized queries."];
-param_insert_char(suite) ->
- [];
+param_insert_char()->
+ [{doc,"Test insertion of fixed length string by parameterized queries."}].
param_insert_char(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -980,13 +946,11 @@ param_insert_char(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_insert_character(doc)->
- ["Test insertion of fixed length string by parameterized queries."];
-param_insert_character(suite) ->
- [];
+param_insert_character()->
+ [{doc,"Test insertion of fixed length string by parameterized queries."}].
param_insert_character(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1017,13 +981,11 @@ param_insert_character(Config) when is_list(Config) ->
ok.
%%------------------------------------------------------------------------
-param_insert_char_varying(doc)->
- ["Test insertion of variable length strings by parameterized queries."];
-param_insert_char_varying(suite) ->
- [];
+param_insert_char_varying()->
+ [{doc,"Test insertion of variable length strings by parameterized queries."}].
param_insert_char_varying(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1054,13 +1016,11 @@ param_insert_char_varying(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_insert_character_varying(doc)->
- ["Test insertion of variable length strings by parameterized queries."];
-param_insert_character_varying(suite) ->
- [];
+param_insert_character_varying()->
+ [{doc,"Test insertion of variable length strings by parameterized queries."}].
param_insert_character_varying(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1091,13 +1051,11 @@ param_insert_character_varying(Config) when is_list(Config) ->
[{{sql_varchar, 10}, ["1", 2]}])),
ok.
%%-------------------------------------------------------------------------
-param_insert_float(doc)->
- ["Test insertion of floats by parameterized queries."];
-param_insert_float(suite) ->
- [];
+param_insert_float()->
+ [{doc,"Test insertion of floats by parameterized queries."}].
param_insert_float(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1120,7 +1078,7 @@ param_insert_float(Config) when is_list(Config) ->
true ->
ok;
false ->
- test_server:fail(float_numbers_do_not_match)
+ ct:fail(float_numbers_do_not_match)
end,
{'EXIT',{badarg,odbc,param_query,'Params'}} =
@@ -1130,13 +1088,11 @@ param_insert_float(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_insert_real(doc)->
- ["Test insertion of real numbers by parameterized queries."];
-param_insert_real(suite) ->
- [];
+param_insert_real()->
+ [{doc,"Test insertion of real numbers by parameterized queries."}].
param_insert_real(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1161,7 +1117,7 @@ param_insert_real(Config) when is_list(Config) ->
true ->
ok;
false ->
- test_server:fail(real_numbers_do_not_match)
+ ct:fail(real_numbers_do_not_match)
end,
{'EXIT',{badarg,odbc,param_query,'Params'}} =
@@ -1171,13 +1127,11 @@ param_insert_real(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_insert_double(doc)->
- ["Test insertion of doubles by parameterized queries."];
-param_insert_double(suite) ->
- [];
+param_insert_double()->
+ [{doc,"Test insertion of doubles by parameterized queries."}].
param_insert_double(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1200,7 +1154,7 @@ param_insert_double(Config) when is_list(Config) ->
true ->
ok;
false ->
- test_server:fail(double_numbers_do_not_match)
+ ct:fail(double_numbers_do_not_match)
end,
{'EXIT',{badarg,odbc,param_query,'Params'}} =
@@ -1210,13 +1164,11 @@ param_insert_double(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_insert_mix(doc)->
- ["Test insertion of a mixture of datatypes by parameterized queries."];
-param_insert_mix(suite) ->
- [];
+param_insert_mix()->
+ [{doc,"Test insertion of a mixture of datatypes by parameterized queries."}].
param_insert_mix(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1237,13 +1189,11 @@ param_insert_mix(Config) when is_list(Config) ->
odbc:sql_query(Ref, "SELECT * FROM " ++ Table),
ok.
%%-------------------------------------------------------------------------
-param_update(doc)->
- ["Test parameterized update query."];
-param_update(suite) ->
- [];
+param_update()->
+ [{doc,"Test parameterized update query."}].
param_update(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1272,12 +1222,12 @@ param_update(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-delete_nonexisting_row(doc) -> % OTP-5759
- ["Make a delete...where with false conditions (0 rows deleted). ",
- "This used to give an error message (see ticket OTP-5759)."];
+delete_nonexisting_row() -> % OTP-5759
+ [{doc, "Make a delete...where with false conditions (0 rows deleted). ",
+ "This used to give an error message (see ticket OTP-5759)."}].
delete_nonexisting_row(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref, "CREATE TABLE " ++ Table
@@ -1301,13 +1251,11 @@ delete_nonexisting_row(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_delete(doc) ->
- ["Test parameterized delete query."];
-param_delete(suite) ->
- [];
+param_delete() ->
+ [{doc,"Test parameterized delete query."}].
param_delete(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1336,13 +1284,11 @@ param_delete(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-param_select(doc) ->
- ["Test parameterized select query."];
-param_select(suite) ->
- [];
+param_select() ->
+ [{doc,"Test parameterized select query."}].
param_select(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1366,13 +1312,11 @@ param_select(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_select_empty_params(doc) ->
- ["Test parameterized select query with no parameters."];
-param_select_empty_params(suite) ->
- [];
+param_select_empty_params() ->
+ [{doc,"Test parameterized select query with no parameters."}].
param_select_empty_params(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1396,13 +1340,11 @@ param_select_empty_params(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-param_delete_empty_params(doc) ->
- ["Test parameterized delete query with no parameters."];
-param_delete_empty_params(suite) ->
- [];
+param_delete_empty_params() ->
+ [{doc,"Test parameterized delete query with no parameters."}].
param_delete_empty_params(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1430,13 +1372,11 @@ param_delete_empty_params(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-describe_integer(doc) ->
- ["Test describe_table/[2,3] for integer columns."];
-describe_integer(suite) ->
- [];
+describe_integer() ->
+ [{doc,"Test describe_table/[2,3] for integer columns."}].
describe_integer(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1449,13 +1389,11 @@ describe_integer(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-describe_string(doc) ->
- ["Test describe_table/[2,3] for string columns."];
-describe_string(suite) ->
- [];
+describe_string() ->
+ [{doc,"Test describe_table/[2,3] for string columns."}].
describe_string(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1470,13 +1408,11 @@ describe_string(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-describe_floating(doc) ->
- ["Test describe_table/[2,3] for floting columns."];
-describe_floating(suite) ->
- [];
+describe_floating() ->
+ [{doc,"Test describe_table/[2,3] for floting columns."}].
describe_floating(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1490,14 +1426,12 @@ describe_floating(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-describe_dec_num(doc) ->
- ["Test describe_table/[2,3] for decimal and numerical columns"];
-describe_dec_num(suite) ->
- [];
+describe_dec_num() ->
+ [{doc,"Test describe_table/[2,3] for decimal and numerical columns"}].
describe_dec_num(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} =
odbc:sql_query(Ref,
@@ -1511,14 +1445,12 @@ describe_dec_num(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
-describe_timestamp(doc) ->
- ["Test describe_table/[2,3] for tinmestap columns"];
-describe_timestamp(suite) ->
- [];
+describe_timestamp() ->
+ [{doc,"Test describe_table/[2,3] for tinmestap columns"}].
describe_timestamp(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{updated, _} = % Value == 0 || -1 driver dependent!
odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++
@@ -1530,14 +1462,12 @@ describe_timestamp(Config) when is_list(Config) ->
ok.
%%-------------------------------------------------------------------------
-describe_no_such_table(doc) ->
- ["Test what happens if you try to describe a table that does not exist."];
-describe_no_such_table(suite) ->
- [];
+describe_no_such_table() ->
+ [{doc,"Test what happens if you try to describe a table that does not exist."}].
describe_no_such_table(Config) when is_list(Config) ->
- Ref = ?config(connection_ref, Config),
- Table = ?config(tableName, Config),
+ Ref = proplists:get_value(connection_ref, Config),
+ Table = proplists:get_value(tableName, Config),
{error, _ } = odbc:describe_table(Ref, Table),
ok.
@@ -1549,10 +1479,10 @@ describe_no_such_table(Config) when is_list(Config) ->
is_driver_error(Error) ->
case is_list(Error) of
true ->
- test_server:format("Driver error ~p~n", [Error]),
+ ct:pal("Driver error ~p~n", [Error]),
ok;
false ->
- test_server:fail(Error)
+ ct:fail(Error)
end.
is_supported_multiple_resultsets(sqlserver) ->
true;
diff --git a/lib/odbc/test/odbc_start_SUITE.erl b/lib/odbc/test/odbc_start_SUITE.erl
index f055eeb60e..310b92ca29 100644
--- a/lib/odbc/test/odbc_start_SUITE.erl
+++ b/lib/odbc/test/odbc_start_SUITE.erl
@@ -49,6 +49,7 @@ init_per_suite(Config) ->
_ ->
%% Make sure odbc is not already started
odbc:stop(),
+ ct:timetrap(?TIMEOUT),
[{tableName, odbc_test_lib:unique_table_name()} | Config]
end
end.
@@ -74,11 +75,9 @@ end_per_suite(_Config) ->
%% variable, but should NOT alter/remove any existing entries.
%% Description: Initialization before each test case
%%--------------------------------------------------------------------
-init_per_testcase(_TestCase, Config0) ->
- test_server:format("ODBCINI = ~p~n", [os:getenv("ODBCINI")]),
- Config = lists:keydelete(watchdog, 1, Config0),
- Dog = test_server:timetrap(?TIMEOUT),
- [{watchdog, Dog} | Config].
+init_per_testcase(_TestCase, Config) ->
+ ct:pal("ODBCINI = ~p~n", [os:getenv("ODBCINI")]),
+ Config.
%%--------------------------------------------------------------------
%% Function: end_per_testcase(TestCase, Config) -> _
@@ -88,15 +87,8 @@ init_per_testcase(_TestCase, Config0) ->
%% A list of key/value pairs, holding the test case configuration.
%% Description: Cleanup after each test case
%%--------------------------------------------------------------------
-end_per_testcase(_TestCase, Config) ->
- Dog = ?config(watchdog, Config),
- case Dog of
- undefined ->
- ok;
- _ ->
- test_server:timetrap_cancel(Dog)
- end.
-
+end_per_testcase(_TestCase, _Config) ->
+ ok.
%%--------------------------------------------------------------------
%% Function: all(Clause) -> TestCases
%% Clause - atom() - suite | doc
@@ -135,10 +127,8 @@ app(Config) when is_list(Config) ->
appup(Config) when is_list(Config) ->
ok = ?t:appup_test(odbc).
-start(doc) ->
- ["Test start/stop of odbc"];
-start(suite) ->
- [];
+start() ->
+ [{doc,"Test start/stop of odbc"}].
start(Config) when is_list(Config) ->
PlatformOptions = odbc_test_lib:platform_options(),
{error,odbc_not_started} = odbc:connect(?RDBMS:connection_string(),
@@ -153,9 +143,9 @@ start(Config) when is_list(Config) ->
start_odbc(transient),
start_odbc(permanent);
{error, odbc_not_started} ->
- test_server:fail(start_failed);
+ ct:fail(start_failed);
Error ->
- test_server:format("Connection failed: ~p~n", [Error]),
+ ct:pal("Connection failed: ~p~n", [Error]),
{skip, "ODBC is not properly setup"}
end.
@@ -166,13 +156,12 @@ start_odbc(Type) ->
ok = odbc:disconnect(Ref),
odbc:stop();
{error, odbc_not_started} ->
- test_server:fail(start_failed)
+ ct:fail(start_failed)
end.
-long_connection_line(doc)->
- ["Test a connection line longer than 127 characters"];
-long_connection_line(suite) -> [];
+long_connection_line()->
+ [{doc,"Test a connection line longer than 127 characters"}].
long_connection_line(_Config) ->
odbc:start(),
String133 = "unknown_odbc_parameter=01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789",
diff --git a/lib/odbc/test/odbc_test_lib.erl b/lib/odbc/test/odbc_test_lib.erl
index 37c2249303..cf82d4d32a 100644
--- a/lib/odbc/test/odbc_test_lib.erl
+++ b/lib/odbc/test/odbc_test_lib.erl
@@ -61,13 +61,13 @@ odbc_check() ->
end.
check_row_count(Count, Count) ->
- test_server:format("Correct row count Count: ~p~n", [Count]),
+ ct:pal("Correct row count Count: ~p~n", [Count]),
true;
check_row_count(_, undefined) ->
- test_server:format("Undefined row count ~n", []),
+ ct:pal("Undefined row count ~n", []),
true;
check_row_count(Expected, Count) ->
- test_server:format("Incorrect row count Expected ~p Got ~p~n",
+ ct:pal("Incorrect row count Expected ~p Got ~p~n",
[Expected, Count]),
false.
diff --git a/lib/odbc/vsn.mk b/lib/odbc/vsn.mk
index c7c84560d1..957c6b42eb 100644
--- a/lib/odbc/vsn.mk
+++ b/lib/odbc/vsn.mk
@@ -1 +1 @@
-ODBC_VSN = 2.11.1
+ODBC_VSN = 2.11.2
diff --git a/lib/orber/doc/src/notes.xml b/lib/orber/doc/src/notes.xml
index 74d9d7a98c..89f258e5e9 100644
--- a/lib/orber/doc/src/notes.xml
+++ b/lib/orber/doc/src/notes.xml
@@ -34,7 +34,22 @@
</header>
- <section><title>Orber 3.8.1</title>
+ <section><title>Orber 3.8.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Orber 3.8.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/orber/test/cdrcoding_10_SUITE.erl b/lib/orber/test/cdrcoding_10_SUITE.erl
index 3eb35572c1..24de589615 100644
--- a/lib/orber/test/cdrcoding_10_SUITE.erl
+++ b/lib/orber/test/cdrcoding_10_SUITE.erl
@@ -26,13 +26,12 @@
%%-----------------------------------------------------------------
-module(cdrcoding_10_SUITE).
-
-include("idl_output/Module.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/include/corba.hrl").
-include_lib("orber/src/orber_iiop.hrl").
--define(default_timeout, ?t:minutes(20)).
+-define(default_timeout, test_server:minutes(20)).
%%-----------------------------------------------------------------
%% External exports
@@ -80,14 +79,14 @@ cases() ->
init_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -126,49 +125,40 @@ end_per_suite(Config) when is_list(Config) ->
% 'oe_orber_test':'oe_unregister'(),
% ok.
-do_register(doc) -> [];
-do_register(suite) -> [];
do_register(Config) when is_list(Config) ->
io:format("Pwd: ~p, mod: ~p~n",[c:pwd(), c:m('oe_orber_test')]),
'oe_orber_test':'oe_register'(),
ok.
-do_unregister(doc) -> [];
-do_unregister(suite) -> [];
+
do_unregister(Config) when is_list(Config) ->
'oe_orber_test':'oe_unregister'(),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: null
%%-----------------------------------------------------------------
-null_type(doc) -> [];
-null_type(suite) -> [];
null_type(Config) when is_list(Config) ->
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_null', 'null'),
- ?line {'null', <<>>, _} = cdr_decode:dec_type('tk_null', {1, 0}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_null', 'null'),
+ {'null', <<>>, _} = cdr_decode:dec_type('tk_null', {1, 0}, B, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: void
%%-----------------------------------------------------------------
-void_type(doc) -> [];
-void_type(suite) -> [];
void_type(Config) when is_list(Config) ->
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_void', 'ok'),
- ?line {'ok', <<>>, _} = cdr_decode:dec_type('tk_void', {1, 0}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_void', 'ok'),
+ {'ok', <<>>, _} = cdr_decode:dec_type('tk_void', {1, 0}, B, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: principal
%%-----------------------------------------------------------------
-principal_type(doc) -> [];
-principal_type(suite) -> [];
principal_type(Config) when is_list(Config) ->
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_Principal', "principal"),
- ?line {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 0}, B0, 0, big),
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_Principal', ""),
- ?line {"", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 0}, B1, 0, big),
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_Principal', "principal"),
- ?line {"principal", <<>>, _} =
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_Principal', "principal"),
+ {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 0}, B0, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_Principal', ""),
+ {"", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 0}, B1, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, 'tk_Principal', "principal"),
+ {"principal", <<>>, _} =
cdr_decode:dec_type('tk_Principal', {1, 0}, B2, 0, big),
ok.
@@ -203,19 +193,17 @@ objref(2) ->
TP = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB},
#'IOP_IOR'{type_id="IDL:Module/Interface:1.0", profiles=[TP]}.
-objref_type(doc) -> [];
-objref_type(suite) -> [];
objref_type(Config) when is_list(Config) ->
T = {'tk_objref', "IDL:Module/Interface:1.0", "Interface"},
Objref0 = objref(0),
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, Objref0),
- ?line {Objref0, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B0, 0, big),
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, Objref0),
+ {Objref0, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B0, 0, big),
Objref1 = objref(1),
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, Objref1),
- ?line {Objref1, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, Objref1),
+ {Objref1, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B1, 0, big),
Objref2 = objref(2),
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, Objref2),
- ?line {Objref2, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, Objref2),
+ {Objref2, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B2, 0, big),
ok.
@@ -223,49 +211,45 @@ objref_type(Config) when is_list(Config) ->
%%-----------------------------------------------------------------
%% Encode/decode test of type: struct
%%-----------------------------------------------------------------
-struct_type(doc) -> [];
-struct_type(suite) -> [];
struct_type(Config) when is_list(Config) ->
T0 = {'tk_struct',"IDL:Module/Struct0:1.0", "Module_Struct0",
[{"long", 'tk_long'}, {"short", 'tk_short'}, {"character", 'tk_char'}]},
S0 = #'Module_Struct0'{l=-4711, s=17, c=$a},
- ?line B0 = cdr_encode:enc_type({1, 0}, T0, S0),
- ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B0, 0, big),
+ B0 = cdr_encode:enc_type({1, 0}, T0, S0),
+ {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B0, 0, big),
T1 = {'tk_struct', "IDL:Module/Struct1:1.0", "Module_Struct1",
[{"string", {'tk_string', 0}}, {"ushort", 'tk_ushort'}, {"ulong", 'tk_ulong'}]},
S1 = #'Module_Struct1'{s="Hi !!!!", us=17, ul=4711},
- ?line B1 = cdr_encode:enc_type({1, 0}, T1, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B1, 0, big),
+ B1 = cdr_encode:enc_type({1, 0}, T1, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B1, 0, big),
T2 = {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2",
[{"long_sequence", {'tk_sequence', 'tk_long', 0}},
{"enum", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}},
{"octet", 'tk_octet'}]},
S2 = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000], e=cow, o=$X},
- ?line B2 = cdr_encode:enc_type({1, 0}, T2, S2),
- ?line {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B2, 0, big),
+ B2 = cdr_encode:enc_type({1, 0}, T2, S2),
+ {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B2, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: union
%%-----------------------------------------------------------------
-union_type(doc) -> [];
-union_type(suite) -> [];
union_type(Config) when is_list(Config) ->
T0 = {'tk_union', "IDL:Module/Union:1.0", "Union", 'tk_short', 2,
[{0, "First", 'tk_short'},
{1, "Second", {'tk_string', 0}},
{2, "Third", 'tk_char'}]},
S0 = #'Module_Union'{label=1, value="Foo Bar !"},
- ?line B0 = cdr_encode:enc_type({1, 0}, T0, S0),
- ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B0, 0, big),
+ B0 = cdr_encode:enc_type({1, 0}, T0, S0),
+ {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B0, 0, big),
S1 = #'Module_Union'{label=0, value=-17},
- ?line B1 = cdr_encode:enc_type({1, 0}, T0, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B1, 0, big),
+ B1 = cdr_encode:enc_type({1, 0}, T0, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B1, 0, big),
S2 = #'Module_Union'{label=2, value=$X},
- ?line B2 = cdr_encode:enc_type({1, 0}, T0, S2),
- ?line {S2, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B2, 0, big),
+ B2 = cdr_encode:enc_type({1, 0}, T0, S2),
+ {S2, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B2, 0, big),
T1 = {'tk_union', "IDL:Module/Union1:1.0", "Union1",
{'tk_enum', "IDL:Module/Enum:1.0",
"Module_Enum", ["horse", "pig", "cow"]}, "pig",
@@ -274,14 +258,14 @@ union_type(Config) when is_list(Config) ->
{"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0",
"Module_Enum1", ["orange", "banana", "apple"]}}]},
S3 = #'Module_Union1'{label=pig, value=["Foo", "Bar", "!"]},
- ?line B3 = cdr_encode:enc_type({1, 0}, T1, S3),
- ?line {S3, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B3, 0, big),
+ B3 = cdr_encode:enc_type({1, 0}, T1, S3),
+ {S3, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B3, 0, big),
S4 = #'Module_Union1'{label=cow, value=apple},
- ?line B4 = cdr_encode:enc_type({1, 0}, T1, S4),
- ?line {S4, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B4, 0, big),
+ B4 = cdr_encode:enc_type({1, 0}, T1, S4),
+ {S4, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B4, 0, big),
S5 = #'Module_Union1'{label=horse, value=17},
- ?line B5 = cdr_encode:enc_type({1, 0}, T1, S5),
- ?line {S5, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B5, 0, big),
+ B5 = cdr_encode:enc_type({1, 0}, T1, S5),
+ {S5, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B5, 0, big),
T2 = {'tk_union', "IDL:Module/Union2:1.0", "Union2",
{'tk_enum', "IDL:Module/Enum:1.0",
"Module_Enum", ["horse", "pig", "cow"]}, "pig",
@@ -303,54 +287,50 @@ union_type(Config) when is_list(Config) ->
["orange", "banana",
"apple"]}}]}}]},
S6 = #'Module_Union2'{label=pig, value=#'Module_Union'{label=0, value=-17}},
- ?line B6 = cdr_encode:enc_type({1, 0}, T2, S6),
- ?line {S6, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B6, 0, big),
+ B6 = cdr_encode:enc_type({1, 0}, T2, S6),
+ {S6, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B6, 0, big),
S7 = #'Module_Union2'{label=cow, value=#'Module_Union1'{label=pig,
value=["Foo", "Bar", "!"]}},
- ?line B7 = cdr_encode:enc_type({1, 0}, T2, S7),
- ?line {S7, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B7, 0, big),
+ B7 = cdr_encode:enc_type({1, 0}, T2, S7),
+ {S7, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B7, 0, big),
S8 = #'Module_Union2'{label=horse, value={-17, 1234567890, -987654321}},
- ?line B8 = cdr_encode:enc_type({1, 0}, T2, S8),
- ?line {S8, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B8, 0, big),
+ B8 = cdr_encode:enc_type({1, 0}, T2, S8),
+ {S8, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B8, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: string
%%-----------------------------------------------------------------
-string_type(doc) -> [];
-string_type(suite) -> [];
string_type(Config) when is_list(Config) ->
S0 = "Foo Bar ???",
- ?line B0 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S0),
- ?line {S0, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B0, 0, big),
+ B0 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S0),
+ {S0, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B0, 0, big),
S1 = "Yes, Foo Bar !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! more than 5000 characters",
- ?line B1 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B1, 0, big),
+ B1 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B1, 0, big),
S2 = "",
- ?line B2 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S2),
- ?line {S2, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B2, 0, big),
+ B2 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S2),
+ {S2, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B2, 0, big),
S3 = "\0",
- ?line B3 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S3),
- ?line {S3, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B3, 0, big),
+ B3 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S3),
+ {S3, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B3, 0, big),
S4 = "~n",
- ?line B4 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S4),
- ?line {S4, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B4, 0, big),
+ B4 = cdr_encode:enc_type({1, 0}, {'tk_string', 0}, S4),
+ {S4, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 0}, B4, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: array
%%-----------------------------------------------------------------
-array_type(doc) -> [];
-array_type(suite) -> [];
array_type(Config) when is_list(Config) ->
T0 = {'tk_array', 'tk_long', 5},
S0 = {-100, 0, 30000, -900100900, 123456789},
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T0, S0),
- ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B0, 0, big),
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T0, S0),
+ {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 0}, B0, 0, big),
T1 = {'tk_array', {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, 2},
S1 = {pig, cow},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B1, 0, big),
T2 = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union",
{'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, "pig",
[{"horse", "First", 'tk_ushort'},
@@ -358,18 +338,16 @@ array_type(Config) when is_list(Config) ->
{"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0",
"Module_Enum1", ["orange", "banana", "apple"]}}]}, 2},
S2 = {#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}},
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T2, S2),
- ?line {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T2, S2),
+ {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 0}, B2, 0, big),
T3 = {'tk_array', {'tk_objref', "IDL:Module/Interface:1.0", "Interface"}, 3},
S3 = {objref(0), objref(1), objref(2)},
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T3, S3),
- ?line {S3, <<>>, _} = cdr_decode:dec_type(T3, {1, 0}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T3, S3),
+ {S3, <<>>, _} = cdr_decode:dec_type(T3, {1, 0}, B3, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: TypeCode
%%-----------------------------------------------------------------
-any_type(doc) -> [];
-any_type(suite) -> [];
any_type(Config) when is_list(Config) ->
T = 'tk_any',
TC = {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2",
@@ -380,8 +358,8 @@ any_type(Config) when is_list(Config) ->
S = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000],
e=cow, o=$X},
Any = #any{typecode=TC,value=S},
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,Any),
- ?line {Any, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,Any),
+ {Any, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B, 0, big),
TC1 = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union",
{'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum",
["horse", "pig", "cow"]}, 1,
@@ -392,16 +370,14 @@ any_type(Config) when is_list(Config) ->
"apple"]}}]},2},
S1 = {#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}},
Any1 = #any{typecode=TC1,value=S1},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,Any1),
- ?line {Any1, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,Any1),
+ {Any1, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B1, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: TypeCode
%%-----------------------------------------------------------------
-typecode_type(doc) -> [];
-typecode_type(suite) -> [];
typecode_type(Config) when is_list(Config) ->
T = 'tk_TypeCode',
TC = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union",
@@ -412,8 +388,8 @@ typecode_type(Config) when is_list(Config) ->
{"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0",
"Module_Enum1", ["orange", "banana",
"apple"]}}]}, 10},
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,TC),
- ?line {TC, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,TC),
+ {TC, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B, 0, big),
TC1 = {'tk_union', "IDL:Module/Union2:1.0", "Union2",
{'tk_enum', "IDL:Module/Enum:1.0",
"Module_Enum", ["horse", "pig", "cow"]}, 2,
@@ -434,15 +410,13 @@ typecode_type(Config) when is_list(Config) ->
"Module_Enum1",
["orange", "banana",
"apple"]}}]}}]},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, TC1),
- ?line {TC1, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, TC1),
+ {TC1, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B1, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: TypeCode
%%-----------------------------------------------------------------
-alias_type(doc) -> [];
-alias_type(suite) -> [];
alias_type(Config) when is_list(Config) ->
T = {'tk_alias', "IDL:Module/Alias:1.0", "Alias",
{'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2",
@@ -452,8 +426,8 @@ alias_type(Config) when is_list(Config) ->
{"octet", 'tk_octet'}]}},
S = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000],
e=cow, o=$X},
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,S),
- ?line {S, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,S),
+ {S, <<>>, _} = cdr_decode:dec_type(T, {1, 0}, B, 0, big),
T1 = {'tk_alias', "IDL:Module/Alias1:1.0", "Alias1",
{'tk_sequence', {'tk_union', "IDL:Module/Union:1.0", "Union",
{'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum",
@@ -464,15 +438,13 @@ alias_type(Config) when is_list(Config) ->
"Module_Enum1", ["orange", "banana",
"apple"]}}]},0}},
S1 = [#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}],
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 0}, B1, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: exception
%%-----------------------------------------------------------------
-exception_type(doc) -> [];
-exception_type(suite) -> [];
exception_type(Config) when is_list(Config) ->
system_exceptions(),
user_exceptions(),
@@ -481,43 +453,43 @@ exception_type(Config) when is_list(Config) ->
system_exceptions() ->
E = #'UNKNOWN'{completion_status=?COMPLETED_YES},
{system_exception, T, E} = orber_exceptions:get_def(E),
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,E),
- ?line {E, _} = cdr_decode:dec_system_exception({1, 0}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T,E),
+ {E, _} = cdr_decode:dec_system_exception({1, 0}, B, 0, big),
E1 = #'INV_OBJREF'{completion_status=?COMPLETED_NO},
{system_exception, T1, E1} = orber_exceptions:get_def(E1),
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1,E1),
- ?line {E1, _} = cdr_decode:dec_system_exception({1, 0}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1,E1),
+ {E1, _} = cdr_decode:dec_system_exception({1, 0}, B1, 0, big),
E2 = #'BAD_OPERATION'{completion_status=?COMPLETED_NO},
{system_exception, T2, E2} = orber_exceptions:get_def(E2),
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T2,E2),
- ?line {E2, _} = cdr_decode:dec_system_exception({1, 0}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T2,E2),
+ {E2, _} = cdr_decode:dec_system_exception({1, 0}, B2, 0, big),
E3 = #'INTF_REPOS'{completion_status=?COMPLETED_MAYBE},
{system_exception, T3, E3} = orber_exceptions:get_def(E3),
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T3,E3),
- ?line {E3, _} = cdr_decode:dec_system_exception({1, 0}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T3,E3),
+ {E3, _} = cdr_decode:dec_system_exception({1, 0}, B3, 0, big),
ok.
user_exceptions() ->
E = #'Module_Except1'{rest_of_name=["I","am","testing","exceptions"], why="Error"},
{user_exception, T, E} = orber_exceptions:get_def(E),
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, E),
- ?line {E, _} = cdr_decode:dec_user_exception({1, 0}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T, E),
+ {E, _} = cdr_decode:dec_user_exception({1, 0}, B, 0, big),
E1 = #'Module_Except2'{e=banana,
s=#'Module_Struct2'{long_sequence=[12,-4040,
1234567898],
e=horse,
o=$a}},
{user_exception, T1, E1} = orber_exceptions:get_def(E1),
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1, E1),
- ?line {E1, _} = cdr_decode:dec_user_exception({1, 0}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T1, E1),
+ {E1, _} = cdr_decode:dec_user_exception({1, 0}, B1, 0, big),
E2 = #'Module_Except3'{u=#'Module_Union1'{label=pig,value=["high","and","low"]},s=1313, o=objref(0)},
{user_exception, T2, E2} = orber_exceptions:get_def(E2),
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T2, E2),
- ?line {E2, _} = cdr_decode:dec_user_exception({1, 0}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T2, E2),
+ {E2, _} = cdr_decode:dec_user_exception({1, 0}, B2, 0, big),
E3 = #'Module_Except4'{},
{user_exception, T3, E3} = orber_exceptions:get_def(E3),
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T3, E3),
- ?line {E3, _} = cdr_decode:dec_user_exception({1, 0}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 0}}, T3, E3),
+ {E3, _} = cdr_decode:dec_user_exception({1, 0}, B3, 0, big),
ok.
%%-----------------------------------------------------------------
@@ -525,7 +497,6 @@ user_exceptions() ->
%% Description: Precondition the stack must be started so the
%% objectkey is valid.
%%-----------------------------------------------------------------
-%request(suite) -> [];
%request(_) ->
% exit(not_implemented).
@@ -533,19 +504,17 @@ user_exceptions() ->
%% Test Case: reply encoding test
%% Description:
%%-----------------------------------------------------------------
-reply(doc) -> ["Description", "more description"];
-reply(suite) -> [];
reply(Config) when is_list(Config) ->
R = #reply_header{service_context=[], request_id=1,
reply_status='no_exception'},
- ?line B = cdr_encode:enc_reply(
+ B = cdr_encode:enc_reply(
#giop_env{version = {1, 0}, request_id = 1,
reply_status = 'no_exception',
tc = {'tk_long', [], [{'tk_sequence',
{'tk_string', 0}, 0}]},
result = 1200, parameters = [["foo","Bar"]],
ctx = []}),
- ?line {R, 1200, [["foo","Bar"]]} =
+ {R, 1200, [["foo","Bar"]]} =
cdr_decode:dec_message({'tk_long', [], [{'tk_sequence', {'tk_string', 0},0}]},
B),
ok.
@@ -554,21 +523,17 @@ reply(Config) when is_list(Config) ->
%% Test Case: cancel_request encoding test
%% Description:
%%-----------------------------------------------------------------
-cancel_request(doc) -> ["Description", "more description"];
-cancel_request(suite) -> [];
cancel_request(Config) when is_list(Config) ->
R = #cancel_request_header{request_id=1},
- ?line B = cdr_encode:enc_cancel_request(#giop_env{version = {1, 0},
+ B = cdr_encode:enc_cancel_request(#giop_env{version = {1, 0},
request_id = 1}),
- ?line R = cdr_decode:dec_message([], B),
+ R = cdr_decode:dec_message([], B),
ok.
%%-----------------------------------------------------------------
%% Test Case: locate_request encoding test
%% Description:
%%-----------------------------------------------------------------
-locate_request(doc) -> ["Description", "more description"];
-locate_request(suite) -> [];
locate_request(Config) when is_list(Config) ->
io:format("Function not imlpemented yet"),
exit(not_implemented).
@@ -577,8 +542,6 @@ locate_request(Config) when is_list(Config) ->
%% Test Case: locate_reply encoding test
%% Description:
%%-----------------------------------------------------------------
-locate_reply(doc) -> ["Description", "more description"];
-locate_reply(suite) -> [];
locate_reply(Config) when is_list(Config) ->
io:format("Function not imlpemented yet"),
exit(not_implemented).
@@ -587,22 +550,18 @@ locate_reply(Config) when is_list(Config) ->
%% Test Case: close_connection encoding test
%% Description:
%%-----------------------------------------------------------------
-close_connection(doc) -> ["Description", "more description"];
-close_connection(suite) -> [];
close_connection(Config) when is_list(Config) ->
- ?line B = cdr_encode:enc_close_connection(#giop_env{version = {1, 0}}),
- ?line 'close_connection' = cdr_decode:dec_message([], B),
+ B = cdr_encode:enc_close_connection(#giop_env{version = {1, 0}}),
+ 'close_connection' = cdr_decode:dec_message([], B),
ok.
%%-----------------------------------------------------------------
%% Test Case: message_error encoding test
%% Description:
%%-----------------------------------------------------------------
-message_error(doc) -> ["Description", "more description"];
-message_error(suite) -> [];
message_error(Config) when is_list(Config) ->
- ?line B = cdr_encode:enc_message_error(#giop_env{version = {1, 0}}),
- ?line 'message_error' = cdr_decode:dec_message([], B),
+ B = cdr_encode:enc_message_error(#giop_env{version = {1, 0}}),
+ 'message_error' = cdr_decode:dec_message([], B),
ok.
diff --git a/lib/orber/test/cdrcoding_11_SUITE.erl b/lib/orber/test/cdrcoding_11_SUITE.erl
index 7513888449..ff5d2852d6 100644
--- a/lib/orber/test/cdrcoding_11_SUITE.erl
+++ b/lib/orber/test/cdrcoding_11_SUITE.erl
@@ -32,7 +32,7 @@
-include_lib("orber/include/corba.hrl").
-include_lib("orber/src/orber_iiop.hrl").
--define(default_timeout, ?t:minutes(5)).
+-define(default_timeout, test_server:minutes(5)).
%%-----------------------------------------------------------------
%% External exports
@@ -80,14 +80,14 @@ cases() ->
init_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -126,48 +126,39 @@ end_per_suite(Config) when is_list(Config) ->
% 'oe_orber_test':'oe_unregister'(),
% ok.
-do_register(doc) -> [];
-do_register(suite) -> [];
do_register(Config) when is_list(Config) ->
'oe_orber_test':'oe_register'(),
ok.
-do_unregister(doc) -> [];
-do_unregister(suite) -> [];
+
do_unregister(Config) when is_list(Config) ->
'oe_orber_test':'oe_unregister'(),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: null
%%-----------------------------------------------------------------
-null_type(doc) -> [];
-null_type(suite) -> [];
null_type(Config) when is_list(Config) ->
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_null', 'null'),
- ?line {'null', <<>>, _} = cdr_decode:dec_type('tk_null', {1, 1}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_null', 'null'),
+ {'null', <<>>, _} = cdr_decode:dec_type('tk_null', {1, 1}, B, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: void
%%-----------------------------------------------------------------
-void_type(doc) -> [];
-void_type(suite) -> [];
void_type(Config) when is_list(Config) ->
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_void', 'ok'),
- ?line {'ok', <<>>, _} = cdr_decode:dec_type('tk_void', {1, 1}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_void', 'ok'),
+ {'ok', <<>>, _} = cdr_decode:dec_type('tk_void', {1, 1}, B, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: principal
%%-----------------------------------------------------------------
-principal_type(doc) -> [];
-principal_type(suite) -> [];
principal_type(Config) when is_list(Config) ->
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_Principal', "principal"),
- ?line {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 1}, B0, 0, big),
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_Principal', ""),
- ?line {"", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 1}, B1, 0, big),
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_Principal', "principal"),
- ?line {"principal", <<>>, _} =
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_Principal', "principal"),
+ {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 1}, B0, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_Principal', ""),
+ {"", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 1}, B1, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, 'tk_Principal', "principal"),
+ {"principal", <<>>, _} =
cdr_decode:dec_type('tk_Principal', {1, 1}, B2, 0, big),
ok.
@@ -203,19 +194,17 @@ objref(2) ->
TP = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB},
#'IOP_IOR'{type_id="IDL:Module/Interface:1.0", profiles=[TP]}.
-objref_type(doc) -> [];
-objref_type(suite) -> [];
objref_type(Config) when is_list(Config) ->
T = {'tk_objref', "IDL:Module/Interface:1.0", "Interface"},
Objref0 = objref(0),
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, Objref0),
- ?line {Objref0, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B0, 0, big),
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, Objref0),
+ {Objref0, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B0, 0, big),
Objref1 = objref(1),
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, Objref1),
- ?line {Objref1, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, Objref1),
+ {Objref1, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B1, 0, big),
Objref2 = objref(2),
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, Objref2),
- ?line {Objref2, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, Objref2),
+ {Objref2, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B2, 0, big),
ok.
@@ -223,49 +212,45 @@ objref_type(Config) when is_list(Config) ->
%%-----------------------------------------------------------------
%% Encode/decode test of type: struct
%%-----------------------------------------------------------------
-struct_type(doc) -> [];
-struct_type(suite) -> [];
struct_type(Config) when is_list(Config) ->
T0 = {'tk_struct',"IDL:Module/Struct0:1.0", "Module_Struct0",
[{"long", 'tk_long'}, {"short", 'tk_short'}, {"character", 'tk_char'}]},
S0 = #'Module_Struct0'{l=-4711, s=17, c=$a},
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S0),
- ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B0, 0, big),
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S0),
+ {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B0, 0, big),
T1 = {'tk_struct', "IDL:Module/Struct1:1.0", "Module_Struct1",
[{"string", {'tk_string', 0}}, {"ushort", 'tk_ushort'}, {"ulong", 'tk_ulong'}]},
S1 = #'Module_Struct1'{s="Hi !!!!", us=17, ul=4711},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B1, 0, big),
T2 = {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2",
[{"long_sequence", {'tk_sequence', 'tk_long', 0}},
{"enum", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}},
{"octet", 'tk_octet'}]},
S2 = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000], e=cow, o=$X},
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S2),
- ?line {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S2),
+ {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B2, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: union
%%-----------------------------------------------------------------
-union_type(doc) -> [];
-union_type(suite) -> [];
union_type(Config) when is_list(Config) ->
T0 = {'tk_union', "IDL:Module/Union:1.0", "Union", 'tk_short', 2,
[{0, "First", 'tk_short'},
{1, "Second", {'tk_string', 0}},
{2, "Third", 'tk_char'}]},
S0 = #'Module_Union'{label=1, value="Foo Bar !"},
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S0),
- ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B0, 0, big),
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S0),
+ {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B0, 0, big),
S1 = #'Module_Union'{label=0, value=-17},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B1, 0, big),
S2 = #'Module_Union'{label=2, value=$X},
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S2),
- ?line {S2, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S2),
+ {S2, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B2, 0, big),
T1 = {'tk_union', "IDL:Module/Union1:1.0", "Union1",
{'tk_enum', "IDL:Module/Enum:1.0",
"Module_Enum", ["horse", "pig", "cow"]}, "pig",
@@ -274,14 +259,14 @@ union_type(Config) when is_list(Config) ->
{"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0",
"Module_Enum1", ["orange", "banana", "apple"]}}]},
S3 = #'Module_Union1'{label=pig, value=["Foo", "Bar", "!"]},
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S3),
- ?line {S3, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S3),
+ {S3, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B3, 0, big),
S4 = #'Module_Union1'{label=cow, value=apple},
- ?line B4 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S4),
- ?line {S4, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B4, 0, big),
+ B4 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S4),
+ {S4, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B4, 0, big),
S5 = #'Module_Union1'{label=horse, value=17},
- ?line B5 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S5),
- ?line {S5, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B5, 0, big),
+ B5 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S5),
+ {S5, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B5, 0, big),
T2 = {'tk_union', "IDL:Module/Union2:1.0", "Union2",
{'tk_enum', "IDL:Module/Enum:1.0",
"Module_Enum", ["horse", "pig", "cow"]}, "pig",
@@ -303,54 +288,50 @@ union_type(Config) when is_list(Config) ->
["orange", "banana",
"apple"]}}]}}]},
S6 = #'Module_Union2'{label=pig, value=#'Module_Union'{label=0, value=-17}},
- ?line B6 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S6),
- ?line {S6, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B6, 0, big),
+ B6 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S6),
+ {S6, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B6, 0, big),
S7 = #'Module_Union2'{label=cow, value=#'Module_Union1'{label=pig,
value=["Foo", "Bar", "!"]}},
- ?line B7 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S7),
- ?line {S7, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B7, 0, big),
+ B7 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S7),
+ {S7, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B7, 0, big),
S8 = #'Module_Union2'{label=horse, value={-17, 1234567890, -987654321}},
- ?line B8 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S8),
- ?line {S8, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B8, 0, big),
+ B8 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S8),
+ {S8, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B8, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: string
%%-----------------------------------------------------------------
-string_type(doc) -> [];
-string_type(suite) -> [];
string_type(Config) when is_list(Config) ->
S0 = "Foo Bar ???",
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S0),
- ?line {S0, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B0, 0, big),
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S0),
+ {S0, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B0, 0, big),
S1 = "Yes, Foo Bar !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! more than 5000 characters",
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B1, 0, big),
S2 = "",
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S2),
- ?line {S2, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S2),
+ {S2, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B2, 0, big),
S3 = "\0",
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S3),
- ?line {S3, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S3),
+ {S3, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B3, 0, big),
S4 = "~n",
- ?line B4 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S4),
- ?line {S4, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B4, 0, big),
+ B4 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, {'tk_string', 0}, S4),
+ {S4, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 1}, B4, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: array
%%-----------------------------------------------------------------
-array_type(doc) -> [];
-array_type(suite) -> [];
array_type(Config) when is_list(Config) ->
T0 = {'tk_array', 'tk_long', 5},
S0 = {-100, 0, 30000, -900100900, 123456789},
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S0),
- ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B0, 0, big),
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T0, S0),
+ {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 1}, B0, 0, big),
T1 = {'tk_array', {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, 2},
S1 = {pig, cow},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B1, 0, big),
T2 = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union",
{'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, "pig",
[{"horse", "First", 'tk_ushort'},
@@ -358,18 +339,16 @@ array_type(Config) when is_list(Config) ->
{"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0",
"Module_Enum1", ["orange", "banana", "apple"]}}]}, 2},
S2 = {#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}},
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S2),
- ?line {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, S2),
+ {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 1}, B2, 0, big),
T3 = {'tk_array', {'tk_objref', "IDL:Module/Interface:1.0", "Interface"}, 3},
S3 = {objref(0), objref(1), objref(2)},
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T3, S3),
- ?line {S3, <<>>, _} = cdr_decode:dec_type(T3, {1, 1}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T3, S3),
+ {S3, <<>>, _} = cdr_decode:dec_type(T3, {1, 1}, B3, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: TypeCode
%%-----------------------------------------------------------------
-any_type(doc) -> [];
-any_type(suite) -> [];
any_type(Config) when is_list(Config) ->
T = 'tk_any',
TC = {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2",
@@ -380,8 +359,8 @@ any_type(Config) when is_list(Config) ->
S = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000],
e=cow, o=$X},
Any = #any{typecode=TC,value=S},
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,Any),
- ?line {Any, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,Any),
+ {Any, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B, 0, big),
TC1 = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union",
{'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum",
["horse", "pig", "cow"]}, 1,
@@ -392,16 +371,14 @@ any_type(Config) when is_list(Config) ->
"apple"]}}]},2},
S1 = {#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}},
Any1 = #any{typecode=TC1,value=S1},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,Any1),
- ?line {Any1, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,Any1),
+ {Any1, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B1, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: TypeCode
%%-----------------------------------------------------------------
-typecode_type(doc) -> [];
-typecode_type(suite) -> [];
typecode_type(Config) when is_list(Config) ->
T = 'tk_TypeCode',
TC = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union",
@@ -412,8 +389,8 @@ typecode_type(Config) when is_list(Config) ->
{"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0",
"Module_Enum1", ["orange", "banana",
"apple"]}}]}, 10},
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,TC),
- ?line {TC, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,TC),
+ {TC, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B, 0, big),
TC1 = {'tk_union', "IDL:Module/Union2:1.0", "Union2",
{'tk_enum', "IDL:Module/Enum:1.0",
"Module_Enum", ["horse", "pig", "cow"]}, 2,
@@ -434,15 +411,13 @@ typecode_type(Config) when is_list(Config) ->
"Module_Enum1",
["orange", "banana",
"apple"]}}]}}]},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, TC1),
- ?line {TC1, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, TC1),
+ {TC1, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B1, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: TypeCode
%%-----------------------------------------------------------------
-alias_type(doc) -> [];
-alias_type(suite) -> [];
alias_type(Config) when is_list(Config) ->
T = {'tk_alias', "IDL:Module/Alias:1.0", "Alias",
{'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2",
@@ -452,8 +427,8 @@ alias_type(Config) when is_list(Config) ->
{"octet", 'tk_octet'}]}},
S = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000],
e=cow, o=$X},
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,S),
- ?line {S, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,S),
+ {S, <<>>, _} = cdr_decode:dec_type(T, {1, 1}, B, 0, big),
T1 = {'tk_alias', "IDL:Module/Alias1:1.0", "Alias1",
{'tk_sequence', {'tk_union', "IDL:Module/Union:1.0", "Union",
{'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum",
@@ -464,15 +439,13 @@ alias_type(Config) when is_list(Config) ->
"Module_Enum1", ["orange", "banana",
"apple"]}}]},0}},
S1 = [#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}],
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 1}, B1, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: exception
%%-----------------------------------------------------------------
-exception_type(doc) -> [];
-exception_type(suite) -> [];
exception_type(Config) when is_list(Config) ->
system_exceptions(),
user_exceptions(),
@@ -481,43 +454,43 @@ exception_type(Config) when is_list(Config) ->
system_exceptions() ->
E = #'UNKNOWN'{completion_status=?COMPLETED_YES},
{system_exception, T, E} = orber_exceptions:get_def(E),
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,E),
- ?line {E, _} = cdr_decode:dec_system_exception({1, 1}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T,E),
+ {E, _} = cdr_decode:dec_system_exception({1, 1}, B, 0, big),
E1 = #'INV_OBJREF'{completion_status=?COMPLETED_NO},
{system_exception, T1, E1} = orber_exceptions:get_def(E1),
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1,E1),
- ?line {E1, _} = cdr_decode:dec_system_exception({1, 1}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1,E1),
+ {E1, _} = cdr_decode:dec_system_exception({1, 1}, B1, 0, big),
E2 = #'BAD_OPERATION'{completion_status=?COMPLETED_NO},
{system_exception, T2, E2} = orber_exceptions:get_def(E2),
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2,E2),
- ?line {E2, _} = cdr_decode:dec_system_exception({1, 1}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2,E2),
+ {E2, _} = cdr_decode:dec_system_exception({1, 1}, B2, 0, big),
E3 = #'INTF_REPOS'{completion_status=?COMPLETED_MAYBE},
{system_exception, T3, E3} = orber_exceptions:get_def(E3),
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T3,E3),
- ?line {E3, _} = cdr_decode:dec_system_exception({1, 1}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T3,E3),
+ {E3, _} = cdr_decode:dec_system_exception({1, 1}, B3, 0, big),
ok.
user_exceptions() ->
E = #'Module_Except1'{rest_of_name=["I","am","testing","exceptions"], why="Error"},
{user_exception, T, E} = orber_exceptions:get_def(E),
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, E),
- ?line {E, _} = cdr_decode:dec_user_exception({1, 1}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T, E),
+ {E, _} = cdr_decode:dec_user_exception({1, 1}, B, 0, big),
E1 = #'Module_Except2'{e=banana,
s=#'Module_Struct2'{long_sequence=[12,-4040,
1234567898],
e=horse,
o=$a}},
{user_exception, T1, E1} = orber_exceptions:get_def(E1),
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, E1),
- ?line {E1, _} = cdr_decode:dec_user_exception({1, 1}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T1, E1),
+ {E1, _} = cdr_decode:dec_user_exception({1, 1}, B1, 0, big),
E2 = #'Module_Except3'{u=#'Module_Union1'{label=pig,value=["high","and","low"]},s=1313, o=objref(0)},
{user_exception, T2, E2} = orber_exceptions:get_def(E2),
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, E2),
- ?line {E2, _} = cdr_decode:dec_user_exception({1, 1}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T2, E2),
+ {E2, _} = cdr_decode:dec_user_exception({1, 1}, B2, 0, big),
E3 = #'Module_Except4'{},
{user_exception, T3, E3} = orber_exceptions:get_def(E3),
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T3, E3),
- ?line {E3, _} = cdr_decode:dec_user_exception({1, 1}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 1}}, T3, E3),
+ {E3, _} = cdr_decode:dec_user_exception({1, 1}, B3, 0, big),
ok.
%%-----------------------------------------------------------------
@@ -525,7 +498,6 @@ user_exceptions() ->
%% Description: Precondition the stack must be started so the
%% objectkey is valid.
%%-----------------------------------------------------------------
-%request(suite) -> [];
%request(_) ->
% exit(not_implemented).
@@ -533,18 +505,16 @@ user_exceptions() ->
%% Test Case: reply encoding test
%% Description:
%%-----------------------------------------------------------------
-reply(doc) -> ["Description", "more description"];
-reply(suite) -> [];
reply(Config) when is_list(Config) ->
R = #reply_header{service_context=[], request_id=1,
reply_status='no_exception'},
- ?line B = cdr_encode:enc_reply(#giop_env{version = {1, 1}, request_id = 1,
+ B = cdr_encode:enc_reply(#giop_env{version = {1, 1}, request_id = 1,
reply_status = 'no_exception',
tc = {'tk_long', [], [{'tk_sequence',
{'tk_string', 0}, 0}]},
result = 1200, parameters = [["foo","Bar"]],
ctx = []}),
- ?line {R, 1200, [["foo","Bar"]]} =
+ {R, 1200, [["foo","Bar"]]} =
cdr_decode:dec_message({'tk_long', [], [{'tk_sequence', {'tk_string', 0},0}]},
B),
ok.
@@ -553,21 +523,17 @@ reply(Config) when is_list(Config) ->
%% Test Case: cancel_request encoding test
%% Description:
%%-----------------------------------------------------------------
-cancel_request(doc) -> ["Description", "more description"];
-cancel_request(suite) -> [];
cancel_request(Config) when is_list(Config) ->
R = #cancel_request_header{request_id=1},
- ?line B = cdr_encode:enc_cancel_request(#giop_env{version = {1, 1},
+ B = cdr_encode:enc_cancel_request(#giop_env{version = {1, 1},
request_id = 1}),
- ?line R = cdr_decode:dec_message([], B),
+ R = cdr_decode:dec_message([], B),
ok.
%%-----------------------------------------------------------------
%% Test Case: locate_request encoding test
%% Description:
%%-----------------------------------------------------------------
-locate_request(doc) -> ["Description", "more description"];
-locate_request(suite) -> [];
locate_request(Config) when is_list(Config) ->
io:format("Function not imlpemented yet"),
exit(not_implemented).
@@ -576,8 +542,6 @@ locate_request(Config) when is_list(Config) ->
%% Test Case: locate_reply encoding test
%% Description:
%%-----------------------------------------------------------------
-locate_reply(doc) -> ["Description", "more description"];
-locate_reply(suite) -> [];
locate_reply(Config) when is_list(Config) ->
io:format("Function not imlpemented yet"),
exit(not_implemented).
@@ -586,22 +550,18 @@ locate_reply(Config) when is_list(Config) ->
%% Test Case: close_connection encoding test
%% Description:
%%-----------------------------------------------------------------
-close_connection(doc) -> ["Description", "more description"];
-close_connection(suite) -> [];
close_connection(Config) when is_list(Config) ->
- ?line B = cdr_encode:enc_close_connection(#giop_env{version = {1, 1}}),
- ?line 'close_connection' = cdr_decode:dec_message([], B),
+ B = cdr_encode:enc_close_connection(#giop_env{version = {1, 1}}),
+ 'close_connection' = cdr_decode:dec_message([], B),
ok.
%%-----------------------------------------------------------------
%% Test Case: message_error encoding test
%% Description:
%%-----------------------------------------------------------------
-message_error(doc) -> ["Description", "more description"];
-message_error(suite) -> [];
message_error(Config) when is_list(Config) ->
- ?line B = cdr_encode:enc_message_error(#giop_env{version = {1, 1}}),
- ?line 'message_error' = cdr_decode:dec_message([], B),
+ B = cdr_encode:enc_message_error(#giop_env{version = {1, 1}}),
+ 'message_error' = cdr_decode:dec_message([], B),
ok.
diff --git a/lib/orber/test/cdrcoding_12_SUITE.erl b/lib/orber/test/cdrcoding_12_SUITE.erl
index 1c04dc0711..13178b7774 100644
--- a/lib/orber/test/cdrcoding_12_SUITE.erl
+++ b/lib/orber/test/cdrcoding_12_SUITE.erl
@@ -33,7 +33,7 @@
-include_lib("orber/include/corba.hrl").
-include_lib("orber/src/orber_iiop.hrl").
--define(default_timeout, ?t:minutes(5)).
+-define(default_timeout, test_server:minutes(5)).
%%-----------------------------------------------------------------
%% External exports
@@ -81,14 +81,14 @@ cases() ->
init_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -111,48 +111,39 @@ end_per_suite(Config) when is_list(Config) ->
%% tested in the cdrlib SUITE.
%%-----------------------------------------------------------------
-do_register(doc) -> [];
-do_register(suite) -> [];
do_register(Config) when is_list(Config) ->
'oe_orber_test':'oe_register'(),
ok.
-do_unregister(doc) -> [];
-do_unregister(suite) -> [];
+
do_unregister(Config) when is_list(Config) ->
'oe_orber_test':'oe_unregister'(),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: null
%%-----------------------------------------------------------------
-null_type(doc) -> [];
-null_type(suite) -> [];
null_type(Config) when is_list(Config) ->
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_null', 'null'),
- ?line {'null', <<>>, _} = cdr_decode:dec_type('tk_null', {1, 2}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_null', 'null'),
+ {'null', <<>>, _} = cdr_decode:dec_type('tk_null', {1, 2}, B, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: void
%%-----------------------------------------------------------------
-void_type(doc) -> [];
-void_type(suite) -> [];
void_type(Config) when is_list(Config) ->
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_void', 'ok'),
- ?line {'ok', <<>>, _} = cdr_decode:dec_type('tk_void', {1, 2}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_void', 'ok'),
+ {'ok', <<>>, _} = cdr_decode:dec_type('tk_void', {1, 2}, B, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: principal
%%-----------------------------------------------------------------
-principal_type(doc) -> [];
-principal_type(suite) -> [];
principal_type(Config) when is_list(Config) ->
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_Principal', "principal"),
- ?line {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 2}, B0, 0, big),
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_Principal', ""),
- ?line {"", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 2}, B1, 0, big),
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_Principal', "principal"),
- ?line {"principal", <<>>, _} =
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_Principal', "principal"),
+ {"principal", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 2}, B0, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_Principal', ""),
+ {"", <<>>, _} = cdr_decode:dec_type('tk_Principal', {1, 2}, B1, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, 'tk_Principal', "principal"),
+ {"principal", <<>>, _} =
cdr_decode:dec_type('tk_Principal', {1, 2}, B2, 0, big),
ok.
@@ -188,19 +179,17 @@ objref(2) ->
TP = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB},
#'IOP_IOR'{type_id="IDL:Module/Interface:1.0", profiles=[TP]}.
-objref_type(doc) -> [];
-objref_type(suite) -> [];
objref_type(Config) when is_list(Config) ->
T = {'tk_objref', "IDL:Module/Interface:1.0", "Interface"},
Objref0 = objref(0),
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, Objref0),
- ?line {Objref0, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B0, 0, big),
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, Objref0),
+ {Objref0, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B0, 0, big),
Objref1 = objref(1),
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, Objref1),
- ?line {Objref1, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, Objref1),
+ {Objref1, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B1, 0, big),
Objref2 = objref(2),
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, Objref2),
- ?line {Objref2, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, Objref2),
+ {Objref2, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B2, 0, big),
ok.
@@ -208,49 +197,45 @@ objref_type(Config) when is_list(Config) ->
%%-----------------------------------------------------------------
%% Encode/decode test of type: struct
%%-----------------------------------------------------------------
-struct_type(doc) -> [];
-struct_type(suite) -> [];
struct_type(Config) when is_list(Config) ->
T0 = {'tk_struct',"IDL:Module/Struct0:1.0", "Module_Struct0",
[{"long", 'tk_long'}, {"short", 'tk_short'}, {"character", 'tk_char'}]},
S0 = #'Module_Struct0'{l=-4711, s=17, c=$a},
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S0),
- ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B0, 0, big),
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S0),
+ {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B0, 0, big),
T1 = {'tk_struct', "IDL:Module/Struct1:1.0", "Module_Struct1",
[{"string", {'tk_string', 0}}, {"ushort", 'tk_ushort'}, {"ulong", 'tk_ulong'}]},
S1 = #'Module_Struct1'{s="Hi !!!!", us=17, ul=4711},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B1, 0, big),
T2 = {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2",
[{"long_sequence", {'tk_sequence', 'tk_long', 0}},
{"enum", {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}},
{"octet", 'tk_octet'}]},
S2 = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000], e=cow, o=$X},
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S2),
- ?line {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S2),
+ {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B2, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: union
%%-----------------------------------------------------------------
-union_type(doc) -> [];
-union_type(suite) -> [];
union_type(Config) when is_list(Config) ->
T0 = {'tk_union', "IDL:Module/Union:1.0", "Union", 'tk_short', 2,
[{0, "First", 'tk_short'},
{1, "Second", {'tk_string', 0}},
{2, "Third", 'tk_char'}]},
S0 = #'Module_Union'{label=1, value="Foo Bar !"},
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S0),
- ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B0, 0, big),
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S0),
+ {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B0, 0, big),
S1 = #'Module_Union'{label=0, value=-17},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B1, 0, big),
S2 = #'Module_Union'{label=2, value=$X},
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S2),
- ?line {S2, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S2),
+ {S2, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B2, 0, big),
T1 = {'tk_union', "IDL:Module/Union1:1.0", "Union1",
{'tk_enum', "IDL:Module/Enum:1.0",
"Module_Enum", ["horse", "pig", "cow"]}, "pig",
@@ -259,14 +244,14 @@ union_type(Config) when is_list(Config) ->
{"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0",
"Module_Enum1", ["orange", "banana", "apple"]}}]},
S3 = #'Module_Union1'{label=pig, value=["Foo", "Bar", "!"]},
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S3),
- ?line {S3, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S3),
+ {S3, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B3, 0, big),
S4 = #'Module_Union1'{label=cow, value=apple},
- ?line B4 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S4),
- ?line {S4, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B4, 0, big),
+ B4 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S4),
+ {S4, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B4, 0, big),
S5 = #'Module_Union1'{label=horse, value=17},
- ?line B5 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S5),
- ?line {S5, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B5, 0, big),
+ B5 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S5),
+ {S5, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B5, 0, big),
T2 = {'tk_union', "IDL:Module/Union2:1.0", "Union2",
{'tk_enum', "IDL:Module/Enum:1.0",
"Module_Enum", ["horse", "pig", "cow"]}, "pig",
@@ -288,54 +273,50 @@ union_type(Config) when is_list(Config) ->
["orange", "banana",
"apple"]}}]}}]},
S6 = #'Module_Union2'{label=pig, value=#'Module_Union'{label=0, value=-17}},
- ?line B6 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S6),
- ?line {S6, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B6, 0, big),
+ B6 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S6),
+ {S6, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B6, 0, big),
S7 = #'Module_Union2'{label=cow, value=#'Module_Union1'{label=pig,
value=["Foo", "Bar", "!"]}},
- ?line B7 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S7),
- ?line {S7, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B7, 0, big),
+ B7 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S7),
+ {S7, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B7, 0, big),
S8 = #'Module_Union2'{label=horse, value={-17, 1234567890, -987654321}},
- ?line B8 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S8),
- ?line {S8, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B8, 0, big),
+ B8 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S8),
+ {S8, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B8, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: string
%%-----------------------------------------------------------------
-string_type(doc) -> [];
-string_type(suite) -> [];
string_type(Config) when is_list(Config) ->
S0 = "Foo Bar ???",
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S0),
- ?line {S0, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B0, 0, big),
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S0),
+ {S0, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B0, 0, big),
S1 = "Yes, Foo Bar !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! more than 5000 characters",
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B1, 0, big),
S2 = "",
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S2),
- ?line {S2, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S2),
+ {S2, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B2, 0, big),
S3 = "\0",
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S3),
- ?line {S3, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S3),
+ {S3, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B3, 0, big),
S4 = "~n",
- ?line B4 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S4),
- ?line {S4, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B4, 0, big),
+ B4 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, {'tk_string', 0}, S4),
+ {S4, <<>>, _} = cdr_decode:dec_type({'tk_string', 0}, {1, 2}, B4, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: array
%%-----------------------------------------------------------------
-array_type(doc) -> [];
-array_type(suite) -> [];
array_type(Config) when is_list(Config) ->
T0 = {'tk_array', 'tk_long', 5},
S0 = {-100, 0, 30000, -900100900, 123456789},
- ?line B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S0),
- ?line {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B0, 0, big),
+ B0 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T0, S0),
+ {S0, <<>>, _} = cdr_decode:dec_type(T0, {1, 2}, B0, 0, big),
T1 = {'tk_array', {'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, 2},
S1 = {pig, cow},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B1, 0, big),
T2 = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union",
{'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum", ["horse", "pig", "cow"]}, "pig",
[{"horse", "First", 'tk_ushort'},
@@ -343,18 +324,16 @@ array_type(Config) when is_list(Config) ->
{"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0",
"Module_Enum1", ["orange", "banana", "apple"]}}]}, 2},
S2 = {#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}},
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S2),
- ?line {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, S2),
+ {S2, <<>>, _} = cdr_decode:dec_type(T2, {1, 2}, B2, 0, big),
T3 = {'tk_array', {'tk_objref', "IDL:Module/Interface:1.0", "Interface"}, 3},
S3 = {objref(0), objref(1), objref(2)},
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T3, S3),
- ?line {S3, <<>>, _} = cdr_decode:dec_type(T3, {1, 2}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T3, S3),
+ {S3, <<>>, _} = cdr_decode:dec_type(T3, {1, 2}, B3, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: TypeCode
%%-----------------------------------------------------------------
-any_type(doc) -> [];
-any_type(suite) -> [];
any_type(Config) when is_list(Config) ->
T = 'tk_any',
TC = {'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2",
@@ -365,8 +344,8 @@ any_type(Config) when is_list(Config) ->
S = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000],
e=cow, o=$X},
Any = #any{typecode=TC,value=S},
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,Any),
- ?line {Any, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,Any),
+ {Any, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B, 0, big),
TC1 = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union",
{'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum",
["horse", "pig", "cow"]}, 1,
@@ -377,16 +356,14 @@ any_type(Config) when is_list(Config) ->
"apple"]}}]},2},
S1 = {#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}},
Any1 = #any{typecode=TC1,value=S1},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,Any1),
- ?line {Any1, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,Any1),
+ {Any1, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B1, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: TypeCode
%%-----------------------------------------------------------------
-typecode_type(doc) -> [];
-typecode_type(suite) -> [];
typecode_type(Config) when is_list(Config) ->
T = 'tk_TypeCode',
TC = {'tk_array', {'tk_union', "IDL:Module/Union:1.0", "Union",
@@ -397,8 +374,8 @@ typecode_type(Config) when is_list(Config) ->
{"cow", "Third", {'tk_enum', "IDL:Module/Enum1:1.0",
"Module_Enum1", ["orange", "banana",
"apple"]}}]}, 10},
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,TC),
- ?line {TC, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,TC),
+ {TC, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B, 0, big),
TC1 = {'tk_union', "IDL:Module/Union2:1.0", "Union2",
{'tk_enum', "IDL:Module/Enum:1.0",
"Module_Enum", ["horse", "pig", "cow"]}, 2,
@@ -419,15 +396,13 @@ typecode_type(Config) when is_list(Config) ->
"Module_Enum1",
["orange", "banana",
"apple"]}}]}}]},
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, TC1),
- ?line {TC1, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, TC1),
+ {TC1, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B1, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: TypeCode
%%-----------------------------------------------------------------
-alias_type(doc) -> [];
-alias_type(suite) -> [];
alias_type(Config) when is_list(Config) ->
T = {'tk_alias', "IDL:Module/Alias:1.0", "Alias",
{'tk_struct', "IDL:Module/Struct2:1.0", "Module_Struct2",
@@ -437,8 +412,8 @@ alias_type(Config) when is_list(Config) ->
{"octet", 'tk_octet'}]}},
S = #'Module_Struct2'{long_sequence=[4711, 350000, 0, -3030, -600000],
e=cow, o=$X},
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,S),
- ?line {S, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,S),
+ {S, <<>>, _} = cdr_decode:dec_type(T, {1, 2}, B, 0, big),
T1 = {'tk_alias', "IDL:Module/Alias1:1.0", "Alias1",
{'tk_sequence', {'tk_union', "IDL:Module/Union:1.0", "Union",
{'tk_enum', "IDL:Module/Enum:1.0", "Module_Enum",
@@ -449,15 +424,13 @@ alias_type(Config) when is_list(Config) ->
"Module_Enum1", ["orange", "banana",
"apple"]}}]},0}},
S1 = [#'Module_Union'{label=cow, value=banana}, #'Module_Union'{label=pig, value=["This", "is", "a", "test", ""]}],
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S1),
- ?line {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, S1),
+ {S1, <<>>, _} = cdr_decode:dec_type(T1, {1, 2}, B1, 0, big),
ok.
%%-----------------------------------------------------------------
%% Encode/decode test of type: exception
%%-----------------------------------------------------------------
-exception_type(doc) -> [];
-exception_type(suite) -> [];
exception_type(Config) when is_list(Config) ->
system_exceptions(),
user_exceptions(),
@@ -466,43 +439,43 @@ exception_type(Config) when is_list(Config) ->
system_exceptions() ->
E = #'UNKNOWN'{completion_status=?COMPLETED_YES},
{system_exception, T, E} = orber_exceptions:get_def(E),
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,E),
- ?line {E, _} = cdr_decode:dec_system_exception({1, 2}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T,E),
+ {E, _} = cdr_decode:dec_system_exception({1, 2}, B, 0, big),
E1 = #'INV_OBJREF'{completion_status=?COMPLETED_NO},
{system_exception, T1, E1} = orber_exceptions:get_def(E1),
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1,E1),
- ?line {E1, _} = cdr_decode:dec_system_exception({1, 2}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1,E1),
+ {E1, _} = cdr_decode:dec_system_exception({1, 2}, B1, 0, big),
E2 = #'BAD_OPERATION'{completion_status=?COMPLETED_NO},
{system_exception, T2, E2} = orber_exceptions:get_def(E2),
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2,E2),
- ?line {E2, _} = cdr_decode:dec_system_exception({1, 2}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2,E2),
+ {E2, _} = cdr_decode:dec_system_exception({1, 2}, B2, 0, big),
E3 = #'INTF_REPOS'{completion_status=?COMPLETED_MAYBE},
{system_exception, T3, E3} = orber_exceptions:get_def(E3),
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T3,E3),
- ?line {E3, _} = cdr_decode:dec_system_exception({1, 2}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T3,E3),
+ {E3, _} = cdr_decode:dec_system_exception({1, 2}, B3, 0, big),
ok.
user_exceptions() ->
E = #'Module_Except1'{rest_of_name=["I","am","testing","exceptions"], why="Error"},
{user_exception, T, E} = orber_exceptions:get_def(E),
- ?line B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, E),
- ?line {E, _} = cdr_decode:dec_user_exception({1, 2}, B, 0, big),
+ B = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T, E),
+ {E, _} = cdr_decode:dec_user_exception({1, 2}, B, 0, big),
E1 = #'Module_Except2'{e=banana,
s=#'Module_Struct2'{long_sequence=[12,-4040,
1234567898],
e=horse,
o=$a}},
{user_exception, T1, E1} = orber_exceptions:get_def(E1),
- ?line B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, E1),
- ?line {E1, _} = cdr_decode:dec_user_exception({1, 2}, B1, 0, big),
+ B1 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T1, E1),
+ {E1, _} = cdr_decode:dec_user_exception({1, 2}, B1, 0, big),
E2 = #'Module_Except3'{u=#'Module_Union1'{label=pig,value=["high","and","low"]},s=1313, o=objref(0)},
{user_exception, T2, E2} = orber_exceptions:get_def(E2),
- ?line B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, E2),
- ?line {E2, _} = cdr_decode:dec_user_exception({1, 2}, B2, 0, big),
+ B2 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T2, E2),
+ {E2, _} = cdr_decode:dec_user_exception({1, 2}, B2, 0, big),
E3 = #'Module_Except4'{},
{user_exception, T3, E3} = orber_exceptions:get_def(E3),
- ?line B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T3, E3),
- ?line {E3, _} = cdr_decode:dec_user_exception({1, 2}, B3, 0, big),
+ B3 = cdr_encode:enc_type(#giop_env{version = {1, 2}}, T3, E3),
+ {E3, _} = cdr_decode:dec_user_exception({1, 2}, B3, 0, big),
ok.
%%-----------------------------------------------------------------
@@ -510,7 +483,6 @@ user_exceptions() ->
%% Description: Precondition the stack must be started so the
%% objectkey is valid.
%%-----------------------------------------------------------------
-%request(suite) -> [];
%request(_) ->
% exit(not_implemented).
@@ -518,12 +490,10 @@ user_exceptions() ->
%% Test Case: reply encoding test
%% Description:
%%-----------------------------------------------------------------
-reply(doc) -> ["Description", "more description"];
-reply(suite) -> [];
reply(Config) when is_list(Config) ->
R = #reply_header{service_context=[], request_id=1,
reply_status='no_exception'},
- ?line B = cdr_encode:enc_reply(#giop_env{version = {1, 2}, request_id = 1,
+ B = cdr_encode:enc_reply(#giop_env{version = {1, 2}, request_id = 1,
reply_status = 'no_exception',
tc = {'tk_long', [], [{'tk_sequence',
{'tk_string', 0}, 0}]},
@@ -531,7 +501,7 @@ reply(Config) when is_list(Config) ->
parameters = [["foo","Bar"]],
ctx = []}),
- ?line {R, 1200, [["foo","Bar"]]} =
+ {R, 1200, [["foo","Bar"]]} =
cdr_decode:dec_message({'tk_long', [], [{'tk_sequence', {'tk_string', 0},0}]},
B),
@@ -541,21 +511,17 @@ reply(Config) when is_list(Config) ->
%% Test Case: cancel_request encoding test
%% Description:
%%-----------------------------------------------------------------
-cancel_request(doc) -> ["Description", "more description"];
-cancel_request(suite) -> [];
cancel_request(Config) when is_list(Config) ->
R = #cancel_request_header{request_id=1},
- ?line B = cdr_encode:enc_cancel_request(#giop_env{version = {1, 2},
+ B = cdr_encode:enc_cancel_request(#giop_env{version = {1, 2},
request_id = 1}),
- ?line R = cdr_decode:dec_message([], B),
+ R = cdr_decode:dec_message([], B),
ok.
%%-----------------------------------------------------------------
%% Test Case: locate_request encoding test
%% Description:
%%-----------------------------------------------------------------
-locate_request(doc) -> ["Description", "more description"];
-locate_request(suite) -> [];
locate_request(Config) when is_list(Config) ->
io:format("Function not imlpemented yet"),
exit(not_implemented).
@@ -564,8 +530,6 @@ locate_request(Config) when is_list(Config) ->
%% Test Case: locate_reply encoding test
%% Description:
%%-----------------------------------------------------------------
-locate_reply(doc) -> ["Description", "more description"];
-locate_reply(suite) -> [];
locate_reply(Config) when is_list(Config) ->
io:format("Function not imlpemented yet"),
exit(not_implemented).
@@ -574,22 +538,18 @@ locate_reply(Config) when is_list(Config) ->
%% Test Case: close_connection encoding test
%% Description:
%%-----------------------------------------------------------------
-close_connection(doc) -> ["Description", "more description"];
-close_connection(suite) -> [];
close_connection(Config) when is_list(Config) ->
- ?line B = cdr_encode:enc_close_connection(#giop_env{version = {1, 2}}),
- ?line 'close_connection' = cdr_decode:dec_message([], B),
+ B = cdr_encode:enc_close_connection(#giop_env{version = {1, 2}}),
+ 'close_connection' = cdr_decode:dec_message([], B),
ok.
%%-----------------------------------------------------------------
%% Test Case: message_error encoding test
%% Description:
%%-----------------------------------------------------------------
-message_error(doc) -> ["Description", "more description"];
-message_error(suite) -> [];
message_error(Config) when is_list(Config) ->
- ?line B = cdr_encode:enc_message_error(#giop_env{version = {1, 2}}),
- ?line 'message_error' = cdr_decode:dec_message([], B),
+ B = cdr_encode:enc_message_error(#giop_env{version = {1, 2}}),
+ 'message_error' = cdr_decode:dec_message([], B),
ok.
diff --git a/lib/orber/test/cdrlib_SUITE.erl b/lib/orber/test/cdrlib_SUITE.erl
index e3482d11bd..93adc861c5 100644
--- a/lib/orber/test/cdrlib_SUITE.erl
+++ b/lib/orber/test/cdrlib_SUITE.erl
@@ -28,7 +28,7 @@
-include_lib("common_test/include/ct.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
%%-----------------------------------------------------------------
%% External exports
@@ -73,12 +73,12 @@ end_per_group(_GroupName, Config) ->
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -86,8 +86,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: short integer test
%% Description:
%%-----------------------------------------------------------------
-short(doc) -> ["Description", "more description"];
-short(suite) -> [];
short(_) ->
short_big_loop([-32768, -4040, -1, 0, 4040, 32767]),
short_little_loop([-32768, -4040, -1, 0, 4040, 32767]),
@@ -96,16 +94,16 @@ short(_) ->
short_big_loop([]) ->
ok;
short_big_loop([X |List]) ->
- ?line [CodedType] = cdrlib:enc_short(X, []),
- ?line {X, <<>>} = cdrlib:dec_short(big, CodedType),
+ [CodedType] = cdrlib:enc_short(X, []),
+ {X, <<>>} = cdrlib:dec_short(big, CodedType),
short_big_loop(List),
ok.
short_little_loop([]) ->
ok;
short_little_loop([X |List]) ->
- ?line CodedType = enc_short_little(X, []),
- ?line {X, <<>>} = cdrlib:dec_short(little, CodedType),
+ CodedType = enc_short_little(X, []),
+ {X, <<>>} = cdrlib:dec_short(little, CodedType),
short_little_loop(List),
ok.
@@ -113,16 +111,14 @@ enc_short_little(X, Message) ->
list_to_binary([(X) band 16#ff, ((X) bsr 8) band 16#ff | Message]).
bad_short() ->
- ?line {'EXCEPTION', _} = (catch cdrlib:enc_short('atom', [])),
- ?line [CodedType] = cdrlib:enc_char($a, []),
- ?line {'EXIT', _} = (catch cdrlib:dec_short(big, CodedType)),
+ {'EXCEPTION', _} = (catch cdrlib:enc_short('atom', [])),
+ [CodedType] = cdrlib:enc_char($a, []),
+ {'EXIT', _} = (catch cdrlib:dec_short(big, CodedType)),
ok.
%%-----------------------------------------------------------------
%% Test Case: unsigned short integer test
%% Description:
%%-----------------------------------------------------------------
-ushort(doc) -> ["Description", "more description"];
-ushort(suite) -> [];
ushort(_) ->
ushort_big_loop([0, 4040, 65535]),
ushort_little_loop([0, 4040, 65535]),
@@ -131,16 +127,16 @@ ushort(_) ->
ushort_big_loop([]) ->
ok;
ushort_big_loop([X |List]) ->
- ?line [CodedType] = cdrlib:enc_unsigned_short(X, []),
- ?line {X, <<>>} = cdrlib:dec_unsigned_short(big, CodedType),
+ [CodedType] = cdrlib:enc_unsigned_short(X, []),
+ {X, <<>>} = cdrlib:dec_unsigned_short(big, CodedType),
ushort_big_loop(List),
ok.
ushort_little_loop([]) ->
ok;
ushort_little_loop([X |List]) ->
- ?line CodedType = enc_ushort_little(X, []),
- ?line {X, <<>>} = cdrlib:dec_unsigned_short(little, CodedType),
+ CodedType = enc_ushort_little(X, []),
+ {X, <<>>} = cdrlib:dec_unsigned_short(little, CodedType),
ushort_little_loop(List),
ok.
@@ -153,8 +149,6 @@ bad_ushort() ->
%% Test Case: long integer test
%% Description:
%%-----------------------------------------------------------------
-long(doc) -> ["Description", "more description"];
-long(suite) -> [];
long(_) ->
long_big_loop([-2147483648, -40404040, -32768, -4040, -1,
0, 4040, 32767, 40404040, 2147483647]),
@@ -166,16 +160,16 @@ long(_) ->
long_big_loop([]) ->
ok;
long_big_loop([X |List]) ->
- ?line [CodedType] = cdrlib:enc_long(X, []),
- ?line {X, <<>>} = cdrlib:dec_long(big, CodedType),
+ [CodedType] = cdrlib:enc_long(X, []),
+ {X, <<>>} = cdrlib:dec_long(big, CodedType),
long_big_loop(List),
ok.
long_little_loop([]) ->
ok;
long_little_loop([X |List]) ->
- ?line CodedType = enc_long_little(X, []),
- ?line {X, <<>>} = cdrlib:dec_long(little, CodedType),
+ CodedType = enc_long_little(X, []),
+ {X, <<>>} = cdrlib:dec_long(little, CodedType),
long_little_loop(List),
ok.
@@ -190,8 +184,6 @@ bad_long() ->
%% Test Case: unsigned long integer test
%% Description:
%%-----------------------------------------------------------------
-ulong(doc) -> ["Description", "more description"];
-ulong(suite) -> [];
ulong(_) ->
ulong_big_loop([0, 4040, 65535, 40404040, 2147483647, 4294967295]),
ulong_little_loop([0, 4040, 65535, 40404040, 2147483647, 4294967295]),
@@ -201,16 +193,16 @@ ulong(_) ->
ulong_big_loop([]) ->
ok;
ulong_big_loop([X |List]) ->
- ?line [CodedType] = cdrlib:enc_unsigned_long(X, []),
- ?line {X, <<>>} = cdrlib:dec_unsigned_long(big, CodedType),
+ [CodedType] = cdrlib:enc_unsigned_long(X, []),
+ {X, <<>>} = cdrlib:dec_unsigned_long(big, CodedType),
ulong_big_loop(List),
ok.
ulong_little_loop([]) ->
ok;
ulong_little_loop([X |List]) ->
- ?line CodedType = enc_ulong_little(X, []),
- ?line {X, <<>>} = cdrlib:dec_unsigned_long(little, CodedType),
+ CodedType = enc_ulong_little(X, []),
+ {X, <<>>} = cdrlib:dec_unsigned_long(little, CodedType),
ulong_little_loop(List),
ok.
@@ -226,8 +218,6 @@ bad_ulong() ->
%% Test Case: long integer test
%% Description:
%%-----------------------------------------------------------------
-longlong(doc) -> ["Description", "more description"];
-longlong(suite) -> [];
longlong(_) ->
longlong_big_loop([-2147483648, -40404040, -32768, -4040, -1,
0, 4040, 32767, 40404040, 2147483647]),
@@ -239,16 +229,16 @@ longlong(_) ->
longlong_big_loop([]) ->
ok;
longlong_big_loop([X |List]) ->
- ?line [CodedType] = cdrlib:enc_longlong(X, []),
- ?line {X, <<>>} = cdrlib:dec_longlong(big, CodedType),
+ [CodedType] = cdrlib:enc_longlong(X, []),
+ {X, <<>>} = cdrlib:dec_longlong(big, CodedType),
longlong_big_loop(List),
ok.
longlong_little_loop([]) ->
ok;
longlong_little_loop([X |List]) ->
- ?line CodedType = enc_longlong_little(X, []),
- ?line {X, <<>>} = cdrlib:dec_longlong(little, CodedType),
+ CodedType = enc_longlong_little(X, []),
+ {X, <<>>} = cdrlib:dec_longlong(little, CodedType),
longlong_little_loop(List),
ok.
@@ -264,8 +254,6 @@ bad_longlong() ->
%% Test Case: unsigned long integer test
%% Description:
%%-----------------------------------------------------------------
-ulonglong(doc) -> ["Description", "more description"];
-ulonglong(suite) -> [];
ulonglong(_) ->
ulonglong_big_loop([0, 4040, 65535, 40404040, 2147483647, 4294967295]),
ulonglong_little_loop([0, 4040, 65535, 40404040, 2147483647, 4294967295]),
@@ -275,16 +263,16 @@ ulonglong(_) ->
ulonglong_big_loop([]) ->
ok;
ulonglong_big_loop([X |List]) ->
- ?line [CodedType] = cdrlib:enc_unsigned_longlong(X, []),
- ?line {X, <<>>} = cdrlib:dec_unsigned_longlong(big, CodedType),
+ [CodedType] = cdrlib:enc_unsigned_longlong(X, []),
+ {X, <<>>} = cdrlib:dec_unsigned_longlong(big, CodedType),
ulonglong_big_loop(List),
ok.
ulonglong_little_loop([]) ->
ok;
ulonglong_little_loop([X |List]) ->
- ?line CodedType = enc_ulonglong_little(X, []),
- ?line {X, <<>>} = cdrlib:dec_unsigned_longlong(little, CodedType),
+ CodedType = enc_ulonglong_little(X, []),
+ {X, <<>>} = cdrlib:dec_unsigned_longlong(little, CodedType),
ulonglong_little_loop(List),
ok.
@@ -302,47 +290,41 @@ bad_ulonglong() ->
%% Test Case: boolean test
%% Description:
%%-----------------------------------------------------------------
-boolean(doc) -> ["Description", "more description"];
-boolean(suite) -> [];
boolean(_) ->
- ?line [CodedTrue] = cdrlib:enc_bool('true', []),
- ?line {'true', <<>>} = cdrlib:dec_bool(CodedTrue),
- ?line [CodedFalse] = cdrlib:enc_bool('false', []),
- ?line {'false', <<>>} = cdrlib:dec_bool(CodedFalse),
+ [CodedTrue] = cdrlib:enc_bool('true', []),
+ {'true', <<>>} = cdrlib:dec_bool(CodedTrue),
+ [CodedFalse] = cdrlib:enc_bool('false', []),
+ {'false', <<>>} = cdrlib:dec_bool(CodedFalse),
ok.
%%-----------------------------------------------------------------
%% Test Case: character test
%% Description:
%%-----------------------------------------------------------------
-character(doc) -> ["Description", "more description"];
-character(suite) -> [];
character(_) ->
- ?line [Coded_0] = cdrlib:enc_char($0, []),
- ?line {$0, <<>>} = cdrlib:dec_char(Coded_0),
- ?line [Coded_a] = cdrlib:enc_char($a, []),
- ?line {$a, <<>>} = cdrlib:dec_char(Coded_a),
- ?line [Coded_Z] = cdrlib:enc_char($Z, []),
- ?line {$Z, <<>>} = cdrlib:dec_char(Coded_Z),
- ?line [Coded_dollar] = cdrlib:enc_char($$, []),
- ?line {$$, <<>>} = cdrlib:dec_char(Coded_dollar),
+ [Coded_0] = cdrlib:enc_char($0, []),
+ {$0, <<>>} = cdrlib:dec_char(Coded_0),
+ [Coded_a] = cdrlib:enc_char($a, []),
+ {$a, <<>>} = cdrlib:dec_char(Coded_a),
+ [Coded_Z] = cdrlib:enc_char($Z, []),
+ {$Z, <<>>} = cdrlib:dec_char(Coded_Z),
+ [Coded_dollar] = cdrlib:enc_char($$, []),
+ {$$, <<>>} = cdrlib:dec_char(Coded_dollar),
ok.
%%-----------------------------------------------------------------
%% Test Case: octet test
%% Description:
%%-----------------------------------------------------------------
-octet(doc) -> ["Description", "more description"];
-octet(suite) -> [];
octet(_) ->
- ?line [Coded_ff] = cdrlib:enc_octet(16#ff, []),
- ?line {16#ff, <<>>} = cdrlib:dec_octet(Coded_ff),
- ?line [Coded_00] = cdrlib:enc_octet(16#00, []),
- ?line {16#00, <<>>} = cdrlib:dec_octet(Coded_00),
- ?line [Coded_5a] = cdrlib:enc_octet(16#5a, []),
- ?line {16#5a, <<>>} = cdrlib:dec_octet(Coded_5a),
- ?line [Coded_48] = cdrlib:enc_octet(16#48, []),
- ?line {16#48, <<>>} = cdrlib:dec_octet(Coded_48),
+ [Coded_ff] = cdrlib:enc_octet(16#ff, []),
+ {16#ff, <<>>} = cdrlib:dec_octet(Coded_ff),
+ [Coded_00] = cdrlib:enc_octet(16#00, []),
+ {16#00, <<>>} = cdrlib:dec_octet(Coded_00),
+ [Coded_5a] = cdrlib:enc_octet(16#5a, []),
+ {16#5a, <<>>} = cdrlib:dec_octet(Coded_5a),
+ [Coded_48] = cdrlib:enc_octet(16#48, []),
+ {16#48, <<>>} = cdrlib:dec_octet(Coded_48),
ok.
@@ -351,8 +333,6 @@ octet(_) ->
%% Test Case: float test
%% Description:
%%-----------------------------------------------------------------
-float(doc) -> ["Description", "more description"];
-float(suite) -> [];
float(_) ->
G = 16#7fffff / 16#800000 + 1.0,
H1 = math:pow(2, 127),
@@ -368,18 +348,18 @@ float(_) ->
float_big_loop([]) ->
ok;
float_big_loop([X |List]) ->
- ?line [CodedType] = cdrlib:enc_float(X, []),
- ?line {Y, <<>>} = cdrlib:dec_float(big, CodedType),
- ?line float_comp(X,Y),
+ [CodedType] = cdrlib:enc_float(X, []),
+ {Y, <<>>} = cdrlib:dec_float(big, CodedType),
+ float_comp(X,Y),
float_big_loop(List),
ok.
float_little_loop([]) ->
ok;
float_little_loop([X |List]) ->
- ?line [CodedType] = enc_float_little(X, []),
- ?line {Y, <<>>} = cdrlib:dec_float(little, CodedType),
- ?line float_comp(X,Y),
+ [CodedType] = enc_float_little(X, []),
+ {Y, <<>>} = cdrlib:dec_float(little, CodedType),
+ float_comp(X,Y),
float_little_loop(List),
ok.
@@ -388,8 +368,8 @@ float_comp(X,Y) when X == 0.0, Y == 0.0 ->
float_comp(X,Y) ->
Div = abs(Y) / abs(X),
%% io:format("~p~n", [float_to_list(Div)]),
- ?line true = (Div < 1.0000001),
- ?line true = (Div > 0.9999999),
+ true = (Div < 1.0000001),
+ true = (Div > 0.9999999),
ok.
enc_float_little(X, Message) ->
@@ -399,8 +379,6 @@ enc_float_little(X, Message) ->
%% Test Case: double test
%% Description:
%%-----------------------------------------------------------------
-double(doc) -> ["Description", "more description"];
-double(suite) -> [];
double(_) ->
F = 16#0fffffffffffff / 16#10000000000000 + 1.0,
E1 = math:pow(2, 1023),
@@ -423,18 +401,18 @@ double(_) ->
double_big_loop([]) ->
ok;
double_big_loop([X |List]) ->
- ?line [CodedType] = cdrlib:enc_double(X, []),
- ?line {Y, <<>>} = cdrlib:dec_double(big, CodedType),
- ?line double_comp(X,Y),
+ [CodedType] = cdrlib:enc_double(X, []),
+ {Y, <<>>} = cdrlib:dec_double(big, CodedType),
+ double_comp(X,Y),
double_big_loop(List),
ok.
double_little_loop([]) ->
ok;
double_little_loop([X |List]) ->
- ?line [CodedType] = enc_double_little(X, []),
- ?line {Y, <<>>} = cdrlib:dec_double(little, CodedType),
- ?line double_comp(X,Y),
+ [CodedType] = enc_double_little(X, []),
+ {Y, <<>>} = cdrlib:dec_double(little, CodedType),
+ double_comp(X,Y),
double_little_loop(List),
ok.
@@ -446,12 +424,10 @@ double_comp(X,Y) when X == 0.0, Y == 0.0 ->
double_comp(X,Y) ->
Div = abs(Y) / abs(X),
%% io:format("~p~n", [float_to_list(Div)]),
- ?line true = (Div < 1.00000000000001),
- ?line true = (Div > 0.99999999999999),
+ true = (Div < 1.00000000000001),
+ true = (Div > 0.99999999999999),
ok.
-double_should_be_ok(doc) -> ["Description", "more description"];
-double_should_be_ok(suite) -> [];
double_should_be_ok(_) ->
F = 16#0fffffffffffff / 16#10000000000000 + 1.0,
E1 = math:pow(2, 1024), % erlang can't handle this.
@@ -466,29 +442,27 @@ double_should_be_ok(_) ->
%% Test Case: enum test
%% Description:
%%-----------------------------------------------------------------
-enum(doc) -> ["Description", "more description"];
-enum(suite) -> [];
enum(_) ->
enum_big(),
enum_little(),
ok.
enum_big() ->
- ?line [Coded_a] = cdrlib:enc_enum(a,[a,b,c],[]),
- ?line {a, <<>>} = cdrlib:dec_enum(big, ["a","b","c"], Coded_a),
- ?line [Coded_b] = cdrlib:enc_enum(b,[a,b,c],[]),
- ?line {b, <<>>} = cdrlib:dec_enum(big, ["a","b","c"], Coded_b),
- ?line [Coded_c] = cdrlib:enc_enum(c,[a,b,c],[]),
- ?line {c, <<>>} = cdrlib:dec_enum(big, ["a","b","c"], Coded_c),
+ [Coded_a] = cdrlib:enc_enum(a,[a,b,c],[]),
+ {a, <<>>} = cdrlib:dec_enum(big, ["a","b","c"], Coded_a),
+ [Coded_b] = cdrlib:enc_enum(b,[a,b,c],[]),
+ {b, <<>>} = cdrlib:dec_enum(big, ["a","b","c"], Coded_b),
+ [Coded_c] = cdrlib:enc_enum(c,[a,b,c],[]),
+ {c, <<>>} = cdrlib:dec_enum(big, ["a","b","c"], Coded_c),
ok.
enum_little() ->
- ?line Coded_a = enc_r_enum(a,[a,b,c],[]),
- ?line {a, <<>>} = cdrlib:dec_enum(little, ["a","b","c"], Coded_a),
- ?line Coded_b = enc_r_enum(b,[a,b,c],[]),
- ?line {b, <<>>} = cdrlib:dec_enum(little, ["a","b","c"], Coded_b),
- ?line Coded_c = enc_r_enum(c,[a,b,c],[]),
- ?line {c, <<>>} = cdrlib:dec_enum(little, ["a","b","c"], Coded_c),
+ Coded_a = enc_r_enum(a,[a,b,c],[]),
+ {a, <<>>} = cdrlib:dec_enum(little, ["a","b","c"], Coded_a),
+ Coded_b = enc_r_enum(b,[a,b,c],[]),
+ {b, <<>>} = cdrlib:dec_enum(little, ["a","b","c"], Coded_b),
+ Coded_c = enc_r_enum(c,[a,b,c],[]),
+ {c, <<>>} = cdrlib:dec_enum(little, ["a","b","c"], Coded_c),
ok.
enc_r_enum(Enum, ElemList, Message) ->
diff --git a/lib/orber/test/corba_SUITE.erl b/lib/orber/test/corba_SUITE.erl
index 559e405226..22bb8dd2f9 100644
--- a/lib/orber/test/corba_SUITE.erl
+++ b/lib/orber/test/corba_SUITE.erl
@@ -32,7 +32,7 @@
-include_lib("orber/src/orber_iiop.hrl").
--define(default_timeout, ?t:minutes(5)).
+-define(default_timeout, test_server:minutes(5)).
-define(match(ExpectedRes,Expr),
fun() ->
@@ -98,14 +98,14 @@ cases() ->
init_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -133,50 +133,48 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% API tests for pseudo interface CORBA
%%-----------------------------------------------------------------
-corba_api(doc) -> ["CORBA API tests", ""];
-corba_api(suite) -> [];
corba_api(_) ->
NIL = corba:create_nil_objref(),
- ?line ok = corba:dispose(NIL),
- ?line NS = corba:resolve_initial_references("NameService"),
- ?line List = corba:list_initial_services(),
- ?line ["NameService"] = List,
- ?line NSstring = corba:object_to_string(NS),
- ?line NS1 = corba:string_to_object(NSstring),
- ?line NSstring = corba:object_to_string(NS1),
- ?line true = corba:add_initial_service("MyData", NS),
- ?line NS = corba:resolve_initial_references("MyData"),
- ?line [_,_] = corba:list_initial_services(),
- ?line false = corba:remove_initial_service("Wrong"),
- ?line NIL = corba:resolve_initial_references("Wrong"),
- ?line NS = corba:string_to_object("corbaloc:rir:/MyData"),
- ?line true = corba:remove_initial_service("MyData"),
- ?line ["NameService"] = corba:list_initial_services(),
+ ok = corba:dispose(NIL),
+ NS = corba:resolve_initial_references("NameService"),
+ List = corba:list_initial_services(),
+ ["NameService"] = List,
+ NSstring = corba:object_to_string(NS),
+ NS1 = corba:string_to_object(NSstring),
+ NSstring = corba:object_to_string(NS1),
+ true = corba:add_initial_service("MyData", NS),
+ NS = corba:resolve_initial_references("MyData"),
+ [_,_] = corba:list_initial_services(),
+ false = corba:remove_initial_service("Wrong"),
+ NIL = corba:resolve_initial_references("Wrong"),
+ NS = corba:string_to_object("corbaloc:rir:/MyData"),
+ true = corba:remove_initial_service("MyData"),
+ ["NameService"] = corba:list_initial_services(),
%% This is a collection of different stringified IOR:s (correct & incorrect)
%% which we use to test IOR encode/decode.
- ?line IOR1 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000040000000000000100000102010000000a3132372e302e302e31009d610000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e2316570000000003030300000002000000210000007800010202000000010040020200000022000000080003030300000000004000400000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c00030303000100010000000400010020000101090001010005010001000101090000000200010100050100010000000000000184000102010000000a3132372e302e302e310000000000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e231657000000000303030000000300000021000000ec000102020000000200060202000000240000001c0001006600060202000000010000000a3132372e302e302e31009d600000000000000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f00460202000000240000001c0001006600060202000000010000000a3132372e302e302e31009d62004000400000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f00000014000000080001006600069d5e000000010000002c000303030001000100000004000100200001010900010100050100010001010900000002000101000501000100000000000000dc000102010000000a3132372e302e302e31009d5f0000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e23165700000000030303000000020000002100000054000102020000000100000202000000220000000800030303000000000000000000000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c00030303000100010000000400010020000101090001010005010001000101090000000200010100050100010000000000000080000102010000000a3132372e302e302e31009d5d0000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e2316570000000003030300000001000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
- ?line IOR2 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e30000303030000000100000000000000e0000102010000000a3132372e302e302e31009d5f00000034abacab3131303432343836383731005f526f6f74504f410049494f505f43534976325f504f410000cafebabe3e23165700000000000000020000002100000054000102020000000100000202000000220000000800030303000000000000000000000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
- ?line IOR3 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000108000102010000000a3132372e302e302e31009d6100000037abacab3131303432343836383731005f526f6f74504f410049494f505f43534976325f55505f504f410000cafebabe3e231657000000000100000002000000210000007800010202000000010040020200000022000000080003030300000000004000400000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
- ?line IOR4 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000080000102010000000a3132372e302e302e31009d5d0000002eabacab3131303432343836383731005f526f6f74504f410049494f505f504f410000cafebabe3e23165700000000020200000001000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
- ?line IOR5 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e30000303030000000100000000000000fc000102010000000a3132372e302e302e3100000000000033abacab3131303432343836383731005f526f6f74504f4100544c535f43534976325f504f410000cafebabe3e231657000000000100000002000000210000007000010202000000010006020200000024000000220001006600060202000000010000000f3132382e3233302e3230382e353500019d6000000000020200000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
- ?line IOR6 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000124000102010000000a3132372e302e302e3100000000000036abacab3131303432343836383731005f526f6f74504f4100544c535f43534976325f55505f504f410000cafebabe3e23165700000000020200000002000000210000009400010202000000010046020200000024000000220001006600060202000000010000000f3132382e3233302e3230382e353500019d620040004002020000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
- ?line IOR7 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000090000102010000000a3132372e302e302e310000000000002dabacab3131303432343836383731005f526f6f74504f4100544c535f504f410000cafebabe3e231657000000000303030000000200000014000000080001006600069d5e000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
- ?line IOR1 = corba:string_to_object(corba:object_to_string(IOR1)),
- ?line IOR2 = corba:string_to_object(corba:object_to_string(IOR2)),
- ?line IOR3 = corba:string_to_object(corba:object_to_string(IOR3)),
- ?line IOR4 = corba:string_to_object(corba:object_to_string(IOR4)),
- ?line IOR5 = corba:string_to_object(corba:object_to_string(IOR5)),
- ?line IOR6 = corba:string_to_object(corba:object_to_string(IOR6)),
- ?line IOR7 = corba:string_to_object(corba:object_to_string(IOR7)),
- ?line ?match(ok, corba:print_object(IOR1)),
- ?line ?match(ok, corba:print_object(IOR2)),
- ?line ?match(ok, corba:print_object(IOR3)),
- ?line ?match(ok, corba:print_object(IOR4)),
- ?line ?match(ok, corba:print_object(IOR5)),
- ?line ?match(ok, corba:print_object(IOR6)),
- ?line ?match(ok, corba:print_object(IOR7)),
- ?line ?match(ok, corba:print_object("IOR:000303030000000d49444c3a746573743a312e300003030300000002000000000000003000010001000000136d792e686f73742e65726c616e672e6f72670001801a02020000000c424f410a00000a0000070a010000000100000024000303030000000100000001000000140003030300010001000000000001010900000000")),
+ IOR1 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000040000000000000100000102010000000a3132372e302e302e31009d610000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e2316570000000003030300000002000000210000007800010202000000010040020200000022000000080003030300000000004000400000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c00030303000100010000000400010020000101090001010005010001000101090000000200010100050100010000000000000184000102010000000a3132372e302e302e310000000000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e231657000000000303030000000300000021000000ec000102020000000200060202000000240000001c0001006600060202000000010000000a3132372e302e302e31009d600000000000000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f00460202000000240000001c0001006600060202000000010000000a3132372e302e302e31009d62004000400000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f00000014000000080001006600069d5e000000010000002c000303030001000100000004000100200001010900010100050100010001010900000002000101000501000100000000000000dc000102010000000a3132372e302e302e31009d5f0000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e23165700000000030303000000020000002100000054000102020000000100000202000000220000000800030303000000000000000000000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c00030303000100010000000400010020000101090001010005010001000101090000000200010100050100010000000000000080000102010000000a3132372e302e302e31009d5d0000002dabacab3131303432343836383731005f526f6f74504f4100414c4c5f504f410000cafebabe3e2316570000000003030300000001000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
+ IOR2 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e30000303030000000100000000000000e0000102010000000a3132372e302e302e31009d5f00000034abacab3131303432343836383731005f526f6f74504f410049494f505f43534976325f504f410000cafebabe3e23165700000000000000020000002100000054000102020000000100000202000000220000000800030303000000000000000000000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
+ IOR3 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000108000102010000000a3132372e302e302e31009d6100000037abacab3131303432343836383731005f526f6f74504f410049494f505f43534976325f55505f504f410000cafebabe3e231657000000000100000002000000210000007800010202000000010040020200000022000000080003030300000000004000400000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
+ IOR4 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000080000102010000000a3132372e302e302e31009d5d0000002eabacab3131303432343836383731005f526f6f74504f410049494f505f504f410000cafebabe3e23165700000000020200000001000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
+ IOR5 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e30000303030000000100000000000000fc000102010000000a3132372e302e302e3100000000000033abacab3131303432343836383731005f526f6f74504f4100544c535f43534976325f504f410000cafebabe3e231657000000000100000002000000210000007000010202000000010006020200000024000000220001006600060202000000010000000f3132382e3233302e3230382e353500019d6000000000020200000000000000000400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
+ IOR6 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000124000102010000000a3132372e302e302e3100000000000036abacab3131303432343836383731005f526f6f74504f4100544c535f43534976325f55505f504f410000cafebabe3e23165700000000020200000002000000210000009400010202000000010046020200000024000000220001006600060202000000010000000f3132382e3233302e3230382e353500019d620040004002020000000806066781020101010000001b0401000806066781020101010000000b40616469726f6e2e636f6d010400000000000000000000020000000806066781020101010000000b06092a864886f712010202010000000f000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
+ IOR7 = ?match({'IOP_IOR',_,_}, corba:string_to_object("IOR:000303030000000d49444c3a746573743a312e3000030303000000010000000000000090000102010000000a3132372e302e302e310000000000002dabacab3131303432343836383731005f526f6f74504f4100544c535f504f410000cafebabe3e231657000000000303030000000200000014000000080001006600069d5e000000010000002c0003030300010001000000040001002000010109000101000501000100010109000000020001010005010001")),
+ IOR1 = corba:string_to_object(corba:object_to_string(IOR1)),
+ IOR2 = corba:string_to_object(corba:object_to_string(IOR2)),
+ IOR3 = corba:string_to_object(corba:object_to_string(IOR3)),
+ IOR4 = corba:string_to_object(corba:object_to_string(IOR4)),
+ IOR5 = corba:string_to_object(corba:object_to_string(IOR5)),
+ IOR6 = corba:string_to_object(corba:object_to_string(IOR6)),
+ IOR7 = corba:string_to_object(corba:object_to_string(IOR7)),
+ ?match(ok, corba:print_object(IOR1)),
+ ?match(ok, corba:print_object(IOR2)),
+ ?match(ok, corba:print_object(IOR3)),
+ ?match(ok, corba:print_object(IOR4)),
+ ?match(ok, corba:print_object(IOR5)),
+ ?match(ok, corba:print_object(IOR6)),
+ ?match(ok, corba:print_object(IOR7)),
+ ?match(ok, corba:print_object("IOR:000303030000000d49444c3a746573743a312e300003030300000002000000000000003000010001000000136d792e686f73742e65726c616e672e6f72670001801a02020000000c424f410a00000a0000070a010000000100000024000303030000000100000001000000140003030300010001000000000001010900000000")),
[IP] = ?match([_], orber:host()),
?match(#'IOP_IOR'{profiles=[#'IOP_TaggedProfile'
{tag=?TAG_INTERNET_IOP,
@@ -199,124 +197,112 @@ corba_api(_) ->
%%-----------------------------------------------------------------
%% API tests for interface BOA
%%-----------------------------------------------------------------
-boa_api(doc) -> ["BOA API tests", ""];
-boa_api(suite) -> [];
boa_api(_) ->
ok.
%%-----------------------------------------------------------------
%% API tests for interface OBJECT
%%-----------------------------------------------------------------
-object_api(doc) -> ["Object API tests", ""];
-object_api(suite) -> [];
object_api(_) ->
- ?line oe_orber_test_server:oe_register(),
- ?line EC = orber_test_server:oe_create(),
- ?line NS = corba:resolve_initial_references("NameService"),
+ oe_orber_test_server:oe_register(),
+ EC = orber_test_server:oe_create(),
+ NS = corba:resolve_initial_references("NameService"),
%% testing corba_object:is_a(Obj, IFRID) locally.
- ?line orber_test_lib:corba_object_tests(EC, NS),
+ orber_test_lib:corba_object_tests(EC, NS),
- ?line ?match(false, corba_object:non_existent(NS)),
+ ?match(false, corba_object:non_existent(NS)),
- ?line corba:dispose(EC),
- ?line oe_orber_test_server:oe_unregister(),
+ corba:dispose(EC),
+ oe_orber_test_server:oe_unregister(),
ok.
%%-----------------------------------------------------------------
%% API tests for orbers main module
%%-----------------------------------------------------------------
-orber_api(doc) -> ["orber API tests", ""];
-orber_api(suite) -> [];
orber_api(_) ->
- ?line ok = orber:uninstall(),
- ?line orber:install([node()]),
- ?line application:start(orber),
- ?line NodeList = orber:orber_nodes(),
- ?line NL = node(),
- ?line [NL] = NodeList,
+ ok = orber:uninstall(),
+ orber:install([node()]),
+ application:start(orber),
+ NodeList = orber:orber_nodes(),
+ NL = node(),
+ [NL] = NodeList,
ok.
%%-----------------------------------------------------------------
%% API tests for exception mapping
%%-----------------------------------------------------------------
-exception_info_api(doc) -> ["orber API tests", ""];
-exception_info_api(suite) -> [];
exception_info_api(_) ->
- ?line {ok, S1} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1163001858,'COMPLETED_NO'}}),
- ?line {ok, S2} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1330446337,'COMPLETED_NO'}}),
- ?line {ok, S3} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1398079490,'COMPLETED_NO'}}),
- ?line {ok, S4} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1347813377,'COMPLETED_NO'}}),
- ?line {ok, S5} = orber:exception_info({'EXCEPTION', {'CosNaming_NamingContext_InvalidName',"IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"}}),
- ?line error_logger:info_msg("~s", [S1]),
- ?line error_logger:info_msg("~s", [S2]),
- ?line error_logger:info_msg("~s", [S3]),
- ?line error_logger:info_msg("~s", [S4]),
- ?line error_logger:info_msg("~s", [S5]),
+ {ok, S1} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1163001858,'COMPLETED_NO'}}),
+ {ok, S2} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1330446337,'COMPLETED_NO'}}),
+ {ok, S3} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1398079490,'COMPLETED_NO'}}),
+ {ok, S4} = orber:exception_info({'EXCEPTION',{'MARSHAL',[],1347813377,'COMPLETED_NO'}}),
+ {ok, S5} = orber:exception_info({'EXCEPTION', {'CosNaming_NamingContext_InvalidName',"IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"}}),
+ error_logger:info_msg("~s", [S1]),
+ error_logger:info_msg("~s", [S2]),
+ error_logger:info_msg("~s", [S3]),
+ error_logger:info_msg("~s", [S4]),
+ error_logger:info_msg("~s", [S5]),
ok.
%%-----------------------------------------------------------------
%% API tests for orbers pseudo objects.
%%-----------------------------------------------------------------
-orber_pseudo_objects(doc) -> ["orber_pseudo_objects API tests", ""];
-orber_pseudo_objects(suite) -> [];
orber_pseudo_objects(_) ->
- ?line oe_orber_test_server:oe_register(),
+ oe_orber_test_server:oe_register(),
Obj1=(catch orber_test_server:oe_create(state,[{pseudo,true},
{local_typecheck, true}])),
- ?line ?match({_,pseudo,orber_test_server_impl, _,_, _}, Obj1),
+ ?match({_,pseudo,orber_test_server_impl, _,_, _}, Obj1),
Obj2=(catch orber_test_server:oe_create([],[{pseudo, truce}])),
- ?line ?match({'EXCEPTION',{'BAD_PARAM',[],_,'COMPLETED_NO'}}, Obj2),
+ ?match({'EXCEPTION',{'BAD_PARAM',[],_,'COMPLETED_NO'}}, Obj2),
spawn(?MODULE, pseudo_calls, [20, Obj1]),
- ?line ?match({ok, 10000}, orber_test_server:pseudo_call_delay(Obj1, 10000)),
+ ?match({ok, 10000}, orber_test_server:pseudo_call_delay(Obj1, 10000)),
spawn(?MODULE, pseudo_casts, [20, Obj1]),
- ?line ?match(ok, orber_test_server:pseudo_cast_delay(Obj1, 10000)),
+ ?match(ok, orber_test_server:pseudo_cast_delay(Obj1, 10000)),
- ?line ?match('object_here', corba:locate(Obj1)),
+ ?match('object_here', corba:locate(Obj1)),
- ?line NS = corba:resolve_initial_references("NameService"),
+ NS = corba:resolve_initial_references("NameService"),
- ?line orber_test_lib:corba_object_tests(Obj1, NS),
+ orber_test_lib:corba_object_tests(Obj1, NS),
- ?line ?match("IDL:omg.org/orber_test/server:1.0",orber_test_server:typeID()),
+ ?match("IDL:omg.org/orber_test/server:1.0",orber_test_server:typeID()),
%% Test if exceptions are handled properly.
- ?line ?match({'EXCEPTION',{'BAD_QOS',_,_,_}},
+ ?match({'EXCEPTION',{'BAD_QOS',_,_,_}},
orber_test_server:pseudo_call_raise_exc(Obj1, 1)),
- ?line ?match({'EXCEPTION',{'BAD_QOS',_,_,_}},
+ ?match({'EXCEPTION',{'BAD_QOS',_,_,_}},
orber_test_server:pseudo_call_raise_exc(Obj1, 2)),
%% Test if exit is handled properly.
- ?line ?match({'EXCEPTION',{'TRANSIENT',_,_,_}},
+ ?match({'EXCEPTION',{'TRANSIENT',_,_,_}},
orber_test_server:stop_brutal(Obj1)),
orber_test_lib:test_coding(Obj1, true),
%% possible to use subobject key?
- ?line ?match(state, binary_to_term(corba:get_subobject_key(Obj1))),
+ ?match(state, binary_to_term(corba:get_subobject_key(Obj1))),
- ?line ?match({'EXCEPTION',{'INV_OBJREF',[],_,'COMPLETED_NO'}},
+ ?match({'EXCEPTION',{'INV_OBJREF',[],_,'COMPLETED_NO'}},
corba:get_pid(Obj1)),
- ?line ?match(false, corba_object:non_existent(Obj1)),
+ ?match(false, corba_object:non_existent(Obj1)),
- ?line ?match(ok, corba:dispose(Obj1)),
+ ?match(ok, corba:dispose(Obj1)),
- ?line ?match(false, corba_object:non_existent(Obj1)),
+ ?match(false, corba_object:non_existent(Obj1)),
%% Try if it's possible to stringify and recover the object reference.
IOR_string = (catch corba:object_to_string(Obj1)),
Obj3 =(catch corba:string_to_object(IOR_string)),
- ?line ?match(IOR_string, corba:object_to_string(Obj3)),
+ ?match(IOR_string, corba:object_to_string(Obj3)),
Obj4=(catch orber_test_server:oe_create(undefined,[{pseudo,true}])),
- ?line ?match(ok, corba:dispose(Obj4)),
- ?line oe_orber_test_server:oe_unregister(),
+ ?match(ok, corba:dispose(Obj4)),
+ oe_orber_test_server:oe_unregister(),
ok.
%%-----------------------------------------------------------------
%% API tests for orbers objectkeys server.
%%-----------------------------------------------------------------
-orber_objectkeys_api(doc) -> ["orber_objectkeys API tests", ""];
-orber_objectkeys_api(suite) -> [];
orber_objectkeys_api(_) ->
Obj0=(catch orber_test_server:oe_create([], [{sup_child, true}])),
Obj1=(catch orber_test_server:oe_create([], [{persistent, true},
@@ -327,23 +313,23 @@ orber_objectkeys_api(_) ->
%% Obj0 is supposed to be a child started by a supervisor (r6) which
%% handles not only {ok, Pid} but also {ok,Pid, Returnvalue}. In our
%% case the Returnvalue is an ObjectRef.
- ?line ?match({ok,_,{_,key,_, _,_, _}}, Obj0),
+ ?match({ok,_,{_,key,_, _,_, _}}, Obj0),
{ok,_,Obj0Ref} = Obj0,
corba:dispose(Obj0Ref),
%% Only 'global' servers are at the moment allowed to be persistent.
- ?line ?match({'EXCEPTION',{'BAD_PARAM',[],_,'COMPLETED_NO'}}, Obj1),
+ ?match({'EXCEPTION',{'BAD_PARAM',[],_,'COMPLETED_NO'}}, Obj1),
%% We created a persistent object successfully.
- ?line ?match({_,key,_,_,_, _}, Obj2),
+ ?match({_,key,_,_,_, _}, Obj2),
%% Get key and Pid
{_,_,Key,_,_, _} = Obj2,
PID=(catch orber_objectkeys:get_pid(Key)),
%% Use the two different ways to look up if the server is persistent.
- ?line ?match(true, orber_objectkeys:is_persistent(Key)),
- ?line ?match(true, orber_objectkeys:is_persistent(PID)),
+ ?match(true, orber_objectkeys:is_persistent(Key)),
+ ?match(true, orber_objectkeys:is_persistent(PID)),
%% Create servers using every possible way.
O1=(catch orber_test_server:oe_create()),
@@ -359,42 +345,42 @@ orber_objectkeys_api(_) ->
O8=(catch orber_test_server:oe_create_link([], {'global', {o8, obj}})),
%% Test if all the object references are correct.
- ?line ?match({_,key,_,_,_, _}, O1),
- ?line ?match({_,key,_,_,_, _}, O2),
- ?line ?match({_,key,_,_,_, _}, O3),
- ?line ?match({_,key,_,_,_, _}, O4),
- ?line ?match({_, registered, o5, _,_, _}, O5),
- ?line ?match({_,key,_,_,_, _}, O6),
- ?line ?match({_, registered, o7, _,_, _}, O7),
- ?line ?match({_,key,_,_,_, _}, O8),
+ ?match({_,key,_,_,_, _}, O1),
+ ?match({_,key,_,_,_, _}, O2),
+ ?match({_,key,_,_,_, _}, O3),
+ ?match({_,key,_,_,_, _}, O4),
+ ?match({_, registered, o5, _,_, _}, O5),
+ ?match({_,key,_,_,_, _}, O6),
+ ?match({_, registered, o7, _,_, _}, O7),
+ ?match({_,key,_,_,_, _}, O8),
%% Test if persistent.
{_,_,Key1,_,_, _} = O1,
PID1=(catch orber_objectkeys:get_pid(Key1)),
- ?line ?match(false, orber_objectkeys:is_persistent(Key1)),
- ?line ?match(false, orber_objectkeys:is_persistent(PID1)),
+ ?match(false, orber_objectkeys:is_persistent(Key1)),
+ ?match(false, orber_objectkeys:is_persistent(PID1)),
%% all the servers are alive(?!).
- ?line ?match(false, corba_object:non_existent(O1)),
- ?line ?match(false, corba_object:non_existent(O2)),
- ?line ?match(false, corba_object:non_existent(O3)),
- ?line ?match(false, corba_object:non_existent(O4)),
- ?line ?match(false, corba_object:non_existent(O5)),
- ?line ?match(false, corba_object:non_existent(O6)),
- ?line ?match(false, corba_object:non_existent(O7)),
- ?line ?match(false, corba_object:non_existent(O8)),
- ?line ?match(false, corba_object:non_existent(Obj2)),
+ ?match(false, corba_object:non_existent(O1)),
+ ?match(false, corba_object:non_existent(O2)),
+ ?match(false, corba_object:non_existent(O3)),
+ ?match(false, corba_object:non_existent(O4)),
+ ?match(false, corba_object:non_existent(O5)),
+ ?match(false, corba_object:non_existent(O6)),
+ ?match(false, corba_object:non_existent(O7)),
+ ?match(false, corba_object:non_existent(O8)),
+ ?match(false, corba_object:non_existent(Obj2)),
%% Does locate work?
- ?line ?match('object_here', corba:locate(O1)),
- ?line ?match('object_here', corba:locate(O2)),
- ?line ?match('object_here', corba:locate(O3)),
- ?line ?match('object_here', corba:locate(O4)),
- ?line ?match('object_here', corba:locate(O5)),
- ?line ?match('object_here', corba:locate(O6)),
- ?line ?match('object_here', corba:locate(O7)),
- ?line ?match('object_here', corba:locate(O8)),
- ?line ?match('object_here', corba:locate(Obj2)),
+ ?match('object_here', corba:locate(O1)),
+ ?match('object_here', corba:locate(O2)),
+ ?match('object_here', corba:locate(O3)),
+ ?match('object_here', corba:locate(O4)),
+ ?match('object_here', corba:locate(O5)),
+ ?match('object_here', corba:locate(O6)),
+ ?match('object_here', corba:locate(O7)),
+ ?match('object_here', corba:locate(O8)),
+ ?match('object_here', corba:locate(Obj2)),
%% Terminate all servers with reason 'normal'.
catch corba:dispose(O1),
@@ -415,15 +401,15 @@ orber_objectkeys_api(_) ->
%% all the servers are dead(?!). If one of these test-cases
%% fails the only error can be that we didn't sleep long enough, i.e.,
%% try a longer timeout. If still fails something is wrong.
- ?line ?match(true, corba_object:non_existent(O1)),
- ?line ?match(true, corba_object:non_existent(O2)),
- ?line ?match(true, corba_object:non_existent(O3)),
- ?line ?match(true, corba_object:non_existent(O4)),
- ?line ?match(true, corba_object:non_existent(O5)),
- ?line ?match(true, corba_object:non_existent(O6)),
- ?line ?match(true, corba_object:non_existent(O7)),
- ?line ?match(true, corba_object:non_existent(O8)),
- ?line ?match(true, corba_object:non_existent(Obj2)),
+ ?match(true, corba_object:non_existent(O1)),
+ ?match(true, corba_object:non_existent(O2)),
+ ?match(true, corba_object:non_existent(O3)),
+ ?match(true, corba_object:non_existent(O4)),
+ ?match(true, corba_object:non_existent(O5)),
+ ?match(true, corba_object:non_existent(O6)),
+ ?match(true, corba_object:non_existent(O7)),
+ ?match(true, corba_object:non_existent(O8)),
+ ?match(true, corba_object:non_existent(Obj2)),
%% Create a new persistent server.
Obj3=(catch orber_test_server:oe_create([],
@@ -431,10 +417,10 @@ orber_objectkeys_api(_) ->
{regname, {global,{obj2, 12345}}}])),
%% OK?!
- ?line ?match({_,key,_,_,_, _}, Obj3),
+ ?match({_,key,_,_,_, _}, Obj3),
%% Try to create a server with the same name (naturally it fails).
- ?line ?match({'EXCEPTION',{'INTERNAL',[],_,'COMPLETED_NO'}},
+ ?match({'EXCEPTION',{'INTERNAL',[],_,'COMPLETED_NO'}},
orber_test_server:oe_create([],
[{persistent, true},
{regname, {global,{obj2, 12345}}}])),
@@ -449,20 +435,20 @@ orber_objectkeys_api(_) ->
%% Give time to clean up.
timer:sleep(2000),
- ?line ?match({'EXCEPTION',{'TRANSIENT',[],_,'COMPLETED_NO'}},
+ ?match({'EXCEPTION',{'TRANSIENT',[],_,'COMPLETED_NO'}},
gen_server:call(orber_objkeyserver,
{get_pid, Key3},
infinity)),
- ?line ?match(false,corba_object:non_existent(Obj3)),
+ ?match(false,corba_object:non_existent(Obj3)),
%% Run gc wit a "huge" time-limit. Will not erase the dead object.
orber_objectkeys:gc(10000),
- ?line ?match(false,corba_object:non_existent(Obj3)),
+ ?match(false,corba_object:non_existent(Obj3)),
%% Run gc with minimum time-limit. Will erase the dead object.
orber_objectkeys:gc(0),
- ?line ?match(true,corba_object:non_existent(Obj3)),
+ ?match(true,corba_object:non_existent(Obj3)),
%% Create a new persistent server.
Obj4=(catch orber_test_server:oe_create([],
@@ -477,22 +463,22 @@ orber_objectkeys_api(_) ->
%% Give time to clean up.
timer:sleep(2000),
-% ?line ?match({'EXCEPTION',{'COMM_FAILURE',[],0,'COMPLETED_NO'}},
- ?line ?match({error, _},
+% ?match({'EXCEPTION',{'COMM_FAILURE',[],0,'COMPLETED_NO'}},
+ ?match({error, _},
corba:get_pid(Obj4)),
- ?line ?match(false,corba_object:non_existent(Obj4)),
+ ?match(false,corba_object:non_existent(Obj4)),
%% Restart the object.
Obj5=(catch orber_test_server:oe_create([],
[{persistent, true},
{regname, {global,{obj2, 12345}}}])),
%% OK?!
- ?line ?match({_,key,_,_,_, _}, Obj5),
+ ?match({_,key,_,_,_, _}, Obj5),
%% Run gc with minimum time-limit.
orber_objectkeys:gc(0),
- ?line ?match(false,corba_object:non_existent(Obj5)),
+ ?match(false,corba_object:non_existent(Obj5)),
corba:dispose(Obj5),
ok.
@@ -508,337 +494,327 @@ orber_objectkeys_api(_) ->
-callback_ok_api(doc) -> ["Successful callbak API tests", ""];
-callback_ok_api(suite) -> [];
+%% Successful callback API tests
callback_ok_api(_) ->
%% Init
- ?line ?match({ok, {?DO_EXIT, state}}, corba:handle_init(?MODULE, {?DO_EXIT_FLAG, state})),
+ ?match({ok, {?DO_EXIT, state}}, corba:handle_init(?MODULE, {?DO_EXIT_FLAG, state})),
%% Terminate
- ?line ?match(ok, corba:handle_terminate(?MODULE, "reason", {?DO_EXIT, state})),
+ ?match(ok, corba:handle_terminate(?MODULE, "reason", {?DO_EXIT, state})),
%% Handle_call
- ?line ?match({reply,ok,{?DO_EXIT,state}},
+ ?match({reply,ok,{?DO_EXIT,state}},
corba:handle_call(?MODULE, foo, [],
{?DO_EXIT, state}, [], false, false)),
%% Handle_cast
- ?line ?match({noreply, {?DO_EXIT,state}},
+ ?match({noreply, {?DO_EXIT,state}},
corba:handle_cast(?MODULE, foo_1w, [],
{?DO_EXIT, state}, [], false)),
%% Handle_call precond/postcond
- ?line ?match({reply, ok, {?DO_EXIT, state}},
+ ?match({reply, ok, {?DO_EXIT, state}},
corba:handle_call(?MODULE, foo, [],
{?DO_EXIT, state}, [], false, false, {?MODULE, precond},
{?MODULE, postcond}, ?MODULE)),
%% Handle_cast precond/postcond
- ?line ?match({noreply, {?DO_EXIT, state}},
+ ?match({noreply, {?DO_EXIT, state}},
corba:handle_cast(?MODULE, foo_1w, [],
{?DO_EXIT, state}, [], false, {?MODULE, precond},
{?MODULE, postcond}, ?MODULE)),
%% Handle_info
- ?line ?match({noreply, {?DO_EXIT, state}},
+ ?match({noreply, {?DO_EXIT, state}},
corba:handle_info(?MODULE, "info", {?DO_EXIT, state})),
ok.
-callback_arity_api(doc) -> ["callbak arity API tests", ""];
-callback_arity_api(suite) -> [];
+%% Callback arity API tests
callback_arity_api(_) ->
%% Handle_call - stay-alive == false
- ?line ?match({'EXIT', {undef,_}},
+ ?match({'EXIT', {undef,_}},
corba:handle_call(?MODULE, foo, [to, many, arguments],
{?DO_EXIT, state}, [], false, false)),
%% Handle_call - stay-alive == true
- ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
+ ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
corba:handle_call(?MODULE, foo, [to, many, arguments],
{?NO_EXIT, state}, [], false, false)),
%% Handle_call - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_call(?MODULE, foo, [],
{?DO_EXIT, arity}, [], false, false)),
%% Handle_call - stay-alive == true
- ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
+ ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
corba:handle_call(?MODULE, foo, [],
{?NO_EXIT, arity}, [], false, false)),
%% Handle_cast - stay-alive == false
- ?line ?match({'EXIT', {undef,_}},
+ ?match({'EXIT', {undef,_}},
corba:handle_cast(?MODULE, foo_1w, [to, many, arguments],
{?DO_EXIT, state}, [], false)),
%% Handle_cast - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, state}},
+ ?match({noreply, {?NO_EXIT, state}},
corba:handle_cast(?MODULE, foo_1w, [to, many, arguments],
{?NO_EXIT, state}, [], false)),
%% Handle_cast - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_cast(?MODULE, foo_1w, [],
{?DO_EXIT, arity}, [], false)),
%% Handle_cast - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, arity}},
+ ?match({noreply, {?NO_EXIT, arity}},
corba:handle_cast(?MODULE, foo_1w, [],
{?NO_EXIT, arity}, [], false)),
%% Handle_info - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_info(?MODULE, "info", {?DO_EXIT, arity})),
%% Handle_info - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, arity}},
+ ?match({noreply, {?NO_EXIT, arity}},
corba:handle_info(?MODULE, "info", {?NO_EXIT, arity})),
ok.
-callback_module_api(doc) -> ["Module callbak API tests", ""];
-callback_module_api(suite) -> [];
+%% Module callback API tests
callback_module_api(_) ->
%% Handle_call - stay-alive == false
- ?line ?match({'EXIT', {undef,_}},
+ ?match({'EXIT', {undef,_}},
corba:handle_call(wrong_mod, foo, [],
{?DO_EXIT, state}, [], false, false)),
%% Handle_call - stay-alive == true
- ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
+ ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
corba:handle_call(wrong_mod, foo, [],
{?NO_EXIT, state}, [], false, false)),
%% Handle_cast - stay-alive == false
- ?line ?match({'EXIT', {undef,_}},
+ ?match({'EXIT', {undef,_}},
corba:handle_cast(wrong_mod, foo_1w, [],
{?DO_EXIT, state}, [], false)),
%% Handle_cast - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, state}},
+ ?match({noreply, {?NO_EXIT, state}},
corba:handle_cast(wrong_mod, foo_1w, [],
{?NO_EXIT, state}, [], false)),
%% Handle_info - stay-alive == false.
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_info(wrong_mod, "info", {?DO_EXIT, state})),
%% Handle_info - stay-alive == true.
- ?line ?match({noreply, {?NO_EXIT, state}},
+ ?match({noreply, {?NO_EXIT, state}},
corba:handle_info(wrong_mod, "info", {?NO_EXIT, state})),
ok.
-callback_function_api(doc) -> ["Function callbak API tests", ""];
-callback_function_api(suite) -> [];
+%% Function callback API tests
callback_function_api(_) ->
%% Handle_call - stay-alive == false
- ?line ?match({'EXIT', {undef,_}},
+ ?match({'EXIT', {undef,_}},
corba:handle_call(?MODULE, bad_function, [],
{?DO_EXIT, state}, [], false, false)),
%% Handle_call - stay-alive == true
- ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
+ ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
corba:handle_call(?MODULE, bad_function, [],
{?NO_EXIT, state}, [], false, false)),
%% Handle_cast - stay-alive == false
- ?line ?match({'EXIT', {undef,_}},
+ ?match({'EXIT', {undef,_}},
corba:handle_cast(?MODULE, bad_function, [],
{?DO_EXIT, state}, [], false)),
%% Handle_cast - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, state}},
+ ?match({noreply, {?NO_EXIT, state}},
corba:handle_cast(?MODULE, bad_function, [],
{?NO_EXIT, state}, [], false)),
%% Handle_info - stay-alive == false. Note, we cannot use ?MODULE here.
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_info(corba, "info", {?DO_EXIT, state})),
%% Handle_info - stay-alive == true. Note, we cannot use ?MODULE here.
- ?line ?match({noreply, {?NO_EXIT, state}},
+ ?match({noreply, {?NO_EXIT, state}},
corba:handle_info(corba, "info", {?NO_EXIT, state})),
ok.
-callback_precond_api(doc) -> ["Precond callbak API tests", ""];
-callback_precond_api(suite) -> [];
+%% Precond callback API tests
callback_precond_api(_) ->
%% Handle_call - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_call(?MODULE, foo, [],
{?DO_EXIT, state}, [], false, false, {wrong_mod, precond},
{?MODULE, postcond}, ?MODULE)),
%% Handle_call - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_call(?MODULE, foo, [],
{?DO_EXIT, state}, [], false, false, {?MODULE, bad_precond},
{?MODULE, postcond}, ?MODULE)),
%% Handle_call - stay-alive == true
- ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_},
+ ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_},
corba:handle_call(?MODULE, foo, [],
{?NO_EXIT, state}, [], false, false, {wrong_mod, precond},
{?MODULE, postcond}, ?MODULE)),
%% Handle_call - stay-alive == true
- ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_},
+ ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_},
corba:handle_call(?MODULE, foo, [],
{?NO_EXIT, state}, [], false, false, {?MODULE, bad_precond},
{?MODULE, postcond}, ?MODULE)),
%% Handle_cast - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_cast(?MODULE, foo_1w, [],
{?DO_EXIT, state}, [], false, {wrong_mod, precond},
{?MODULE, postcond}, ?MODULE)),
%% Handle_cast - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_cast(?MODULE, foo_1w, [],
{?DO_EXIT, state}, [], false, {?MODULE, bad_precond},
{?MODULE, postcond}, ?MODULE)),
%% Handle_cast - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, state}},
+ ?match({noreply, {?NO_EXIT, state}},
corba:handle_cast(?MODULE, foo_1w, [],
{?NO_EXIT, state}, [], false, {wrong_mod, precond},
{?MODULE, postcond}, ?MODULE)),
%% Handle_cast - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, state}},
+ ?match({noreply, {?NO_EXIT, state}},
corba:handle_cast(?MODULE, foo_1w, [],
{?NO_EXIT, state}, [], false, {?MODULE, bad_precond},
{?MODULE, postcond}, ?MODULE)),
ok.
-callback_postcond_api(doc) -> ["Postcond callbak API tests", ""];
-callback_postcond_api(suite) -> [];
+%% Postcond callback API tests
callback_postcond_api(_) ->
%% Handle_call - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_call(?MODULE, foo, [],
{?DO_EXIT, state}, [], false, false, {?MODULE, precond},
{wrong_mod, postcond}, ?MODULE)),
%% Handle_call - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_call(?MODULE, foo, [],
{?DO_EXIT, state}, [], false, false, {?MODULE, precond},
{?MODULE, bad_postcond}, ?MODULE)),
%% Handle_call - stay-alive == true
- ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_},
+ ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_},
corba:handle_call(?MODULE, foo, [],
{?NO_EXIT, state}, [], false, false, {?MODULE, precond},
{wrong_mod, postcond}, ?MODULE)),
%% Handle_call - stay-alive == true
- ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_},
+ ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_},
corba:handle_call(?MODULE, foo, [],
{?NO_EXIT, state}, [], false, false, {?MODULE, precond},
{?MODULE, bad_postcond}, ?MODULE)),
%% Handle_cast - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_cast(?MODULE, foo_1w, [],
{?DO_EXIT, state}, [], false, {?MODULE, precond},
{wrong_mod, postcond}, ?MODULE)),
%% Handle_cast - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_cast(?MODULE, foo_1w, [],
{?DO_EXIT, state}, [], false, {?MODULE, precond},
{?MODULE, bad_postcond}, ?MODULE)),
%% Handle_cast - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, state}},
+ ?match({noreply, {?NO_EXIT, state}},
corba:handle_cast(?MODULE, foo_1w, [],
{?NO_EXIT, state}, [], false, {?MODULE, precond},
{wrong_mod, postcond}, ?MODULE)),
%% Handle_cast - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, state}},
+ ?match({noreply, {?NO_EXIT, state}},
corba:handle_cast(?MODULE, foo_1w, [],
{?NO_EXIT, state}, [], false, {?MODULE, precond},
{?MODULE, bad_postcond}, ?MODULE)),
ok.
-callback_exit_api(doc) -> ["Callbak exit API tests", ""];
-callback_exit_api(suite) -> [];
+%% Callback exit API tests
callback_exit_api(_) ->
%% Handle_call - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_call(?MODULE, foo, [],
{?DO_EXIT, exit}, [], false, false)),
%% Handle_call - stay-alive == true
- ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
+ ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
corba:handle_call(?MODULE, foo, [],
{?NO_EXIT, exit}, [], false, false)),
%% Handle_cast - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_cast(?MODULE, foo_1w, [],
{?DO_EXIT, exit}, [], false)),
%% Handle_cast - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, exit}},
+ ?match({noreply, {?NO_EXIT, exit}},
corba:handle_cast(?MODULE, foo_1w, [],
{?NO_EXIT, exit}, [], false)),
%% Handle_info - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_info(?MODULE, "info", {?DO_EXIT, exit})),
%% Handle_info - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, exit}},
+ ?match({noreply, {?NO_EXIT, exit}},
corba:handle_info(?MODULE, "info", {?NO_EXIT, exit})),
ok.
-callback_badarith_api(doc) -> ["callbak badarith API tests", ""];
-callback_badarith_api(suite) -> [];
+%% Callback badarith API tests
callback_badarith_api(_) ->
%% Handle_call - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_call(?MODULE, foo, [],
{?DO_EXIT, badarith}, [], false, false)),
%% Handle_call - stay-alive == true
- ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_},
+ ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}},_},
corba:handle_call(?MODULE, foo, [],
{?NO_EXIT, badarith}, [], false, false)),
%% Handle_cast - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_cast(?MODULE, foo_1w, [],
{?DO_EXIT, badarith}, [], false)),
%% Handle_cast - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, badarith}},
+ ?match({noreply, {?NO_EXIT, badarith}},
corba:handle_cast(?MODULE, foo_1w, [],
{?NO_EXIT, badarith}, [], false)),
%% Handle_info - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_info(?MODULE, "info", {?DO_EXIT, badarith})),
%% Handle_info - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, badarith}},
+ ?match({noreply, {?NO_EXIT, badarith}},
corba:handle_info(?MODULE, "info", {?NO_EXIT, badarith})),
ok.
-callback_case_clause_api(doc) -> ["callbak case_clause API tests", ""];
-callback_case_clause_api(suite) -> [];
+%% Callback case_clause API tests
callback_case_clause_api(_) ->
%% Handle_call - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_call(?MODULE, foo, [],
{?DO_EXIT, case_clause}, [], false, false)),
%% Handle_call - stay-alive == true
- ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
+ ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
corba:handle_call(?MODULE, foo, [],
{?NO_EXIT, case_clause}, [], false, false)),
%% Handle_cast - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_cast(?MODULE, foo_1w, [],
{?DO_EXIT, case_clause}, [], false)),
%% Handle_cast - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, case_clause}},
+ ?match({noreply, {?NO_EXIT, case_clause}},
corba:handle_cast(?MODULE, foo_1w, [],
{?NO_EXIT, case_clause}, [], false)),
%% Handle_info - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_info(?MODULE, "info", {?DO_EXIT, case_clause})),
%% Handle_info - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, case_clause}},
+ ?match({noreply, {?NO_EXIT, case_clause}},
corba:handle_info(?MODULE, "info", {?NO_EXIT, case_clause})),
ok.
-callback_function_clause_api(doc) -> ["callbak function_clause API tests", ""];
-callback_function_clause_api(suite) -> [];
+%% Callback function_clause API tests
callback_function_clause_api(_) ->
%% Handle_call - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_call(?MODULE, foo, [],
{?DO_EXIT, function_clause}, [], false, false)),
%% Handle_call - stay-alive == true
- ?line ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
+ ?match({reply, {'EXCEPTION', #'OBJ_ADAPTER'{}}, _},
corba:handle_call(?MODULE, foo, [],
{?NO_EXIT, function_clause}, [], false, false)),
%% Handle_cast - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_cast(?MODULE, foo_1w, [],
{?DO_EXIT, function_clause}, [], false)),
%% Handle_cast - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, function_clause}},
+ ?match({noreply, {?NO_EXIT, function_clause}},
corba:handle_cast(?MODULE, foo_1w, [],
{?NO_EXIT, function_clause}, [], false)),
%% Handle_info - stay-alive == false
- ?line ?match({'EXIT', _},
+ ?match({'EXIT', _},
corba:handle_info(?MODULE, "info", {?DO_EXIT, function_clause})),
%% Handle_info - stay-alive == true
- ?line ?match({noreply, {?NO_EXIT, function_clause}},
+ ?match({noreply, {?NO_EXIT, function_clause}},
corba:handle_info(?MODULE, "info", {?NO_EXIT, function_clause})),
ok.
diff --git a/lib/orber/test/csiv2_SUITE.erl b/lib/orber/test/csiv2_SUITE.erl
index 48818e4cab..7844060582 100644
--- a/lib/orber/test/csiv2_SUITE.erl
+++ b/lib/orber/test/csiv2_SUITE.erl
@@ -18,7 +18,6 @@
%% %CopyrightEnd%
%%
%%
-
-module(csiv2_SUITE).
-include_lib("common_test/include/ct.hrl").
@@ -31,7 +30,7 @@
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl").
%%-include_lib("orber/src/OrberCSIv2.hrl").
--define(default_timeout, ?t:minutes(5)).
+-define(default_timeout, test_server:minutes(5)).
-define(match(ExpectedRes,Expr),
fun() ->
@@ -44,7 +43,7 @@
_ ->
io:format("###### ERROR ERROR ######~nRESULT: ~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -357,7 +356,7 @@ end_per_testcase(_Case, Config) ->
orber:jump_stop(),
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -389,8 +388,8 @@ end_per_suite(Config) ->
-ifdef(false).
%% OrberCSIv2
-code_CertificateChain_api(doc) -> ["Code CertificateChain"];
-code_CertificateChain_api(suite) -> [];
+%%-----------------------------------------------------------------
+%% Code CertificateChain
code_CertificateChain_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -399,8 +398,7 @@ code_CertificateChain_api(_Config) ->
'OrberCSIv2':decode('CertificateChain', list_to_binary(Enc))),
ok.
-code_AttributeCertChain_api(doc) -> ["Code AttributeCertChain"];
-code_AttributeCertChain_api(suite) -> [];
+%% Code AttributeCertChain
code_AttributeCertChain_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -409,8 +407,7 @@ code_AttributeCertChain_api(_Config) ->
'OrberCSIv2':decode('AttributeCertChain', list_to_binary(Enc))),
ok.
-code_VerifyingCertChain_api(doc) -> ["Code VerifyingCertChain"];
-code_VerifyingCertChain_api(suite) -> [];
+%% Code VerifyingCertChain
code_VerifyingCertChain_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -420,8 +417,8 @@ code_VerifyingCertChain_api(_Config) ->
ok.
%% PKIXAttributeCertificate
-code_AttributeCertificate_api(doc) -> ["Code AttributeCertificate"];
-code_AttributeCertificate_api(suite) -> [];
+%%-----------------------------------------------------------------
+%% Code AttributeCertificate
code_AttributeCertificate_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -430,8 +427,7 @@ code_AttributeCertificate_api(_Config) ->
'OrberCSIv2':decode('AttributeCertificate', list_to_binary(Enc))),
ok.
-code_AttributeCertificateInfo_api(doc) -> ["Code AttributeCertificateInfo"];
-code_AttributeCertificateInfo_api(suite) -> [];
+%% Code AttributeCertificateInfo
code_AttributeCertificateInfo_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -440,8 +436,7 @@ code_AttributeCertificateInfo_api(_Config) ->
'OrberCSIv2':decode('AttributeCertificateInfo', list_to_binary(Enc))),
ok.
-code_AttCertVersion_api(doc) -> ["Code AttCertVersion"];
-code_AttCertVersion_api(suite) -> [];
+%% Code AttCertVersion
code_AttCertVersion_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -450,8 +445,7 @@ code_AttCertVersion_api(_Config) ->
'OrberCSIv2':decode('AttCertVersion', list_to_binary(Enc))),
ok.
-code_Holder_api(doc) -> ["Code Holder"];
-code_Holder_api(suite) -> [];
+%% Code Holder
code_Holder_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -460,8 +454,7 @@ code_Holder_api(_Config) ->
'OrberCSIv2':decode('Holder', list_to_binary(Enc))),
ok.
-code_AttCertIssuer_api(doc) -> ["Code AttCertIssuer"];
-code_AttCertIssuer_api(suite) -> [];
+%% Code AttCertIssuer
code_AttCertIssuer_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -470,8 +463,7 @@ code_AttCertIssuer_api(_Config) ->
'OrberCSIv2':decode('AttCertIssuer', list_to_binary(Enc))),
ok.
-code_AttCertValidityPeriod_api(doc) -> ["Code AttCertValidityPeriod"];
-code_AttCertValidityPeriod_api(suite) -> [];
+%% Code AttCertValidityPeriod
code_AttCertValidityPeriod_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('AttCertValidityPeriod', ?AttCertValidityPeriod)),
@@ -479,8 +471,7 @@ code_AttCertValidityPeriod_api(_Config) ->
'OrberCSIv2':decode('AttCertValidityPeriod', list_to_binary(Enc))),
ok.
-code_V2Form_api(doc) -> ["Code V2Form"];
-code_V2Form_api(suite) -> [];
+%% Code V2Form
code_V2Form_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -489,8 +480,7 @@ code_V2Form_api(_Config) ->
'OrberCSIv2':decode('V2Form', list_to_binary(Enc))),
ok.
-code_IssuerSerial_api(doc) -> ["Code IssuerSerial"];
-code_IssuerSerial_api(suite) -> [];
+%% Code IssuerSerial
code_IssuerSerial_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -499,8 +489,7 @@ code_IssuerSerial_api(_Config) ->
'OrberCSIv2':decode('IssuerSerial', list_to_binary(Enc))),
ok.
-code_ObjectDigestInfo_api(doc) -> ["Code ObjectDigestInfo"];
-code_ObjectDigestInfo_api(suite) -> [];
+%% Code ObjectDigestInfo
code_ObjectDigestInfo_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -510,8 +499,8 @@ code_ObjectDigestInfo_api(_Config) ->
ok.
%% PKIX1Explicit88
-code_Certificate_api(doc) -> ["Code Certificate"];
-code_Certificate_api(suite) -> [];
+%%-----------------------------------------------------------------
+%% Code Certificate
code_Certificate_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -520,8 +509,7 @@ code_Certificate_api(_Config) ->
'OrberCSIv2':decode('Certificate', list_to_binary(Enc))),
ok.
-code_TBSCertificate_api(doc) -> ["Code TBSCertificate"];
-code_TBSCertificate_api(suite) -> [];
+%% Code TBSCertificate
code_TBSCertificate_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -530,8 +518,7 @@ code_TBSCertificate_api(_Config) ->
'OrberCSIv2':decode('TBSCertificate', list_to_binary(Enc))),
ok.
-code_CertificateSerialNumber_api(doc) -> ["Code CertificateSerialNumber"];
-code_CertificateSerialNumber_api(suite) -> [];
+%% Code CertificateSerialNumber"];
code_CertificateSerialNumber_api(_Config) ->
{ok, Enc} =
?match({ok, _},
@@ -540,16 +527,14 @@ code_CertificateSerialNumber_api(_Config) ->
'OrberCSIv2':decode('CertificateSerialNumber', list_to_binary(Enc))),
ok.
-code_Version_api(doc) -> ["Code Version"];
-code_Version_api(suite) -> [];
+%% Code Version
code_Version_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('Version', ?Version)),
?match({ok, ?Version}, 'OrberCSIv2':decode('Version', list_to_binary(Enc))),
ok.
-code_AlgorithmIdentifier_api(doc) -> ["Code AlgorithmIdentifier"];
-code_AlgorithmIdentifier_api(suite) -> [];
+%% Code AlgorithmIdentifier
code_AlgorithmIdentifier_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('AlgorithmIdentifier', ?AlgorithmIdentifier)),
@@ -557,8 +542,7 @@ code_AlgorithmIdentifier_api(_Config) ->
'OrberCSIv2':decode('AlgorithmIdentifier', list_to_binary(Enc))),
ok.
-code_Name_api(doc) -> ["Code Name"];
-code_Name_api(suite) -> [];
+%% Code Name
code_Name_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('Name', ?Name)),
@@ -566,8 +550,7 @@ code_Name_api(_Config) ->
'OrberCSIv2':decode('Name', list_to_binary(Enc))),
ok.
-code_RDNSequence_api(doc) -> ["Code RDNSequence"];
-code_RDNSequence_api(suite) -> [];
+%% Code RDNSequence
code_RDNSequence_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('RDNSequence', ?RDNSequence)),
@@ -575,8 +558,7 @@ code_RDNSequence_api(_Config) ->
'OrberCSIv2':decode('RDNSequence', list_to_binary(Enc))),
ok.
-code_RelativeDistinguishedName_api(doc) -> ["Code RelativeDistinguishedName"];
-code_RelativeDistinguishedName_api(suite) -> [];
+%% Code RelativeDistinguishedName
code_RelativeDistinguishedName_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('RelativeDistinguishedName', ?RelativeDistinguishedName)),
@@ -584,8 +566,7 @@ code_RelativeDistinguishedName_api(_Config) ->
'OrberCSIv2':decode('RelativeDistinguishedName', list_to_binary(Enc))),
ok.
-code_AttributeTypeAndValue_api(doc) -> ["Code AttributeTypeAndValue"];
-code_AttributeTypeAndValue_api(suite) -> [];
+%% Code AttributeTypeAndValue
code_AttributeTypeAndValue_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('AttributeTypeAndValue', ?AttributeTypeAndValue)),
@@ -593,8 +574,7 @@ code_AttributeTypeAndValue_api(_Config) ->
'OrberCSIv2':decode('AttributeTypeAndValue', list_to_binary(Enc))),
ok.
-code_Attribute_api(doc) -> ["Code Attribute"];
-code_Attribute_api(suite) -> [];
+%% Code Attribute"];
code_Attribute_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('Attribute', ?Attribute)),
@@ -602,8 +582,7 @@ code_Attribute_api(_Config) ->
'OrberCSIv2':decode('Attribute', list_to_binary(Enc))),
ok.
-code_Validity_api(doc) -> ["Code Validity"];
-code_Validity_api(suite) -> [];
+%% Code Validity
code_Validity_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('Validity', ?Validity)),
@@ -611,8 +590,7 @@ code_Validity_api(_Config) ->
'OrberCSIv2':decode('Validity', list_to_binary(Enc))),
ok.
-code_SubjectPublicKeyInfo_api(doc) -> ["Code SubjectPublicKeyInfo"];
-code_SubjectPublicKeyInfo_api(suite) -> [];
+%% Code SubjectPublicKeyInfo
code_SubjectPublicKeyInfo_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('SubjectPublicKeyInfo', ?SubjectPublicKeyInfo)),
@@ -620,16 +598,14 @@ code_SubjectPublicKeyInfo_api(_Config) ->
'OrberCSIv2':decode('SubjectPublicKeyInfo', list_to_binary(Enc))),
ok.
-code_UniqueIdentifier_api(doc) -> ["Code UniqueIdentifier"];
-code_UniqueIdentifier_api(suite) -> [];
+%% Code UniqueIdentifier
code_UniqueIdentifier_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('UniqueIdentifier', ?UniqueIdentifier)),
?match({ok, _}, 'OrberCSIv2':decode('UniqueIdentifier', list_to_binary(Enc))),
ok.
-code_Extensions_api(doc) -> ["Code Extensions"];
-code_Extensions_api(suite) -> [];
+%% Code Extensions
code_Extensions_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('Extensions', ?Extensions)),
@@ -637,8 +613,7 @@ code_Extensions_api(_Config) ->
'OrberCSIv2':decode('Extensions', list_to_binary(Enc))),
ok.
-code_Extension_api(doc) -> ["Code Extension"];
-code_Extension_api(suite) -> [];
+%% Code Extension
code_Extension_api(_Config) ->
{ok, Enc} =
?match({ok, _}, 'OrberCSIv2':encode('Extension', ?Extension)),
@@ -647,8 +622,8 @@ code_Extension_api(_Config) ->
ok.
%% OpenSSL generated x509 Certificate
-code_OpenSSL509_api(doc) -> ["Code OpenSSL generated x509 Certificate"];
-code_OpenSSL509_api(suite) -> [];
+%%-----------------------------------------------------------------
+%% Code OpenSSL generated x509 Certificate
code_OpenSSL509_api(_Config) ->
{ok, Cert} =
?match({ok, #'Certificate'{}},
@@ -666,8 +641,7 @@ code_OpenSSL509_api(_Config) ->
%%-----------------------------------------------------------------
%% Test ssl:peercert
%%-----------------------------------------------------------------
-ssl_server_peercert_api(doc) -> ["Test ssl:peercert (server side)"];
-ssl_server_peercert_api(suite) -> [];
+%% Test ssl:peercert (server side)
ssl_server_peercert_api(_Config) ->
Options = orber_test_lib:get_options(iiop_ssl, server,
2, [{iiop_ssl_port, 0}]),
@@ -685,8 +659,7 @@ ssl_server_peercert_api(_Config) ->
destroy_fake_ORB(ssl, Socket),
ok.
-ssl_client_peercert_api(doc) -> ["Test ssl:peercert (client side)"];
-ssl_client_peercert_api(suite) -> [];
+%% Test ssl:peercert (client side)
ssl_client_peercert_api(_Config) ->
Options = orber_test_lib:get_options(iiop_ssl, client,
2, [{iiop_ssl_port, 0}]),
@@ -827,7 +800,7 @@ context_test(Obj) ->
context_data = MTContextError},
#'IOP_ServiceContext'{context_id=?IOP_SecurityAttributeService,
context_data = MTMessageInContext}],
- ?line ?match(ok, orber_test_server:testing_iiop_context(Obj, [{context, Ctx}])).
+ ?match(ok, orber_test_server:testing_iiop_context(Obj, [{context, Ctx}])).
fake_server_ORB(Type, Port, Options) ->
diff --git a/lib/orber/test/data_types_SUITE.erl b/lib/orber/test/data_types_SUITE.erl
index 8dd404a173..3873bfbaf6 100644
--- a/lib/orber/test/data_types_SUITE.erl
+++ b/lib/orber/test/data_types_SUITE.erl
@@ -29,7 +29,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/include/corba.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
-define(match(ExpectedRes, Expr),
fun() ->
@@ -42,7 +42,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -89,24 +89,22 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
%%-----------------------------------------------------------------
-%% Test Case: name component handling tests
+%% Test Case: Fixed Point Datatype
%% Description:
%%-----------------------------------------------------------------
-fixed_type(doc) -> ["Test the Fixed Point Datatype."];
-fixed_type(suite) -> [];
fixed_type(_) ->
Val1 = ?match({fixed,3,2,314}, orber_test_server:val1()),
_Val2 = ?match({fixed,3,2,314}, orber_test_server:val2()),
@@ -165,11 +163,9 @@ fixed_type(_) ->
ok.
%%-----------------------------------------------------------------
-%% Test Case: any type
+%% Test Case: Any type
%% Description:
%%-----------------------------------------------------------------
-any_type(doc) -> ["Test the Any Datatype."];
-any_type(suite) -> [];
any_type(_) ->
?match(#any{typecode=undefined, value=undefined},
any:create()),
diff --git a/lib/orber/test/generated_SUITE.erl b/lib/orber/test/generated_SUITE.erl
index 2062afe2bb..3550941dfd 100644
--- a/lib/orber/test/generated_SUITE.erl
+++ b/lib/orber/test/generated_SUITE.erl
@@ -29,7 +29,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/include/corba.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
-define(match(ExpectedRes, Expr),
fun() ->
@@ -40,7 +40,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -51,7 +51,7 @@
Not ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS);
+ exit(AcTuAlReS);
_ ->
AcTuAlReS
end
@@ -63,7 +63,7 @@
case orber_tc:check_tc(TC) of
false ->
io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]),
- ?line exit(TC);
+ exit(TC);
true ->
true
end
@@ -122,12 +122,12 @@ end_per_group(_GroupName, Config) ->
%% Init and cleanup functions.
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -135,8 +135,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case:'OrberApp_IFR'
%% Description:
%%-----------------------------------------------------------------
-'OrberApp_IFR'(doc) -> [""];
-'OrberApp_IFR'(suite) -> [];
'OrberApp_IFR'(_) ->
?nomatch(undefined, 'OrberApp_IFR':oe_tc(get_absolute_name)),
?nomatch(undefined, 'OrberApp_IFR':oe_tc(get_user_exception_type)),
@@ -153,8 +151,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: erlang_binary
%% Description:
%%-----------------------------------------------------------------
-erlang_binary(doc) -> [""];
-erlang_binary(suite) -> [];
erlang_binary(_) ->
?match(true, orber_tc:check_tc(erlang_binary:tc())),
?match("IDL:erlang/binary:1.0", erlang_binary:id()),
@@ -165,8 +161,6 @@ erlang_binary(_) ->
%% Test Case: erlang_pid
%% Description:
%%-----------------------------------------------------------------
-erlang_pid(doc) -> [""];
-erlang_pid(suite) -> [];
erlang_pid(_) ->
?match(true, orber_tc:check_tc(erlang_pid:tc())),
?match("IDL:erlang/pid:1.0", erlang_pid:id()),
@@ -177,8 +171,6 @@ erlang_pid(_) ->
%% Test Case: erlang_port
%% Description:
%%-----------------------------------------------------------------
-erlang_port(doc) -> [""];
-erlang_port(suite) -> [];
erlang_port(_) ->
?match(true, orber_tc:check_tc(erlang_port:tc())),
?match("IDL:erlang/port:1.0", erlang_port:id()),
@@ -189,8 +181,6 @@ erlang_port(_) ->
%% Test Case: erlang_ref
%% Description:
%%-----------------------------------------------------------------
-erlang_ref(doc) -> [""];
-erlang_ref(suite) -> [];
erlang_ref(_) ->
?match(true, orber_tc:check_tc(erlang_ref:tc())),
?match("IDL:erlang/ref:1.0", erlang_ref:id()),
@@ -201,8 +191,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_Binding'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_Binding'(doc) -> [""];
-'CosNaming_Binding'(suite) -> [];
'CosNaming_Binding'(_) ->
?match(true, orber_tc:check_tc('CosNaming_Binding':tc())),
?match("IDL:omg.org/CosNaming/Binding:1.0", 'CosNaming_Binding':id()),
@@ -213,8 +201,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_BindingList'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_BindingList'(doc) -> [""];
-'CosNaming_BindingList'(suite) -> [];
'CosNaming_BindingList'(_) ->
?match(true, orber_tc:check_tc('CosNaming_BindingList':tc())),
?match("IDL:omg.org/CosNaming/BindingList:1.0", 'CosNaming_BindingList':id()),
@@ -225,8 +211,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_Name'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_Name'(doc) -> [""];
-'CosNaming_Name'(suite) -> [];
'CosNaming_Name'(_) ->
?match(true, orber_tc:check_tc('CosNaming_Name':tc())),
?match("IDL:omg.org/CosNaming/Name:1.0", 'CosNaming_Name':id()),
@@ -237,8 +221,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_NameComponent'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_NameComponent'(doc) -> [""];
-'CosNaming_NameComponent'(suite) -> [];
'CosNaming_NameComponent'(_) ->
?match(true, orber_tc:check_tc('CosNaming_NameComponent':tc())),
?match("IDL:omg.org/CosNaming/NameComponent:1.0", 'CosNaming_NameComponent':id()),
@@ -249,8 +231,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_NamingContextExt_InvalidAddress'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_NamingContextExt_InvalidAddress'(doc) -> [""];
-'CosNaming_NamingContextExt_InvalidAddress'(suite) -> [];
'CosNaming_NamingContextExt_InvalidAddress'(_) ->
?match(true, orber_tc:check_tc('CosNaming_NamingContextExt_InvalidAddress':tc())),
?match("IDL:omg.org/CosNaming/NamingContextExt/InvalidAddress:1.0", 'CosNaming_NamingContextExt_InvalidAddress':id()),
@@ -261,8 +241,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_NamingContext_AlreadyBound'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_NamingContext_AlreadyBound'(doc) -> [""];
-'CosNaming_NamingContext_AlreadyBound'(suite) -> [];
'CosNaming_NamingContext_AlreadyBound'(_) ->
?match(true, orber_tc:check_tc('CosNaming_NamingContext_AlreadyBound':tc())),
?match("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0", 'CosNaming_NamingContext_AlreadyBound':id()),
@@ -273,8 +251,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_NamingContext_CannotProceed'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_NamingContext_CannotProceed'(doc) -> [""];
-'CosNaming_NamingContext_CannotProceed'(suite) -> [];
'CosNaming_NamingContext_CannotProceed'(_) ->
?match(true, orber_tc:check_tc('CosNaming_NamingContext_CannotProceed':tc())),
?match("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0", 'CosNaming_NamingContext_CannotProceed':id()),
@@ -285,8 +261,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_NamingContext_InvalidName'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_NamingContext_InvalidName'(doc) -> [""];
-'CosNaming_NamingContext_InvalidName'(suite) -> [];
'CosNaming_NamingContext_InvalidName'(_) ->
?match(true, orber_tc:check_tc('CosNaming_NamingContext_InvalidName':tc())),
?match("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0", 'CosNaming_NamingContext_InvalidName':id()),
@@ -297,8 +271,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_NamingContext_NotEmpty'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_NamingContext_NotEmpty'(doc) -> [""];
-'CosNaming_NamingContext_NotEmpty'(suite) -> [];
'CosNaming_NamingContext_NotEmpty'(_) ->
?match(true, orber_tc:check_tc('CosNaming_NamingContext_NotEmpty':tc())),
?match("IDL:omg.org/CosNaming/NamingContext/NotEmpty:1.0", 'CosNaming_NamingContext_NotEmpty':id()),
@@ -309,8 +281,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_NamingContext_NotFound'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_NamingContext_NotFound'(doc) -> [""];
-'CosNaming_NamingContext_NotFound'(suite) -> [];
'CosNaming_NamingContext_NotFound'(_) ->
?match(true, orber_tc:check_tc('CosNaming_NamingContext_NotFound':tc())),
?match("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0", 'CosNaming_NamingContext_NotFound':id()),
@@ -321,8 +291,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_BindingIterator'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_BindingIterator'(doc) -> [""];
-'CosNaming_BindingIterator'(suite) -> [];
'CosNaming_BindingIterator'(_) ->
?nomatch(undefined, 'CosNaming_BindingIterator':oe_tc(next_one)),
?nomatch(undefined, 'CosNaming_BindingIterator':oe_tc(next_n)),
@@ -341,8 +309,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_NamingContext'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_NamingContext'(doc) -> [""];
-'CosNaming_NamingContext'(suite) -> [];
'CosNaming_NamingContext'(_) ->
?nomatch(undefined, 'CosNaming_NamingContext':oe_tc(bind)),
?nomatch(undefined, 'CosNaming_NamingContext':oe_tc(rebind)),
@@ -368,8 +334,6 @@ erlang_ref(_) ->
%% Test Case: 'CosNaming_NamingContexExt'
%% Description:
%%-----------------------------------------------------------------
-'CosNaming_NamingContextExt'(doc) -> [""];
-'CosNaming_NamingContextExt'(suite) -> [];
'CosNaming_NamingContextExt'(_) ->
?nomatch(undefined, 'CosNaming_NamingContextExt':oe_tc(to_string)),
?nomatch(undefined, 'CosNaming_NamingContextExt':oe_tc(to_name)),
diff --git a/lib/orber/test/interceptors_SUITE.erl b/lib/orber/test/interceptors_SUITE.erl
index 1bce0a3bfd..cec4cd1fab 100644
--- a/lib/orber/test/interceptors_SUITE.erl
+++ b/lib/orber/test/interceptors_SUITE.erl
@@ -30,7 +30,7 @@
-include_lib("orber/include/corba.hrl").
-include_lib("orber/src/orber_iiop.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
-define(match(ExpectedRes, Expr),
fun() ->
@@ -43,7 +43,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -54,7 +54,7 @@
Not ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS);
+ exit(AcTuAlReS);
_ ->
io:format("------ CORRECT RESULT ------~n~p~n",
[AcTuAlReS]),
@@ -105,7 +105,7 @@ end_per_group(_GroupName, Config) ->
%% Init and cleanup functions.
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
corba:orb_init([{flags, (?ORB_ENV_USE_PI bor ?ORB_ENV_LOCAL_TYPECHECKING)},
@@ -120,7 +120,7 @@ end_per_testcase(_Case, Config) ->
orber:jump_stop(),
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -128,8 +128,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: local_pseudo
%% Description:
%%-----------------------------------------------------------------
-local_pseudo(doc) -> [""];
-local_pseudo(suite) -> [];
local_pseudo(_) ->
?match({native, [?MODULE]}, orber:get_local_interceptors()),
%% Global settings
@@ -177,8 +175,6 @@ local_pseudo(_) ->
%% Test Case: local_default
%% Description:
%%-----------------------------------------------------------------
-local_default(doc) -> [""];
-local_default(suite) -> [];
local_default(_) ->
?match({native, [?MODULE]}, orber:get_local_interceptors()),
%% Global settings
@@ -226,8 +222,6 @@ local_default(_) ->
%% Test Case: local_local
%% Description:
%%-----------------------------------------------------------------
-local_local(doc) -> [""];
-local_local(suite) -> [];
local_local(_) ->
?match({native, [?MODULE]}, orber:get_local_interceptors()),
%% Global settings
@@ -276,8 +270,6 @@ local_local(_) ->
%% Test Case: local_global
%% Description:
%%-----------------------------------------------------------------
-local_global(doc) -> [""];
-local_global(suite) -> [];
local_global(_) ->
?match({native, [?MODULE]}, orber:get_local_interceptors()),
%% Global settings
diff --git a/lib/orber/test/iop_ior_10_SUITE.erl b/lib/orber/test/iop_ior_10_SUITE.erl
index 8779e123e0..68a6793f62 100644
--- a/lib/orber/test/iop_ior_10_SUITE.erl
+++ b/lib/orber/test/iop_ior_10_SUITE.erl
@@ -29,7 +29,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/src/orber_iiop.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
%%-----------------------------------------------------------------
%% External exports
@@ -74,12 +74,12 @@ end_per_group(_GroupName, Config) ->
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -88,8 +88,6 @@ end_per_testcase(_Case, Config) ->
%% Description: Just testing the string_encoding function because the
%% other encodings is called from them.
%%-----------------------------------------------------------------
-encoding(doc) -> ["Description", "more description"];
-encoding(suite) -> [];
encoding(_) ->
V = #'IIOP_Version'{major=1,minor=0},
M0 = 'Module_Interface',
@@ -97,12 +95,12 @@ encoding(_) ->
H0 = "my.hostname.org",
P0 = 4040,
N0 = 'name',
- ?line O0 = corba_fake_mk_objkey(M0, registered, N0),
+ O0 = corba_fake_mk_objkey(M0, registered, N0),
PB0 = #'IIOP_ProfileBody_1_0'{iiop_version=V, host=H0, port=P0, object_key=O0},
TP0 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB0},
S0 = #'IOP_IOR'{type_id=T0, profiles=[TP0]},
N1 = list_to_pid("<0.100.0>"),
- ?line O1 = corba_fake_mk_objkey(M0, key, N1),
+ O1 = corba_fake_mk_objkey(M0, key, N1),
PB1 = #'IIOP_ProfileBody_1_0'{iiop_version=V, host=H0, port=P0, object_key=O1},
TP1 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB1},
S1 = #'IOP_IOR'{type_id=T0, profiles=[TP1]},
@@ -110,12 +108,12 @@ encoding(_) ->
PB2 = #'IIOP_ProfileBody_1_0'{iiop_version=V, host=H0, port=P0, object_key=O2},
TP2 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB2},
S2 = #'IOP_IOR'{type_id=T0, profiles=[TP2]},
- ?line C0 = iop_ior:string_code(S0),
- ?line {S0, <<>>, _} = iop_ior:string_decode(C0),
- ?line C1 = iop_ior:string_code(S1),
- ?line {S1, <<>>, _} = iop_ior:string_decode(C1),
- ?line C2 = iop_ior:string_code(S2),
- ?line {S2, <<>>, _} = iop_ior:string_decode(C2),
+ C0 = iop_ior:string_code(S0),
+ {S0, <<>>, _} = iop_ior:string_decode(C0),
+ C1 = iop_ior:string_code(S1),
+ {S1, <<>>, _} = iop_ior:string_decode(C1),
+ C2 = iop_ior:string_code(S2),
+ {S2, <<>>, _} = iop_ior:string_decode(C2),
ok.
@@ -123,8 +121,6 @@ encoding(_) ->
%% Test Case: IOR creation test
%% Description:
%%-----------------------------------------------------------------
-create_and_get_ops(doc) -> ["Description", "more description"];
-create_and_get_ops(suite) -> [];
create_and_get_ops(_) ->
V = #'IIOP_Version'{major=1,minor=0},
M0 = 'Module_Interface',
@@ -132,41 +128,41 @@ create_and_get_ops(_) ->
H0 = "my.hostname.org",
P0 = 4040,
N0 = 'name',
- ?line O0 = corba_fake_mk_objkey(M0, registered, N0),
+ O0 = corba_fake_mk_objkey(M0, registered, N0),
PB0 = #'IIOP_ProfileBody_1_0'{iiop_version=V, host=H0, port=P0, object_key=O0},
TP0 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB0},
S0 = #'IOP_IOR'{type_id=T0, profiles=[TP0]},
- ?line S0 = iop_ior:create({1, 0}, T0, [H0], P0, -1, O0, [], 0, 0),
+ S0 = iop_ior:create({1, 0}, T0, [H0], P0, -1, O0, [], 0, 0),
N1 = list_to_pid("<0.100.0>"),
- ?line O1 = corba_fake_mk_objkey(M0, key, N1),
+ O1 = corba_fake_mk_objkey(M0, key, N1),
{_,_,K1,_,_,_} = O1,
PB1 = #'IIOP_ProfileBody_1_0'{iiop_version=V, host=H0, port=P0, object_key=O1},
TP1 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB1},
S1 = #'IOP_IOR'{type_id=T0, profiles=[TP1]},
- ?line S1 = iop_ior:create({1, 0}, T0, [H0], P0, -1, O1, [], 0, 0),
+ S1 = iop_ior:create({1, 0}, T0, [H0], P0, -1, O1, [], 0, 0),
O2 = "This is an external objectkey",
PB2 = #'IIOP_ProfileBody_1_0'{iiop_version=V, host=H0, port=P0, object_key=O2},
TP2 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB2},
S2 = #'IOP_IOR'{type_id=T0, profiles=[TP2]},
- ?line {'internal_registered', N0, _, _, M0} = iop_ior:get_key(S0),
- ?line {'internal', K1, _, _, M0} = iop_ior:get_key(S1),
- ?line {'external', {H0, P0, O2, _,_,
- #host_data{protocol = normal,
- ssl_data = undefined,
- version = {1,0},
- csiv2_mech = undefined,
- csiv2_statefull = false,
- charset = 65537,
- wcharset = 65801,
- ft_heartbeat = false,
- ft_primary = false,
- ft_group = undefined,
- csiv2_addresses = []}}}
+ {'internal_registered', N0, _, _, M0} = iop_ior:get_key(S0),
+ {'internal', K1, _, _, M0} = iop_ior:get_key(S1),
+ {'external', {H0, P0, O2, _,_,
+ #host_data{protocol = normal,
+ ssl_data = undefined,
+ version = {1,0},
+ csiv2_mech = undefined,
+ csiv2_statefull = false,
+ charset = 65537,
+ wcharset = 65801,
+ ft_heartbeat = false,
+ ft_primary = false,
+ ft_group = undefined,
+ csiv2_addresses = []}}}
= iop_ior:get_key(S2),
- ?line T0 = iop_ior:get_typeID(S0),
- ?line O0 = iop_ior:get_objkey(S0),
- ?line O1 = iop_ior:get_objkey(S1),
- ?line O2 = iop_ior:get_objkey(S2),
+ T0 = iop_ior:get_typeID(S0),
+ O0 = iop_ior:get_objkey(S0),
+ O1 = iop_ior:get_objkey(S1),
+ O2 = iop_ior:get_objkey(S2),
ok.
%%-----------------------------------------------------------------
diff --git a/lib/orber/test/iop_ior_11_SUITE.erl b/lib/orber/test/iop_ior_11_SUITE.erl
index 46342ddfd7..8276feeb93 100644
--- a/lib/orber/test/iop_ior_11_SUITE.erl
+++ b/lib/orber/test/iop_ior_11_SUITE.erl
@@ -29,7 +29,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/src/orber_iiop.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
%%-----------------------------------------------------------------
%% External exports
@@ -74,12 +74,12 @@ end_per_group(_GroupName, Config) ->
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -88,8 +88,6 @@ end_per_testcase(_Case, Config) ->
%% Description: Just testing the string_encoding function because the
%% other encodings is called from them.
%%-----------------------------------------------------------------
-encoding(doc) -> ["Description", "more description"];
-encoding(suite) -> [];
encoding(_) ->
V = #'IIOP_Version'{major=1,minor=1},
M0 = 'Module_Interface',
@@ -107,13 +105,13 @@ encoding(_) ->
cdrlib:enc_unsigned_short(2,
cdrlib:enc_unsigned_short(SSLPort, [])))]}]
end,
- ?line O0 = corba_fake_mk_objkey(M0, registered, N0),
+ O0 = corba_fake_mk_objkey(M0, registered, N0),
PB0 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O0,
components=Components},
TP0 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB0},
S0 = #'IOP_IOR'{type_id=T0, profiles=[TP0]},
N1 = list_to_pid("<0.100.0>"),
- ?line O1 = corba_fake_mk_objkey(M0, key, N1),
+ O1 = corba_fake_mk_objkey(M0, key, N1),
PB1 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O1,
components=[]},
TP1 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB1},
@@ -123,12 +121,12 @@ encoding(_) ->
components=[]},
TP2 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB2},
S2 = #'IOP_IOR'{type_id=T0, profiles=[TP2]},
- ?line C0 = iop_ior:string_code(S0),
- ?line {S0, <<>>, _} = iop_ior:string_decode(C0),
- ?line C1 = iop_ior:string_code(S1),
- ?line {S1, <<>>, _} = iop_ior:string_decode(C1),
- ?line C2 = iop_ior:string_code(S2),
- ?line {S2, <<>>, _} = iop_ior:string_decode(C2),
+ C0 = iop_ior:string_code(S0),
+ {S0, <<>>, _} = iop_ior:string_decode(C0),
+ C1 = iop_ior:string_code(S1),
+ {S1, <<>>, _} = iop_ior:string_decode(C1),
+ C2 = iop_ior:string_code(S2),
+ {S2, <<>>, _} = iop_ior:string_decode(C2),
ok.
@@ -136,8 +134,6 @@ encoding(_) ->
%% Test Case: IOR creation test
%% Description:
%%-----------------------------------------------------------------
-create_and_get_ops(doc) -> ["Description", "more description"];
-create_and_get_ops(suite) -> [];
create_and_get_ops(_) ->
V = #'IIOP_Version'{major=1,minor=1},
CSC = #'IOP_TaggedComponent'{tag=?TAG_CODE_SETS,
@@ -147,46 +143,46 @@ create_and_get_ops(_) ->
H0 = "my.hostname.org",
P0 = 4040,
N0 = 'name',
- ?line O0 = corba_fake_mk_objkey(M0, registered, N0),
+ O0 = corba_fake_mk_objkey(M0, registered, N0),
PB0 = #'IIOP_ProfileBody_1_1'
{iiop_version=V, host=H0, port=P0, object_key=O0,
components=[CSC]},
TP0 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB0},
S0 = #'IOP_IOR'{type_id=T0, profiles=[TP0]},
- ?line S0 = iop_ior:create({1, 1}, T0, [H0], P0, -1, O0, [CSC], 0, 0),
+ S0 = iop_ior:create({1, 1}, T0, [H0], P0, -1, O0, [CSC], 0, 0),
N1 = list_to_pid("<0.100.0>"),
- ?line O1 = corba_fake_mk_objkey(M0, key, N1),
+ O1 = corba_fake_mk_objkey(M0, key, N1),
{_,_,K1,_,_,_} = O1,
PB1 = #'IIOP_ProfileBody_1_1'
{iiop_version=V, host=H0, port=P0, object_key=O1,
components=[CSC]},
TP1 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB1},
S1 = #'IOP_IOR'{type_id=T0, profiles=[TP1]},
- ?line S1 = iop_ior:create({1, 1}, T0, [H0], P0, -1, O1, [CSC], 0, 0),
+ S1 = iop_ior:create({1, 1}, T0, [H0], P0, -1, O1, [CSC], 0, 0),
O2 = "This is an external objectkey",
PB2 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O2,
components=[]},
TP2 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB2},
S2 = #'IOP_IOR'{type_id=T0, profiles=[TP2]},
- ?line {'internal_registered', N0, _, _, M0} = iop_ior:get_key(S0),
- ?line {'internal', K1, _, _, M0} = iop_ior:get_key(S1),
- ?line {'external', {H0, P0, O2, _,_,
- #host_data{protocol = normal,
- ssl_data = undefined,
- version = {1,1},
- csiv2_mech = undefined,
- csiv2_statefull = false,
- charset = 65537,
- wcharset = 65801,
- ft_heartbeat = false,
- ft_primary = false,
- ft_group = undefined,
- csiv2_addresses = []}}} =
+ {'internal_registered', N0, _, _, M0} = iop_ior:get_key(S0),
+ {'internal', K1, _, _, M0} = iop_ior:get_key(S1),
+ {'external', {H0, P0, O2, _,_,
+ #host_data{protocol = normal,
+ ssl_data = undefined,
+ version = {1,1},
+ csiv2_mech = undefined,
+ csiv2_statefull = false,
+ charset = 65537,
+ wcharset = 65801,
+ ft_heartbeat = false,
+ ft_primary = false,
+ ft_group = undefined,
+ csiv2_addresses = []}}} =
iop_ior:get_key(S2),
- ?line T0 = iop_ior:get_typeID(S0),
- ?line O0 = iop_ior:get_objkey(S0),
- ?line O1 = iop_ior:get_objkey(S1),
- ?line O2 = iop_ior:get_objkey(S2),
+ T0 = iop_ior:get_typeID(S0),
+ O0 = iop_ior:get_objkey(S0),
+ O1 = iop_ior:get_objkey(S1),
+ O2 = iop_ior:get_objkey(S2),
ok.
%%-----------------------------------------------------------------
diff --git a/lib/orber/test/iop_ior_12_SUITE.erl b/lib/orber/test/iop_ior_12_SUITE.erl
index bce9f3af88..802b0b11a2 100644
--- a/lib/orber/test/iop_ior_12_SUITE.erl
+++ b/lib/orber/test/iop_ior_12_SUITE.erl
@@ -30,7 +30,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/src/orber_iiop.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
%%-----------------------------------------------------------------
%% External exports
@@ -75,12 +75,12 @@ end_per_group(_GroupName, Config) ->
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -89,8 +89,6 @@ end_per_testcase(_Case, Config) ->
%% Description: Just testing the string_encoding function because the
%% other encodings is called from them.
%%-----------------------------------------------------------------
-encoding(doc) -> ["Description", "more description"];
-encoding(suite) -> [];
encoding(_) ->
V = #'IIOP_Version'{major=1,minor=2},
M0 = 'Module_Interface',
@@ -105,31 +103,31 @@ encoding(_) ->
[#'IOP_TaggedComponent'{tag=?TAG_SSL_SEC_TRANS,
component_data=[0 |
cdrlib:enc_unsigned_short(2,
- cdrlib:enc_unsigned_short(2,
+ cdrlib:enc_unsigned_short(2,
cdrlib:enc_unsigned_short(SSLPort, [])))]}]
end,
- ?line O0 = corba_fake_mk_objkey(M0, registered, N0),
+ O0 = corba_fake_mk_objkey(M0, registered, N0),
PB0 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O0,
- components=Components},
+ components=Components},
TP0 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB0},
S0 = #'IOP_IOR'{type_id=T0, profiles=[TP0]},
N1 = list_to_pid("<0.100.0>"),
- ?line O1 = corba_fake_mk_objkey(M0, key, N1),
+ O1 = corba_fake_mk_objkey(M0, key, N1),
PB1 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O1,
- components=[]},
+ components=[]},
TP1 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB1},
S1 = #'IOP_IOR'{type_id=T0, profiles=[TP1]},
O2 = "This is an external objectkey",
PB2 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O2,
- components=[]},
+ components=[]},
TP2 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB2},
S2 = #'IOP_IOR'{type_id=T0, profiles=[TP2]},
- ?line C0 = iop_ior:string_code(S0),
- ?line {S0, <<>>, _} = iop_ior:string_decode(C0),
- ?line C1 = iop_ior:string_code(S1),
- ?line {S1, <<>>, _} = iop_ior:string_decode(C1),
- ?line C2 = iop_ior:string_code(S2),
- ?line {S2, <<>>, _} = iop_ior:string_decode(C2),
+ C0 = iop_ior:string_code(S0),
+ {S0, <<>>, _} = iop_ior:string_decode(C0),
+ C1 = iop_ior:string_code(S1),
+ {S1, <<>>, _} = iop_ior:string_decode(C1),
+ C2 = iop_ior:string_code(S2),
+ {S2, <<>>, _} = iop_ior:string_decode(C2),
ok.
@@ -137,8 +135,6 @@ encoding(_) ->
%% Test Case: IOR creation test
%% Description:
%%-----------------------------------------------------------------
-create_and_get_ops(doc) -> ["Description", "more description"];
-create_and_get_ops(suite) -> [];
create_and_get_ops(_) ->
V = #'IIOP_Version'{major=1,minor=2},
CSC = #'IOP_TaggedComponent'{tag=?TAG_CODE_SETS,
@@ -148,46 +144,46 @@ create_and_get_ops(_) ->
H0 = "my.hostname.org",
P0 = 4040,
N0 = 'name',
- ?line O0 = corba_fake_mk_objkey(M0, registered, N0),
+ O0 = corba_fake_mk_objkey(M0, registered, N0),
PB0 = #'IIOP_ProfileBody_1_1'
{iiop_version=V, host=H0, port=P0, object_key=O0,
components=[CSC]},
TP0 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB0},
S0 = #'IOP_IOR'{type_id=T0, profiles=[TP0]},
- ?line S0 = iop_ior:create({1, 2}, T0, [H0], P0, -1, O0, [CSC], 0, 0),
+ S0 = iop_ior:create({1, 2}, T0, [H0], P0, -1, O0, [CSC], 0, 0),
N1 = list_to_pid("<0.100.0>"),
- ?line O1 = corba_fake_mk_objkey(M0, key, N1),
+ O1 = corba_fake_mk_objkey(M0, key, N1),
{_,_,K1,_,_,_} = O1,
PB1 = #'IIOP_ProfileBody_1_1'
{iiop_version=V, host=H0, port=P0, object_key=O1,
components=[CSC]},
TP1 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB1},
S1 = #'IOP_IOR'{type_id=T0, profiles=[TP1]},
- ?line S1 = iop_ior:create({1, 2}, T0, [H0], P0, -1, O1, [CSC], 0, 0),
+ S1 = iop_ior:create({1, 2}, T0, [H0], P0, -1, O1, [CSC], 0, 0),
O2 = "This is an external objectkey",
PB2 = #'IIOP_ProfileBody_1_1'{iiop_version=V, host=H0, port=P0, object_key=O2,
- components=[]},
+ components=[]},
TP2 = #'IOP_TaggedProfile'{tag=?TAG_INTERNET_IOP, profile_data=PB2},
S2 = #'IOP_IOR'{type_id=T0, profiles=[TP2]},
- ?line {'internal_registered', N0, _, _, M0} = iop_ior:get_key(S0),
- ?line {'internal', K1, _, _, M0} = iop_ior:get_key(S1),
- ?line {'external', {H0, P0, O2,_,_,
- #host_data{protocol = normal,
- ssl_data = undefined,
- version = {1,2},
- csiv2_mech = undefined,
- csiv2_statefull = false,
- charset = 65537,
- wcharset = 65801,
- ft_heartbeat = false,
- ft_primary = false,
- ft_group = undefined,
- csiv2_addresses = []}}}
+ {'internal_registered', N0, _, _, M0} = iop_ior:get_key(S0),
+ {'internal', K1, _, _, M0} = iop_ior:get_key(S1),
+ {'external', {H0, P0, O2,_,_,
+ #host_data{protocol = normal,
+ ssl_data = undefined,
+ version = {1,2},
+ csiv2_mech = undefined,
+ csiv2_statefull = false,
+ charset = 65537,
+ wcharset = 65801,
+ ft_heartbeat = false,
+ ft_primary = false,
+ ft_group = undefined,
+ csiv2_addresses = []}}}
= iop_ior:get_key(S2),
- ?line T0 = iop_ior:get_typeID(S0),
- ?line O0 = iop_ior:get_objkey(S0),
- ?line O1 = iop_ior:get_objkey(S1),
- ?line O2 = iop_ior:get_objkey(S2),
+ T0 = iop_ior:get_typeID(S0),
+ O0 = iop_ior:get_objkey(S0),
+ O1 = iop_ior:get_objkey(S1),
+ O2 = iop_ior:get_objkey(S2),
ok.
%%-----------------------------------------------------------------
diff --git a/lib/orber/test/ip_v4v6_interop_SUITE.erl b/lib/orber/test/ip_v4v6_interop_SUITE.erl
index cc5bcd71a5..48cc77eca7 100644
--- a/lib/orber/test/ip_v4v6_interop_SUITE.erl
+++ b/lib/orber/test/ip_v4v6_interop_SUITE.erl
@@ -59,7 +59,7 @@
%%----------------------------------------------------------------------
%% Macros
%%----------------------------------------------------------------------
--define(default_timeout, ?t:minutes(15)).
+-define(default_timeout, test_server:minutes(15)).
-define(match(ExpectedRes,Expr),
fun() ->
@@ -72,7 +72,7 @@
_ ->
io:format("###### ERROR ERROR ######~nRESULT: ~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
%%----------------------------------------------------------------------
@@ -93,7 +93,7 @@ init_per_testcase(_Case, Config) ->
end_per_testcase(_Case, Config) ->
orber:jump_stop(),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -126,8 +126,7 @@ end_per_group(_GroupName, Config) ->
%%====================================================================
%% Test Cases
%%====================================================================
-dual_ipv4v6(doc) ->
- ["ORB configured for supporting both IPv4 and IPv6"];
+%% ORB configured for supporting both IPv4 and IPv6
dual_ipv4v6(_Config) ->
%% Starting slave node with ipv4 configured ORB
diff --git a/lib/orber/test/lname_SUITE.erl b/lib/orber/test/lname_SUITE.erl
index a12f2b88a7..cb67cd6136 100644
--- a/lib/orber/test/lname_SUITE.erl
+++ b/lib/orber/test/lname_SUITE.erl
@@ -30,7 +30,7 @@
-include_lib("orber/COSS/CosNaming/CosNaming.hrl").
-include_lib("orber/COSS/CosNaming/lname.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
%%-----------------------------------------------------------------
%% External exports
@@ -75,12 +75,12 @@ end_per_group(_GroupName, Config) ->
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -89,34 +89,32 @@ end_per_testcase(_Case, Config) ->
%% Test Case: name component handling tests
%% Description:
%%-----------------------------------------------------------------
-lname_component(doc) -> ["Description", "more description"];
-lname_component(suite) -> [];
lname_component(_) ->
create_test(),
get_tests(),
set_tests().
create_test() ->
- ?line #'CosNaming_NameComponent'{} = lname_component:create(),
+ #'CosNaming_NameComponent'{} = lname_component:create(),
ok.
get_tests() ->
NC = #'CosNaming_NameComponent'{id="first", kind="apple"},
NC1 = #'CosNaming_NameComponent'{id="", kind="apple"},
NC2 = #'CosNaming_NameComponent'{id="first", kind=""},
- ?line "first" = lname_component:get_id(NC),
- ?line "apple" = lname_component:get_kind(NC),
- ?line {'EXCEPTION', #'LNameComponent_NotSet'{}} =
+ "first" = lname_component:get_id(NC),
+ "apple" = lname_component:get_kind(NC),
+ {'EXCEPTION', #'LNameComponent_NotSet'{}} =
(catch lname_component:get_id(NC1)),
- ?line {'EXCEPTION', #'LNameComponent_NotSet'{}} =
+ {'EXCEPTION', #'LNameComponent_NotSet'{}} =
(catch lname_component:get_kind(NC2)),
ok.
set_tests() ->
NC = #'CosNaming_NameComponent'{id="first", kind="apple"},
- ?line #'CosNaming_NameComponent'{id="second", kind="apple"} =
+ #'CosNaming_NameComponent'{id="second", kind="apple"} =
lname_component:set_id(NC, "second"),
- ?line #'CosNaming_NameComponent'{id="first", kind="pear"} =
+ #'CosNaming_NameComponent'{id="first", kind="pear"} =
lname_component:set_kind(NC, "pear"),
ok.
@@ -124,8 +122,6 @@ set_tests() ->
%% Test Case: name handling tests
%% Description:
%%-----------------------------------------------------------------
-lname(doc) -> ["Description", "more description"];
-lname(suite) -> [];
lname(_) ->
Name = [#'CosNaming_NameComponent'{id="first", kind="apple"},
#'CosNaming_NameComponent'{id="last", kind="peach"},
@@ -139,79 +135,79 @@ lname(_) ->
insert_tests(Name) ->
NC = #'CosNaming_NameComponent'{id="new", kind="pear"},
- ?line [NC, #'CosNaming_NameComponent'{id="first", kind="apple"},
+ [NC, #'CosNaming_NameComponent'{id="first", kind="apple"},
#'CosNaming_NameComponent'{id="last", kind="peach"},
#'CosNaming_NameComponent'{id="and", kind="plum"},
#'CosNaming_NameComponent'{id="always", kind="orange"}] =
lname:insert_component(Name, 1, NC),
- ?line [#'CosNaming_NameComponent'{id="first", kind="apple"},
+ [#'CosNaming_NameComponent'{id="first", kind="apple"},
#'CosNaming_NameComponent'{id="last", kind="peach"},
#'CosNaming_NameComponent'{id="and", kind="plum"},
#'CosNaming_NameComponent'{id="always", kind="orange"}, NC] =
lname:insert_component(Name, 5, NC),
- ?line [#'CosNaming_NameComponent'{id="first", kind="apple"},
+ [#'CosNaming_NameComponent'{id="first", kind="apple"},
#'CosNaming_NameComponent'{id="last", kind="peach"},
#'CosNaming_NameComponent'{id="and", kind="plum"}, NC,
#'CosNaming_NameComponent'{id="always", kind="orange"}] =
lname:insert_component(Name, 4, NC),
- ?line [#'CosNaming_NameComponent'{id="first", kind="apple"},
+ [#'CosNaming_NameComponent'{id="first", kind="apple"},
#'CosNaming_NameComponent'{id="last", kind="peach"}, NC,
#'CosNaming_NameComponent'{id="and", kind="plum"},
#'CosNaming_NameComponent'{id="always", kind="orange"}] =
lname:insert_component(Name, 3, NC),
- ?line {'EXCEPTION', #'LName_NoComponent'{}} =
+ {'EXCEPTION', #'LName_NoComponent'{}} =
(catch lname:insert_component(Name, 6, NC)),
- ?line {'EXCEPTION', #'LName_NoComponent'{}} =
+ {'EXCEPTION', #'LName_NoComponent'{}} =
(catch lname:insert_component(Name, 0, NC)),
- ?line {'EXCEPTION', #'LName_NoComponent'{}} =
+ {'EXCEPTION', #'LName_NoComponent'{}} =
(catch lname:insert_component(Name, -2, NC)),
ok.
get_tests(Name) ->
- ?line #'CosNaming_NameComponent'{id="first", kind="apple"} =
+ #'CosNaming_NameComponent'{id="first", kind="apple"} =
lname:get_component(Name, 1),
- ?line #'CosNaming_NameComponent'{id="always", kind="orange"} =
+ #'CosNaming_NameComponent'{id="always", kind="orange"} =
lname:get_component(Name, 4),
- ?line #'CosNaming_NameComponent'{id="and", kind="plum"} =
+ #'CosNaming_NameComponent'{id="and", kind="plum"} =
lname:get_component(Name, 3),
- ?line {'EXCEPTION', #'LName_NoComponent'{}} =
+ {'EXCEPTION', #'LName_NoComponent'{}} =
(catch lname:get_component(Name, 5)),
- ?line {'EXCEPTION', #'LName_NoComponent'{}} =
+ {'EXCEPTION', #'LName_NoComponent'{}} =
(catch lname:get_component(Name, 0)),
- ?line {'EXCEPTION', #'LName_NoComponent'{}} =
+ {'EXCEPTION', #'LName_NoComponent'{}} =
(catch lname:get_component(Name, -2)),
ok.
delete_tests(Name) ->
- ?line [#'CosNaming_NameComponent'{id="last", kind="peach"},
+ [#'CosNaming_NameComponent'{id="last", kind="peach"},
#'CosNaming_NameComponent'{id="and", kind="plum"},
#'CosNaming_NameComponent'{id="always", kind="orange"}] =
lname:delete_component(Name, 1),
- ?line [#'CosNaming_NameComponent'{id="first", kind="apple"},
+ [#'CosNaming_NameComponent'{id="first", kind="apple"},
#'CosNaming_NameComponent'{id="last", kind="peach"},
#'CosNaming_NameComponent'{id="and", kind="plum"}] =
lname:delete_component(Name, 4),
- ?line [#'CosNaming_NameComponent'{id="first", kind="apple"},
+ [#'CosNaming_NameComponent'{id="first", kind="apple"},
#'CosNaming_NameComponent'{id="last", kind="peach"},
#'CosNaming_NameComponent'{id="always", kind="orange"}] =
lname:delete_component(Name, 3),
- ?line {'EXCEPTION', #'LName_NoComponent'{}} =
+ {'EXCEPTION', #'LName_NoComponent'{}} =
(catch lname:delete_component(Name, 6)),
- ?line {'EXCEPTION', #'LName_NoComponent'{}} =
+ {'EXCEPTION', #'LName_NoComponent'{}} =
(catch lname:delete_component(Name, 0)),
- ?line {'EXCEPTION', #'LName_NoComponent'{}} =
+ {'EXCEPTION', #'LName_NoComponent'{}} =
(catch lname:delete_component(Name, -2)),
ok.
comparision_tests(Name) ->
- ?line true = lname:equal(Name, Name),
- ?line false = lname:equal(Name, lname:delete_component(Name, 2)),
- ?line true = lname:less_than(lname:delete_component(Name, 2), Name),
- ?line false = lname:less_than(Name, Name),
- ?line false = lname:less_than(Name, lname:delete_component(Name, 2)),
+ true = lname:equal(Name, Name),
+ false = lname:equal(Name, lname:delete_component(Name, 2)),
+ true = lname:less_than(lname:delete_component(Name, 2), Name),
+ false = lname:less_than(Name, Name),
+ false = lname:less_than(Name, lname:delete_component(Name, 2)),
ok.
convertion_tests(Name) ->
- ?line Name = lname:from_idl_form(Name),
- ?line Name = lname:to_idl_form(Name),
+ Name = lname:from_idl_form(Name),
+ Name = lname:to_idl_form(Name),
ok.
diff --git a/lib/orber/test/multi_ORB_SUITE.erl b/lib/orber/test/multi_ORB_SUITE.erl
index 9708111525..d739e47cc1 100644
--- a/lib/orber/test/multi_ORB_SUITE.erl
+++ b/lib/orber/test/multi_ORB_SUITE.erl
@@ -31,7 +31,7 @@
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl").
--define(default_timeout, ?t:minutes(15)).
+-define(default_timeout, test_server:minutes(15)).
-define(match(ExpectedRes,Expr),
fun() ->
@@ -44,7 +44,7 @@
_ ->
io:format("###### ERROR ERROR ######~nRESULT: ~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -159,7 +159,7 @@ init_per_testcase(_Case, Config) ->
init_all(Config).
init_ssl(Config) ->
- case ?config(crypto_started, Config) of
+ case proplists:get_value(crypto_started, Config) of
true ->
case orber_test_lib:ssl_version() of
no_ssl ->
@@ -172,7 +172,7 @@ init_ssl(Config) ->
end.
init_ssl_3(Config) ->
- case ?config(crypto_started, Config) of
+ case proplists:get_value(crypto_started, Config) of
true ->
case orber_test_lib:ssl_version() of
3 ->
@@ -200,7 +200,7 @@ end_per_testcase(_Case, Config) ->
orber:jump_stop(),
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -225,8 +225,7 @@ end_per_suite(Config) ->
%% API tests for ORB to ORB, no security
%%-----------------------------------------------------------------
-implicit_context_api(doc) -> ["IIOP Implicit Contex tests"];
-implicit_context_api(suite) -> [];
+%% IIOP Implicit Contex tests
implicit_context_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -257,9 +256,7 @@ implicit_context_api(_Config) ->
?match(true, lists:keymember(Loopback, 1, Conns)),
ok.
-implicit_context_roundtrip_api(doc) ->
- ["IIOP Implicit Contex roundtrip tests"];
-implicit_context_roundtrip_api(suite) -> [];
+%% IIOP Implicit Contex roundtrip tests
implicit_context_roundtrip_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -289,10 +286,7 @@ implicit_context_roundtrip_api(_Config) ->
?match(true, lists:keymember(Loopback, 1, Conns)),
ok.
-
-
-oneway_implicit_context_api(doc) -> ["IIOP Implicit Contex oneway tests"];
-oneway_implicit_context_api(suite) -> [];
+%% IIOP Implicit Contex oneway tests
oneway_implicit_context_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -326,9 +320,7 @@ oneway_implicit_context_api(_Config) ->
?match(true, lists:keymember(Loopback, 1, Conns)),
ok.
-
-pseudo_implicit_context_api(doc) -> ["IIOP Implicit Contex tests (via pseudo object)"];
-pseudo_implicit_context_api(suite) -> [];
+%% IIOP Implicit Contex tests (via pseudo object)
pseudo_implicit_context_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -358,9 +350,7 @@ pseudo_implicit_context_api(_Config) ->
?match(true, lists:keymember(Loopback, 1, Conns)),
ok.
-pseudo_two_implicit_context_api(doc) ->
- ["IIOP two Implicit Contex tests (via pseudo object)"];
-pseudo_two_implicit_context_api(suite) -> [];
+%% IIOP two Implicit Contex tests (via pseudo object)
pseudo_two_implicit_context_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -394,8 +384,7 @@ pseudo_two_implicit_context_api(_Config) ->
?match(true, lists:keymember(Loopback, 1, Conns)),
ok.
-oneway_pseudo_implicit_context_api(doc) -> ["IIOP Implicit Contex tests (via pseudo object oneway)"];
-oneway_pseudo_implicit_context_api(suite) -> [];
+%% IIOP Implicit Contex tests (via pseudo object oneway)
oneway_pseudo_implicit_context_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -425,9 +414,7 @@ oneway_pseudo_implicit_context_api(_Config) ->
?match(true, lists:keymember(Loopback, 1, Conns)),
ok.
-oneway_pseudo_two_implicit_context_api(doc) ->
- ["IIOP two Implicit Contex tests (via pseudo object oneway)"];
-oneway_pseudo_two_implicit_context_api(suite) -> [];
+%% IIOP two Implicit Contex tests (via pseudo object oneway)
oneway_pseudo_two_implicit_context_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -464,8 +451,7 @@ oneway_pseudo_two_implicit_context_api(_Config) ->
-multiple_accept_api(doc) -> ["IIOP Multiple Accept tests"];
-multiple_accept_api(suite) -> [];
+%% IIOP Multiple Accept tests
multiple_accept_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -537,10 +523,9 @@ multiple_accept_api(_Config) ->
ok.
-proxy_interface_api(doc) -> ["IIOP Proxy Interface tests",
- "This case test if the server ORB use the correct",
- "interface when exporting IOR:s"];
-proxy_interface_api(suite) -> [];
+%% IIOP Proxy Interface tests
+%% This case test if the server ORB use the correct
+%% interface when exporting IOR:s
proxy_interface_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -557,10 +542,9 @@ proxy_interface_api(_Config) ->
iop_ior:get_key(IOR2)),
ok.
-proxy_interface_ipv6_api(doc) -> ["IIOP Proxy Interface tests",
- "This case test if the server ORB use the correct",
- "IPv6 interface when exporting IOR:s"];
-proxy_interface_ipv6_api(suite) -> [];
+%% IIOP Proxy Interface tests
+%% This case test if the server ORB use the correct
+%% IPv6 interface when exporting IOR:s
proxy_interface_ipv6_api(_Config) ->
case orber_test_lib:version_ok() of
true ->
@@ -593,10 +577,9 @@ proxy_interface_ipv6_api2() ->
orber_test_lib:remote_apply(ClientNode, iop_ior, get_key, [IOR2])),
ok.
-local_interface_api(doc) -> ["IIOP Local Interface tests",
- "This case test if the server ORB use the correct",
- "local interface when connecting to another ORB"];
-local_interface_api(suite) -> [];
+%% IIOP Local Interface tests
+%% This case test if the server ORB use the correct
+%% local interface when connecting to another ORB
local_interface_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -627,11 +610,9 @@ local_interface_api(_Config) ->
ok.
-local_interface_ctx_override_api(doc) ->
- ["IIOP Local Interface tests",
- "This case test if the server ORB use the correct",
- "local interface when connecting to another ORB"];
-local_interface_ctx_override_api(suite) -> [];
+%% IIOP Local Interface tests
+%% This case test if the server ORB use the correct
+%% local interface when connecting to another ORB
local_interface_ctx_override_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -664,11 +645,9 @@ local_interface_ctx_override_api(_Config) ->
ok.
-local_interface_acl_override_api(doc) ->
- ["IIOP Local Interface tests",
- "This case test if the server ORB use the correct",
- "local interface when connecting to another ORB"];
-local_interface_acl_override_api(suite) -> [];
+%% IIOP Local Interface tests
+%% This case test if the server ORB use the correct
+%% local interface when connecting to another ORB
local_interface_acl_override_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -708,9 +687,8 @@ local_interface_acl_override_api(_Config) ->
ok.
-iiop_timeout_api(doc) -> ["IIOP TIMEOUT API tests",
- "This case test if timeout configuration behaves correctly"];
-iiop_timeout_api(suite) -> [];
+%% IIOP TIMEOUT API tests
+%% This case test if timeout configuration behaves correctly
iiop_timeout_api(_Config) ->
%% Install two secure orber.
@@ -754,9 +732,8 @@ iiop_timeout_api(_Config) ->
[timeout])),
ok.
-iiop_timeout_added_api(doc) -> ["IIOP TIMEOUT API tests",
- "This case test if timeout configuration behaves correctly"];
-iiop_timeout_added_api(suite) -> [];
+%% IIOP TIMEOUT API tests
+%% This case test if timeout configuration behaves correctly
iiop_timeout_added_api(_Config) ->
IP = orber_test_lib:get_host(),
{ok, Node, _Host} = ?match({ok,_,_}, orber_test_lib:js_node([])),
@@ -791,12 +768,10 @@ iiop_timeout_added_api(_Config) ->
%% API tests for ORB to ORB using pseudo call/cast, no security
%%-----------------------------------------------------------------
-multi_pseudo_orber_api(doc) ->
- ["MULTI ORB PSEUDO API tests",
- "This case test if data encode/decode (IIOP) for pseudo objects",
- "produce the correct result, i.e., the test_server echos",
- "the input parameter or an exception is raised (MARSHAL)."];
-multi_pseudo_orber_api(suite) -> [];
+%% MULTI ORB PSEUDO API tests
+%% This case test if data encode/decode (IIOP) for pseudo objects
+%% produce the correct result, i.e., the test_server echos
+%% the input parameter or an exception is raised (MARSHAL)
multi_pseudo_orber_api(_Config) ->
%% --- Create a slave-node ---
{ok, Node, Host} =
@@ -840,9 +815,7 @@ multi_pseudo_orber_api(_Config) ->
%%-----------------------------------------------------------------
%% API tests for ORB to ORB with local flags definition set.
%%-----------------------------------------------------------------
-flags_added_api(doc) ->
- ["MULTI ORB PSEUDO with local flags definition set"];
-flags_added_api(suite) -> [];
+%% MULTI ORB PSEUDO with local flags definition set
flags_added_api(_Config) ->
%% --- Create a slave-node ---
IP = orber_test_lib:get_host(),
@@ -880,9 +853,7 @@ flags_added_api(_Config) ->
%%-----------------------------------------------------------------
%% API tests for ORB to ORB with limited concurrent requests
%%-----------------------------------------------------------------
-max_requests_api(doc) ->
- ["MULTI ORB PSEUDO with limited concurrent requests tests"];
-max_requests_api(suite) -> [];
+%% MULTI ORB PSEUDO with limited concurrent requests tests
max_requests_api(_Config) ->
%% --- Create a slave-node ---
{ok, Node, Host} =
@@ -890,9 +861,7 @@ max_requests_api(_Config) ->
Port = orber_test_lib:remote_apply(Node, orber, iiop_port, []),
max_requests(Node, Host, Port).
-max_requests_added_api(doc) ->
- ["MULTI ORB PSEUDO with limited concurrent requests tests"];
-max_requests_added_api(suite) -> [];
+%% MULTI ORB PSEUDO with limited concurrent requests tests
max_requests_added_api(_Config) ->
%% --- Create a slave-node ---
[IP] = ?match([_], orber:host()),
@@ -940,9 +909,7 @@ max_requests(Node, Host, Port) ->
%%-----------------------------------------------------------------
%% API tests for ORB to ORB with limited concurrent connections
%%-----------------------------------------------------------------
-max_connections_api(doc) ->
- ["MULTI ORB PSEUDO with limited concurrent connections tests"];
-max_connections_api(suite) -> [];
+%% MULTI ORB PSEUDO with limited concurrent connections tests
max_connections_api(_Config) ->
%% --- Create a slave-node ---
{ok, ServerNode, ServerHost} =
@@ -1012,9 +979,7 @@ max_connections_api(_Config) ->
%%-----------------------------------------------------------------
%% API tests for terminating connection by using an IOR.
%%-----------------------------------------------------------------
-close_connections_api(doc) ->
- ["Close outgoing connection "];
-close_connections_api(suite) -> [];
+%% Close outgoing connection
close_connections_api(_Config) ->
%% --- Create a slave-node ---
IP = orber_test_lib:get_host(),
@@ -1047,11 +1012,9 @@ close_connections_api(_Config) ->
ok.
-close_connections_local_interface_api(doc) ->
- ["IIOP Local Interface disconnect tests",
- "This case test if the server ORB use the correct",
- "local interface when connecting to another ORB"];
-close_connections_local_interface_api(suite) -> [];
+%% IIOP Local Interface disconnect tests
+%% This case test if the server ORB use the correct
+%% local interface when connecting to another ORB
close_connections_local_interface_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -1083,11 +1046,9 @@ close_connections_local_interface_api(_Config) ->
ok.
-close_connections_local_interface_ctx_override_api(doc) ->
- ["IIOP Local Interface disconnect tests",
- "This case test if the server ORB use the correct",
- "local interface when connecting to another ORB"];
-close_connections_local_interface_ctx_override_api(suite) -> [];
+%% IIOP Local Interface disconnect tests
+%% This case test if the server ORB use the correct
+%% local interface when connecting to another ORB
close_connections_local_interface_ctx_override_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -1147,11 +1108,9 @@ close_connections_local_interface_ctx_override_api(_Config) ->
iiop_connections, [out])),
ok.
-close_connections_alt_iiop_addr_api(doc) ->
- ["IIOP alternate address disconnect tests",
- "This case test if the server ORB use the correct",
- "local interface when connecting to another ORB"];
-close_connections_alt_iiop_addr_api(suite) -> [];
+%% IIOP alternate address disconnect tests
+%% This case test if the server ORB use the correct
+%% local interface when connecting to another ORB
close_connections_alt_iiop_addr_api(_Config) ->
%% --- Create a slave-node ---
Loopback = orber_test_lib:get_loopback_interface(),
@@ -1187,11 +1146,9 @@ close_connections_alt_iiop_addr_api(_Config) ->
iiop_connections, [in])),
ok.
-close_connections_multiple_profiles_api(doc) ->
- ["IIOP alternate address disconnect tests",
- "This case test if the server ORB use the correct",
- "local interface when connecting to another ORB"];
-close_connections_multiple_profiles_api(suite) -> [];
+%% IIOP alternate address disconnect tests
+%% This case test if the server ORB use the correct
+%% local interface when connecting to another ORB
close_connections_multiple_profiles_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -1228,9 +1185,7 @@ close_connections_multiple_profiles_api(_Config) ->
%%-----------------------------------------------------------------
%% API tests for ORB to ORB with iiop_packet_size set
%%-----------------------------------------------------------------
-max_packet_size_exceeded_api(doc) ->
- ["Exceed the maximum request size"];
-max_packet_size_exceeded_api(suite) -> [];
+%% Exceed the maximum request size
max_packet_size_exceeded_api(_Config) ->
case catch gen_tcp:listen(0, [{packet,cdr}, {packet_size, 14}]) of
{'EXIT',badarg} ->
@@ -1250,9 +1205,7 @@ max_packet_size_exceeded_api(_Config) ->
%%-----------------------------------------------------------------
%% API tests for ORB to ORB with iiop_packet_size set
%%-----------------------------------------------------------------
-max_packet_size_ok_api(doc) ->
- ["Not exceed the maximum request size"];
-max_packet_size_ok_api(suite) -> [];
+%% Not exceed the maximum request size
max_packet_size_ok_api(_Config) ->
case catch gen_tcp:listen(0, [{packet,cdr}, {packet_size, 14}]) of
{'EXIT',badarg} ->
@@ -1274,9 +1227,7 @@ max_packet_size_ok_api(_Config) ->
%%-----------------------------------------------------------------
%% API tests for ORB to ORB, no security
%%-----------------------------------------------------------------
-
-light_ifr_api(doc) -> ["LIGHT IFR ORB API tests"];
-light_ifr_api(suite) -> [];
+%% LIGHT IFR ORB API tests
light_ifr_api(_Config) ->
{ok, ClientNode, _ClientHost} =
@@ -1349,11 +1300,9 @@ light_ifr_api(_Config) ->
%%-----------------------------------------------------------------
%% API tests for ORB to ORB, no security
%%-----------------------------------------------------------------
-
-light_orber_api(doc) -> ["LIGHT ORB API tests",
- "This case test if a light Orber can communicate correctly",
- "with an fully installed Orber."];
-light_orber_api(suite) -> [];
+%% LIGHT ORB API tests
+%% This case test if a light Orber can communicate correctly
+%% with an fully installed Orber.
light_orber_api(_Config) ->
%% --- Create a slave-node ---
LocalHost = net_adm:localhost(),
@@ -1398,13 +1347,11 @@ light_orber_api(_Config) ->
%%-----------------------------------------------------------------
%% API tests for ORB to ORB, no security
%%-----------------------------------------------------------------
-
-light_orber2_api(doc) -> ["LIGHT ORB API tests",
- "This case test if a light Orber can communicate correctly",
- "with an fully installed Orber. This case test if we can",
- "start as lightweight without first setting the environment",
- "variable"];
-light_orber2_api(suite) -> [];
+%% LIGHT ORB API tests
+%% This case test if a light Orber can communicate correctly
+%% with an fully installed Orber. This case test if we can
+%% start as lightweight without first setting the environment
+%% variable
light_orber2_api(_Config) ->
%% --- Create a slave-node ---
LocalHost = net_adm:localhost(),
@@ -1450,12 +1397,10 @@ light_orber2_api(_Config) ->
%%-----------------------------------------------------------------
%% API tests for ORB to ORB, no security
%%-----------------------------------------------------------------
-
-multi_orber_api(doc) -> ["MULTI ORB API tests",
- "This case test if data encode/decode (IIOP)",
- "produce the correct result, i.e., the test_server echos",
- "the input parameter or an exception is raised (MARSHAL)."];
-multi_orber_api(suite) -> [];
+%% MULTI ORB API tests
+%% This case test if data encode/decode (IIOP)
+%% produce the correct result, i.e., the test_server echos
+%% the input parameter or an exception is raised (MARSHAL).
multi_orber_api(_Config) ->
NewICObj1 = ?match({_,_,_,_,_,_}, orber_test_server:oe_create([])),
@@ -1535,12 +1480,11 @@ multi_orber_api(_Config) ->
%%-----------------------------------------------------------------
%% API tests for ORB to ORB, no security, using basic interceptors
%%-----------------------------------------------------------------
-basic_PI_api(doc) -> ["MULTI ORB API tests",
- "This case test if data encode/decode (IIOP)",
- "produce the correct result when using basic interceptors,",
- "i.e., the test_server echos",
- "the input parameter or an exception is raised (MARSHAL)."];
-basic_PI_api(suite) -> [];
+%% MULTI ORB API tests
+%% This case test if data encode/decode (IIOP)
+%% produce the correct result when using basic interceptors
+%% i.e., the test_server echos the input parameter or
+%% an exception is raised (MARSHAL).
basic_PI_api(_Config) ->
%% Change configuration to use Basic Interceptors.
orber:configure_override(interceptors, {native, [orber_test_lib]}),
@@ -1612,11 +1556,10 @@ basic_PI_api(_Config) ->
%% API tests for ORB to ORB, ssl security depth 1
%%-----------------------------------------------------------------
-ssl_1_multi_orber_api(doc) -> ["SECURE MULTI ORB API tests (SSL depth 1)",
- "This case set up two secure orbs and test if they can",
- "communicate. The case also test to access one of the",
- "secure orbs which must raise a NO_PERMISSION exception."];
-ssl_1_multi_orber_api(suite) -> [];
+%% SECURE MULTI ORB API tests (SSL depth 1)
+%% This case set up two secure orbs and test if they can
+%% communicate. The case also test to access one of the
+%% secure orbs which must raise a NO_PERMISSION exception.
ssl_1_multi_orber_api(_Config) ->
ServerOptions = orber_test_lib:get_options_old(iiop_ssl, server,
1, [{iiop_ssl_port, 0}]),
@@ -1625,11 +1568,10 @@ ssl_1_multi_orber_api(_Config) ->
ssl_suite(ServerOptions, ClientOptions).
-ssl_1_multi_orber_generation_3_api(doc) -> ["SECURE MULTI ORB API tests (SSL depth 1)",
- "This case set up two secure orbs and test if they can",
- "communicate. The case also test to access one of the",
- "secure orbs which must raise a NO_PERMISSION exception."];
-ssl_1_multi_orber_generation_3_api(suite) -> [];
+%% SECURE MULTI ORB API tests (SSL depth 1)
+%% This case set up two secure orbs and test if they can
+%% communicate. The case also test to access one of the
+%% secure orbs which must raise a NO_PERMISSION exception.
ssl_1_multi_orber_generation_3_api(_Config) ->
ServerOptions = orber_test_lib:get_options(iiop_ssl, server,
@@ -1644,11 +1586,10 @@ ssl_1_multi_orber_generation_3_api(_Config) ->
%% API tests for ORB to ORB, ssl security depth 2
%%-----------------------------------------------------------------
-ssl_2_multi_orber_api(doc) -> ["SECURE MULTI ORB API tests (SSL depth 2)",
- "This case set up two secure orbs and test if they can",
- "communicate. The case also test to access one of the",
- "secure orbs which must raise a NO_PERMISSION exception."];
-ssl_2_multi_orber_api(suite) -> [];
+%% SECURE MULTI ORB API tests (SSL depth 2)
+%% These case set up two secure orbs and test if they can
+%% communicate. They also test to access one of the
+%% secure orbs which must raise a NO_PERMISSION exception.
ssl_2_multi_orber_api(_Config) ->
ServerOptions = orber_test_lib:get_options_old(iiop_ssl, server,
@@ -1657,12 +1598,6 @@ ssl_2_multi_orber_api(_Config) ->
2, [{iiop_ssl_port, 0}]),
ssl_suite(ServerOptions, ClientOptions).
-
-ssl_2_multi_orber_generation_3_api(doc) -> ["SECURE MULTI ORB API tests (SSL depth 2)",
- "This case set up two secure orbs and test if they can",
- "communicate. The case also test to access one of the",
- "secure orbs which must raise a NO_PERMISSION exception."];
-ssl_2_multi_orber_generation_3_api(suite) -> [];
ssl_2_multi_orber_generation_3_api(_Config) ->
ServerOptions = orber_test_lib:get_options(iiop_ssl, server,
@@ -1676,17 +1611,16 @@ ssl_2_multi_orber_generation_3_api(_Config) ->
%% API tests for ORB to ORB, ssl security depth 2
%%-----------------------------------------------------------------
-ssl_reconfigure_api(doc) -> ["SECURE MULTI ORB API tests (SSL depth 2)",
- "This case set up two secure orbs and test if they can",
- "communicate. The case also test to access one of the",
- "secure orbs which must raise a NO_PERMISSION exception."];
-ssl_reconfigure_api(suite) -> [];
+%% SECURE MULTI ORB API tests (SSL depth 2)
+%% These case set up two secure orbs and test if they can
+%% communicate. They also test to access one of the
+%% secure orbs which must raise a NO_PERMISSION exception.
ssl_reconfigure_api(_Config) ->
ssl_reconfigure_old([]).
-ssl_reconfigure_generation_3_api_old(_Config) ->
- ssl_reconfigure_old([{ssl_generation, 3}]).
+% ssl_reconfigure_generation_3_api_old(_Config) ->
+% ssl_reconfigure_old([{ssl_generation, 3}]).
ssl_reconfigure_old(ExtraSSLOptions) ->
@@ -1737,11 +1671,6 @@ ssl_reconfigure_old(ExtraSSLOptions) ->
print, [Obj])).
-ssl_reconfigure_generation_3_api(doc) -> ["SECURE MULTI ORB API tests (SSL depth 2)",
- "This case set up two secure orbs and test if they can",
- "communicate. The case also test to access one of the",
- "secure orbs which must raise a NO_PERMISSION exception."];
-ssl_reconfigure_generation_3_api(suite) -> [];
ssl_reconfigure_generation_3_api(_Config) ->
ssl_reconfigure([{ssl_generation, 3}]).
@@ -1795,18 +1724,6 @@ ssl_reconfigure(ExtraSSLOptions) ->
print, [Obj])).
-%%-----------------------------------------------------------------
-%% API tests for Orber to Java ORB, no security
-%%-----------------------------------------------------------------
-
-%orber_java_api(doc) -> ["ERLANG-ORB <-> JAVA-ORB API tests",
-% "This case test if data encode/decode (IIOP)",
-% "produce the correct result, i.e., the test_server echos",
-% "the input parameter or an exception is raised (MARSHAL)."];
-%orber_java_api(suite) -> [];
-%orber_java_api(Config) ->
-% ok.
-
%%------------------------------------------------------------
%% function : ssl_suite
%% Arguments: Config
@@ -1814,7 +1731,6 @@ ssl_reconfigure(ExtraSSLOptions) ->
%% Returns : ok
%% Effect :
%%------------------------------------------------------------
-
ssl_suite(ServerOptions, ClientOptions) ->
{ok, ServerNode, ServerHost} =
@@ -1861,8 +1777,6 @@ ssl_suite(ServerOptions, ClientOptions) ->
%%-----------------------------------------------------------------
%% iiop_setup_connection_timeout API tests for ORB to ORB.
%%-----------------------------------------------------------------
-setup_connection_timeout_api(doc) -> ["iiop_setup_connection_timeout API tests for ORB to ORB."];
-setup_connection_timeout_api(suite) -> [];
setup_connection_timeout_api(_Config) ->
?match(ok, application:set_env(orber, iiop_backlog, 0)),
%% Wait to be sure that the configuration has kicked in.
@@ -1886,9 +1800,6 @@ setup_connection_timeout_api(_Config) ->
%%-----------------------------------------------------------------
%% iiop_setup_connection_timeout API tests for ORB to ORB.
%%-----------------------------------------------------------------
-setup_multi_connection_timeout_api(doc) ->
- ["iiop_multi_setup_connection_timeout API tests for ORB to ORB."];
-setup_multi_connection_timeout_api(suite) -> [];
setup_multi_connection_timeout_api(_Config) ->
?match(ok, application:set_env(orber, iiop_backlog, 0)),
%% Wait to be sure that the configuration has kicked in.
@@ -1911,9 +1822,6 @@ setup_multi_connection_timeout_api(_Config) ->
?match(ok, application:set_env(orber, iiop_out_ports, undefined)),
ok.
-setup_multi_connection_timeout_attempts_api(doc) ->
- ["iiop_multi_setup_connection_timeout API tests for ORB to ORB."];
-setup_multi_connection_timeout_attempts_api(suite) -> [];
setup_multi_connection_timeout_attempts_api(_Config) ->
?match(ok, application:set_env(orber, iiop_backlog, 0)),
%% Wait to be sure that the configuration has kicked in.
@@ -1937,9 +1845,6 @@ setup_multi_connection_timeout_attempts_api(_Config) ->
?match(ok, application:set_env(orber, iiop_out_ports, undefined)),
ok.
-setup_multi_connection_timeout_random_api(doc) ->
- ["iiop_multi_setup_connection_timeout API tests for ORB to ORB."];
-setup_multi_connection_timeout_random_api(suite) -> [];
setup_multi_connection_timeout_random_api(_Config) ->
?match(ok, application:set_env(orber, iiop_backlog, 0)),
%% Wait to be sure that the configuration has kicked in.
@@ -1966,8 +1871,6 @@ setup_multi_connection_timeout_random_api(_Config) ->
%%-----------------------------------------------------------------
%% Sending an incorrect header to the server-side ORB.
%%-----------------------------------------------------------------
-bad_giop_header_api(doc) -> ["Sending an incorrect header to the server-side ORB."];
-bad_giop_header_api(suite) -> [];
bad_giop_header_api(_Config) ->
orber:configure_override(interceptors, {native,[orber_iiop_tracer]}),
orber:configure(orber_debug_level, 10),
@@ -1996,8 +1899,6 @@ bad_giop_header_api(_Config) ->
-define(FRAG_4, <<71,73,79,80,1,2,0,7,0,0,0,5,0,0,0,?REQUEST_ID,0>>).
-fragments_server_api(doc) -> ["fragments API tests for server-side ORB."];
-fragments_server_api(suite) -> [];
fragments_server_api(_Config) ->
%% --- Create a slave-node ---
{ok, Node, Host} =
@@ -2054,8 +1955,6 @@ fragments_server_api(_Config) ->
%%-----------------------------------------------------------------
%% Fragmented IIOP tests (Server-side). Exceeding Maximum.
%%-----------------------------------------------------------------
-fragments_max_server_api(doc) -> ["Maximum fragments API tests for server-side ORB."];
-fragments_max_server_api(suite) -> [];
fragments_max_server_api(_Config) ->
%% --- Create a slave-node ---
IP = orber_test_lib:get_host(),
@@ -2065,8 +1964,6 @@ fragments_max_server_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
fragments_max_server(ServerNode, IP, ServerPort).
-fragments_max_server_added_api(doc) -> ["Maximum fragments API tests for server-side ORB."];
-fragments_max_server_added_api(suite) -> [];
fragments_max_server_added_api(_Config) ->
%% --- Create a slave-node ---
IP = orber_test_lib:get_host(),
@@ -2128,8 +2025,6 @@ fragments_max_server(ServerNode, ServerHost, ServerPort) ->
%%-----------------------------------------------------------------
%% Fragmented IIOP tests (Client-side).
%%-----------------------------------------------------------------
-fragments_client_api(doc) -> ["fragments API tests for client-side ORB."];
-fragments_client_api(suite) -> [];
fragments_client_api(_Config) ->
Any = #any{typecode = {tk_string,0},
value = "123"},
@@ -2147,11 +2042,6 @@ fragments_client_api(_Config) ->
orber:configure(orber_debug_level, 0),
ok.
-%%-----------------------------------------------------------------
-%% Fragmented IIOP tests (Client-side).
-%%-----------------------------------------------------------------
-bad_fragment_id_client_api(doc) -> ["fragments API tests for client-side ORB."];
-bad_fragment_id_client_api(suite) -> [];
bad_fragment_id_client_api(_Config) ->
application:set_env(orber, interceptors, {native,[orber_iiop_tracer]}),
orber:configure(orber_debug_level, 10),
@@ -2171,8 +2061,6 @@ bad_fragment_id_client_api(_Config) ->
%%-----------------------------------------------------------------
%% Non-existing request id
%%-----------------------------------------------------------------
-bad_id_cancel_request_api(doc) -> ["Description", "more description"];
-bad_id_cancel_request_api(suite) -> [];
bad_id_cancel_request_api(Config) when is_list(Config) ->
Req10 = cdr_encode:enc_cancel_request(#giop_env{version = {1, 0},
request_id = 556}),
diff --git a/lib/orber/test/naming_context_SUITE.erl b/lib/orber/test/naming_context_SUITE.erl
index 12d93caf9f..2afede287a 100644
--- a/lib/orber/test/naming_context_SUITE.erl
+++ b/lib/orber/test/naming_context_SUITE.erl
@@ -31,7 +31,7 @@
-include_lib("orber/src/orber_iiop.hrl").
-include_lib("orber/include/corba.hrl").
--define(default_timeout, ?t:minutes(5)).
+-define(default_timeout, test_server:minutes(5)).
%%-----------------------------------------------------------------
%% External exports
@@ -68,7 +68,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -102,7 +102,7 @@ cases() ->
init_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
orber:jump_start(0),
[{watchdog, Dog}|Config].
@@ -111,7 +111,7 @@ end_per_testcase(_Case, Config) ->
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
orber:jump_stop(),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -125,139 +125,134 @@ end_per_suite(Config) ->
%% Test Case: name handling tests
%% Description:
%%-----------------------------------------------------------------
-name_context(doc) -> ["Description", "more description"];
-name_context(suite) -> [];
name_context(_) ->
?REMAP_EXCEPT(name_context_run()).
name_context_run() ->
- ?line Ns = corba:resolve_initial_references("NameService"),
+ Ns = corba:resolve_initial_references("NameService"),
?match({'EXCEPTION', #'NO_PERMISSION'{}},
'CosNaming_NamingContextExt':destroy(Ns)),
%% Create a test context.
- ?line Tc = 'CosNaming_NamingContext':bind_new_context(Ns,
+ Tc = 'CosNaming_NamingContext':bind_new_context(Ns,
[#'CosNaming_NameComponent'{id="testcontext",
kind=""}]),
%% Start testing
- ?line 'CosNaming_NamingContext':bind(Tc, [#'CosNaming_NameComponent'
+ 'CosNaming_NamingContext':bind(Tc, [#'CosNaming_NameComponent'
{id="hej",
kind=""}], Ns),
- ?line Ns = 'CosNaming_NamingContext':resolve(Tc,
+ Ns = 'CosNaming_NamingContext':resolve(Tc,
[#'CosNaming_NameComponent'{id="hej",
kind=""}]),
- ?line Nc = 'CosNaming_NamingContext':new_context(Tc),
- ?line 'CosNaming_NamingContext':bind(Tc, [#'CosNaming_NameComponent'
+ Nc = 'CosNaming_NamingContext':new_context(Tc),
+ 'CosNaming_NamingContext':bind(Tc, [#'CosNaming_NameComponent'
{id="stop",
kind=""}], Nc),
- ?line Nc = 'CosNaming_NamingContext':resolve(Tc,
+ Nc = 'CosNaming_NamingContext':resolve(Tc,
[#'CosNaming_NameComponent'{id="stop",
kind=""}]),
- ?line {'EXCEPTION', E0} =
+ {'EXCEPTION', E0} =
(catch 'CosNaming_NamingContext':bind(Tc,
[#'CosNaming_NameComponent'{id="stop",
kind=""}], Ns)),
- ?line ok = 'CosNaming_NamingContext':rebind(Tc,
+ ok = 'CosNaming_NamingContext':rebind(Tc,
[#'CosNaming_NameComponent'{id="stop",
kind=""}], Ns),
- ?line {'CosNaming_NamingContext_AlreadyBound', _} = E0,
- ?line 'CosNaming_NamingContext':bind_context(Tc,
+ {'CosNaming_NamingContext_AlreadyBound', _} = E0,
+ 'CosNaming_NamingContext':bind_context(Tc,
[#'CosNaming_NameComponent'{id="evaluate",
kind=""}], Nc),
- ?line Nc =
+ Nc =
'CosNaming_NamingContext':resolve(Tc,
[#'CosNaming_NameComponent'{id="evaluate",
kind=""}]),
- ?line 'CosNaming_NamingContext':bind(Tc,
+ 'CosNaming_NamingContext':bind(Tc,
[#'CosNaming_NameComponent'{id="evaluate",
kind=""},
#'CosNaming_NameComponent'{id="hej",
kind=""}], Ns),
- ?line ok = 'CosNaming_NamingContext':rebind(Tc,
+ ok = 'CosNaming_NamingContext':rebind(Tc,
[#'CosNaming_NameComponent'{id="evaluate",
kind=""},
#'CosNaming_NameComponent'{id="hej",
kind=""}], Ns),
- ?line Ns = 'CosNaming_NamingContext':resolve(Tc,
+ Ns = 'CosNaming_NamingContext':resolve(Tc,
[#'CosNaming_NameComponent'{id="evaluate",
kind=""},
#'CosNaming_NameComponent'{id="hej",
kind=""}]),
- ?line {'EXCEPTION', E1} =
+ {'EXCEPTION', E1} =
(catch 'CosNaming_NamingContext':resolve(Tc,
[#'CosNaming_NameComponent'{id="stop",
kind=""},
#'CosNaming_NameComponent'{id="hej",
kind=""}])),
- ?line ?match(ok, orber_diagnostics:nameservice()),
+ ?match(ok, orber_diagnostics:nameservice()),
- ?line {'CosNaming_NamingContext_CannotProceed', _,_,_} = E1,
- ?line {'EXCEPTION', E2} = (catch 'CosNaming_NamingContext':destroy(Nc)),
- ?line {'CosNaming_NamingContext_NotEmpty', _} = E2,
- ?line ok = 'CosNaming_NamingContext':unbind(Tc,
+ {'CosNaming_NamingContext_CannotProceed', _,_,_} = E1,
+ {'EXCEPTION', E2} = (catch 'CosNaming_NamingContext':destroy(Nc)),
+ {'CosNaming_NamingContext_NotEmpty', _} = E2,
+ ok = 'CosNaming_NamingContext':unbind(Tc,
[#'CosNaming_NameComponent'{id="evaluate",
kind=""},
#'CosNaming_NameComponent'{id="hej",
kind=""}]),
- ?line ok = 'CosNaming_NamingContext':destroy(Nc),
- ?line ok = 'CosNaming_NamingContext':unbind(Tc,
+ ok = 'CosNaming_NamingContext':destroy(Nc),
+ ok = 'CosNaming_NamingContext':unbind(Tc,
[#'CosNaming_NameComponent'{id="evaluate",
kind=""}]),
- ?line ok = 'CosNaming_NamingContext':unbind(Tc,
+ ok = 'CosNaming_NamingContext':unbind(Tc,
[#'CosNaming_NameComponent'{id="stop",
kind=""}]),
- ?line ok = 'CosNaming_NamingContext':unbind(Tc,
+ ok = 'CosNaming_NamingContext':unbind(Tc,
[#'CosNaming_NameComponent'{id="hej",
kind=""}]),
- ?line case 'CosNaming_NamingContext':list(Tc, 3) of
+ case 'CosNaming_NamingContext':list(Tc, 3) of
{ok, [], ?ORBER_NIL_OBJREF} ->
ok;
_ ->
exit(not_empty)
end,
- ?line ok = 'CosNaming_NamingContext':unbind(Ns,
+ ok = 'CosNaming_NamingContext':unbind(Ns,
[#'CosNaming_NameComponent'{id="testcontext",
kind=""}]),
- ?line ok = 'CosNaming_NamingContext':destroy(Tc),
+ ok = 'CosNaming_NamingContext':destroy(Tc),
ok.
-check_list(doc) ->
- ["Check that the CosNaming::NamingContext::list()",
- "returns ok.",
- "Own Id: OTP-2023"];
-check_list(suite) -> [];
+%% Check that the CosNaming::NamingContext::list() returns ok.
+%% Own Id: OTP-2023
check_list(Config) when is_list(Config) ->
?REMAP_EXCEPT(check_list_run(Config)).
check_list_run(_Config) ->
create_default_contexts(),
- ?line Ns = corba:resolve_initial_references("NameService"),
- ?line {_, BL, _} = ?match({ok, _, ?ORBER_NIL_OBJREF},
+ Ns = corba:resolve_initial_references("NameService"),
+ {_, BL, _} = ?match({ok, _, ?ORBER_NIL_OBJREF},
'CosNaming_NamingContext':list(Ns, 256)),
FF = fun(X) -> XX = hd(X#'CosNaming_Binding'.binding_name),
XX#'CosNaming_NameComponent'.id end,
L = lists:sort(lists:map(FF, BL)),
- ?line ["host", "workgroup"] = L,
+ ["host", "workgroup"] = L,
%% Test next_n/2
- ?line {_, _, BI} = ?match({ok, [], _BI}, 'CosNaming_NamingContext':list(Ns, 0)),
- ?line ?match({true, []}, 'CosNaming_BindingIterator':next_n(BI, 0)),
- ?line ?match({true, [_]}, 'CosNaming_BindingIterator':next_n(BI, 1)),
- ?line ?match({false, [_]}, 'CosNaming_BindingIterator':next_n(BI, 1)),
- ?line ?match({false, []}, 'CosNaming_BindingIterator':next_n(BI, 1)),
- ?line ?match(ok, 'CosNaming_BindingIterator':destroy(BI)),
-
- ?line {_, _, BI2} = ?match({ok, [], _BI2}, 'CosNaming_NamingContext':list(Ns, 0)),
- ?line ?match({true, _}, 'CosNaming_BindingIterator':next_one(BI2)),
- ?line ?match({true, _}, 'CosNaming_BindingIterator':next_one(BI2)),
- ?line ?match({false, _}, 'CosNaming_BindingIterator':next_one(BI2)),
- ?line ?match(ok, 'CosNaming_BindingIterator':destroy(BI2)),
- ?line ?match(ok, orber_diagnostics:nameservice()),
+ {_, _, BI} = ?match({ok, [], _BI}, 'CosNaming_NamingContext':list(Ns, 0)),
+ ?match({true, []}, 'CosNaming_BindingIterator':next_n(BI, 0)),
+ ?match({true, [_]}, 'CosNaming_BindingIterator':next_n(BI, 1)),
+ ?match({false, [_]}, 'CosNaming_BindingIterator':next_n(BI, 1)),
+ ?match({false, []}, 'CosNaming_BindingIterator':next_n(BI, 1)),
+ ?match(ok, 'CosNaming_BindingIterator':destroy(BI)),
+
+ {_, _, BI2} = ?match({ok, [], _BI2}, 'CosNaming_NamingContext':list(Ns, 0)),
+ ?match({true, _}, 'CosNaming_BindingIterator':next_one(BI2)),
+ ?match({true, _}, 'CosNaming_BindingIterator':next_one(BI2)),
+ ?match({false, _}, 'CosNaming_BindingIterator':next_one(BI2)),
+ ?match(ok, 'CosNaming_BindingIterator':destroy(BI2)),
+ ?match(ok, orber_diagnostics:nameservice()),
ok.
create_default_contexts() ->
@@ -308,13 +303,11 @@ create_default_contexts() ->
%% Test Case:
%% Description:
%%-----------------------------------------------------------------
-name_context_ext(doc) -> ["Description", "more description"];
-name_context_ext(suite) -> [];
name_context_ext(_Config) ->
?REMAP_EXCEPT(name_context_ext_run()).
name_context_ext_run() ->
- ?line NS = ?match({_,pseudo,_, _,_, _},
+ NS = ?match({_,pseudo,_, _,_, _},
corba:resolve_initial_references("NameService")),
Name1 = [#'CosNaming_NameComponent'{id="\\<id1\\>", kind="kind1"},
@@ -357,7 +350,7 @@ name_context_ext_run() ->
'CosNaming_NamingContextExt':to_name(NS, BadString2)),
%% Create a test context.
- ?line Tc = ?match({_,pseudo,_, _,_, _},
+ Tc = ?match({_,pseudo,_, _,_, _},
'CosNaming_NamingContext':bind_new_context(NS,
[#'CosNaming_NameComponent'{id="testcontext",
kind=""}])),
diff --git a/lib/orber/test/orber_SUITE.erl b/lib/orber/test/orber_SUITE.erl
index 46403c00cb..75da31bc5f 100644
--- a/lib/orber/test/orber_SUITE.erl
+++ b/lib/orber/test/orber_SUITE.erl
@@ -21,7 +21,7 @@
-module(orber_SUITE).
-include_lib("common_test/include/ct.hrl").
--define(default_timeout, ?t:minutes(15)).
+-define(default_timeout, test_server:minutes(15)).
-define(application, orber).
% Test server specific exports
@@ -64,21 +64,19 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog=?config(watchdog, Config),
+ Dog=proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
%
% Test cases starts here.
%
-app_test(doc) -> [];
-app_test(suite) -> [];
app_test(_Config) ->
- ?line ok=?t:app_test(orber),
+ ok=test_server:app_test(orber),
ok.
otp_9887(_Config) ->
@@ -103,10 +101,6 @@ otp_9887(_Config) ->
ok.
%% Install Orber using the load_order option.
-install_load_order(suite) ->
- [];
-install_load_order(doc) ->
- [];
install_load_order(_Config) ->
orber:jump_stop(),
case catch install_load_order2() of
@@ -129,10 +123,6 @@ install_load_order2() ->
ok.
%% Install Orber using the local_content option.
-install_local_content(suite) ->
- [];
-install_local_content(doc) ->
- [];
install_local_content(_Config) ->
orber:jump_stop(),
case catch install_local_content2() of
@@ -157,10 +147,6 @@ install_local_content2() ->
%% Check for undefined functions
-undefined_functions(suite) ->
- [];
-undefined_functions(doc) ->
- [];
undefined_functions(_Config) ->
App = orber,
Root = code:root_dir(),
diff --git a/lib/orber/test/orber_acl_SUITE.erl b/lib/orber/test/orber_acl_SUITE.erl
index 43dc4497bd..2b0a48adc9 100644
--- a/lib/orber/test/orber_acl_SUITE.erl
+++ b/lib/orber/test/orber_acl_SUITE.erl
@@ -28,7 +28,7 @@
-include_lib("common_test/include/ct.hrl").
--define(default_timeout, ?t:minutes(5)).
+-define(default_timeout, test_server:minutes(5)).
-define(match(ExpectedRes,Expr),
fun() ->
@@ -41,7 +41,7 @@
_ ->
io:format("###### ERROR ERROR ######~nRESULT: ~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -92,21 +92,19 @@ end_per_suite(Config) ->
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
%%-----------------------------------------------------------------
-%% Test Case :
-%% Description:
+%% Test Case
+%% Description: Testing IPv4 Verify Operation
%%-----------------------------------------------------------------
-ipv4_verify(doc) -> ["Testing IPv4 Verify Operation."];
-ipv4_verify(suite) -> [];
ipv4_verify(_) ->
?match(true, orber_acl:verify("192.168.64.148", "192.168.64.0/17", inet)),
?match({false,"192.168.128.0","192.168.255.255"},
@@ -133,10 +131,8 @@ ipv4_verify(_) ->
%%-----------------------------------------------------------------
%% Test Case :
-%% Description:
+%% Description: Testing IPv4 Range Operation
%%-----------------------------------------------------------------
-ipv4_range(doc) -> ["Testing IPv4 Range Operation."];
-ipv4_range(suite) -> [];
ipv4_range(_) ->
?match({ok,"192.168.0.0", "192.168.127.255"},
orber_acl:range("192.168.64.0/17")),
@@ -162,10 +158,8 @@ ipv4_range(_) ->
%%-----------------------------------------------------------------
%% Test Case :
-%% Description:
+%% Description: Testing IPv4 Interfaces Operation
%%-----------------------------------------------------------------
-ipv4_interfaces(doc) -> ["Testing IPv4 Interfaces Operation."];
-ipv4_interfaces(suite) -> [];
ipv4_interfaces(_) ->
?match({ok, _},
orber_acl:init_acl([{tcp_in, "192.168.128.0/18", ["10.1.1.1"]},
@@ -185,19 +179,15 @@ ipv4_interfaces(_) ->
%%-----------------------------------------------------------------
%% Test Case :
-%% Description:
+%% Description: Benchmarking runtime critical IPv4 Operations
%%-----------------------------------------------------------------
-ipv4_bm(doc) -> ["Benchmarking runtime critical IPv4 Operations."];
-ipv4_bm(suite) -> [];
ipv4_bm(_) ->
?match({ok, _, _, _}, bm2([{tcp_in, "192.168.64.0/17"}], inet, "192.168.64.148")),
ok.
%%-----------------------------------------------------------------
%% Test Case :
-%% Description:
+%% Description: Testing IPv6 Verify Operation
%%-----------------------------------------------------------------
-ipv6_verify(doc) -> ["Testing IPv6 Verify Operation."];
-ipv6_verify(suite) -> [];
ipv6_verify(_) ->
case orber_test_lib:version_ok() of
true ->
@@ -215,10 +205,8 @@ ipv6_verify(_) ->
%%-----------------------------------------------------------------
%% Test Case :
-%% Description:
+%% Description: Testing IPv6 Range Operation
%%-----------------------------------------------------------------
-ipv6_range(doc) -> ["Testing IPv6 Range Operation."];
-ipv6_range(suite) -> [];
ipv6_range(_) ->
case orber_test_lib:version_ok() of
true ->
@@ -233,10 +221,8 @@ ipv6_range(_) ->
%%-----------------------------------------------------------------
%% Test Case :
-%% Description:
+%% Description: Testing IPv6 Interfaces Operation
%%-----------------------------------------------------------------
-ipv6_interfaces(doc) -> ["Testing IPv6 Interfaces Operation."];
-ipv6_interfaces(suite) -> [];
ipv6_interfaces(_) ->
case orber_test_lib:version_ok() of
true ->
@@ -252,10 +238,8 @@ ipv6_interfaces(_) ->
%%-----------------------------------------------------------------
%% Test Case :
-%% Description:
+%% Description: Benchmarking runtime critical IPv6 Operations
%%-----------------------------------------------------------------
-ipv6_bm(doc) -> ["Benchmarking runtime critical IPv6 Operations."];
-ipv6_bm(suite) -> [];
ipv6_bm(_) ->
case orber_test_lib:version_ok() of
true ->
diff --git a/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl b/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl
index a76682608f..6d085d3bf5 100644
--- a/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl
+++ b/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl
@@ -30,7 +30,7 @@
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContextExt.hrl").
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl").
--define(default_timeout, ?t:minutes(15)).
+-define(default_timeout, test_server:minutes(15)).
-define(match(ExpectedRes,Expr),
fun() ->
@@ -43,7 +43,7 @@
_ ->
io:format("###### ERROR ERROR ######~nRESULT: ~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -87,12 +87,12 @@ cases() ->
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -113,8 +113,7 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% Incomming connections - Deny
%%-----------------------------------------------------------------
-deny_port_api(doc) -> ["Deny Access due to invalid local port"];
-deny_port_api(suite) -> [];
+%% Deny Access due to invalid local port
deny_port_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -123,11 +122,10 @@ deny_port_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-deny_port_range_api(doc) -> ["Deny Access due to invalid local port range"];
-deny_port_range_api(suite) -> [];
+%% Deny Access due to invalid local port range
deny_port_range_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -136,12 +134,11 @@ deny_port_range_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-deny_host_api(doc) -> ["Deny Access due to invalid host"];
-deny_host_api(suite) -> [];
+%% Deny Access due to invalid host
deny_host_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -150,11 +147,10 @@ deny_host_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-deny_peerhost_api(doc) -> ["Deny Access due to invalid peerhost"];
-deny_peerhost_api(suite) -> [];
+%% Deny Access due to invalid peerhost
deny_peerhost_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -163,14 +159,13 @@ deny_peerhost_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
%%-----------------------------------------------------------------
%% Incomming connections - Allow
%%-----------------------------------------------------------------
-allow_port_range_api(doc) -> ["Allow Access due to valid local port range"];
-allow_port_range_api(suite) -> [];
+%% Allow Access due to valid local port range
allow_port_range_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -181,12 +176,11 @@ allow_port_range_api(_Config) ->
?match({'IOP_IOR',_,_},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
?match(false, corba_object:not_existent(IOR)),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-allow_host_api(doc) -> ["Allow Access due to valid host"];
-allow_host_api(suite) -> [];
+%% Allow Access due to valid host
allow_host_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -197,11 +191,10 @@ allow_host_api(_Config) ->
?match({'IOP_IOR',_,_},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
?match(false, corba_object:not_existent(IOR)),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-allow_peerhost_api(doc) -> ["Allow Access due to valid peerhost"];
-allow_peerhost_api(suite) -> [];
+%% Allow Access due to valid peerhost
allow_peerhost_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -218,14 +211,12 @@ allow_peerhost_api(_Config) ->
[#'IOP_ServiceContext'
{context_id=?ORBER_GENERIC_CTX_ID,
context_data = {interface, IP}}])),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
%%-----------------------------------------------------------------
%% Test corbaloc strings
%%-----------------------------------------------------------------
-check_address_api(doc) -> ["Test corbaloc strings"];
-check_address_api(suite) -> [];
check_address_api(_Config) ->
?match({[[iiop,{1,0},"10.0.0.1",2809]],"NameService"},
orber_cosnaming_utils:addresses(":10.0.0.1/NameService")),
@@ -287,7 +278,7 @@ check_address_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'IOP_IOR',_,_},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
diff --git a/lib/orber/test/orber_firewall_ipv4_out_SUITE.erl b/lib/orber/test/orber_firewall_ipv4_out_SUITE.erl
index b1c8e00aba..e061d0410d 100644
--- a/lib/orber/test/orber_firewall_ipv4_out_SUITE.erl
+++ b/lib/orber/test/orber_firewall_ipv4_out_SUITE.erl
@@ -30,7 +30,7 @@
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContextExt.hrl").
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl").
--define(default_timeout, ?t:minutes(15)).
+-define(default_timeout, test_server:minutes(15)).
-define(match(ExpectedRes,Expr),
fun() ->
@@ -43,7 +43,7 @@
_ ->
io:format("###### ERROR ERROR ######~nRESULT: ~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -87,12 +87,12 @@ cases() ->
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -113,8 +113,7 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% Incomming connections - Deny
%%-----------------------------------------------------------------
-deny_port_api(doc) -> ["Deny Access due to invalid local port"];
-deny_port_api(suite) -> [];
+%% Deny Access due to invalid local port
deny_port_api(_Config) ->
[IP] = ?match([_], orber:host()),
ServerPort = orber:iiop_port(),
@@ -124,11 +123,10 @@ deny_port_api(_Config) ->
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
orber_test_lib:remote_apply(ClientNode, corba, string_to_object,
["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])),
-% ?line catch orber_test_lib:destroy_node(ClientNode, timeout),
+% catch orber_test_lib:destroy_node(ClientNode, timeout),
ok.
-deny_port_range_api(doc) -> ["Deny Access due to invalid local port range"];
-deny_port_range_api(suite) -> [];
+%% Deny Access due to invalid local port range
deny_port_range_api(_Config) ->
[IP] = ?match([_], orber:host()),
ServerPort = orber:iiop_port(),
@@ -138,12 +136,11 @@ deny_port_range_api(_Config) ->
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
orber_test_lib:remote_apply(ClientNode, corba, string_to_object,
["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])),
-% ?line catch orber_test_lib:destroy_node(ClientNode, timeout),
+% catch orber_test_lib:destroy_node(ClientNode, timeout),
ok.
-deny_host_api(doc) -> ["Deny Access due to invalid host"];
-deny_host_api(suite) -> [];
+%% Deny Access due to invalid host
deny_host_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ClientNode, _ClientHost} =
@@ -153,14 +150,13 @@ deny_host_api(_Config) ->
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
orber_test_lib:remote_apply(ClientNode, corba, string_to_object,
["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])),
-% ?line catch orber_test_lib:destroy_node(ClientNode, timeout),
+% catch orber_test_lib:destroy_node(ClientNode, timeout),
ok.
%%-----------------------------------------------------------------
%% Incomming connections - Allow
%%-----------------------------------------------------------------
-allow_port_api(doc) -> ["Allow Access due to valid local port range"];
-allow_port_api(suite) -> [];
+%% Allow Access due to valid local port range
allow_port_api(_Config) ->
[IP] = ?match([_], orber:host()),
ServerPort = orber:iiop_port(),
@@ -173,11 +169,10 @@ allow_port_api(_Config) ->
["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])),
?match(false,
orber_test_lib:remote_apply(ClientNode, corba_object, not_existent, [IOR])),
-% ?line catch orber_test_lib:destroy_node(ClientNode, timeout),
+% catch orber_test_lib:destroy_node(ClientNode, timeout),
ok.
-allow_port_range_api(doc) -> ["Allow Access due to valid local port range"];
-allow_port_range_api(suite) -> [];
+%% Allow Access due to valid local port range
allow_port_range_api(_Config) ->
[IP] = ?match([_], orber:host()),
ServerPort = orber:iiop_port(),
@@ -190,12 +185,11 @@ allow_port_range_api(_Config) ->
["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])),
?match(false,
orber_test_lib:remote_apply(ClientNode, corba_object, not_existent, [IOR])),
-% ?line catch orber_test_lib:destroy_node(ClientNode, timeout),
+% catch orber_test_lib:destroy_node(ClientNode, timeout),
ok.
-allow_host_api(doc) -> ["Allow Access due to valid host"];
-allow_host_api(suite) -> [];
+%% Allow Access due to valid host
allow_host_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ClientNode, _ClientHost} =
@@ -208,11 +202,10 @@ allow_host_api(_Config) ->
["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])),
?match(false,
orber_test_lib:remote_apply(ClientNode, corba_object, not_existent, [IOR])),
-% ?line catch orber_test_lib:destroy_node(ClientNode, timeout),
+% catch orber_test_lib:destroy_node(ClientNode, timeout),
ok.
-local_interface_api(doc) -> ["Allow Access due to valid host via a spcific interface"];
-local_interface_api(suite) -> [];
+%% Allow Access due to valid host via a spcific interface
local_interface_api(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -231,6 +224,6 @@ local_interface_api(_Config) ->
["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])),
?match(false,
orber_test_lib:remote_apply(ClientNode, corba_object, not_existent, [IOR])),
-% ?line catch orber_test_lib:destroy_node(ClientNode, timeout),
+% catch orber_test_lib:destroy_node(ClientNode, timeout),
ok.
diff --git a/lib/orber/test/orber_firewall_ipv6_in_SUITE.erl b/lib/orber/test/orber_firewall_ipv6_in_SUITE.erl
index e1a172140c..ee879f5ea8 100644
--- a/lib/orber/test/orber_firewall_ipv6_in_SUITE.erl
+++ b/lib/orber/test/orber_firewall_ipv6_in_SUITE.erl
@@ -30,7 +30,7 @@
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContextExt.hrl").
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl").
--define(default_timeout, ?t:minutes(15)).
+-define(default_timeout, test_server:minutes(15)).
-define(match(ExpectedRes,Expr),
fun() ->
@@ -43,7 +43,7 @@
_ ->
io:format("###### ERROR ERROR ######~nRESULT: ~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -87,7 +87,7 @@ cases() ->
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
orber:jump_start([{iiop_port, 0},
{iiop_out_ports, {5980, 6000}},
{flags, ?ORB_ENV_USE_IPV6}]),
@@ -96,7 +96,7 @@ init_per_testcase(_Case, Config) ->
end_per_testcase(_Case, Config) ->
orber:jump_stop(),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -120,8 +120,7 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% Incomming connections - Deny
%%-----------------------------------------------------------------
-deny_port_api(doc) -> ["Deny Access due to invalid local port"];
-deny_port_api(suite) -> [];
+%% Deny Access due to invalid local port
deny_port_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, ServerHost} =
@@ -131,11 +130,10 @@ deny_port_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")),
- % ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+ % catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-deny_port_range_api(doc) -> ["Deny Access due to invalid local port range"];
-deny_port_range_api(suite) -> [];
+%% Deny Access due to invalid local port range
deny_port_range_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, ServerHost} =
@@ -145,12 +143,11 @@ deny_port_range_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-deny_host_api(doc) -> ["Deny Access due to invalid host"];
-deny_host_api(suite) -> [];
+%% Deny Access due to invalid host
deny_host_api(_Config) ->
{ok, ServerNode, ServerHost} =
?match({ok,_,_}, orber_test_lib:js_node([{flags, (?ORB_ENV_USE_IPV6 bor
@@ -159,11 +156,10 @@ deny_host_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-deny_peerhost_api(doc) -> ["Deny Access due to invalid peer host"];
-deny_peerhost_api(suite) -> [];
+%% Deny Access due to invalid peer host
deny_peerhost_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, ServerHost} =
@@ -174,14 +170,13 @@ deny_peerhost_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
%%-----------------------------------------------------------------
%% Incomming connections - Allow
%%-----------------------------------------------------------------
-allow_port_range_api(doc) -> ["Allow Access due to valid local port range"];
-allow_port_range_api(suite) -> [];
+%% Allow Access due to valid local port range
allow_port_range_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, ServerHost} =
@@ -194,12 +189,11 @@ allow_port_range_api(_Config) ->
?match({'IOP_IOR',_,_},
corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")),
?match(false, corba_object:not_existent(IOR)),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-allow_host_api(doc) -> ["Allow Access due to valid host"];
-allow_host_api(suite) -> [];
+%% Allow Access due to valid host
allow_host_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, ServerHost} =
@@ -212,11 +206,10 @@ allow_host_api(_Config) ->
corba:string_to_object("corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService")),
?match(false, corba_object:not_existent(IOR)),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-allow_peerhost_api(doc) -> ["Allow Access due to valid host"];
-allow_peerhost_api(suite) -> [];
+%% Allow Access due to valid host
allow_peerhost_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, ServerHost} =
@@ -235,14 +228,12 @@ allow_peerhost_api(_Config) ->
{context_id=?ORBER_GENERIC_CTX_ID,
context_data = {interface, IP}}])),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
%%-----------------------------------------------------------------
%% Test corbaloc strings
%%-----------------------------------------------------------------
-check_address_api(doc) -> ["Test corbaloc strings"];
-check_address_api(suite) -> [];
check_address_api(_Config) ->
?match({[[iiop,{1,0},"0:0:0:0:0:FFFF:C02A:2A2A",2809]],"NameService"},
orber_cosnaming_utils:addresses(":[0:0:0:0:0:FFFF:C02A:2A2A]/NameService")),
@@ -318,7 +309,7 @@ check_address_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'IOP_IOR',_,_},
corba:string_to_object("corbaloc::1.2@["++IP++"]:"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
diff --git a/lib/orber/test/orber_firewall_ipv6_out_SUITE.erl b/lib/orber/test/orber_firewall_ipv6_out_SUITE.erl
index 8dfc7d9d6f..0fe305aeb5 100644
--- a/lib/orber/test/orber_firewall_ipv6_out_SUITE.erl
+++ b/lib/orber/test/orber_firewall_ipv6_out_SUITE.erl
@@ -30,7 +30,7 @@
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContextExt.hrl").
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl").
--define(default_timeout, ?t:minutes(15)).
+-define(default_timeout, test_server:minutes(15)).
-define(match(ExpectedRes,Expr),
fun() ->
@@ -43,7 +43,7 @@
_ ->
io:format("###### ERROR ERROR ######~nRESULT: ~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -87,7 +87,7 @@ cases() ->
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
orber:jump_start([{iiop_port, 0},
{iiop_out_ports, {5980, 6000}},
{flags, ?ORB_ENV_USE_IPV6}]),
@@ -96,7 +96,7 @@ init_per_testcase(_Case, Config) ->
end_per_testcase(_Case, Config) ->
orber:jump_stop(),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -120,8 +120,7 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% Incomming connections - Deny
%%-----------------------------------------------------------------
-deny_port_api(doc) -> ["Deny Access due to invalid local port"];
-deny_port_api(suite) -> [];
+%% Deny Access due to invalid local port
deny_port_api(_Config) ->
[IP] = ?match([_], orber:host()),
ServerPort = orber:iiop_port(),
@@ -132,11 +131,10 @@ deny_port_api(_Config) ->
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
orber_test_lib:remote_apply(ServerNode, corba, string_to_object,
["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-deny_port_range_api(doc) -> ["Deny Access due to invalid local port range"];
-deny_port_range_api(suite) -> [];
+%% Deny Access due to invalid local port range
deny_port_range_api(_Config) ->
[IP] = ?match([_], orber:host()),
ServerPort = orber:iiop_port(),
@@ -147,12 +145,11 @@ deny_port_range_api(_Config) ->
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
orber_test_lib:remote_apply(ServerNode, corba, string_to_object,
["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-deny_host_api(doc) -> ["Deny Access due to invalid host"];
-deny_host_api(suite) -> [];
+%% Deny Access due to invalid host
deny_host_api(_Config) ->
{ok, ServerNode, ServerHost} =
?match({ok,_,_}, orber_test_lib:js_node([{flags, (?ORB_ENV_USE_IPV6 bor
@@ -162,14 +159,13 @@ deny_host_api(_Config) ->
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
orber_test_lib:remote_apply(ServerNode, corba, string_to_object,
["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
%%-----------------------------------------------------------------
%% Incomming connections - Allow
%%-----------------------------------------------------------------
-allow_port_api(doc) -> ["Allow Access due to valid local port"];
-allow_port_api(suite) -> [];
+%% Allow Access due to valid local port
allow_port_api(_Config) ->
[IP] = ?match([_], orber:host()),
ServerPort = orber:iiop_port(),
@@ -183,11 +179,10 @@ allow_port_api(_Config) ->
["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])),
?match(false,
orber_test_lib:remote_apply(ServerNode, corba_object, not_existent, [IOR])),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-allow_port_range_api(doc) -> ["Allow Access due to valid local port range"];
-allow_port_range_api(suite) -> [];
+%% Allow Access due to valid local port range
allow_port_range_api(_Config) ->
[IP] = ?match([_], orber:host()),
ServerPort = orber:iiop_port(),
@@ -201,12 +196,11 @@ allow_port_range_api(_Config) ->
["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])),
?match(false,
orber_test_lib:remote_apply(ServerNode, corba_object, not_existent, [IOR])),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-allow_host_api(doc) -> ["Allow Access due to valid host"];
-allow_host_api(suite) -> [];
+%% Allow Access due to valid host
allow_host_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, ServerHost} =
@@ -220,11 +214,10 @@ allow_host_api(_Config) ->
["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])),
?match(false,
orber_test_lib:remote_apply(ServerNode, corba_object, not_existent, [IOR])),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-local_interface_api(doc) -> ["Allow Access due to valid host via a spcific interface"];
-local_interface_api(suite) -> [];
+%% Allow Access due to valid host via a spcific interface
local_interface_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, ServerHost} =
@@ -238,6 +231,6 @@ local_interface_api(_Config) ->
["corbaloc::1.2@"++ServerHost++":"++integer_to_list(ServerPort)++"/NameService"])),
?match(false,
orber_test_lib:remote_apply(ServerNode, corba_object, not_existent, [IOR])),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
diff --git a/lib/orber/test/orber_nat_SUITE.erl b/lib/orber/test/orber_nat_SUITE.erl
index 24744a6348..029a5e529b 100644
--- a/lib/orber/test/orber_nat_SUITE.erl
+++ b/lib/orber/test/orber_nat_SUITE.erl
@@ -31,7 +31,7 @@
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl").
--define(default_timeout, ?t:minutes(15)).
+-define(default_timeout, test_server:minutes(15)).
-define(match(ExpectedRes,Expr),
fun() ->
@@ -44,7 +44,7 @@
_ ->
io:format("###### ERROR ERROR ######~nRESULT: ~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -102,7 +102,7 @@ cases() ->
init_per_testcase(TC, Config)
when TC =:= nat_iiop_ssl_port;
TC =:= nat_iiop_ssl_port_local ->
- case ?config(crypto_started, Config) of
+ case proplists:get_value(crypto_started, Config) of
true ->
case orber_test_lib:ssl_version() of
no_ssl ->
@@ -128,7 +128,7 @@ end_per_testcase(_Case, Config) ->
orber:jump_stop(),
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -152,10 +152,8 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% API tests for NAT
%%-----------------------------------------------------------------
-
-nat_ip_address(doc) -> ["This case test if the server ORB use the correct",
- "interface when exporting IOR:s"];
-nat_ip_address(suite) -> [];
+%% These case test if the server ORB use the correct
+%% interface when exporting IOR:s
nat_ip_address(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -169,9 +167,6 @@ nat_ip_address(_Config) ->
iop_ior:get_key(IOR)),
ok.
-nat_ip_address_multiple(doc) -> ["This case test if the server ORB use the correct",
- "interface when exporting IOR:s"];
-nat_ip_address_multiple(suite) -> [];
nat_ip_address_multiple(_Config) ->
IP = orber_test_lib:get_host(),
@@ -185,9 +180,6 @@ nat_ip_address_multiple(_Config) ->
iop_ior:get_key(IOR)),
ok.
-nat_ip_address_local(doc) -> ["This case test if the server ORB use the correct",
- "interface when exporting IOR:s"];
-nat_ip_address_local(suite) -> [];
nat_ip_address_local(_Config) ->
IP = orber_test_lib:get_host(),
{ok, ServerNode, _ServerHost} =
@@ -200,9 +192,6 @@ nat_ip_address_local(_Config) ->
iop_ior:get_key(IOR)),
ok.
-nat_ip_address_local_local(doc) -> ["This case test if the server ORB use the correct",
- "interface when exporting IOR:s"];
-nat_ip_address_local_local(suite) -> [];
nat_ip_address_local_local(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -222,9 +211,6 @@ nat_ip_address_local_local(_Config) ->
iop_ior:get_key(IOR2)),
ok.
-nat_iiop_port(doc) -> ["This case test if the server ORB use the correct",
- "port when exporting IOR:s"];
-nat_iiop_port(suite) -> [];
nat_iiop_port(_Config) ->
IP = orber_test_lib:get_host(),
{ok, ServerNode, _ServerHost} =
@@ -237,9 +223,6 @@ nat_iiop_port(_Config) ->
iop_ior:get_key(IOR)),
ok.
-nat_iiop_port_local(doc) -> ["This case test if the server ORB use the correct",
- "port when exporting IOR:s"];
-nat_iiop_port_local(suite) -> [];
nat_iiop_port_local(_Config) ->
IP = orber_test_lib:get_host(),
{ok, ServerNode, _ServerHost} =
@@ -252,9 +235,6 @@ nat_iiop_port_local(_Config) ->
iop_ior:get_key(IOR)),
ok.
-nat_iiop_port_local_local(doc) -> ["This case test if the server ORB use the correct",
- "port when exporting IOR:s"];
-nat_iiop_port_local_local(suite) -> [];
nat_iiop_port_local_local(_Config) ->
IP = orber_test_lib:get_host(),
Loopback = orber_test_lib:get_loopback_interface(),
@@ -286,11 +266,8 @@ nat_iiop_port_local_local(_Config) ->
%%-----------------------------------------------------------------
%% API tests for ORB to ORB, ssl security depth 1
%%-----------------------------------------------------------------
-
-
-nat_iiop_ssl_port(doc) -> ["SECURE MULTI ORB API tests (SSL depth 1)",
- "Make sure NAT works for SSL"];
-nat_iiop_ssl_port(suite) -> [];
+%% SECURE MULTI ORB API tests (SSL depth 1)
+%% Make sure NAT works for SSL
nat_iiop_ssl_port(_Config) ->
IP = orber_test_lib:get_host(),
@@ -337,9 +314,6 @@ nat_iiop_ssl_port(_Config) ->
remove_listen_interface, [Ref])),
ok.
-nat_iiop_ssl_port_local(doc) -> ["SECURE MULTI ORB API tests (SSL depth 1)",
- "Make sure NAT works for SSL"];
-nat_iiop_ssl_port_local(suite) -> [];
nat_iiop_ssl_port_local(_Config) ->
IP = orber_test_lib:get_host(),
diff --git a/lib/orber/test/orber_web_SUITE.erl b/lib/orber/test/orber_web_SUITE.erl
index 2966fbd994..b272eb3fcf 100644
--- a/lib/orber/test/orber_web_SUITE.erl
+++ b/lib/orber/test/orber_web_SUITE.erl
@@ -30,7 +30,7 @@
-include_lib("orber/include/corba.hrl").
-include_lib("orber/src/orber_iiop.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
-define(match(ExpectedRes, Expr),
fun() ->
@@ -43,7 +43,7 @@
_ ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -54,7 +54,7 @@
Not ->
io:format("###### ERROR ERROR ######~n~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS);
+ exit(AcTuAlReS);
_ ->
io:format("------ CORRECT RESULT ------~n~p~n",
[AcTuAlReS]),
@@ -106,7 +106,7 @@ end_per_group(_GroupName, Config) ->
%% Init and cleanup functions.
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
Path = code:which(?MODULE),
code:add_pathz(filename:join(filename:dirname(Path), "idl_output")),
orber:jump_start(2875),
@@ -119,7 +119,7 @@ end_per_testcase(_Case, Config) ->
orber:jump_stop(),
Path = code:which(?MODULE),
code:del_path(filename:join(filename:dirname(Path), "idl_output")),
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -127,8 +127,6 @@ end_per_testcase(_Case, Config) ->
%% Test Case: menu
%% Description:
%%-----------------------------------------------------------------
-menu(doc) -> [""];
-menu(suite) -> [];
menu(_) ->
Node = atom_to_list(node()),
OK = orber_web:menu(env, [{"node", Node}]),
@@ -141,8 +139,6 @@ menu(_) ->
%% Test Case: configure
%% Description:
%%-----------------------------------------------------------------
-configure(doc) -> [""];
-configure(suite) -> [];
configure(_) ->
Node = atom_to_list(node()),
?match({'EXIT', _}, orber_web:configure(env, [])),
@@ -162,8 +158,6 @@ configure(_) ->
%% Test Case: info
%% Description:
%%-----------------------------------------------------------------
-info(doc) -> [""];
-info(suite) -> [];
info(_) ->
?match({'EXIT', _}, orber_web:info(env, [])),
?match({'EXIT', _}, orber_web:info(env, [{"node", localhost}])),
@@ -174,8 +168,6 @@ info(_) ->
%% Test Case: nameservice
%% Description:
%%-----------------------------------------------------------------
-nameservice(doc) -> [""];
-nameservice(suite) -> [];
nameservice(_) ->
NodeStr = atom_to_list(node()),
?match({'EXIT', _}, orber_web:nameservice(env, [{"node", localhost},
@@ -215,8 +207,6 @@ nameservice(_) ->
%% Test Case: ifr_select
%% Description:
%%-----------------------------------------------------------------
-ifr_select(doc) -> [""];
-ifr_select(suite) -> [];
ifr_select(_) ->
?match({'EXIT', _}, orber_web:ifr_select(env, [])),
?match({'EXIT', _}, orber_web:ifr_select(env, [{"node", localhost}])),
@@ -228,8 +218,6 @@ ifr_select(_) ->
%% Test Case: ifr_data
%% Description:
%%-----------------------------------------------------------------
-ifr_data(doc) -> [""];
-ifr_data(suite) -> [];
ifr_data(_) ->
?match({'EXIT', _}, orber_web:ifr_data(env, [])),
?match({'EXIT', _}, orber_web:ifr_data(env, [{"node", localhost},
@@ -266,8 +254,6 @@ ifr_data(_) ->
%% Test Case: create
%% Description:
%%-----------------------------------------------------------------
-create(doc) -> [""];
-create(suite) -> [];
create(_) ->
NodeStr = atom_to_list(node()),
?match({'EXIT', _}, orber_web:create(env, [])),
@@ -347,8 +333,6 @@ create(_) ->
%% Test Case: delete_ctx
%% Description:
%%-----------------------------------------------------------------
-delete_ctx(doc) -> [""];
-delete_ctx(suite) -> [];
delete_ctx(_) ->
?match({ok, _}, orber_web:delete_ctx(env, [{"node", atom_to_list(node())},
{"context", "id1"}])),
@@ -363,8 +347,6 @@ delete_ctx(_) ->
%% Test Case: add_ctx
%% Description:
%%-----------------------------------------------------------------
-add_ctx(doc) -> [""];
-add_ctx(suite) -> [];
add_ctx(_) ->
?match({error, _}, orber_web:add_ctx(env, [{"node", "bad_node"},
{"context", "root"},
@@ -384,8 +366,6 @@ add_ctx(_) ->
%% Test Case: delete_obj
%% Description:
%%-----------------------------------------------------------------
-delete_obj(doc) -> [""];
-delete_obj(suite) -> [];
delete_obj(_) ->
NodeStr = atom_to_list(node()),
?match({error, _}, orber_web:delete_obj(env, [{"node", "bad_node"},
@@ -436,8 +416,6 @@ delete_obj(_) ->
%% Test Case: server
%% Description:
%%-----------------------------------------------------------------
-server(doc) -> [""];
-server(suite) -> [];
server(_) ->
NodeStr = "node=" ++ atom_to_list(node()),
{ok, Pid} = ?match({ok,_}, orber_web_server:start()),
diff --git a/lib/orber/test/tc_SUITE.erl b/lib/orber/test/tc_SUITE.erl
index 565d9f4645..4572057403 100644
--- a/lib/orber/test/tc_SUITE.erl
+++ b/lib/orber/test/tc_SUITE.erl
@@ -3,7 +3,7 @@
%%
%% Copyright Ericsson AB 2004-2016. All Rights Reserved.
%%
-%% Licensed under the Apache License, Version 2.0 (the "License");
+%% Licensed under the Apache Li2cense, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
@@ -29,7 +29,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("orber/src/orber_iiop.hrl").
--define(default_timeout, ?t:minutes(3)).
+-define(default_timeout, test_server:minutes(3)).
-define(match(Expr),
fun() ->
@@ -173,12 +173,12 @@ end_per_group(_GroupName, Config) ->
%%-----------------------------------------------------------------
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -186,66 +186,54 @@ end_per_testcase(_Case, Config) ->
%% Test Case: null test
%% Description:
%%-----------------------------------------------------------------
-null(doc) -> [];
-null(suite) -> [];
null(_) ->
- ?line true = orber_tc:check_tc(orber_tc:null()),
- ?line code(orber_tc:null()),
+ true = orber_tc:check_tc(orber_tc:null()),
+ code(orber_tc:null()),
ok.
%%-----------------------------------------------------------------
%% Test Case: void test
%% Description:
%%-----------------------------------------------------------------
-void(doc) -> [];
-void(suite) -> [];
void(_) ->
- ?line true = orber_tc:check_tc(orber_tc:void()),
- ?line code(orber_tc:void()),
+ true = orber_tc:check_tc(orber_tc:void()),
+ code(orber_tc:void()),
ok.
%%-----------------------------------------------------------------
%% Test Case: short integer test
%% Description:
%%-----------------------------------------------------------------
-short(doc) -> [];
-short(suite) -> [];
short(_) ->
- ?line true = orber_tc:check_tc(orber_tc:short()),
- ?line code(orber_tc:short()),
+ true = orber_tc:check_tc(orber_tc:short()),
+ code(orber_tc:short()),
ok.
%%-----------------------------------------------------------------
%% Test Case: unsigned short integer test
%% Description:
%%-----------------------------------------------------------------
-ushort(doc) -> [];
-ushort(suite) -> [];
ushort(_) ->
- ?line true = orber_tc:check_tc(orber_tc:unsigned_short()),
- ?line code(orber_tc:unsigned_short()),
+ true = orber_tc:check_tc(orber_tc:unsigned_short()),
+ code(orber_tc:unsigned_short()),
ok.
%%-----------------------------------------------------------------
%% Test Case: long integer test
%% Description:
%%-----------------------------------------------------------------
-long(doc) -> [];
-long(suite) -> [];
long(_) ->
- ?line true = orber_tc:check_tc(orber_tc:long()),
- ?line code(orber_tc:long()),
+ true = orber_tc:check_tc(orber_tc:long()),
+ code(orber_tc:long()),
ok.
%%-----------------------------------------------------------------
%% Test Case: unsigned long integer test
%% Description:
%%-----------------------------------------------------------------
-ulong(doc) -> [];
-ulong(suite) -> [];
ulong(_) ->
- ?line true = orber_tc:check_tc(orber_tc:unsigned_long()),
- ?line code(orber_tc:unsigned_long()),
+ true = orber_tc:check_tc(orber_tc:unsigned_long()),
+ code(orber_tc:unsigned_long()),
ok.
@@ -253,22 +241,18 @@ ulong(_) ->
%% Test Case: long integer test
%% Description:
%%-----------------------------------------------------------------
-longlong(doc) -> [];
-longlong(suite) -> [];
longlong(_) ->
- ?line true = orber_tc:check_tc(orber_tc:long_long()),
- ?line code(orber_tc:long_long()),
+ true = orber_tc:check_tc(orber_tc:long_long()),
+ code(orber_tc:long_long()),
ok.
%%-----------------------------------------------------------------
%% Test Case: unsigned long integer test
%% Description:
%%-----------------------------------------------------------------
-ulonglong(doc) -> [];
-ulonglong(suite) -> [];
ulonglong(_) ->
- ?line true = orber_tc:check_tc(orber_tc:unsigned_long_long()),
- ?line code(orber_tc:unsigned_long_long()),
+ true = orber_tc:check_tc(orber_tc:unsigned_long_long()),
+ code(orber_tc:unsigned_long_long()),
ok.
@@ -276,110 +260,90 @@ ulonglong(_) ->
%% Test Case: float test
%% Description:
%%-----------------------------------------------------------------
-float(doc) -> [];
-float(suite) -> [];
float(_) ->
- ?line true = orber_tc:check_tc(orber_tc:'float'()),
- ?line code(orber_tc:'float'()),
+ true = orber_tc:check_tc(orber_tc:'float'()),
+ code(orber_tc:'float'()),
ok.
%%-----------------------------------------------------------------
%% Test Case: double test
%% Description:
%%-----------------------------------------------------------------
-double(doc) -> [];
-double(suite) -> [];
double(_) ->
- ?line true = orber_tc:check_tc(orber_tc:double()),
- ?line code(orber_tc:double()),
+ true = orber_tc:check_tc(orber_tc:double()),
+ code(orber_tc:double()),
ok.
%%-----------------------------------------------------------------
%% Test Case: longdouble test
%% Description:
%%-----------------------------------------------------------------
-longdouble(doc) -> [];
-longdouble(suite) -> [];
longdouble(_) ->
- ?line true = orber_tc:check_tc(orber_tc:longdouble()),
- ?line code(orber_tc:longdouble()),
+ true = orber_tc:check_tc(orber_tc:longdouble()),
+ code(orber_tc:longdouble()),
ok.
%%-----------------------------------------------------------------
%% Test Case: boolean test
%% Description:
%%-----------------------------------------------------------------
-boolean(doc) -> [];
-boolean(suite) -> [];
boolean(_) ->
- ?line true = orber_tc:check_tc(orber_tc:boolean()),
- ?line code(orber_tc:boolean()),
+ true = orber_tc:check_tc(orber_tc:boolean()),
+ code(orber_tc:boolean()),
ok.
%%-----------------------------------------------------------------
%% Test Case: character test
%% Description:
%%-----------------------------------------------------------------
-char(doc) -> [];
-char(suite) -> [];
char(_) ->
- ?line true = orber_tc:check_tc(orber_tc:char()),
- ?line code(orber_tc:char()),
+ true = orber_tc:check_tc(orber_tc:char()),
+ code(orber_tc:char()),
ok.
%%-----------------------------------------------------------------
%% Test Case: character test
%% Description:
%%-----------------------------------------------------------------
-wchar(doc) -> [];
-wchar(suite) -> [];
wchar(_) ->
- ?line true = orber_tc:check_tc(orber_tc:wchar()),
- ?line code(orber_tc:wchar()),
+ true = orber_tc:check_tc(orber_tc:wchar()),
+ code(orber_tc:wchar()),
ok.
%%-----------------------------------------------------------------
%% Test Case: octet test
%% Description:
%%-----------------------------------------------------------------
-octet(doc) -> [];
-octet(suite) -> [];
octet(_) ->
- ?line true = orber_tc:check_tc(orber_tc:octet()),
- ?line code(orber_tc:octet()),
+ true = orber_tc:check_tc(orber_tc:octet()),
+ code(orber_tc:octet()),
ok.
%%-----------------------------------------------------------------
%% Test Case: any test
%% Description:
%%-----------------------------------------------------------------
-any(doc) -> [];
-any(suite) -> [];
any(_) ->
- ?line true = orber_tc:check_tc(orber_tc:any()),
- ?line code(orber_tc:any()),
+ true = orber_tc:check_tc(orber_tc:any()),
+ code(orber_tc:any()),
ok.
%%-----------------------------------------------------------------
%% Test Case: typecode test
%% Description:
%%-----------------------------------------------------------------
-typecode(doc) -> [];
-typecode(suite) -> [];
typecode(_) ->
- ?line true = orber_tc:check_tc(orber_tc:typecode()),
- ?line code(orber_tc:typecode()),
+ true = orber_tc:check_tc(orber_tc:typecode()),
+ code(orber_tc:typecode()),
ok.
%%-----------------------------------------------------------------
%% Test Case: principal test
%% Description:
%%-----------------------------------------------------------------
-principal(doc) -> [];
-principal(suite) -> [];
principal(_) ->
- ?line true = orber_tc:check_tc(orber_tc:principal()),
- ?line code(orber_tc:principal()),
+ true = orber_tc:check_tc(orber_tc:principal()),
+ code(orber_tc:principal()),
ok.
@@ -387,62 +351,56 @@ principal(_) ->
%% Test Case: object_reference test
%% Description:
%%-----------------------------------------------------------------
-object_reference(doc) -> [];
-object_reference(suite) -> [];
object_reference(_) ->
- ?line true = orber_tc:check_tc(orber_tc:object_reference("Id", "Name")),
- ?line false = orber_tc:check_tc(orber_tc:object_reference(42, "Name")),
- ?line false = orber_tc:check_tc(orber_tc:object_reference("Id", 42)),
- ?line code(orber_tc:object_reference("Id", "Name")),
- ?line ?match(code(orber_tc:object_reference(42, "Name"))),
- ?line ?match(code(orber_tc:object_reference("Id", 42))),
+ true = orber_tc:check_tc(orber_tc:object_reference("Id", "Name")),
+ false = orber_tc:check_tc(orber_tc:object_reference(42, "Name")),
+ false = orber_tc:check_tc(orber_tc:object_reference("Id", 42)),
+ code(orber_tc:object_reference("Id", "Name")),
+ ?match(code(orber_tc:object_reference(42, "Name"))),
+ ?match(code(orber_tc:object_reference("Id", 42))),
ok.
%%-----------------------------------------------------------------
%% Test Case: struct
%% Description:
%%-----------------------------------------------------------------
-struct(doc) -> [];
-struct(suite) -> [];
struct(_) ->
- ?line true = orber_tc:check_tc(orber_tc:struct("Id", "Name", ?ELIST)),
- ?line false = orber_tc:check_tc(orber_tc:struct(42, "Name", ?ELIST)),
- ?line false = orber_tc:check_tc(orber_tc:struct("Id", false, ?ELIST)),
- ?line false = orber_tc:check_tc(orber_tc:struct("Id", "Name", ?VELIST)),
- ?line false = orber_tc:check_tc(orber_tc:struct("Id", "Name", "wrong")),
- ?line code(orber_tc:struct("Id", "Name", ?ELIST)),
- ?line ?match(code(orber_tc:struct(42, "Name", ?ELIST))),
- ?line ?match(code(orber_tc:struct("Id", false, ?ELIST))),
- ?line ?match(code(orber_tc:struct("Id", "Name", ?VELIST))),
- ?line ?match(code(orber_tc:struct("Id", "Name", "wrong"))),
+ true = orber_tc:check_tc(orber_tc:struct("Id", "Name", ?ELIST)),
+ false = orber_tc:check_tc(orber_tc:struct(42, "Name", ?ELIST)),
+ false = orber_tc:check_tc(orber_tc:struct("Id", false, ?ELIST)),
+ false = orber_tc:check_tc(orber_tc:struct("Id", "Name", ?VELIST)),
+ false = orber_tc:check_tc(orber_tc:struct("Id", "Name", "wrong")),
+ code(orber_tc:struct("Id", "Name", ?ELIST)),
+ ?match(code(orber_tc:struct(42, "Name", ?ELIST))),
+ ?match(code(orber_tc:struct("Id", false, ?ELIST))),
+ ?match(code(orber_tc:struct("Id", "Name", ?VELIST))),
+ ?match(code(orber_tc:struct("Id", "Name", "wrong"))),
ok.
%%-----------------------------------------------------------------
%% Test Case: union
%% Description:
%%-----------------------------------------------------------------
-union(doc) -> [];
-union(suite) -> [];
union(_) ->
- ?line true = orber_tc:check_tc(orber_tc:union("Id", "Name", orber_tc:long(),
+ true = orber_tc:check_tc(orber_tc:union("Id", "Name", orber_tc:long(),
-1, [{1, "long", orber_tc:long()},
{2, "longlong", orber_tc:long()}])),
- ?line false = orber_tc:check_tc(orber_tc:union("Id", "Name", orber_tc:long(),
+ false = orber_tc:check_tc(orber_tc:union("Id", "Name", orber_tc:long(),
-1, ?ELIST)),
- ?line false = orber_tc:check_tc(orber_tc:union(42, "Name", orber_tc:long(),
+ false = orber_tc:check_tc(orber_tc:union(42, "Name", orber_tc:long(),
-1, [{1, "long", orber_tc:long()},
{2, "longlong", orber_tc:long()}])),
- ?line false = orber_tc:check_tc(orber_tc:union("Id", false, orber_tc:long(),
+ false = orber_tc:check_tc(orber_tc:union("Id", false, orber_tc:long(),
-1, [{1, "long", orber_tc:long()},
{2, "longlong", orber_tc:long()}])),
- ?line false = orber_tc:check_tc(orber_tc:union("Id", "Name", bad_tc,
+ false = orber_tc:check_tc(orber_tc:union("Id", "Name", bad_tc,
-1, [{1, "long", orber_tc:long()},
{2, "longlong", orber_tc:long()}])),
- ?line false = orber_tc:check_tc(orber_tc:union("Id", "Name", orber_tc:long(),
+ false = orber_tc:check_tc(orber_tc:union("Id", "Name", orber_tc:long(),
"wrong", [{1, "long", orber_tc:long()},
{2, "longlong", orber_tc:long()}])),
- ?line code(orber_tc:union("Id", "Name", orber_tc:long(),
+ code(orber_tc:union("Id", "Name", orber_tc:long(),
-1, [{1, "long", orber_tc:long()},
{2, "longlong", orber_tc:long()}])),
ok.
@@ -452,109 +410,95 @@ union(_) ->
%% Test Case: enum test
%% Description:
%%-----------------------------------------------------------------
-enum(doc) -> [];
-enum(suite) -> [];
enum(_) ->
- ?line true = orber_tc:check_tc(orber_tc:enum("Id", "Name",
+ true = orber_tc:check_tc(orber_tc:enum("Id", "Name",
["E1", "E2", "E3"])),
- ?line false = orber_tc:check_tc(orber_tc:enum(42, "Name",
+ false = orber_tc:check_tc(orber_tc:enum(42, "Name",
["E1", "E2", "E3"])),
- ?line false = orber_tc:check_tc(orber_tc:enum("Id", false,
+ false = orber_tc:check_tc(orber_tc:enum("Id", false,
["E1", "E2", "E3"])),
- ?line false = orber_tc:check_tc(orber_tc:enum("Id", "Name",
+ false = orber_tc:check_tc(orber_tc:enum("Id", "Name",
["E1", false, "E3"])),
- ?line code(orber_tc:enum("Id", "Name", ["E1", "E2", "E3"])),
- ?line ?match(code(orber_tc:enum(false, "Name", ["E1", "E2", "E3"]))),
- ?line ?match(code(orber_tc:enum("Id", 42, ["E1", "E2", "E3"]))),
- ?line ?match(code(orber_tc:enum("Id", "Name", ["E1", false, "E3"]))),
+ code(orber_tc:enum("Id", "Name", ["E1", "E2", "E3"])),
+ ?match(code(orber_tc:enum(false, "Name", ["E1", "E2", "E3"]))),
+ ?match(code(orber_tc:enum("Id", 42, ["E1", "E2", "E3"]))),
+ ?match(code(orber_tc:enum("Id", "Name", ["E1", false, "E3"]))),
ok.
%%-----------------------------------------------------------------
%% Test Case: string
%% Description:
%%-----------------------------------------------------------------
-string(doc) -> [];
-string(suite) -> [];
string(_) ->
- ?line true = orber_tc:check_tc(orber_tc:string(0)),
- ?line true = orber_tc:check_tc(orber_tc:string(1)),
- ?line false = orber_tc:check_tc(orber_tc:string("wrong")),
- ?line code(orber_tc:string(0)),
- ?line code(orber_tc:string(1)),
- ?line ?match(code(orber_tc:string(-1))),
- ?line ?match(code(orber_tc:string(?ULONGMAX+1))),
- ?line ?match(code(orber_tc:string("wrong"))),
+ true = orber_tc:check_tc(orber_tc:string(0)),
+ true = orber_tc:check_tc(orber_tc:string(1)),
+ false = orber_tc:check_tc(orber_tc:string("wrong")),
+ code(orber_tc:string(0)),
+ code(orber_tc:string(1)),
+ ?match(code(orber_tc:string(-1))),
+ ?match(code(orber_tc:string(?ULONGMAX+1))),
+ ?match(code(orber_tc:string("wrong"))),
ok.
%%-----------------------------------------------------------------
%% Test Case: wstring
%% Description:
%%-----------------------------------------------------------------
-wstring(doc) -> [];
-wstring(suite) -> [];
wstring(_) ->
- ?line true = orber_tc:check_tc(orber_tc:wstring(0)),
- ?line true = orber_tc:check_tc(orber_tc:wstring(1)),
- ?line false = orber_tc:check_tc(orber_tc:wstring("wrong")),
- ?line code(orber_tc:wstring(0)),
- ?line code(orber_tc:wstring(1)),
- ?line ?match(code(orber_tc:wstring(-1))),
- ?line ?match(code(orber_tc:wstring(?ULONGMAX+1))),
- ?line ?match(code(orber_tc:wstring(false))),
+ true = orber_tc:check_tc(orber_tc:wstring(0)),
+ true = orber_tc:check_tc(orber_tc:wstring(1)),
+ false = orber_tc:check_tc(orber_tc:wstring("wrong")),
+ code(orber_tc:wstring(0)),
+ code(orber_tc:wstring(1)),
+ ?match(code(orber_tc:wstring(-1))),
+ ?match(code(orber_tc:wstring(?ULONGMAX+1))),
+ ?match(code(orber_tc:wstring(false))),
ok.
%%-----------------------------------------------------------------
%% Test Case: sequence
%% Description:
%%-----------------------------------------------------------------
-sequence(doc) -> [];
-sequence(suite) -> [];
sequence(_) ->
- ?line true = orber_tc:check_tc(orber_tc:sequence(orber_tc:struct("Id", "Name", ?ELIST), 0)),
- ?line code(orber_tc:sequence(orber_tc:struct("Id", "Name", ?ELIST), 0)),
+ true = orber_tc:check_tc(orber_tc:sequence(orber_tc:struct("Id", "Name", ?ELIST), 0)),
+ code(orber_tc:sequence(orber_tc:struct("Id", "Name", ?ELIST), 0)),
ok.
%%-----------------------------------------------------------------
%% Test Case: array
%% Description:
%%-----------------------------------------------------------------
-array(doc) -> [];
-array(suite) -> [];
array(_) ->
- ?line true = orber_tc:check_tc(orber_tc:array(orber_tc:struct("Id", "Name", ?ELIST), 1)),
- ?line code(orber_tc:array(orber_tc:struct("Id", "Name", ?ELIST), 1)),
+ true = orber_tc:check_tc(orber_tc:array(orber_tc:struct("Id", "Name", ?ELIST), 1)),
+ code(orber_tc:array(orber_tc:struct("Id", "Name", ?ELIST), 1)),
ok.
%%-----------------------------------------------------------------
%% Test Case: alias
%% Description:
%%-----------------------------------------------------------------
-alias(doc) -> [];
-alias(suite) -> [];
alias(_) ->
- ?line true = orber_tc:check_tc(orber_tc:alias("Id", "Name", orber_tc:struct("Id", "Name", ?ELIST))),
- ?line false = orber_tc:check_tc(orber_tc:alias(false, "Name", orber_tc:struct("Id", "Name", ?ELIST))),
- ?line false = orber_tc:check_tc(orber_tc:alias("Id", 42, orber_tc:struct("Id", "Name", ?ELIST))),
- ?line false = orber_tc:check_tc(orber_tc:alias("Id", "Name", "wrong")),
- ?line code(orber_tc:alias("Id", "Name", orber_tc:struct("Id", "Name", ?ELIST))),
- ?line ?match(code(orber_tc:alias("Id", "Name", orber_tc:struct("Id", "Name", ?VELIST)))),
+ true = orber_tc:check_tc(orber_tc:alias("Id", "Name", orber_tc:struct("Id", "Name", ?ELIST))),
+ false = orber_tc:check_tc(orber_tc:alias(false, "Name", orber_tc:struct("Id", "Name", ?ELIST))),
+ false = orber_tc:check_tc(orber_tc:alias("Id", 42, orber_tc:struct("Id", "Name", ?ELIST))),
+ false = orber_tc:check_tc(orber_tc:alias("Id", "Name", "wrong")),
+ code(orber_tc:alias("Id", "Name", orber_tc:struct("Id", "Name", ?ELIST))),
+ ?match(code(orber_tc:alias("Id", "Name", orber_tc:struct("Id", "Name", ?VELIST)))),
ok.
%%-----------------------------------------------------------------
%% Test Case: exception
%% Description:
%%-----------------------------------------------------------------
-exception(doc) -> [];
-exception(suite) -> [];
exception(_) ->
- ?line true = orber_tc:check_tc(orber_tc:exception("Id", "Name", ?ELIST)),
- ?line false = orber_tc:check_tc(orber_tc:exception(42, "Name", ?ELIST)),
- ?line false = orber_tc:check_tc(orber_tc:exception("Id", false, ?ELIST)),
- ?line false = orber_tc:check_tc(orber_tc:exception("Id", "Name", "wrong")),
- ?line code(orber_tc:exception("Id", "Name", ?ELIST)),
- ?line ?match(code(orber_tc:exception(42, "Name", ?ELIST))),
- ?line ?match(code(orber_tc:exception("Id", false, ?ELIST))),
- ?line ?match(code(orber_tc:exception("Id", "Name", "wrong"))),
+ true = orber_tc:check_tc(orber_tc:exception("Id", "Name", ?ELIST)),
+ false = orber_tc:check_tc(orber_tc:exception(42, "Name", ?ELIST)),
+ false = orber_tc:check_tc(orber_tc:exception("Id", false, ?ELIST)),
+ false = orber_tc:check_tc(orber_tc:exception("Id", "Name", "wrong")),
+ code(orber_tc:exception("Id", "Name", ?ELIST)),
+ ?match(code(orber_tc:exception(42, "Name", ?ELIST))),
+ ?match(code(orber_tc:exception("Id", false, ?ELIST))),
+ ?match(code(orber_tc:exception("Id", "Name", "wrong"))),
ok.
@@ -562,86 +506,76 @@ exception(_) ->
%% Test Case: fixed
%% Description:
%%-----------------------------------------------------------------
-fixed(doc) -> [];
-fixed(suite) -> [];
fixed(_) ->
- ?line true = orber_tc:check_tc(orber_tc:fixed(25, 2)),
- ?line code(orber_tc:fixed(25, 2)),
+ true = orber_tc:check_tc(orber_tc:fixed(25, 2)),
+ code(orber_tc:fixed(25, 2)),
ok.
%%-----------------------------------------------------------------
%% Test Case: value
%% Description:
%%-----------------------------------------------------------------
-value(doc) -> [];
-value(suite) -> [];
value(_) ->
- ?line true = orber_tc:check_tc(orber_tc:value("Id", "Name", 42,
+ true = orber_tc:check_tc(orber_tc:value("Id", "Name", 42,
orber_tc:fixed(25, 2), ?VELIST)),
- ?line false = orber_tc:check_tc(orber_tc:value(42, "Name", 42,
+ false = orber_tc:check_tc(orber_tc:value(42, "Name", 42,
orber_tc:fixed(25, 2), ?VELIST)),
- ?line false = orber_tc:check_tc(orber_tc:value("Id", 42, 42,
+ false = orber_tc:check_tc(orber_tc:value("Id", 42, 42,
orber_tc:fixed(25, 2), ?VELIST)),
- ?line false = orber_tc:check_tc(orber_tc:value("Id", "Name", "wrong",
+ false = orber_tc:check_tc(orber_tc:value("Id", "Name", "wrong",
orber_tc:fixed(25, 2), ?VELIST)),
- ?line false = orber_tc:check_tc(orber_tc:value("Id", "Name", "42",
+ false = orber_tc:check_tc(orber_tc:value("Id", "Name", "42",
orber_tc:fixed(25, 2), ?VELIST)),
- ?line false = orber_tc:check_tc(orber_tc:value("Id", "Name", "42",
+ false = orber_tc:check_tc(orber_tc:value("Id", "Name", "42",
?VELIST, ?VELIST)),
- ?line false = orber_tc:check_tc(orber_tc:value("Id", "Name", "42",
+ false = orber_tc:check_tc(orber_tc:value("Id", "Name", "42",
orber_tc:fixed(25, 2), false)),
- ?line code(orber_tc:value("Id", "Name", 42, orber_tc:long(), ?VELIST)),
+ code(orber_tc:value("Id", "Name", 42, orber_tc:long(), ?VELIST)),
ok.
%%-----------------------------------------------------------------
%% Test Case: value_box
%% Description:
%%-----------------------------------------------------------------
-value_box(doc) -> [];
-value_box(suite) -> [];
value_box(_) ->
- ?line true = orber_tc:check_tc(orber_tc:value_box("Id", "Name",
+ true = orber_tc:check_tc(orber_tc:value_box("Id", "Name",
orber_tc:fixed(25, 2))),
- ?line false = orber_tc:check_tc(orber_tc:value_box(42, "Name",
+ false = orber_tc:check_tc(orber_tc:value_box(42, "Name",
orber_tc:fixed(25, 2))),
- ?line false = orber_tc:check_tc(orber_tc:value_box("Id", 42,
+ false = orber_tc:check_tc(orber_tc:value_box("Id", 42,
orber_tc:fixed(25, 2))),
- ?line false = orber_tc:check_tc(orber_tc:value_box("Id", "Name", "wrong")),
- ?line code(orber_tc:value_box("Id", "Name", orber_tc:long())),
- ?line ?match(code(orber_tc:value_box(42, "Name", orber_tc:short()))),
- ?line ?match(code(orber_tc:value_box("Id", 42, orber_tc:char()))),
- ?line ?match(code(orber_tc:value_box("Id", "Name", false))),
+ false = orber_tc:check_tc(orber_tc:value_box("Id", "Name", "wrong")),
+ code(orber_tc:value_box("Id", "Name", orber_tc:long())),
+ ?match(code(orber_tc:value_box(42, "Name", orber_tc:short()))),
+ ?match(code(orber_tc:value_box("Id", 42, orber_tc:char()))),
+ ?match(code(orber_tc:value_box("Id", "Name", false))),
ok.
%%-----------------------------------------------------------------
%% Test Case: native
%% Description:
%%-----------------------------------------------------------------
-native(doc) -> [];
-native(suite) -> [];
native(_) ->
- ?line true = orber_tc:check_tc(orber_tc:native("Id", "Name")),
- ?line false = orber_tc:check_tc(orber_tc:native(42, "Name")),
- ?line false = orber_tc:check_tc(orber_tc:native("Id", 42)),
- ?line code(orber_tc:native("Id", "Name")),
- ?line ?match(code(orber_tc:native(42, "Name"))),
- ?line ?match(code(orber_tc:native("Id", 42))),
+ true = orber_tc:check_tc(orber_tc:native("Id", "Name")),
+ false = orber_tc:check_tc(orber_tc:native(42, "Name")),
+ false = orber_tc:check_tc(orber_tc:native("Id", 42)),
+ code(orber_tc:native("Id", "Name")),
+ ?match(code(orber_tc:native(42, "Name"))),
+ ?match(code(orber_tc:native("Id", 42))),
ok.
%%-----------------------------------------------------------------
%% Test Case: abstract_interface
%% Description:
%%-----------------------------------------------------------------
-abstract_interface(doc) -> [];
-abstract_interface(suite) -> [];
abstract_interface(_) ->
- ?line true = orber_tc:check_tc(orber_tc:abstract_interface("RepId", "Name")),
- ?line false = orber_tc:check_tc(orber_tc:abstract_interface(false, "Name")),
- ?line false = orber_tc:check_tc(orber_tc:abstract_interface("RepId", 42)),
- ?line code(orber_tc:abstract_interface("RepId", "Name")),
- ?line ?match(code(orber_tc:abstract_interface(42, "Name"))),
- ?line ?match(code(orber_tc:abstract_interface("Id", 42))),
+ true = orber_tc:check_tc(orber_tc:abstract_interface("RepId", "Name")),
+ false = orber_tc:check_tc(orber_tc:abstract_interface(false, "Name")),
+ false = orber_tc:check_tc(orber_tc:abstract_interface("RepId", 42)),
+ code(orber_tc:abstract_interface("RepId", "Name")),
+ ?match(code(orber_tc:abstract_interface(42, "Name"))),
+ ?match(code(orber_tc:abstract_interface("Id", 42))),
ok.
@@ -650,22 +584,18 @@ abstract_interface(_) ->
%% Test Case: indirection
%% Description:
%%-----------------------------------------------------------------
-indirection(doc) -> [];
-indirection(suite) -> [];
indirection(_) ->
- ?line true = orber_tc:check_tc({'none', 42}),
+ true = orber_tc:check_tc({'none', 42}),
ok.
%%-----------------------------------------------------------------
%% Test Case: get_tc
%% Description:
%%-----------------------------------------------------------------
-get_tc(doc) -> [];
-get_tc(suite) -> [];
get_tc(_) ->
TC = 'CosNaming_Binding':tc(),
- ?line TC = orber_tc:get_tc({'CosNaming_Binding', 42}),
- ?line ?match(orber_tc:get_tc({'none', 42})),
+ TC = orber_tc:get_tc({'CosNaming_Binding', 42}),
+ ?match(orber_tc:get_tc({'none', 42})),
ok.
%%-----------------------------------------------------------------
diff --git a/lib/orber/vsn.mk b/lib/orber/vsn.mk
index 4947315ad0..dcb2c985a3 100644
--- a/lib/orber/vsn.mk
+++ b/lib/orber/vsn.mk
@@ -1 +1 @@
-ORBER_VSN = 3.8.1
+ORBER_VSN = 3.8.2
diff --git a/lib/os_mon/doc/src/notes.xml b/lib/os_mon/doc/src/notes.xml
index c565df7f3b..e6e80b046d 100644
--- a/lib/os_mon/doc/src/notes.xml
+++ b/lib/os_mon/doc/src/notes.xml
@@ -31,6 +31,40 @@
</header>
<p>This document describes the changes made to the OS_Mon application.</p>
+<section><title>Os_Mon 2.4.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix type specification for cpu_sup:util/1</p>
+ <p>
+ Own Id: OTP-13526 Aux Id: PR-1029 </p>
+ </item>
+ <item>
+ <p>
+ Fix strict compilation on SUN/SPARC</p>
+ <p>
+ Own Id: OTP-13548 Aux Id: PR-1046 </p>
+ </item>
+ <item>
+ <p>
+ Implement cpu_sup:util/0,1 on Mac OSX</p>
+ <p>
+ Own Id: OTP-13597 Aux Id: PR-1049 </p>
+ </item>
+ <item>
+ <p>
+ Fix memsup:get_os_wordsize() on 64-bit FreeBSD and 64-bit
+ Linux PPC</p>
+ <p>
+ Own Id: OTP-13601 Aux Id: PR-1039 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Os_Mon 2.4</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/os_mon/vsn.mk b/lib/os_mon/vsn.mk
index 7f2667e40a..1ac0fb1d27 100644
--- a/lib/os_mon/vsn.mk
+++ b/lib/os_mon/vsn.mk
@@ -1 +1 @@
-OS_MON_VSN = 2.4
+OS_MON_VSN = 2.4.1
diff --git a/lib/otp_mibs/doc/src/notes.xml b/lib/otp_mibs/doc/src/notes.xml
index 7beac5ffcb..dbd2f47ffb 100644
--- a/lib/otp_mibs/doc/src/notes.xml
+++ b/lib/otp_mibs/doc/src/notes.xml
@@ -32,6 +32,21 @@
<p>This document describes the changes made to the OTP_Mibs
application.</p>
+<section><title>Otp_Mibs 1.1.1</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Otp_Mibs 1.1</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/otp_mibs/vsn.mk b/lib/otp_mibs/vsn.mk
index 38436d363e..7a793007ee 100644
--- a/lib/otp_mibs/vsn.mk
+++ b/lib/otp_mibs/vsn.mk
@@ -1,4 +1,4 @@
-OTP_MIBS_VSN = 1.1
+OTP_MIBS_VSN = 1.1.1
# Note: The branch 'otp_mibs' is defunct as of otp_mibs-1.0.4 and
# should NOT be used again.
diff --git a/lib/parsetools/doc/src/notes.xml b/lib/parsetools/doc/src/notes.xml
index 06d66e28c3..b826b4d03a 100644
--- a/lib/parsetools/doc/src/notes.xml
+++ b/lib/parsetools/doc/src/notes.xml
@@ -31,6 +31,21 @@
</header>
<p>This document describes the changes made to the Parsetools application.</p>
+<section><title>Parsetools 2.1.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Parsetools 2.1.1</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/parsetools/vsn.mk b/lib/parsetools/vsn.mk
index de3da23c8a..befdd82d6e 100644
--- a/lib/parsetools/vsn.mk
+++ b/lib/parsetools/vsn.mk
@@ -1 +1 @@
-PARSETOOLS_VSN = 2.1.1
+PARSETOOLS_VSN = 2.1.2
diff --git a/lib/percept/doc/src/notes.xml b/lib/percept/doc/src/notes.xml
index 750dcb6cf5..c9d5d3ae29 100644
--- a/lib/percept/doc/src/notes.xml
+++ b/lib/percept/doc/src/notes.xml
@@ -33,6 +33,35 @@
</header>
<p>This document describes the changes made to the Percept application.</p>
+<section><title>Percept 0.9</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Remove deprecated <c>erlang:now/0</c> calls</p>
+ <p>
+ Own Id: OTP-13422</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Improve line implementation</p>
+ <p>
+ Add capabilities for line thickness and anti-aliasing.</p>
+ <p>
+ Own Id: OTP-13598</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Percept 0.8.11</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/percept/vsn.mk b/lib/percept/vsn.mk
index 833ab35aa5..614cee8645 100644
--- a/lib/percept/vsn.mk
+++ b/lib/percept/vsn.mk
@@ -1 +1 @@
-PERCEPT_VSN = 0.8.11
+PERCEPT_VSN = 0.9
diff --git a/lib/public_key/doc/src/notes.xml b/lib/public_key/doc/src/notes.xml
index 49b2ba0326..c4d930c01f 100644
--- a/lib/public_key/doc/src/notes.xml
+++ b/lib/public_key/doc/src/notes.xml
@@ -35,6 +35,34 @@
<file>notes.xml</file>
</header>
+<section><title>Public_Key 1.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The ASN-1 type GeneralName can have more values, then the
+ most common directory name, the code now handles this.</p>
+ <p>
+ Own Id: OTP-13554</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Handle PEM encoded EC public keys</p>
+ <p>
+ Own Id: OTP-13408</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Public_Key 1.1.1</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/public_key/doc/src/public_key.xml b/lib/public_key/doc/src/public_key.xml
index 74bb06b9b2..385604677c 100644
--- a/lib/public_key/doc/src/public_key.xml
+++ b/lib/public_key/doc/src/public_key.xml
@@ -839,6 +839,7 @@ fun(#'DistributionPoint'{}, #'CertificateList'{},
<func>
<name>short_name_hash(Name) -> string()</name>
+ <fsummary>Generates a short hash of an issuer name.</fsummary>
<type>
<v>Name = issuer_name()</v>
</type>
diff --git a/lib/public_key/vsn.mk b/lib/public_key/vsn.mk
index f801f55073..84f6a659b5 100644
--- a/lib/public_key/vsn.mk
+++ b/lib/public_key/vsn.mk
@@ -1 +1 @@
-PUBLIC_KEY_VSN = 1.1.1
+PUBLIC_KEY_VSN = 1.2
diff --git a/lib/reltool/doc/src/notes.xml b/lib/reltool/doc/src/notes.xml
index 0a83954865..6df4924d0a 100644
--- a/lib/reltool/doc/src/notes.xml
+++ b/lib/reltool/doc/src/notes.xml
@@ -38,7 +38,24 @@
thus constitutes one section in this document. The title of each
section is the version number of Reltool.</p>
- <section><title>Reltool 0.7</title>
+ <section><title>Reltool 0.7.1</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> Modify the code as motivated by a change of the
+ Erlang Parser (<c>undefined</c> is no longer
+ automatically inserted to the type of record fields
+ without an initializer). </p>
+ <p>
+ Own Id: OTP-13033 Aux Id: OTP-12719 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Reltool 0.7</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/reltool/src/reltool_server.erl b/lib/reltool/src/reltool_server.erl
index 21a4485f94..89e90670cf 100644
--- a/lib/reltool/src/reltool_server.erl
+++ b/lib/reltool/src/reltool_server.erl
@@ -530,9 +530,14 @@ analyse(#state{sys=Sys} = S, Apps, Status) ->
%% Write all #app to app_tab and all #mod to mod_tab.
Status2 = apps_init_is_included(S, Apps, RelApps, Status),
+ %% For each application that is not (directly or indirectly) part
+ %% of a release, but still has #app.is_included==true, propagate
+ %% is_included to the dependencies specified in the .app files.
+ app_propagate_is_included(S),
+
%% For each module that has #mod.is_included==true, propagate
%% is_included to the modules it uses.
- propagate_is_included(S),
+ mod_propagate_is_included(S),
%% Insert reverse dependencies - i.e. for each
%% #mod{name=Mod, uses_mods=[UsedMod]},
@@ -565,31 +570,34 @@ apps_in_rels(Rels, Apps) ->
apps_in_rel(#rel{name = RelName, rel_apps = RelApps}, Apps) ->
Mandatory = [{RelName, kernel}, {RelName, stdlib}],
- Other =
+ Explicit0 = [{RelName, AppName} || #rel_app{name=AppName} <- RelApps],
+ Explicit = Mandatory ++ Explicit0,
+ Deps =
[{RelName, AppName} ||
RA <- RelApps,
- AppName <- [RA#rel_app.name |
+ AppName <-
+ case lists:keyfind(RA#rel_app.name,
+ #app.name,
+ Apps) of
+ App=#app{info = #app_info{applications = AA}} ->
%% Included applications in rel shall overwrite included
%% applications in .app. I.e. included applications in
%% .app shall only be used if it is not defined in rel.
- case RA#rel_app.incl_apps of
- undefined ->
- case lists:keyfind(RA#rel_app.name,
- #app.name,
- Apps) of
- #app{info = #app_info{incl_apps = IA}} ->
- IA;
- false ->
- reltool_utils:throw_error(
- "Release ~tp uses non existing "
- "application ~w",
- [RelName,RA#rel_app.name])
- end;
- IA ->
- IA
- end],
- not lists:keymember(AppName, 2, Mandatory)],
- more_apps_in_rels(Mandatory ++ Other, Apps, []).
+ IA = case RA#rel_app.incl_apps of
+ undefined ->
+ (App#app.info)#app_info.incl_apps;
+ RelIA ->
+ RelIA
+ end,
+ AA ++ IA;
+ false ->
+ reltool_utils:throw_error(
+ "Release ~tp uses non existing "
+ "application ~w",
+ [RelName,RA#rel_app.name])
+ end,
+ not lists:keymember(AppName, 2, Explicit)],
+ more_apps_in_rels(Deps, Apps, Explicit).
more_apps_in_rels([{RelName, AppName} = RA | RelApps], Apps, Acc) ->
case lists:member(RA, Acc) of
@@ -597,8 +605,8 @@ more_apps_in_rels([{RelName, AppName} = RA | RelApps], Apps, Acc) ->
more_apps_in_rels(RelApps, Apps, Acc);
false ->
case lists:keyfind(AppName, #app.name, Apps) of
- #app{info = #app_info{applications = InfoApps}} ->
- Extra = [{RelName, N} || N <- InfoApps],
+ #app{info = #app_info{applications = AA, incl_apps=IA}} ->
+ Extra = [{RelName, N} || N <- AA++IA],
Acc2 = more_apps_in_rels(Extra, Apps, [RA | Acc]),
more_apps_in_rels(RelApps, Apps, Acc2);
false ->
@@ -610,7 +618,6 @@ more_apps_in_rels([{RelName, AppName} = RA | RelApps], Apps, Acc) ->
more_apps_in_rels([], _Apps, Acc) ->
Acc.
-
apps_init_is_included(S, Apps, RelApps, Status) ->
lists:foldl(fun(App, AccStatus) ->
app_init_is_included(S, App, RelApps, AccStatus)
@@ -745,6 +752,100 @@ false_to_undefined(Bool) ->
_ -> Bool
end.
+get_no_rel_apps_and_dependencies(S) ->
+ ets:select(S#state.app_tab, [{#app{name='$1',
+ is_included=true,
+ info=#app_info{applications='$2',
+ incl_apps='$3',
+ _='_'},
+ rels=[],
+ _='_'},
+ [],
+ [{{'$1','$2','$3'}}]}]).
+
+app_propagate_is_included(S) ->
+ lists:foreach(
+ fun({AppName,DepNames1,DepNames2}) ->
+ app_mark_is_included(S,AppName,DepNames1++DepNames2)
+ end,
+ get_no_rel_apps_and_dependencies(S)).
+
+app_mark_is_included(#state{app_tab=AppTab, mod_tab=ModTab, sys=Sys}=S,UsedByName,[AppName|AppNames]) ->
+ case ets:lookup(AppTab, AppName) of
+ [A] ->
+ case A#app.is_included of
+ undefined ->
+ %% Not yet marked => mark and propagate
+ A2 =
+ case A#app.incl_cond of
+ include ->
+ A#app{is_pre_included = true,
+ is_included = true};
+ exclude ->
+ A#app{is_pre_included = false,
+ is_included = false};
+ AppInclCond when AppInclCond==undefined;
+ AppInclCond==derived ->
+ A#app{is_included = true}
+ end,
+ ets:insert(AppTab, A2),
+
+ ModCond =
+ case A#app.mod_cond of
+ undefined -> Sys#sys.mod_cond;
+ _ -> A#app.mod_cond
+ end,
+ Filter =
+ fun(M) ->
+ case ModCond of
+ all -> true;
+ app -> M#mod.is_app_mod;
+ ebin -> M#mod.is_ebin_mod;
+ derived -> false;
+ none -> false
+ end
+ end,
+ Mods = lists:filter(Filter, A#app.mods),
+ %% Mark the modules of this app, but no need to go
+ %% recursive on modules since this is done in
+ %% mod_mark_is_included.
+ [case M#mod.is_included of
+ undefined ->
+ M2 =
+ case M#mod.incl_cond of
+ include ->
+ M#mod{is_pre_included = true,
+ is_included = true};
+ exclude ->
+ M#mod{is_pre_included = false,
+ is_included = false};
+ ModInclCond when ModInclCond==undefined;
+ ModInclCond==derived ->
+ M#mod{is_included = true}
+ end,
+ ets:insert(ModTab, M2);
+ _ ->
+ ok
+ end || M <- Mods],
+
+ %% Go recursive on dependencies
+ #app{info=#app_info{applications=DepNames1,
+ incl_apps=DepNames2}} = A,
+ app_mark_is_included(S,AppName,DepNames1++DepNames2);
+ _ ->
+ %% Already marked
+ ok
+ end;
+ [] ->
+ %% Missing app
+ reltool_utils:throw_error(
+ "Application ~tp uses non existing application ~w",
+ [UsedByName,AppName])
+ end,
+ app_mark_is_included(S, UsedByName, AppNames);
+app_mark_is_included(_S, _UsedByName, []) ->
+ ok.
+
%% Return the list for {ModName, UsesModNames} for all modules where
%% #mod.is_included==true.
get_all_mods_and_dependencies(S) ->
@@ -755,7 +856,7 @@ get_all_mods_and_dependencies(S) ->
[],
[{{'$1','$2'}}]}]).
-propagate_is_included(S) ->
+mod_propagate_is_included(S) ->
case lists:flatmap(
fun({ModName,UsesModNames}) ->
mod_mark_is_included(S,ModName,UsesModNames,[])
diff --git a/lib/reltool/test/reltool_server_SUITE.erl b/lib/reltool/test/reltool_server_SUITE.erl
index e9bd46fb27..e8dfea94da 100644
--- a/lib/reltool/test/reltool_server_SUITE.erl
+++ b/lib/reltool/test/reltool_server_SUITE.erl
@@ -142,6 +142,7 @@ all() ->
save_config,
dependencies,
mod_incl_cond_derived,
+ dep_in_app_not_xref,
use_selected_vsn,
use_selected_vsn_relative_path,
non_standard_vsn_id,
@@ -408,7 +409,6 @@ create_release_sort(Config) ->
{app,tools,[{mod_cond,app},{incl_cond,include}]}
]},
%% Generate release
-
?msym({ok, {release, {RelName1, RelVsn},
{erts, _},
[{kernel, _},
@@ -2304,6 +2304,7 @@ dependencies(Config) ->
ok.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Test that incl_cond on mod level overwrites mod_cond on app level
%% Uses same test applications as dependencies/1 above
mod_incl_cond_derived(Config) ->
@@ -2346,6 +2347,40 @@ mod_incl_cond_derived(Config) ->
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% ERL-167, OTP-11993: For applications that are not included in a
+%% release spec ('rel'), dependencies in the .app files are not
+%% considered - only those found with xref.
+dep_in_app_not_xref(Config) ->
+ RelName = "Just testing...",
+ RelVsn = "1.0",
+ Sys =
+ {sys,
+ [
+ {lib_dirs,[filename:join(datadir(Config),"dep_in_app_not_xref")]},
+ {incl_cond,exclude},
+ {incl_archive_filters,[]},
+ {erts,[{incl_cond,exclude}]},
+ {boot_rel, RelName},
+ {rel, RelName, RelVsn, [kernel, stdlib]},
+ {app,kernel,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,x,[{incl_cond,include}]},
+ {app,y,[{incl_cond,derived}]},
+ {app,z,[{incl_cond,derived}]}
+ ]},
+
+ TargetDir = filename:join([?WORK_DIR, "target_dep_in_app_not_xref"]),
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ ?log("SPEC: ~p\n", [reltool:get_target_spec([{config, Sys}])]),
+ ok = ?m(ok, reltool:create_target([{config, Sys}], TargetDir)),
+ ?log("~p~n",[file:list_dir(filename:join([TargetDir,"lib"]))]),
+
+ ?m(true, filelib:is_dir(filename:join([TargetDir,"lib","y-1.0"]))),
+ ?m(true, filelib:is_dir(filename:join([TargetDir,"lib","z-1.0"]))),
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
use_selected_vsn(Config) ->
LibDir1 = filename:join(datadir(Config),"use_selected_vsn"),
B1Dir = filename:join(LibDir1,"b-1.0"),
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/x-1.0/ebin/x.app b/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/x-1.0/ebin/x.app
new file mode 100644
index 0000000000..fe922e3a41
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/x-1.0/ebin/x.app
@@ -0,0 +1,7 @@
+% -*-erlang-*-
+{application, x,
+ [{description, "Main application in reltool dependency test"},
+ {vsn, "1.0"},
+ {modules, [x1]},
+ {registered, []},
+ {applications, [kernel, stdlib, y]}]}.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/x-1.0/src/x1.erl b/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/x-1.0/src/x1.erl
new file mode 100644
index 0000000000..bf1e7f9279
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/x-1.0/src/x1.erl
@@ -0,0 +1,5 @@
+-module(x1).
+-compile(export_all).
+
+f() ->
+ ok.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/y-1.0/ebin/y.app b/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/y-1.0/ebin/y.app
new file mode 100644
index 0000000000..a21cfe6c21
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/y-1.0/ebin/y.app
@@ -0,0 +1,8 @@
+% -*-erlang-*-
+{application, y,
+ [{description, "Library application in reltool dependency test"},
+ {vsn, "1.0"},
+ {modules, [y1]},
+ {registered, []},
+ {applications, [kernel, stdlib]},
+ {included_applications, [z]}]}.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/y-1.0/src/y1.erl b/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/y-1.0/src/y1.erl
new file mode 100644
index 0000000000..902a7e21f3
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/y-1.0/src/y1.erl
@@ -0,0 +1,5 @@
+-module(y1).
+-compile(export_all).
+
+f() ->
+ ok.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/z-1.0/ebin/z.app b/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/z-1.0/ebin/z.app
new file mode 100644
index 0000000000..437a0968e9
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/z-1.0/ebin/z.app
@@ -0,0 +1,7 @@
+% -*-erlang-*-
+{application, z,
+ [{description, "Library application in reltool dependency test"},
+ {vsn, "1.0"},
+ {modules, [z1]},
+ {registered, []},
+ {applications, [kernel, stdlib]}]}.
diff --git a/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/z-1.0/src/z1.erl b/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/z-1.0/src/z1.erl
new file mode 100644
index 0000000000..97ef90b87f
--- /dev/null
+++ b/lib/reltool/test/reltool_server_SUITE_data/dep_in_app_not_xref/z-1.0/src/z1.erl
@@ -0,0 +1,5 @@
+-module(z1).
+-compile(export_all).
+
+f() ->
+ ok.
diff --git a/lib/reltool/vsn.mk b/lib/reltool/vsn.mk
index 733c41bc02..76f69fd294 100644
--- a/lib/reltool/vsn.mk
+++ b/lib/reltool/vsn.mk
@@ -1 +1 @@
-RELTOOL_VSN = 0.7
+RELTOOL_VSN = 0.7.1
diff --git a/lib/runtime_tools/doc/src/notes.xml b/lib/runtime_tools/doc/src/notes.xml
index 57241edbdc..6bec7cb9ca 100644
--- a/lib/runtime_tools/doc/src/notes.xml
+++ b/lib/runtime_tools/doc/src/notes.xml
@@ -32,6 +32,100 @@
<p>This document describes the changes made to the Runtime_Tools
application.</p>
+<section><title>Runtime_Tools 1.10</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix bug in dbg:trace_port/2 that could cause the trace ip
+ driver to produce faulty error reports "...(re)selected
+ before stop_select was called for driver trace_ip_drv".</p>
+ <p>
+ Own Id: OTP-13576 Aux Id: ERL-119 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add microstate accounting</p>
+ <p>
+ Microstate accounting is a way to track which state the
+ different threads within ERTS are in. The main usage area
+ is to pin point performance bottlenecks by checking which
+ states the threads are in and then from there figuring
+ out why and where to optimize.</p>
+ <p>
+ Since checking whether microstate accounting is on or off
+ is relatively expensive only a few of the states are
+ enabled by default and more states can be enabled through
+ configure.</p>
+ <p>
+ There is a convenience module called msacc that has been
+ added to runtime_tools that can assist in gathering and
+ interpreting the data from Microstate accounting.</p>
+ <p>
+ For more information see <seealso
+ marker="erts:erlang#statistics_microstate_accounting">erlang:statistics(microstate_accounting,
+ _)</seealso> and the <seealso
+ marker="runtime_tools:msacc">msacc</seealso> module in
+ runtime_tools.</p>
+ <p>
+ Own Id: OTP-12345</p>
+ </item>
+ <item>
+ <p>
+ Update observer GUI to support tracing on ports, and to
+ set matchspecs for send/receive. This required some minor
+ bugfixes in runtime_tools/dbg.</p>
+ <p>
+ Own Id: OTP-13481</p>
+ </item>
+ <item>
+ <p>
+ Update dbg and ttb to work with a tracer module as tracer
+ and tracing on ports.</p>
+ <p>
+ Own Id: OTP-13500</p>
+ </item>
+ <item>
+ <p>
+ Updated dbg to accept the new trace options
+ <c>monotonic_timestamp</c> and
+ <c>strict_monotonic_timestamp</c>.</p>
+ <p>
+ Own Id: OTP-13502</p>
+ </item>
+ <item>
+ <p>
+ Introduce LTTng tracing via Erlang tracing.</p>
+ <p>
+ For LTTng to be enabled OTP needs to be built with
+ configure option <c>--with-dynamic-trace=lttng</c>.</p>
+ <p>The dynamic trace module <c>dyntrace</c> is now
+ capable to be used as a LTTng sink for Erlang tracing.
+ For a list of all tracepoints, see <seealso
+ marker="runtime_tools:LTTng">Runtime Tools User's
+ Guide</seealso> .</p>
+ <p>This feature also introduces an incompatible change in
+ trace tags. The trace tags <c>gc_start</c> and
+ <c>gc_end</c> has been split into <c>gc_minor_start</c>,
+ <c>gc_minor_end</c> and <c>gc_major_start</c>,
+ <c>gc_major_end</c>.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-13532</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Runtime_Tools 1.9.3</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/runtime_tools/vsn.mk b/lib/runtime_tools/vsn.mk
index bfc8b84b91..b33f6f4721 100644
--- a/lib/runtime_tools/vsn.mk
+++ b/lib/runtime_tools/vsn.mk
@@ -1 +1 @@
-RUNTIME_TOOLS_VSN = 1.9.3
+RUNTIME_TOOLS_VSN = 1.10
diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml
index f07938220c..dae73f8b23 100644
--- a/lib/sasl/doc/src/notes.xml
+++ b/lib/sasl/doc/src/notes.xml
@@ -31,6 +31,23 @@
</header>
<p>This document describes the changes made to the SASL application.</p>
+<section><title>SASL 3.0</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ The module 'overload' is removed.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-13184</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>SASL 2.7</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl
index 8134e02221..10d2539b7f 100644
--- a/lib/sasl/test/release_handler_SUITE.erl
+++ b/lib/sasl/test/release_handler_SUITE.erl
@@ -1063,6 +1063,12 @@ otp_9395_check_and_purge(cleanup,_Conf) ->
%% OTP-9395 - performance problems when there are MANY processes
%% Upgrade which updates many modules (brutal_purge)
otp_9395_update_many_mods(Conf) when is_list(Conf) ->
+
+ %% "nain" is very slow - it fails this test quite often due to a
+ %% long sys call
+ %% /proc/cpuinfo: "clock: 1249MHz"
+ inet:gethostname() == {ok,"nain"} andalso throw({skip,"slow test host"}),
+
%% Set some paths
PrivDir = priv_dir(Conf),
Dir = filename:join(PrivDir,"otp_9395_update_many_mods"),
@@ -1103,6 +1109,7 @@ otp_9395_update_many_mods(Conf) when is_list(Conf) ->
[RelVsn2, filename:join(Rel2Dir, "sys.config")]),
%% First, install release directly and check how much time it takes
+ rpc:call(Node,erlang,garbage_collect,[]),
rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]),
{TInst0,{ok, _, []}} =
timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]),
@@ -1129,6 +1136,7 @@ otp_9395_update_many_mods(Conf) when is_list(Conf) ->
%% Finally install release after check and purge, and check that
%% this install was faster than the first.
rpc:call(Node,erlang,system_flag,[scheduler_wall_time,false]),
+ rpc:call(Node,erlang,garbage_collect,[]),
rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]),
{TInst2,{ok, _RelVsn1, []}} =
timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]),
@@ -1160,6 +1168,12 @@ otp_9395_update_many_mods(cleanup,_Conf) ->
%% OTP-9395 - performance problems when there are MANY processes
%% Upgrade which removes many modules (brutal_purge)
otp_9395_rm_many_mods(Conf) when is_list(Conf) ->
+
+ %% "nain" is very slow - it fails this test quite often due to a
+ %% long sys call
+ %% /proc/cpuinfo: "clock: 1249MHz"
+ inet:gethostname() == {ok,"nain"} andalso throw({skip,"slow test host"}),
+
%% Set some paths
PrivDir = priv_dir(Conf),
Dir = filename:join(PrivDir,"otp_9395_rm_many_mods"),
@@ -1200,6 +1214,7 @@ otp_9395_rm_many_mods(Conf) when is_list(Conf) ->
[RelVsn2, filename:join(Rel2Dir, "sys.config")]),
%% First, install release directly and check how much time it takes
+ rpc:call(Node,erlang,garbage_collect,[]),
rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]),
{TInst0,{ok, _, []}} =
timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]),
@@ -1226,6 +1241,7 @@ otp_9395_rm_many_mods(Conf) when is_list(Conf) ->
%% Finally install release after check and purge, and check that
%% this install was faster than the first.
rpc:call(Node,erlang,system_flag,[scheduler_wall_time,false]),
+ rpc:call(Node,erlang,garbage_collect,[]),
rpc:call(Node,erlang,system_flag,[scheduler_wall_time,true]),
{TInst2,{ok, _RelVsn1, []}} =
timer:tc(rpc,call,[Node, release_handler, install_release, [RelVsn2]]),
@@ -1761,8 +1777,6 @@ upgrade_gg(Conf) ->
Nodes1 = [Gg1,Gg3,Gg4,Gg5] =
start_nodes(Conf,[Gg1Sname,Gg3Sname,Gg4Sname,Gg5Sname],"upgrade_gg"),
- %% Give some time to synch nodes, then check global group info.
- timer:sleep(1000),
[check_gg_info(Node,Nodes1,[],Nodes1--[Node]) || Node <- Nodes1],
%% register a process on each of the nodes
@@ -1918,7 +1932,7 @@ wait_nodes_up(Nodes, Tag) ->
wait_nodes_up(Nodes0, Tag, Apps) ->
?t:format("wait_nodes_up(~p, ~p, ~p):",[Nodes0, Tag, Apps]),
Nodes = fix_nodes(Nodes0),
- wait_nodes_up(Nodes, Tag, lists:umerge(Apps,[kernel,stdlib,sasl]), 30).
+ wait_nodes_up(Nodes, Tag, lists:umerge(Apps,[kernel,stdlib,sasl]), 60).
fix_nodes([{Node,InitPid}|Nodes]) ->
[{Node,InitPid} | fix_nodes(Nodes)];
@@ -1960,7 +1974,7 @@ wait_nodes_up(Nodes, Tag, Apps, N) ->
?t:format("",[]),
ok;
_ ->
- timer:sleep(1000),
+ timer:sleep(2000),
wait_nodes_up(Pang, Tag, Apps, N-1)
end.
@@ -2449,37 +2463,27 @@ write_term_file(File,Term) ->
ok = file:write_file(File,io_lib:format("~p.~n",[Term])).
-%% Check that global group info is correct
+%% Check that global group info is correct - try again for a maximum of 5 sec
check_gg_info(Node,OtherAlive,OtherDead,Synced) ->
+ check_gg_info(Node,OtherAlive,OtherDead,Synced,5).
+
+check_gg_info(Node,OtherAlive,OtherDead,Synced,N) ->
GGI = rpc:call(Node, global_group, info, []),
GI = rpc:call(Node, global, info,[]),
try do_check_gg_info(OtherAlive,OtherDead,Synced,GGI,GI)
- catch _:E ->
- ?t:format("~ncheck_gg_info failed for ~p: ~p~nwhen GGI was: ~p~n"
- "and GI was: ~p~n",
- [Node,E,GGI,GI]),
- %% An attempt to find out if it is only a timing issue
- %% that makes this fail every now and then:
- try_again_check(Node,GGI,GI,1),
- ?t:fail("check_gg_info failed")
- end.
-
-try_again_check(_Node,_GGI,_GI,6) ->
- ok;
-try_again_check(Node,GGI,GI,N) ->
- timer:sleep(1000),
- case {rpc:call(Node,global_group,info,[]),
- rpc:call(Node,global,info,[])} of
- {GGI,GI} ->
- ?t:format("~nAfter one more sek, GGI and GI are still the same"),
- try_again_check(Node,GGI,GI,N+1);
- {NewGGI,NewGI} ->
- ?t:format("~nAfter one more sek:~nNew GGI: ~p~nNew GI: ~p~n",
- [NewGGI,NewGI]),
- try_again_check(Node,NewGGI,NewGI,N+1)
+ catch _:E when N==0 ->
+ ?t:format("~nERROR: check_gg_info failed for ~p:~n~p~n"
+ "when GGI was: ~p~nand GI was: ~p~n",
+ [Node,{E,erlang:get_stacktrace()},GGI,GI]),
+ ?t:fail("check_gg_info failed");
+ _:E ->
+ ?t:format("~nWARNING: check_gg_info failed for ~p:~n~p~n"
+ "when GGI was: ~p~nand GI was: ~p~n",
+ [Node,{E,erlang:get_stacktrace()},GGI,GI]),
+ timer:sleep(1000),
+ check_gg_info(Node,OtherAlive,OtherDead,Synced,N-1)
end.
-
do_check_gg_info(OtherAlive,OtherDead,Synced,GGI,GI) ->
{_,gg1} = lists:keyfind(own_group_name,1,GGI),
{_,synced} = lists:keyfind(state,1,GGI),
diff --git a/lib/sasl/test/rh_test_lib.erl b/lib/sasl/test/rh_test_lib.erl
index 11935496d8..dacd8b6b9f 100644
--- a/lib/sasl/test/rh_test_lib.erl
+++ b/lib/sasl/test/rh_test_lib.erl
@@ -18,7 +18,7 @@ cmd(Cmd,Args,Env) ->
case open_port({spawn_executable, Cmd}, [{args,Args},{env,Env}]) of
Port when is_port(Port) ->
unlink(Port),
- erlang:port_close(Port),
+ catch erlang:port_close(Port), % migth already be closed, so catching
ok;
Error ->
Error
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index b9dc5e4117..0f5c35b300 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -34,7 +34,22 @@
</header>
- <section><title>SNMP 5.2.2</title>
+ <section><title>SNMP 5.2.3</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SNMP 5.2.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/snmp/src/agent/snmpa_conf.erl b/lib/snmp/src/agent/snmpa_conf.erl
index 94325a8ed6..fc5116dac9 100644
--- a/lib/snmp/src/agent/snmpa_conf.erl
+++ b/lib/snmp/src/agent/snmpa_conf.erl
@@ -154,7 +154,7 @@ do_write_agent_conf(Fd, {intAgentMaxPacketSize = Tag, Val} ) ->
do_write_agent_conf(Fd, {snmpEngineMaxMessageSize = Tag, Val} ) ->
io:format(Fd, "{~w, ~w}.~n", [Tag, Val]);
do_write_agent_conf(Fd, {snmpEngineID = Tag, Val} ) ->
- io:format(Fd, "{~w, \"~s\"}.~n", [Tag, Val]);
+ io:format(Fd, "{~w, ~p}.~n", [Tag, Val]);
do_write_agent_conf(_Fd, Crap) ->
error({bad_agent_config, Crap}).
@@ -758,9 +758,9 @@ do_write_usm_conf(
PrivP, PrivKeyC, OwnPrivKeyC,
Public, AuthKey, PrivKey}) ->
io:format(Fd, "{", []),
- io:format(Fd, "\"~s\", ", [EngineID]),
- io:format(Fd, "\"~s\", ", [UserName]),
- io:format(Fd, "\"~s\", ", [SecName]),
+ io:format(Fd, "~p, ", [EngineID]),
+ io:format(Fd, "~p, ", [UserName]),
+ io:format(Fd, "~p, ", [SecName]),
io:format(Fd, "~w, ", [Clone]),
io:format(Fd, "~w, ", [AuthP]),
do_write_usm2(Fd, AuthKeyC, ", "),
@@ -859,15 +859,15 @@ do_write_vacm_conf(
{vacmSecurityToGroup,
SecModel, SecName, GroupName}) ->
io:format(
- Fd, "{vacmSecurityToGroup, ~w, \"~s\", \"~s\"}.~n",
+ Fd, "{vacmSecurityToGroup, ~w, ~p, ~p}.~n",
[SecModel, SecName, GroupName]);
do_write_vacm_conf(
Fd,
{vacmAccess,
GroupName, Prefix, SecModel, SecLevel, Match, RV, WV, NV}) ->
io:format(
- Fd, "{vacmAccess, \"~s\", \"~s\", ~w, ~w, ~w, "
- "\"~s\", \"~s\", \"~s\"}.~n",
+ Fd, "{vacmAccess, ~p, ~p, ~w, ~w, ~w, "
+ "~p, ~p, ~p}.~n",
[GroupName, Prefix, SecModel, SecLevel,
Match, RV, WV, NV]);
do_write_vacm_conf(
@@ -875,7 +875,7 @@ do_write_vacm_conf(
{vacmViewTreeFamily,
ViewIndex, ViewSubtree, ViewStatus, ViewMask}) ->
io:format(
- Fd, "{vacmViewTreeFamily, \"~s\", ~w, ~w, ~w}.~n",
+ Fd, "{vacmViewTreeFamily, ~p, ~w, ~w, ~w}.~n",
[ViewIndex, ViewSubtree, ViewStatus, ViewMask]);
do_write_vacm_conf(_Fd, Crap) ->
error({bad_vacm_config, Crap}).
diff --git a/lib/snmp/test/modules.mk b/lib/snmp/test/modules.mk
index 87539f88f7..0f54e67c65 100644
--- a/lib/snmp/test/modules.mk
+++ b/lib/snmp/test/modules.mk
@@ -31,6 +31,7 @@ SUITE_MODULES = \
snmp_agent_mibs_test \
snmp_agent_nfilter_test \
snmp_agent_test \
+ snmp_agent_conf_test \
snmp_agent_test_lib \
snmp_manager_config_test \
snmp_manager_user \
diff --git a/lib/snmp/test/snmp_SUITE.erl b/lib/snmp/test/snmp_SUITE.erl
index 3b9219739b..05bd86253b 100644
--- a/lib/snmp/test/snmp_SUITE.erl
+++ b/lib/snmp/test/snmp_SUITE.erl
@@ -81,7 +81,8 @@ groups() ->
{group, note_store_test}]},
{agent, [], [{group, mibs_test},
{group, nfilter_test},
- {group, agent_test},
+ {group, agent_test},
+ {group, agent_conf_test},
{group, snmpnet_test}]},
{manager, [], [{group, manager_config_test},
{group, manager_user_test},
@@ -97,6 +98,7 @@ groups() ->
{mibs_test, [], [{snmp_agent_mibs_test, all}]},
{nfilter_test, [], [{snmp_agent_nfilter_test, all}]},
{agent_test, [], [{snmp_agent_test, all}]},
+ {agent_conf_test, [], [{snmp_agent_conf_test, all}]},
{snmpnet_test, [], [{snmp_to_snmpnet_SUITE, all}]},
{manager_config_test, [], [{snmp_manager_config_test, all}]},
{manager_user_test, [], [{snmp_manager_user_test, all}]},
diff --git a/lib/snmp/test/snmp_agent_conf_test.erl b/lib/snmp/test/snmp_agent_conf_test.erl
new file mode 100644
index 0000000000..0a22bd47d1
--- /dev/null
+++ b/lib/snmp/test/snmp_agent_conf_test.erl
@@ -0,0 +1,210 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2003-2016. All Rights Reserved.
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(snmp_agent_conf_test).
+
+%%----------------------------------------------------------------------
+%% Include files
+%%----------------------------------------------------------------------
+
+%-include_lib("test_server/include/test_server.hrl").
+%-include("snmp_test_lib.hrl").
+-include_lib("common_test/include/ct.hrl").
+
+-export([
+ all/0,
+ groups/0,
+ init_per_suite/1,
+ end_per_suite/1,
+
+ check_agent/1,
+ check_usm/1,
+ check_vacm/1
+ ]).
+
+
+all() -> [
+ check_agent,
+ check_usm,
+ check_vacm
+ ].
+
+
+groups() ->
+ [].
+
+
+init_per_suite(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ PrivSubdir = filename:join(PrivDir, "snmp_agent_conf_test"),
+ ok = filelib:ensure_dir(filename:join(PrivSubdir, "dummy")),
+ [{priv_subdir, PrivSubdir} | Config].
+
+end_per_suite(_Config) ->
+ ok.
+
+%%======================================================================
+%% Test data
+%%======================================================================
+
+engine_ids() -> [
+ "plain eid",
+ "here\"eid",
+ "comes\neid",
+ "trouble\0eid",
+ binary_to_list(<<"中国引擎标识符"/utf8>>)
+].
+
+snmp_admin_strings() -> [
+ "plain string",
+ "heres\"eid",
+ "trouble\neid",
+ binary_to_list(<<"中国引擎标识符"/utf8>>)
+].
+
+
+%%======================================================================
+%% Test functions
+%%======================================================================
+
+
+check_agent(Config) ->
+ Dir = ?config(priv_subdir, Config),
+ lists:foreach(
+ fun(EngineId) -> check_agent_by_engineid(Dir, EngineId) end,
+ engine_ids()
+ ),
+ ok.
+
+check_agent_by_engineid(Dir, EngineId) ->
+ WEntries = [
+ snmpa_conf:agent_entry(intAgentIpAddress, {0,0,0,0}),
+ snmpa_conf:agent_entry(intAgentUDPPort, 161),
+ snmpa_conf:agent_entry(snmpEngineMaxMessageSize, 484),
+ snmpa_conf:agent_entry(snmpEngineID, EngineId)
+ ],
+
+ ok = snmpa_conf:write_agent_config(Dir, WEntries),
+ {ok, REntries} = snmpa_conf:read_agent_config(Dir),
+
+ true = is_subset(WEntries, REntries),
+ ok.
+
+%%======================================================================
+
+check_usm(Config) ->
+ Dir = ?config(priv_subdir, Config),
+ EngineId = hd(engine_ids()),
+ UserName = hd(snmp_admin_strings()),
+ SecName = hd(snmp_admin_strings()),
+
+ %% vary engine id
+ lists:foreach(
+ fun(EngineId_) -> check_usm_by_params(Dir, EngineId_, UserName, SecName) end,
+ engine_ids()
+ ),
+
+ %% vary user name
+ lists:foreach(
+ fun(UserName_) -> check_usm_by_params(Dir, EngineId, UserName_, SecName) end,
+ snmp_admin_strings()
+ ),
+
+ %% vary sec name
+ lists:foreach(
+ fun(SecName_) -> check_usm_by_params(Dir, EngineId, UserName, SecName_) end,
+ snmp_admin_strings()
+ ),
+
+ ok.
+
+check_usm_by_params(Dir, EngineId, UserName, SecName) ->
+ WEntries = [
+ snmpa_conf:usm_entry(
+ EngineId,
+ UserName,
+ SecName,
+ zeroDotZero,
+ usmNoAuthProtocol, % authproto
+ "", "",
+ usmNoPrivProtocol, % privproto
+ "", "", "",
+ [], %AuthKey
+ []) %PrivKey
+ ],
+
+ ok = snmpa_conf:write_usm_config(Dir, WEntries),
+ {ok, REntries} = snmpa_conf:read_usm_config(Dir),
+
+ true = is_subset(WEntries, REntries),
+ ok.
+
+%%======================================================================
+
+check_vacm(Config) ->
+ Dir = ?config(priv_subdir, Config),
+
+ %% vary sec name
+ lists:foreach(
+ fun(SecName_) -> check_vacm_by_params(Dir, SecName_) end,
+ snmp_admin_strings()
+ ),
+
+ ok.
+
+
+check_vacm_by_params(Dir, SecName) ->
+ WEntries = [
+ %% SecModel, SecName, GroupName
+ snmpa_conf:vacm_s2g_entry(usm, SecName, SecName),
+ %% GroupName,Prefix,SecModel,SecLevel,Match,ReadView,WriteView,NotifyView
+ snmpa_conf:vacm_acc_entry(SecName, "", any, noAuthNoPriv, exact, "all", "all", "all")
+ ],
+
+ ok = snmpa_conf:write_vacm_config(Dir, WEntries),
+ {ok, REntries} = snmpa_conf:read_vacm_config(Dir),
+
+ true = is_subset(WEntries, REntries),
+ ok.
+
+
+
+%%======================================================================
+
+
+%% additional tests needed:
+% check_context()
+% check_community()
+% check_standard()
+% check_target_addr()
+% check_target_params()
+% check_notify()
+
+
+%%======================================================================
+%% Local utility functions
+%%======================================================================
+
+is_subset(List1, List2) ->
+ io:format("Check ~p is subset of ~p\n", [List1, List2]),
+ sets:is_subset(
+ sets:from_list(List1),
+ sets:from_list(List2)
+ ).
diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk
index f58f6b6162..f95b428290 100644
--- a/lib/snmp/vsn.mk
+++ b/lib/snmp/vsn.mk
@@ -19,6 +19,6 @@
# %CopyrightEnd%
APPLICATION = snmp
-SNMP_VSN = 5.2.2
+SNMP_VSN = 5.2.3
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(SNMP_VSN)$(PRE_VSN)"
diff --git a/lib/ssh/doc/src/notes.xml b/lib/ssh/doc/src/notes.xml
index 96bc50c689..f9d11b2a60 100644
--- a/lib/ssh/doc/src/notes.xml
+++ b/lib/ssh/doc/src/notes.xml
@@ -30,6 +30,124 @@
<file>notes.xml</file>
</header>
+<section><title>Ssh 4.3.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ SSH client does not any longer retry a bad password given
+ as option to ssh:connect et al.</p>
+ <p>
+ Own Id: OTP-13674 Aux Id: TR-HU92273 </p>
+ </item>
+ <item>
+ <p>
+ Removed possible hanging risk for a certain timing
+ sequence when communicating client and server executes on
+ the same node.</p>
+ <p>
+ Own Id: OTP-13715</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 4.3</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ A socket created and connected by gen_tcp could now be
+ used as input to ssh:connect, ssh:shell,
+ ssh_sftp:start_channel and ssh:daemon.</p>
+ <p>
+ Own Id: OTP-12860</p>
+ </item>
+ <item>
+ <p>
+ Some time optimization mainly in message encoding.</p>
+ <p>
+ Own Id: OTP-13131</p>
+ </item>
+ <item>
+ <p>
+ Optimized the sftp client time by setting new packet and
+ window sizes.</p>
+ <p>
+ Own Id: OTP-13175</p>
+ </item>
+ <item>
+ <p>
+ The <c>ssh_connection_handler</c> module in SSH is
+ changed and now uses the new behaviour <c>gen_statem</c>. </p>
+ <p>
+ The module can be used as an example of a
+ <c>gen_statem</c> callback module but with a warning:
+ This commit of ssh is just a straightforward port from
+ gen_fsm to gen_statem with some code cleaning. Since the
+ state machine and the state callbacks are almost
+ unchanged the ssh module does not demonstrate the full
+ potential of the new behaviour.</p>
+ <p>
+ The "new" state machine uses compound states. The ssh
+ server and client state machines are quite similar but
+ differences exist. With <c>gen_fsm</c> there were flags
+ in the user data which in fact implemented "substates".
+ Now with <c>gen_statem</c> those are made explicit in the
+ state names, eg. the state <c>userauth</c> and the binary
+ <c>role</c>-flag becomes the two state names
+ <c>{userauth, server}</c> and <c>{userauth, client}</c>.</p>
+ <p>
+ Own Id: OTP-13267</p>
+ </item>
+ <item>
+ <p>
+ The <c>{error, Reason}</c> tuples returned from
+ <c>ssh_sftp</c> api functions are described.</p>
+ <p>
+ Own Id: OTP-13347 Aux Id: ERL-86 </p>
+ </item>
+ <item>
+ <p>
+ Added -spec in ssh</p>
+ <p>
+ Own Id: OTP-13479</p>
+ </item>
+ <item>
+ <p>
+ It is now possible to call <c>ssh:daemon/{1,2,3}</c> with
+ <c>Port=0</c>. This makes the daemon select a free
+ listening tcp port before opening it. To find this port
+ number after the call, use the new function
+ <c>ssh:daemon_info/1</c>. See the reference manual for
+ details.</p>
+ <p>
+ Own Id: OTP-13527</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 4.2.2.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ SSH client does not any longer retry a bad password given
+ as option to ssh:connect et al.</p>
+ <p>
+ Own Id: OTP-13674 Aux Id: TR-HU92273 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Ssh 4.2.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/ssh/src/ssh_auth.erl b/lib/ssh/src/ssh_auth.erl
index 49eec8072f..fb5e086656 100644
--- a/lib/ssh/src/ssh_auth.erl
+++ b/lib/ssh/src/ssh_auth.erl
@@ -31,12 +31,111 @@
-export([publickey_msg/1, password_msg/1, keyboard_interactive_msg/1,
service_request_msg/1, init_userauth_request_msg/1,
userauth_request_msg/1, handle_userauth_request/3,
- handle_userauth_info_request/3, handle_userauth_info_response/2
+ handle_userauth_info_request/2, handle_userauth_info_response/2
]).
%%--------------------------------------------------------------------
%%% Internal application API
%%--------------------------------------------------------------------
+%%%----------------------------------------------------------------
+userauth_request_msg(#ssh{userauth_methods = ServerMethods,
+ userauth_supported_methods = UserPrefMethods, % Note: this is not documented as supported for clients
+ userauth_preference = ClientMethods0
+ } = Ssh0) ->
+ case sort_select_mthds(ClientMethods0, UserPrefMethods, ServerMethods) of
+ [] ->
+ Msg = #ssh_msg_disconnect{code = ?SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE,
+ description = "Unable to connect using the available authentication methods",
+ language = "en"},
+ {disconnect, Msg, ssh_transport:ssh_packet(Msg, Ssh0)};
+
+ [{Pref,Module,Function,Args} | Prefs] ->
+ Ssh = case Pref of
+ "keyboard-interactive" -> Ssh0;
+ _ -> Ssh0#ssh{userauth_preference = Prefs}
+ end,
+ case Module:Function(Args ++ [Ssh]) of
+ {not_ok, Ssh1} ->
+ userauth_request_msg(Ssh1#ssh{userauth_preference = Prefs});
+ Result ->
+ {Pref,Result}
+ end
+ end.
+
+
+
+sort_select_mthds(Clients, undefined, Servers) ->
+ %% User has not expressed an opinion via option "auth_methods", use the server's prefs
+ sort_select_mthds1(Clients, Servers, string:tokens(?SUPPORTED_AUTH_METHODS,","));
+
+sort_select_mthds(Clients, Users0, Servers0) ->
+ %% The User has an opinion, use the intersection of that and the Servers whishes but
+ %% in the Users order
+ sort_select_mthds1(Clients, string:tokens(Users0,","), Servers0).
+
+
+sort_select_mthds1(Clients, Users0, Servers0) ->
+ Servers = unique(Servers0),
+ Users = unique(Users0),
+ [C || Key <- Users,
+ lists:member(Key, Servers),
+ C <- Clients,
+ element(1,C) == Key].
+
+unique(L) ->
+ lists:reverse(
+ lists:foldl(fun(E,Acc) ->
+ case lists:member(E,Acc) of
+ true -> Acc;
+ false -> [E|Acc]
+ end
+ end, [], L)).
+
+
+%%%---- userauth_request_msg "callbacks"
+password_msg([#ssh{opts = Opts, io_cb = IoCb,
+ user = User, service = Service} = Ssh0]) ->
+ {Password,Ssh} =
+ case proplists:get_value(password, Opts) of
+ undefined when IoCb == ssh_no_io ->
+ {not_ok, Ssh0};
+ undefined ->
+ {IoCb:read_password("ssh password: ",Ssh0), Ssh0};
+ PW ->
+ %% If "password" option is given it should not be tried again
+ {PW, Ssh0#ssh{opts = lists:keyreplace(password,1,Opts,{password,not_ok})}}
+ end,
+ case Password of
+ not_ok ->
+ {not_ok, Ssh};
+ _ ->
+ ssh_transport:ssh_packet(
+ #ssh_msg_userauth_request{user = User,
+ service = Service,
+ method = "password",
+ data =
+ <<?BOOLEAN(?FALSE),
+ ?STRING(unicode:characters_to_binary(Password))>>},
+ Ssh)
+ end.
+
+%% See RFC 4256 for info on keyboard-interactive
+keyboard_interactive_msg([#ssh{user = User,
+ opts = Opts,
+ service = Service} = Ssh]) ->
+ case proplists:get_value(password, Opts) of
+ not_ok ->
+ {not_ok,Ssh}; % No need to use a failed pwd once more
+ _ ->
+ ssh_transport:ssh_packet(
+ #ssh_msg_userauth_request{user = User,
+ service = Service,
+ method = "keyboard-interactive",
+ data = << ?STRING(<<"">>),
+ ?STRING(<<>>) >> },
+ Ssh)
+ end.
+
publickey_msg([Alg, #ssh{user = User,
session_id = SessionId,
service = Service,
@@ -48,7 +147,7 @@ publickey_msg([Alg, #ssh{user = User,
StrAlgo = atom_to_list(Alg),
case encode_public_key(StrAlgo, ssh_transport:extract_public_key(PrivKey)) of
not_ok ->
- not_ok;
+ {not_ok, Ssh};
PubKeyBlob ->
SigData = build_sig_data(SessionId,
User, Service, PubKeyBlob, StrAlgo),
@@ -65,52 +164,15 @@ publickey_msg([Alg, #ssh{user = User,
Ssh)
end;
_Error ->
- not_ok
- end.
-
-password_msg([#ssh{opts = Opts, io_cb = IoCb,
- user = User, service = Service} = Ssh]) ->
- Password = case proplists:get_value(password, Opts) of
- undefined ->
- user_interaction(IoCb, Ssh);
- PW ->
- PW
- end,
- case Password of
- not_ok ->
- not_ok;
- _ ->
- ssh_transport:ssh_packet(
- #ssh_msg_userauth_request{user = User,
- service = Service,
- method = "password",
- data =
- <<?BOOLEAN(?FALSE),
- ?STRING(unicode:characters_to_binary(Password))>>},
- Ssh)
+ {not_ok, Ssh}
end.
-user_interaction(ssh_no_io, _) ->
- not_ok;
-user_interaction(IoCb, Ssh) ->
- IoCb:read_password("ssh password: ", Ssh).
-
-
-%% See RFC 4256 for info on keyboard-interactive
-keyboard_interactive_msg([#ssh{user = User,
- service = Service} = Ssh]) ->
- ssh_transport:ssh_packet(
- #ssh_msg_userauth_request{user = User,
- service = Service,
- method = "keyboard-interactive",
- data = << ?STRING(<<"">>),
- ?STRING(<<>>) >> },
- Ssh).
-
+%%%----------------------------------------------------------------
service_request_msg(Ssh) ->
ssh_transport:ssh_packet(#ssh_msg_service_request{name = "ssh-userauth"},
Ssh#ssh{service = "ssh-userauth"}).
+%%%----------------------------------------------------------------
init_userauth_request_msg(#ssh{opts = Opts} = Ssh) ->
case user_name(Opts) of
{ok, User} ->
@@ -140,34 +202,9 @@ init_userauth_request_msg(#ssh{opts = Opts} = Ssh) ->
description = ErrStr})
end.
-userauth_request_msg(#ssh{userauth_preference = []} = Ssh) ->
- Msg = #ssh_msg_disconnect{code =
- ?SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE,
- description = "Unable to connect using the available"
- " authentication methods",
- language = "en"},
- {disconnect, Msg, ssh_transport:ssh_packet(Msg, Ssh)};
-
-userauth_request_msg(#ssh{userauth_methods = Methods,
- userauth_preference = [{Pref, Module,
- Function, Args} | Prefs]}
- = Ssh0) ->
- Ssh = Ssh0#ssh{userauth_preference = Prefs},
- case lists:member(Pref, Methods) of
- true ->
- case Module:Function(Args ++ [Ssh]) of
- not_ok ->
- userauth_request_msg(Ssh);
- Result ->
- {Pref,Result}
- end;
- false ->
- userauth_request_msg(Ssh)
- end.
-
-
-handle_userauth_request(#ssh_msg_service_request{name =
- Name = "ssh-userauth"},
+%%%----------------------------------------------------------------
+%%% called by server
+handle_userauth_request(#ssh_msg_service_request{name = Name = "ssh-userauth"},
_, Ssh) ->
{ok, ssh_transport:ssh_packet(#ssh_msg_service_accept{name = Name},
Ssh#ssh{service = "ssh-connection"})};
@@ -319,21 +356,28 @@ handle_userauth_request(#ssh_msg_userauth_request{user = User,
partial_success = false}, Ssh)}.
-
-handle_userauth_info_request(
- #ssh_msg_userauth_info_request{name = Name,
- instruction = Instr,
- num_prompts = NumPrompts,
- data = Data}, IoCb,
- #ssh{opts = Opts} = Ssh) ->
+%%%----------------------------------------------------------------
+%%% keyboard-interactive client
+handle_userauth_info_request(#ssh_msg_userauth_info_request{name = Name,
+ instruction = Instr,
+ num_prompts = NumPrompts,
+ data = Data},
+ #ssh{opts = Opts,
+ io_cb = IoCb
+ } = Ssh) ->
PromptInfos = decode_keyboard_interactive_prompts(NumPrompts,Data),
- Responses = keyboard_interact_get_responses(IoCb, Opts,
- Name, Instr, PromptInfos),
- {ok,
- ssh_transport:ssh_packet(
- #ssh_msg_userauth_info_response{num_responses = NumPrompts,
- data = Responses}, Ssh)}.
+ case keyboard_interact_get_responses(IoCb, Opts, Name, Instr, PromptInfos) of
+ not_ok ->
+ not_ok;
+ Responses ->
+ {ok,
+ ssh_transport:ssh_packet(
+ #ssh_msg_userauth_info_response{num_responses = NumPrompts,
+ data = Responses}, Ssh)}
+ end.
+%%%----------------------------------------------------------------
+%%% keyboard-interactive server
handle_userauth_info_response(#ssh_msg_userauth_info_response{num_responses = 1,
data = <<?UINT32(Sz), Password:Sz/binary>>},
#ssh{opts = Opts,
@@ -369,11 +413,6 @@ method_preference(Algs) ->
[{"publickey", ?MODULE, publickey_msg, [A]} | Acc]
end,
[{"password", ?MODULE, password_msg, []},
- {"keyboard-interactive", ?MODULE, keyboard_interactive_msg, []},
- {"keyboard-interactive", ?MODULE, keyboard_interactive_msg, []},
- {"keyboard-interactive", ?MODULE, keyboard_interactive_msg, []},
- {"keyboard-interactive", ?MODULE, keyboard_interactive_msg, []},
- {"keyboard-interactive", ?MODULE, keyboard_interactive_msg, []},
{"keyboard-interactive", ?MODULE, keyboard_interactive_msg, []}
],
Algs).
@@ -473,6 +512,9 @@ keyboard_interact_get_responses(IoCb, Opts, Name, Instr, PromptInfos) ->
proplists:get_value(password, Opts, undefined), IoCb, Name,
Instr, PromptInfos, Opts, NumPrompts).
+
+keyboard_interact_get_responses(_, _, not_ok, _, _, _, _, _, _) ->
+ not_ok;
keyboard_interact_get_responses(_, undefined, Password, _, _, _, _, _,
1) when Password =/= undefined ->
[Password]; %% Password auth implemented with keyboard-interaction and passwd is known
@@ -486,17 +528,18 @@ keyboard_interact_get_responses(true, Fun, _Pwd, _IoCb, Name, Instr, PromptInfos
keyboard_interact_fun(Fun, Name, Instr, PromptInfos, NumPrompts).
keyboard_interact(IoCb, Name, Instr, Prompts, Opts) ->
- if Name /= "" -> IoCb:format("~s~n", [Name]);
- true -> ok
- end,
- if Instr /= "" -> IoCb:format("~s~n", [Instr]);
- true -> ok
- end,
+ write_if_nonempty(IoCb, Name),
+ write_if_nonempty(IoCb, Instr),
lists:map(fun({Prompt, true}) -> IoCb:read_line(Prompt, Opts);
({Prompt, false}) -> IoCb:read_password(Prompt, Opts)
end,
Prompts).
+write_if_nonempty(_, "") -> ok;
+write_if_nonempty(_, <<>>) -> ok;
+write_if_nonempty(IoCb, Text) -> IoCb:format("~s~n",[Text]).
+
+
keyboard_interact_fun(KbdInteractFun, Name, Instr, PromptInfos, NumPrompts) ->
Prompts = lists:map(fun({Prompt, _Echo}) -> Prompt end,
PromptInfos),
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index e952a333ff..f9f4c82351 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -428,7 +428,12 @@ init_connection(server, C = #connection{}, Opts) ->
init_ssh_record(Role, Socket, Opts) ->
{ok, PeerAddr} = inet:peername(Socket),
KeyCb = proplists:get_value(key_cb, Opts, ssh_file),
- AuthMethods = proplists:get_value(auth_methods, Opts, ?SUPPORTED_AUTH_METHODS),
+ AuthMethods = proplists:get_value(auth_methods,
+ Opts,
+ case Role of
+ server -> ?SUPPORTED_AUTH_METHODS;
+ client -> undefined
+ end),
S0 = #ssh{role = Role,
key_cb = KeyCb,
opts = Opts,
@@ -794,9 +799,13 @@ handle_event(_, #ssh_msg_userauth_banner{message = Msg}, {userauth,client}, D) -
handle_event(_, #ssh_msg_userauth_info_request{} = Msg, {userauth_keyboard_interactive, client},
#data{ssh_params = Ssh0} = D) ->
- {ok, {Reply, Ssh}} = ssh_auth:handle_userauth_info_request(Msg, Ssh0#ssh.io_cb, Ssh0),
- send_bytes(Reply, D),
- {next_state, {userauth_keyboard_interactive_info_response,client}, D#data{ssh_params = Ssh}};
+ case ssh_auth:handle_userauth_info_request(Msg, Ssh0) of
+ {ok, {Reply, Ssh}} ->
+ send_bytes(Reply, D),
+ {next_state, {userauth_keyboard_interactive_info_response,client}, D#data{ssh_params = Ssh}};
+ not_ok ->
+ {next_state, {userauth,client}, D, [{next_event, internal, Msg}]}
+ end;
handle_event(_, #ssh_msg_userauth_info_response{} = Msg, {userauth_keyboard_interactive, server}, D) ->
case ssh_auth:handle_userauth_info_response(Msg, D#data.ssh_params) of
@@ -819,7 +828,18 @@ handle_event(_, Msg = #ssh_msg_userauth_failure{}, {userauth_keyboard_interactiv
D = D0#data{ssh_params = Ssh0#ssh{userauth_preference=Prefs}},
{next_state, {userauth,client}, D, [{next_event, internal, Msg}]};
-handle_event(_, Msg=#ssh_msg_userauth_failure{}, {userauth_keyboard_interactive_info_response, client}, D) ->
+handle_event(_, Msg=#ssh_msg_userauth_failure{}, {userauth_keyboard_interactive_info_response, client},
+ #data{ssh_params = Ssh0} = D0) ->
+ Opts = Ssh0#ssh.opts,
+ D = case proplists:get_value(password, Opts) of
+ undefined ->
+ D0;
+ _ ->
+ D0#data{ssh_params =
+ Ssh0#ssh{opts =
+ lists:keyreplace(password,1,Opts,
+ {password,not_ok})}} % FIXME:intermodule dependency
+ end,
{next_state, {userauth,client}, D, [{next_event, internal, Msg}]};
handle_event(_, Msg=#ssh_msg_userauth_success{}, {userauth_keyboard_interactive_info_response, client}, D) ->
@@ -1006,13 +1026,13 @@ handle_event({call,From}, get_print_info, StateName, D) ->
{keep_state_and_data, [{reply,From,Reply}]};
handle_event({call,From}, {connection_info, Options}, _, D) ->
- Info = ssh_info(Options, D, []),
+ Info = fold_keys(Options, fun conn_info/2, D),
{keep_state_and_data, [{reply,From,Info}]};
handle_event({call,From}, {channel_info,ChannelId,Options}, _, D) ->
case ssh_channel:cache_lookup(cache(D), ChannelId) of
#channel{} = Channel ->
- Info = ssh_channel_info(Options, Channel, []),
+ Info = fold_keys(Options, fun chann_info/2, Channel),
{keep_state_and_data, [{reply,From,Info}]};
undefined ->
{keep_state_and_data, [{reply,From,[]}]}
@@ -1206,8 +1226,9 @@ handle_event(internal, prepare_next_packet, _, D) ->
Sz when Sz >= Enough ->
self() ! {D#data.transport_protocol, D#data.socket, <<>>};
_ ->
- inet:setopts(D#data.socket, [{active, once}])
+ ok
end,
+ inet:setopts(D#data.socket, [{active, once}]),
keep_state_and_data;
handle_event(info, {CloseTag,Socket}, StateName,
@@ -1315,12 +1336,10 @@ terminate(shutdown, StateName, State0) ->
State = send_msg(#ssh_msg_disconnect{code = ?SSH_DISCONNECT_BY_APPLICATION,
description = "Application shutdown"},
State0),
-timer:sleep(400), %% FIXME!!! gen_tcp:shutdown instead
finalize_termination(StateName, State);
%% terminate({shutdown,Msg}, StateName, State0) when is_record(Msg,ssh_msg_disconnect)->
%% State = send_msg(Msg, State0),
-%% timer:sleep(400), %% FIXME!!! gen_tcp:shutdown instead
%% finalize_termination(StateName, Msg, State);
terminate({shutdown,_R}, StateName, State) ->
@@ -1635,7 +1654,6 @@ new_channel_id(#data{connection_state = #connection{channel_id_seed = Id} =
disconnect(Msg=#ssh_msg_disconnect{description=Description}, _StateName, State0) ->
State = send_msg(Msg, State0),
disconnect_fun(Description, State),
-timer:sleep(400),
{stop, {shutdown,Description}, State}.
%%%----------------------------------------------------------------
@@ -1644,43 +1662,43 @@ counterpart_versions(NumVsn, StrVsn, #ssh{role = server} = Ssh) ->
counterpart_versions(NumVsn, StrVsn, #ssh{role = client} = Ssh) ->
Ssh#ssh{s_vsn = NumVsn , s_version = StrVsn}.
-ssh_info([], _State, Acc) ->
- Acc;
-ssh_info([client_version | Rest], #data{ssh_params = #ssh{c_vsn = IntVsn,
- c_version = StringVsn}} = State, Acc) ->
- ssh_info(Rest, State, [{client_version, {IntVsn, StringVsn}} | Acc]);
-
-ssh_info([server_version | Rest], #data{ssh_params =#ssh{s_vsn = IntVsn,
- s_version = StringVsn}} = State, Acc) ->
- ssh_info(Rest, State, [{server_version, {IntVsn, StringVsn}} | Acc]);
-ssh_info([peer | Rest], #data{ssh_params = #ssh{peer = Peer}} = State, Acc) ->
- ssh_info(Rest, State, [{peer, Peer} | Acc]);
-ssh_info([sockname | Rest], #data{socket = Socket} = State, Acc) ->
- {ok, SockName} = inet:sockname(Socket),
- ssh_info(Rest, State, [{sockname, SockName}|Acc]);
-ssh_info([user | Rest], #data{auth_user = User} = State, Acc) ->
- ssh_info(Rest, State, [{user, User}|Acc]);
-ssh_info([ _ | Rest], State, Acc) ->
- ssh_info(Rest, State, Acc).
-
-
-ssh_channel_info([], _, Acc) ->
- Acc;
+%%%----------------------------------------------------------------
+conn_info(client_version, #data{ssh_params=S}) -> {S#ssh.c_vsn, S#ssh.c_version};
+conn_info(server_version, #data{ssh_params=S}) -> {S#ssh.s_vsn, S#ssh.s_version};
+conn_info(peer, #data{ssh_params=S}) -> S#ssh.peer;
+conn_info(user, D) -> D#data.auth_user;
+conn_info(sockname, D) -> {ok, SockName} = inet:sockname(D#data.socket),
+ SockName;
+%% dbg options ( = not documented):
+conn_info(socket, D) -> D#data.socket;
+conn_info(chan_ids, D) ->
+ ssh_channel:cache_foldl(fun(#channel{local_id=Id}, Acc) ->
+ [Id | Acc]
+ end, [], cache(D)).
-ssh_channel_info([recv_window | Rest], #channel{recv_window_size = WinSize,
- recv_packet_size = Packsize
- } = Channel, Acc) ->
- ssh_channel_info(Rest, Channel, [{recv_window, {{win_size, WinSize},
- {packet_size, Packsize}}} | Acc]);
-ssh_channel_info([send_window | Rest], #channel{send_window_size = WinSize,
- send_packet_size = Packsize
- } = Channel, Acc) ->
- ssh_channel_info(Rest, Channel, [{send_window, {{win_size, WinSize},
- {packet_size, Packsize}}} | Acc]);
-ssh_channel_info([ _ | Rest], Channel, Acc) ->
- ssh_channel_info(Rest, Channel, Acc).
+%%%----------------------------------------------------------------
+chann_info(recv_window, C) ->
+ {{win_size, C#channel.recv_window_size},
+ {packet_size, C#channel.recv_packet_size}};
+chann_info(send_window, C) ->
+ {{win_size, C#channel.send_window_size},
+ {packet_size, C#channel.send_packet_size}};
+%% dbg options ( = not documented):
+chann_info(pid, C) ->
+ C#channel.user.
+%%%----------------------------------------------------------------
+%% Assisting meta function for the *_info functions
+fold_keys(Keys, Fun, Extra) ->
+ lists:foldr(fun(Key, Acc) ->
+ try Fun(Key, Extra) of
+ Value -> [{Key,Value}|Acc]
+ catch
+ _:_ -> Acc
+ end
+ end, [], Keys).
+%%%----------------------------------------------------------------
log_error(Reason) ->
Report = io_lib:format("Erlang ssh connection handler failed with reason:~n"
" ~p~n"
@@ -1689,7 +1707,6 @@ log_error(Reason) ->
[Reason, erlang:get_stacktrace()]),
error_logger:error_report(Report).
-
%%%----------------------------------------------------------------
not_connected_filter({connection_reply, _Data}) -> true;
not_connected_filter(_) -> false.
diff --git a/lib/ssh/src/ssh_dbg.erl b/lib/ssh/src/ssh_dbg.erl
index 480795cfc7..bd6bc0335b 100644
--- a/lib/ssh/src/ssh_dbg.erl
+++ b/lib/ssh/src/ssh_dbg.erl
@@ -24,6 +24,7 @@
-export([messages/0,
messages/1,
+ messages/2,
stop/0
]).
@@ -36,12 +37,16 @@
writer,
acc = []}).
%%%================================================================
-messages() -> messages(fun(String,_D) -> io:format(String) end).
-%% messages() -> messages(fun(String,Acc) -> [String|Acc] end)
+messages() ->
+ messages(fun(String,_D) -> io:format(String) end).
messages(Write) when is_function(Write,2) ->
+ messages(Write, fun(X) -> X end).
+
+messages(Write, MangleArg) when is_function(Write,2),
+ is_function(MangleArg,1) ->
catch dbg:start(),
- setup_tracer(Write),
+ setup_tracer(Write, MangleArg),
dbg:p(new,c),
dbg_ssh_messages().
@@ -63,18 +68,30 @@ msg_formater({trace,_Pid,return_from,{ssh_message,encode,1},_Res}, D) ->
msg_formater({trace,_Pid,call,{ssh_message,decode,_}}, D) ->
D;
msg_formater({trace,Pid,return_from,{ssh_message,decode,1},Msg}, D) ->
- fmt("~nRECV ~p ~s~n", [Pid,wr_record(shrink_bin(Msg))], D);
+ fmt("~n~p RECV ~s~n", [Pid,wr_record(shrink_bin(Msg))], D);
msg_formater({trace,_Pid,call,{ssh_transport,select_algorithm,_}}, D) ->
D;
msg_formater({trace,Pid,return_from,{ssh_transport,select_algorithm,3},{ok,Alg}}, D) ->
- fmt("~nALGORITHMS ~p~n~s~n", [Pid, wr_record(Alg)], D);
+ fmt("~n~p ALGORITHMS~n~s~n", [Pid, wr_record(Alg)], D);
+
+
+msg_formater({trace,Pid,send,{tcp,Sock,Bytes},Pid}, D) ->
+ fmt("~n~p TCP SEND on ~p~n ~p~n", [Pid,Sock, shrink_bin(Bytes)], D);
+
+msg_formater({trace,Pid,send,{tcp,Sock,Bytes},Dest}, D) ->
+ fmt("~n~p TCP SEND from ~p TO ~p~n ~p~n", [Pid,Sock,Dest, shrink_bin(Bytes)], D);
msg_formater({trace,Pid,send,ErlangMsg,Dest}, D) ->
- fmt("~nERL MSG ~p SEND TO ~p~n ~p~n", [Pid,Dest, shrink_bin(ErlangMsg)], D);
+ fmt("~n~p ERL MSG SEND TO ~p~n ~p~n", [Pid,Dest, shrink_bin(ErlangMsg)], D);
+
+
+msg_formater({trace,Pid,'receive',{tcp,Sock,Bytes}}, D) ->
+ fmt("~n~p TCP RECEIVE on ~p~n ~p~n", [Pid,Sock,shrink_bin(Bytes)], D);
msg_formater({trace,Pid,'receive',ErlangMsg}, D) ->
- fmt("~nERL MSG ~p RECIEVE~n ~p~n", [Pid,shrink_bin(ErlangMsg)], D);
+ fmt("~n~p ERL MSG RECEIVE~n ~p~n", [Pid,shrink_bin(ErlangMsg)], D);
+
msg_formater(M, D) ->
fmt("~nDBG ~n~p~n", [shrink_bin(M)], D).
@@ -87,8 +104,10 @@ fmt(Fmt, Args, D=#data{writer=Write,acc=Acc}) ->
D#data{acc = Write(io_lib:format(Fmt, Args), Acc)}.
%%%----------------------------------------------------------------
-setup_tracer(Write) ->
- Handler = fun msg_formater/2,
+setup_tracer(Write, MangleArg) ->
+ Handler = fun(Arg, D) ->
+ msg_formater(MangleArg(Arg), D)
+ end,
InitialData = #data{writer = Write},
{ok,_} = dbg:tracer(process, {Handler, InitialData}),
ok.
diff --git a/lib/ssh/src/ssh_io.erl b/lib/ssh/src/ssh_io.erl
index 026d0f6151..1d8f370884 100644
--- a/lib/ssh/src/ssh_io.erl
+++ b/lib/ssh/src/ssh_io.erl
@@ -31,56 +31,55 @@ read_line(Prompt, Ssh) ->
format("~s", [listify(Prompt)]),
proplists:get_value(user_pid, Ssh) ! {self(), question},
receive
- Answer ->
+ Answer when is_list(Answer) ->
Answer
end.
yes_no(Prompt, Ssh) ->
- io:format("~s [y/n]?", [Prompt]),
+ format("~s [y/n]?", [Prompt]),
proplists:get_value(user_pid, Ssh#ssh.opts) ! {self(), question},
receive
- Answer ->
+ %% I can't see that the atoms y and n are ever received, but it must
+ %% be investigated before removing
+ y -> yes;
+ n -> no;
+
+ Answer when is_list(Answer) ->
case trim(Answer) of
"y" -> yes;
"n" -> no;
"Y" -> yes;
"N" -> no;
- y -> yes;
- n -> no;
_ ->
- io:format("please answer y or n\n"),
+ format("please answer y or n\n",[]),
yes_no(Prompt, Ssh)
end
end.
-read_password(Prompt, Ssh) ->
+read_password(Prompt, #ssh{opts=Opts}) -> read_password(Prompt, Opts);
+read_password(Prompt, Opts) when is_list(Opts) ->
format("~s", [listify(Prompt)]),
- case is_list(Ssh) of
- false ->
- proplists:get_value(user_pid, Ssh#ssh.opts) ! {self(), user_password};
- _ ->
- proplists:get_value(user_pid, Ssh) ! {self(), user_password}
- end,
+ proplists:get_value(user_pid, Opts) ! {self(), user_password},
receive
- Answer ->
- case Answer of
- "" ->
- read_password(Prompt, Ssh);
- Pass -> Pass
- end
+ Answer when is_list(Answer) ->
+ case trim(Answer) of
+ "" ->
+ read_password(Prompt, Opts);
+ Pwd ->
+ Pwd
+ end
end.
-listify(A) when is_atom(A) ->
- atom_to_list(A);
-listify(L) when is_list(L) ->
- L;
-listify(B) when is_binary(B) ->
- binary_to_list(B).
format(Fmt, Args) ->
io:format(Fmt, Args).
+%%%================================================================
+listify(A) when is_atom(A) -> atom_to_list(A);
+listify(L) when is_list(L) -> L;
+listify(B) when is_binary(B) -> binary_to_list(B).
+
trim(Line) when is_list(Line) ->
lists:reverse(trim1(lists:reverse(trim1(Line))));
@@ -93,6 +92,3 @@ trim1([$\r|Cs]) -> trim(Cs);
trim1([$\n|Cs]) -> trim(Cs);
trim1([$\t|Cs]) -> trim(Cs);
trim1(Cs) -> Cs.
-
-
-
diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl
index 733414e23a..d52d453007 100644
--- a/lib/ssh/test/ssh_basic_SUITE.erl
+++ b/lib/ssh/test/ssh_basic_SUITE.erl
@@ -50,7 +50,12 @@
inet6_option/1,
inet_option/1,
internal_error/1,
- known_hosts/1,
+ known_hosts/1,
+ login_bad_pwd_no_retry1/1,
+ login_bad_pwd_no_retry2/1,
+ login_bad_pwd_no_retry3/1,
+ login_bad_pwd_no_retry4/1,
+ login_bad_pwd_no_retry5/1,
misc_ssh_options/1,
openssh_zlib_basic_test/1,
packet_size_zero/1,
@@ -100,7 +105,8 @@ all() ->
daemon_opt_fd,
multi_daemon_opt_fd,
packet_size_zero,
- ssh_info_print
+ ssh_info_print,
+ {group, login_bad_pwd_no_retry}
].
groups() ->
@@ -116,7 +122,13 @@ groups() ->
{dsa_pass_key, [], [pass_phrase]},
{rsa_pass_key, [], [pass_phrase]},
{key_cb, [], [key_callback, key_callback_options]},
- {internal_error, [], [internal_error]}
+ {internal_error, [], [internal_error]},
+ {login_bad_pwd_no_retry, [], [login_bad_pwd_no_retry1,
+ login_bad_pwd_no_retry2,
+ login_bad_pwd_no_retry3,
+ login_bad_pwd_no_retry4,
+ login_bad_pwd_no_retry5
+ ]}
].
@@ -1090,6 +1102,72 @@ ssh_info_print(Config) ->
%%--------------------------------------------------------------------
+%% Check that a basd pwd is not tried more times. Could cause lock-out
+%% on server
+
+login_bad_pwd_no_retry1(Config) ->
+ login_bad_pwd_no_retry(Config, "keyboard-interactive,password").
+
+login_bad_pwd_no_retry2(Config) ->
+ login_bad_pwd_no_retry(Config, "password,keyboard-interactive").
+
+login_bad_pwd_no_retry3(Config) ->
+ login_bad_pwd_no_retry(Config, "password,publickey,keyboard-interactive").
+
+login_bad_pwd_no_retry4(Config) ->
+ login_bad_pwd_no_retry(Config, "password,other,keyboard-interactive").
+
+login_bad_pwd_no_retry5(Config) ->
+ login_bad_pwd_no_retry(Config, "password,other,keyboard-interactive,password,password").
+
+
+
+
+
+login_bad_pwd_no_retry(Config, AuthMethods) ->
+ PrivDir = proplists:get_value(priv_dir, Config),
+ UserDir = filename:join(PrivDir, nopubkey), % to make sure we don't use public-key-auth
+ file:make_dir(UserDir),
+ SysDir = proplists:get_value(data_dir, Config),
+
+ Parent = self(),
+ PwdFun = fun(_, _, _, undefined) -> {false, 1};
+ (_, _, _, _) -> Parent ! retry_bad_pwd,
+ false
+ end,
+
+ {DaemonRef, _Host, Port} =
+ ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, UserDir},
+ {auth_methods, AuthMethods},
+ {user_passwords, [{"foo","somepwd"}]},
+ {pwdfun, PwdFun}
+ ]),
+
+ ConnRes = ssh:connect("localhost", Port,
+ [{silently_accept_hosts, true},
+ {user, "foo"},
+ {password, "badpwd"},
+ {user_dir, UserDir},
+ {user_interaction, false}]),
+
+ receive
+ retry_bad_pwd ->
+ ssh:stop_daemon(DaemonRef),
+ {fail, "Retry bad password"}
+ after 0 ->
+ case ConnRes of
+ {error,"Unable to connect using the available authentication methods"} ->
+ ssh:stop_daemon(DaemonRef),
+ ok;
+ {ok,Conn} ->
+ ssh:close(Conn),
+ ssh:stop_daemon(DaemonRef),
+ {fail, "Connect erroneosly succeded"}
+ end
+ end.
+
+%%--------------------------------------------------------------------
%% Internal functions ------------------------------------------------
%%--------------------------------------------------------------------
%% Due to timing the error message may or may not be delivered to
diff --git a/lib/ssh/vsn.mk b/lib/ssh/vsn.mk
index b165928877..575c1af3a9 100644
--- a/lib/ssh/vsn.mk
+++ b/lib/ssh/vsn.mk
@@ -1,5 +1,5 @@
#-*-makefile-*- ; force emacs to enter makefile-mode
-SSH_VSN = 4.3
+SSH_VSN = 4.3.1
APP_VSN = "ssh-$(SSH_VSN)"
diff --git a/lib/ssl/doc/src/notes.xml b/lib/ssl/doc/src/notes.xml
index c427db24a4..9d68ee0eee 100644
--- a/lib/ssl/doc/src/notes.xml
+++ b/lib/ssl/doc/src/notes.xml
@@ -28,6 +28,180 @@
<p>This document describes the changes made to the SSL application.</p>
+<section><title>SSL 8.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The TLS/SSL protocol version selection for the SSL server
+ has been corrected to follow RFC 5246 Appendix E.1
+ especially in case where the list of supported versions
+ has gaps. Now the server selects the highest protocol
+ version it supports that is not higher than what the
+ client supports.</p>
+ <p>
+ Own Id: OTP-13753 Aux Id: seq13150 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SSL 8.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Server now rejects, a not requested client cert, as an
+ incorrect handshake message and ends the connection.</p>
+ <p>
+ Own Id: OTP-13651</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Remove default support for DES cipher suites</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-13195</p>
+ </item>
+ <item>
+ <p>
+ Deprecate the function <c>crypto:rand_bytes</c> and make
+ sure that <c>crypto:strong_rand_bytes</c> is used in all
+ places that are cryptographically significant.</p>
+ <p>
+ Own Id: OTP-13214</p>
+ </item>
+ <item>
+ <p>
+ Better error handling of user error during TLS upgrade.
+ ERL-69 is solved by gen_statem rewrite of ssl
+ application.</p>
+ <p>
+ Own Id: OTP-13255</p>
+ </item>
+ <item>
+ <p>
+ Provide user friendly error message when crypto rejects a
+ key</p>
+ <p>
+ Own Id: OTP-13256</p>
+ </item>
+ <item>
+ <p>
+ Add ssl:getstat/1 and ssl:getstat/2</p>
+ <p>
+ Own Id: OTP-13415</p>
+ </item>
+ <item>
+ <p>
+ TLS distribution connections now allow specifying the
+ options <c>verify_fun</c>, <c>crl_check</c> and
+ <c>crl_cache</c>. See the documentation. GitHub pull req
+ #956 contributed by Magnus Henoch.</p>
+ <p>
+ Own Id: OTP-13429 Aux Id: Pull#956 </p>
+ </item>
+ <item>
+ <p>
+ Remove confusing error message when closing a distributed
+ erlang node running over TLS</p>
+ <p>
+ Own Id: OTP-13431</p>
+ </item>
+ <item>
+ <p>
+ Remove default support for use of md5 in TLS 1.2
+ signature algorithms</p>
+ <p>
+ Own Id: OTP-13463</p>
+ </item>
+ <item>
+ <p>
+ ssl now uses gen_statem instead of gen_fsm to implement
+ the ssl connection process, this solves some timing
+ issues in addition to making the code more intuitive as
+ the behaviour can be used cleanly instead of having a lot
+ of workaround for shortcomings of the behaviour.</p>
+ <p>
+ Own Id: OTP-13464</p>
+ </item>
+ <item>
+ <p>
+ Phase out interoperability with clients that offer SSLv2.
+ By default they are no longer supported, but an option to
+ provide interoperability is offered.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-13465</p>
+ </item>
+ <item>
+ <p>
+ OpenSSL has functions to generate short (eight hex
+ digits) hashes of issuers of certificates and CRLs. These
+ hashes are used by the "c_rehash" script to populate
+ directories of CA certificates and CRLs, e.g. in the
+ Apache web server. Add functionality to let an Erlang
+ program find the right CRL for a given certificate in
+ such a directory.</p>
+ <p>
+ Own Id: OTP-13530</p>
+ </item>
+ <item>
+ <p>
+ Some legacy TLS 1.0 software does not tolerate the 1/n-1
+ content split BEAST mitigation technique. Add a
+ beast_mitigation SSL option (defaulting to
+ one_n_minus_one) to select or disable the BEAST
+ mitigation technique.</p>
+ <p>
+ Own Id: OTP-13629</p>
+ </item>
+ <item>
+ <p>
+ Enhance error log messages to facilitate for users to
+ understand the error</p>
+ <p>
+ Own Id: OTP-13632</p>
+ </item>
+ <item>
+ <p>
+ Increased default DH params to 2048-bit</p>
+ <p>
+ Own Id: OTP-13636</p>
+ </item>
+ <item>
+ <p>
+ Propagate CRL unknown CA error so that public_key
+ validation process continues correctly and determines
+ what should happen.</p>
+ <p>
+ Own Id: OTP-13656</p>
+ </item>
+ <item>
+ <p>
+ Introduce a flight concept for handshake packages. This
+ is a preparation for enabling DTLS, however it can also
+ have a positive effects for TLS on slow and unreliable
+ networks.</p>
+ <p>
+ Own Id: OTP-13678</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>SSL 7.3.3</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml
index 4ea000802f..abba5aaf59 100644
--- a/lib/ssl/doc/src/ssl.xml
+++ b/lib/ssl/doc/src/ssl.xml
@@ -464,10 +464,12 @@ fun(srp, Username :: string(), UserState :: term()) ->
<tag><c>{padding_check, boolean()}</c></tag>
<item><p>Affects TLS-1.0 connections only.
If set to <c>false</c>, it disables the block cipher padding check
- to be able to interoperate with legacy software.</p></item>
-
- <warning><p>Using <c>{padding_check, boolean()}</c> makes TLS
+ to be able to interoperate with legacy software.</p>
+ <warning><p>Using <c>{padding_check, boolean()}</c> makes TLS
vulnerable to the Poodle attack.</p></warning>
+ </item>
+
+
<tag><c>{beast_mitigation, one_n_minus_one | zero_n | disabled}</c></tag>
<item><p>Affects SSL-3.0 and TLS-1.0 connections only. Used to change the BEAST
@@ -478,11 +480,12 @@ fun(srp, Username :: string(), UserState :: term()) ->
<p><c>zero_n</c> - Perform 0/n BEAST mitigation.</p>
- <p><c>disabled</c> - Disable BEAST mitigation.</p></item>
+ <p><c>disabled</c> - Disable BEAST mitigation.</p>
- <warning><p>Using <c>{beast_mitigation, disabled}</c> makes SSL or TLS
+ <warning><p>Using <c>{beast_mitigation, disabled}</c> makes SSL or TLS
vulnerable to the BEAST attack.</p></warning>
- </taglist>
+ </item>
+ </taglist>
</section>
@@ -595,7 +598,7 @@ fun(srp, Username :: string(), UserState :: term()) ->
TLS handshake. If no lower TLS versions than 1.2 are supported,
the client will send a TLS signature algorithm extension
with the algorithms specified by this option.
- Defaults to
+ Defaults to</p>
<code>[
%% SHA2
@@ -612,7 +615,7 @@ fun(srp, Username :: string(), UserState :: term()) ->
{sha, rsa},
{sha, dsa},
]</code>
-
+<p>
The algorithms should be in the preferred order.
Selected signature algorithm can restrict which hash functions
that may be selected. Default support for {md5, rsa} removed in ssl-8.0
diff --git a/lib/ssl/doc/src/ssl_app.xml b/lib/ssl/doc/src/ssl_app.xml
index e50ffdbfe6..a66e947bc1 100644
--- a/lib/ssl/doc/src/ssl_app.xml
+++ b/lib/ssl/doc/src/ssl_app.xml
@@ -45,6 +45,8 @@
but can be configured.</item>
<item>For security reasons DES cipher suites are no longer supported by default,
but can be configured.</item>
+ <item> Renegotiation Indication Extension <url href="http://www.ietf.org/rfc/rfc5746.txt">RFC 5746</url> is supported
+ </item>
<item>Ephemeral Diffie-Hellman cipher suites are supported,
but not Diffie Hellman Certificates cipher suites.</item>
<item>Elliptic Curve cipher suites are supported if the Crypto
@@ -55,10 +57,16 @@
<item>IDEA cipher suites are not supported as they have
become deprecated by the latest TLS specification so it is not
motivated to implement them.</item>
+ <item>Compression is not supported.</item>
<item>CRL validation is supported.</item>
<item>Policy certificate extensions are not supported.</item>
<item>'Server Name Indication' extension
(<url href="http://www.ietf.org/rfc/rfc6066.txt">RFC 6066</url>) is supported.</item>
+ <item>Application Layer Protocol Negotiation (ALPN) and its successor Next Protocol Negotiation (NPN)
+ are supported. </item>
+ <item>It is possible to use Pre-Shared Key (PSK) and Secure Remote Password (SRP)
+ cipher suites, but they are not enabled by default.
+ </item>
</list>
</description>
@@ -109,7 +117,7 @@
<item><p>List of extra user-defined arguments to the <c>init</c> function
in the session cache callback module. Defaults to <c>[]</c>.</p></item>
- <tag><c><![CDATA[session_cache_client_max = integer() <optional>]]></c><br/>
+ <tag><c><![CDATA[session_cache_client_max = integer() <optional>]]></c><br/></tag>
<item><p>Limits the growth of the clients session cache, that is
how many sessions towards servers that are cached to be used by
new client connections. If the maximum number of sessions is
@@ -142,8 +150,6 @@
shutdown gracefully. Defaults to 5000 milliseconds.
</p>
</item>
- </tag>
-
</taglist>
</section>
diff --git a/lib/ssl/doc/src/ssl_distribution.xml b/lib/ssl/doc/src/ssl_distribution.xml
index 495e02d271..4bd5f67202 100644
--- a/lib/ssl/doc/src/ssl_distribution.xml
+++ b/lib/ssl/doc/src/ssl_distribution.xml
@@ -98,6 +98,7 @@
{stdlib,"1.18"},
{crypto, "2.0.3"},
{public_key, "0.12"},
+ {asn1, "4.0"},
{ssl, "5.0"}
]}.
</code>
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl
index 60a61bc901..b8be686b99 100644
--- a/lib/ssl/src/dtls_connection.erl
+++ b/lib/ssl/src/dtls_connection.erl
@@ -42,9 +42,8 @@
-export([next_record/1, next_event/3]).
%% Handshake handling
--export([%%renegotiate/2,
- send_handshake/2, send_change_cipher/2]).
-
+-export([%%renegotiate/2,
+ send_handshake/2, queue_handshake/2, queue_change_cipher/2]).
%% Alert and close handling
-export([%%send_alert/2, handle_own_alert/4, handle_close_alert/3,
@@ -53,11 +52,12 @@
]).
%% Data handling
+
-export([%%write_application_data/3,
read_application_data/2,
- %%passive_receive/2,
- next_record_if_active/1 %%,
- %%handle_common_event/4
+ passive_receive/2, next_record_if_active/1%,
+ %%handle_common_event/4,
+ %handle_packet/3
]).
%% gen_statem state functions
@@ -72,13 +72,13 @@
%%====================================================================
%% Internal application API
%%====================================================================
-start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = false},_} = Opts,
+start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = false},_, Tracker} = Opts,
User, {CbModule, _,_, _} = CbInfo,
Timeout) ->
try
{ok, Pid} = dtls_connection_sup:start_child([Role, Host, Port, Socket,
Opts, User, CbInfo]),
- {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule),
+ {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule, Tracker),
ok = ssl_connection:handshake(SslSocket, Timeout),
{ok, SslSocket}
catch
@@ -86,13 +86,13 @@ start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = false},_} = Opts,
Error
end;
-start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = true},_} = Opts,
+start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = true},_, Tracker} = Opts,
User, {CbModule, _,_, _} = CbInfo,
Timeout) ->
try
{ok, Pid} = dtls_connection_sup:start_child_dist([Role, Host, Port, Socket,
Opts, User, CbInfo]),
- {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule),
+ {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule, Tracker),
ok = ssl_connection:handshake(SslSocket, Timeout),
{ok, SslSocket}
catch
@@ -100,14 +100,37 @@ start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = true},_} = Opts,
Error
end.
-send_handshake(Handshake, #state{negotiated_version = Version,
- tls_handshake_history = Hist0,
- connection_states = ConnectionStates0} = State0) ->
- {BinHandshake, ConnectionStates, Hist} =
+send_handshake(Handshake, State) ->
+ send_handshake_flight(queue_handshake(Handshake, State)).
+
+queue_flight_buffer(Msg, #state{negotiated_version = Version,
+ connection_states = #connection_states{
+ current_write =
+ #connection_state{epoch = Epoch}},
+ flight_buffer = Flight} = State) ->
+ State#state{flight_buffer = Flight ++ [{Version, Epoch, Msg}]}.
+
+queue_handshake(Handshake, #state{negotiated_version = Version,
+ tls_handshake_history = Hist0,
+ connection_states = ConnectionStates0} = State0) ->
+ {Frag, ConnectionStates, Hist} =
encode_handshake(Handshake, Version, ConnectionStates0, Hist0),
- send_flight(BinHandshake, State0#state{connection_states = ConnectionStates,
- tls_handshake_history = Hist
- }).
+ queue_flight_buffer(Frag, State0#state{connection_states = ConnectionStates,
+ tls_handshake_history = Hist}).
+
+send_handshake_flight(#state{socket = Socket,
+ transport_cb = Transport,
+ flight_buffer = Flight,
+ connection_states = ConnectionStates0} = State0) ->
+
+ {Encoded, ConnectionStates} =
+ encode_handshake_flight(Flight, ConnectionStates0),
+
+ Transport:send(Socket, Encoded),
+ State0#state{flight_buffer = [], connection_states = ConnectionStates}.
+
+queue_change_cipher(Msg, State) ->
+ queue_flight_buffer(Msg, State).
send_alert(Alert, #state{negotiated_version = Version,
socket = Socket,
@@ -118,15 +141,6 @@ send_alert(Alert, #state{negotiated_version = Version,
Transport:send(Socket, BinMsg),
State0#state{connection_states = ConnectionStates}.
-send_change_cipher(Msg, #state{connection_states = ConnectionStates0,
- socket = Socket,
- negotiated_version = Version,
- transport_cb = Transport} = State0) ->
- {BinChangeCipher, ConnectionStates} =
- encode_change_cipher(Msg, Version, ConnectionStates0),
- Transport:send(Socket, BinChangeCipher),
- State0#state{connection_states = ConnectionStates}.
-
%%====================================================================
%% tls_connection_sup API
%%====================================================================
@@ -196,28 +210,44 @@ error({call, From}, Msg, State) ->
error(_, _, _) ->
{keep_state_and_data, [postpone]}.
-hello(internal, #client_hello{client_version = ClientVersion} = Hello,
- #state{connection_states = ConnectionStates0,
- port = Port, session = #session{own_certificate = Cert} = Session0,
- renegotiation = {Renegotiation, _},
- session_cache = Cache,
- session_cache_cb = CacheCb,
- ssl_options = SslOpts} = State) ->
+%%--------------------------------------------------------------------
+-spec hello(gen_statem:event_type(),
+ #hello_request{} | #client_hello{} | #server_hello{} | term(),
+ #state{}) ->
+ gen_statem:state_function_result().
+%%--------------------------------------------------------------------
+hello(internal, #client_hello{client_version = ClientVersion,
+ extensions = #hello_extensions{ec_point_formats = EcPointFormats,
+ elliptic_curves = EllipticCurves}} = Hello,
+ State = #state{connection_states = ConnectionStates0,
+ port = Port, session = #session{own_certificate = Cert} = Session0,
+ renegotiation = {Renegotiation, _},
+ session_cache = Cache,
+ session_cache_cb = CacheCb,
+ negotiated_protocol = CurrentProtocol,
+ key_algorithm = KeyExAlg,
+ ssl_options = SslOpts}) ->
+
case dtls_handshake:hello(Hello, SslOpts, {Port, Session0, Cache, CacheCb,
- ConnectionStates0, Cert}, Renegotiation) of
- {Version, {Type, Session},
- ConnectionStates,
- #hello_extensions{ec_point_formats = EcPointFormats,
- elliptic_curves = EllipticCurves} = ServerHelloExt, HashSign} ->
- ssl_connection:hello(internal, {common_client_hello, Type, ServerHelloExt, HashSign},
- State#state{connection_states = ConnectionStates,
+ ConnectionStates0, Cert, KeyExAlg}, Renegotiation) of
+ #alert{} = Alert ->
+ handle_own_alert(Alert, ClientVersion, hello, State);
+ {Version, {Type, Session},
+ ConnectionStates, Protocol0, ServerHelloExt, HashSign} ->
+ Protocol = case Protocol0 of
+ undefined -> CurrentProtocol;
+ _ -> Protocol0
+ end,
+
+ ssl_connection:hello(internal, {common_client_hello, Type, ServerHelloExt},
+ State#state{connection_states = ConnectionStates,
negotiated_version = Version,
+ hashsign_algorithm = HashSign,
session = Session,
- client_ecc = {EllipticCurves, EcPointFormats}}, ?MODULE);
- #alert{} = Alert ->
- handle_own_alert(Alert, ClientVersion, hello, State)
+ client_ecc = {EllipticCurves, EcPointFormats},
+ negotiated_protocol = Protocol}, ?MODULE)
end;
-hello(internal, Hello,
+hello(internal, #server_hello{} = Hello,
#state{connection_states = ConnectionStates0,
negotiated_version = ReqVersion,
role = client,
@@ -261,8 +291,7 @@ connection(internal, #hello_request{}, #state{host = Host, port = Port,
renegotiation = {Renegotiation, _}} = State0) ->
Hello = dtls_handshake:client_hello(Host, Port, ConnectionStates0, SslOpts,
Cache, CacheCb, Renegotiation, Cert),
- %% TODO DTLS version State1 = send_handshake(Hello, State0),
- State1 = State0,
+ State1 = send_handshake(Hello, State0),
{Record, State} =
next_record(
State1#state{session = Session0#session{session_id
@@ -309,11 +338,24 @@ handle_info({Protocol, _, Data}, StateName,
{stop, {shutdown, own_alert}}
end;
handle_info({CloseTag, Socket}, StateName,
- #state{socket = Socket, close_tag = CloseTag,
- negotiated_version = _Version} = State) ->
+ #state{socket = Socket, close_tag = CloseTag,
+ negotiated_version = Version} = State) ->
+ %% Note that as of DTLS 1.2 (TLS 1.1),
+ %% failure to properly close a connection no longer requires that a
+ %% session not be resumed. This is a change from DTLS 1.0 to conform
+ %% with widespread implementation practice.
+ case Version of
+ {254, N} when N =< 253 ->
+ ok;
+ _ ->
+ %% As invalidate_sessions here causes performance issues,
+ %% we will conform to the widespread implementation
+ %% practice and go aginst the spec
+ %%invalidate_session(Role, Host, Port, Session)
+ ok
+ end,
handle_normal_shutdown(?ALERT_REC(?FATAL, ?CLOSE_NOTIFY), StateName, State),
{stop, {shutdown, transport_closed}};
-
handle_info(Msg, StateName, State) ->
ssl_connection:handle_info(Msg, StateName, State).
@@ -343,76 +385,82 @@ format_status(Type, Data) ->
%%% Internal functions
%%--------------------------------------------------------------------
encode_handshake(Handshake, Version, ConnectionStates0, Hist0) ->
- Seq = sequence(ConnectionStates0),
- {EncHandshake, FragmentedHandshake} = dtls_handshake:encode_handshake(Handshake, Version,
- Seq),
+ {Seq, ConnectionStates} = sequence(ConnectionStates0),
+ {EncHandshake, Frag} = dtls_handshake:encode_handshake(Handshake, Version, Seq),
Hist = ssl_handshake:update_handshake_history(Hist0, EncHandshake),
- {Encoded, ConnectionStates} =
- dtls_record:encode_handshake(FragmentedHandshake,
- Version, ConnectionStates0),
- {Encoded, ConnectionStates, Hist}.
-
-next_record(#state{%%flight = #flight{state = finished},
- protocol_buffers =
- #protocol_buffers{dtls_packets = [], dtls_cipher_texts = [CT | Rest]}
- = Buffers,
- connection_states = ConnStates0} = State) ->
- case dtls_record:decode_cipher_text(CT, ConnStates0) of
- {Plain, ConnStates} ->
- {Plain, State#state{protocol_buffers =
- Buffers#protocol_buffers{dtls_cipher_texts = Rest},
- connection_states = ConnStates}};
- #alert{} = Alert ->
- {Alert, State}
- end;
-next_record(#state{socket = Socket,
- transport_cb = Transport} = State) -> %% when FlightState =/= finished
- ssl_socket:setopts(Transport, Socket, [{active,once}]),
- {no_record, State};
-
+ {Frag, ConnectionStates, Hist}.
-next_record(State) ->
- {no_record, State}.
+encode_change_cipher(#change_cipher_spec{}, Version, ConnectionStates) ->
+ dtls_record:encode_change_cipher_spec(Version, ConnectionStates).
+encode_handshake_flight(Flight, ConnectionStates) ->
+ MSS = 1400,
+ encode_handshake_records(Flight, ConnectionStates, MSS, init_pack_records()).
-next_event(StateName, Record, State) ->
- next_event(StateName, Record, State, []).
+encode_handshake_records([], CS, _MSS, Recs) ->
+ {finish_pack_records(Recs), CS};
-next_event(connection = StateName, no_record, State0, Actions) ->
- case next_record_if_active(State0) of
- {no_record, State} ->
- ssl_connection:hibernate_after(StateName, State, Actions);
- {#ssl_tls{} = Record, State} ->
- {next_state, StateName, State, [{next_event, internal, {dtls_record, Record}} | Actions]};
- {#alert{} = Alert, State} ->
- {next_state, StateName, State, [{next_event, internal, Alert} | Actions]}
+encode_handshake_records([{Version, _Epoch, Frag = #change_cipher_spec{}}|Tail], ConnectionStates0, MSS, Recs0) ->
+ {Encoded, ConnectionStates} =
+ encode_change_cipher(Frag, Version, ConnectionStates0),
+ Recs = append_pack_records([Encoded], MSS, Recs0),
+ encode_handshake_records(Tail, ConnectionStates, MSS, Recs);
+
+encode_handshake_records([{Version, Epoch, {MsgType, MsgSeq, Bin}}|Tail], CS0, MSS, Recs0 = {Buf0, _}) ->
+ Space = MSS - iolist_size(Buf0),
+ Len = byte_size(Bin),
+ {Encoded, CS} =
+ encode_handshake_record(Version, Epoch, Space, MsgType, MsgSeq, Len, Bin, 0, MSS, [], CS0),
+ Recs = append_pack_records(Encoded, MSS, Recs0),
+ encode_handshake_records(Tail, CS, MSS, Recs).
+
+%% TODO: move to dtls_handshake????
+encode_handshake_record(_Version, _Epoch, _Space, _MsgType, _MsgSeq, _Len, <<>>, _Offset, _MRS, Encoded, CS)
+ when length(Encoded) > 0 ->
+ %% make sure we encode at least one segment (for empty messages like Server Hello Done
+ {lists:reverse(Encoded), CS};
+
+encode_handshake_record(Version, Epoch, Space, MsgType, MsgSeq, Len, Bin,
+ Offset, MRS, Encoded0, CS0) ->
+ MaxFragmentLen = Space - 25,
+ case Bin of
+ <<BinFragment:MaxFragmentLen/bytes, Rest/binary>> ->
+ ok;
+ _ ->
+ BinFragment = Bin,
+ Rest = <<>>
+ end,
+ FragLength = byte_size(BinFragment),
+ Frag = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(Offset), ?uint24(FragLength), BinFragment],
+ %% TODO Real solution, now avoid dialyzer error {Encoded, CS} = ssl_record:encode_handshake({Epoch, Frag}, Version, CS0),
+ {Encoded, CS} = ssl_record:encode_handshake(Frag, Version, CS0),
+ encode_handshake_record(Version, Epoch, MRS, MsgType, MsgSeq, Len, Rest, Offset + FragLength, MRS, [Encoded|Encoded0], CS).
+
+init_pack_records() ->
+ {[], []}.
+
+append_pack_records([], MSS, Recs = {Buf0, Acc0}) ->
+ Remaining = MSS - iolist_size(Buf0),
+ if Remaining < 12 ->
+ {[], [lists:reverse(Buf0)|Acc0]};
+ true ->
+ Recs
end;
-next_event(StateName, Record, State, Actions) ->
- case Record of
- no_record ->
- {next_state, StateName, State, Actions};
- #ssl_tls{} = Record ->
- {next_state, StateName, State, [{next_event, internal, {dtls_record, Record}} | Actions]};
- #alert{} = Alert ->
- {next_state, StateName, State, [{next_event, internal, Alert} | Actions]}
+append_pack_records([Head|Tail], MSS, {Buf0, Acc0}) ->
+ TotLen = iolist_size(Buf0) + iolist_size(Head),
+ if TotLen > MSS ->
+ append_pack_records(Tail, MSS, {[Head], [lists:reverse(Buf0)|Acc0]});
+ true ->
+ append_pack_records(Tail, MSS, {[Head|Buf0], Acc0})
end.
-send_flight(Fragments, #state{transport_cb = Transport, socket = Socket,
- protocol_buffers = _PBuffers} = State) ->
- Transport:send(Socket, Fragments),
- %% Start retransmission
- %% State#state{protocol_buffers =
- %% (PBuffers#protocol_buffers){ #flight{state = waiting}}}}.
- State.
+finish_pack_records({[], Acc}) ->
+ lists:reverse(Acc);
+finish_pack_records({Buf, Acc}) ->
+ lists:reverse([lists:reverse(Buf)|Acc]).
-handle_own_alert(_,_,_, State) -> %% Place holder
- {stop, {shutdown, own_alert}, State}.
-
-handle_normal_shutdown(_, _, _State) -> %% Place holder
- ok.
-
-encode_change_cipher(#change_cipher_spec{}, Version, ConnectionStates) ->
- dtls_record:encode_change_cipher_spec(Version, ConnectionStates).
+%% decode_alerts(Bin) ->
+%% ssl_alert:decode(Bin).
initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions}, User,
{CbModule, DataTag, CloseTag, ErrorTag}) ->
@@ -451,21 +499,137 @@ initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions}, User,
start_or_recv_from = undefined,
protocol_cb = ?MODULE
}.
-read_application_data(_,State) ->
- {#ssl_tls{fragment = <<"place holder">>}, State}.
-next_tls_record(<<>>, _State) ->
- #alert{}; %% Place holder
-next_tls_record(_, State) ->
- {#ssl_tls{fragment = <<"place holder">>}, State}.
+next_tls_record(Data, #state{protocol_buffers = #protocol_buffers{
+ dtls_record_buffer = Buf0,
+ dtls_cipher_texts = CT0} = Buffers} = State0) ->
+ case dtls_record:get_dtls_records(Data, Buf0) of
+ {Records, Buf1} ->
+ CT1 = CT0 ++ Records,
+ next_record(State0#state{protocol_buffers =
+ Buffers#protocol_buffers{dtls_record_buffer = Buf1,
+ dtls_cipher_texts = CT1}});
+
+ #alert{} = Alert ->
+ Alert
+ end.
+
+next_record(#state{%%flight = #flight{state = finished},
+ protocol_buffers =
+ #protocol_buffers{dtls_packets = [], dtls_cipher_texts = [CT | Rest]}
+ = Buffers,
+ connection_states = ConnStates0} = State) ->
+ case dtls_record:decode_cipher_text(CT, ConnStates0) of
+ {Plain, ConnStates} ->
+ {Plain, State#state{protocol_buffers =
+ Buffers#protocol_buffers{dtls_cipher_texts = Rest},
+ connection_states = ConnStates}};
+ #alert{} = Alert ->
+ {Alert, State}
+ end;
+next_record(#state{socket = Socket,
+ transport_cb = Transport} = State) -> %% when FlightState =/= finished
+ ssl_socket:setopts(Transport, Socket, [{active,once}]),
+ {no_record, State};
+next_record(State) ->
+ {no_record, State}.
-sequence(_) ->
- %%TODO real imp
- 1.
-next_record_if_active(State =
- #state{socket_options =
- #socket_options{active = false}}) ->
+next_record_if_active(State =
+ #state{socket_options =
+ #socket_options{active = false}}) ->
{no_record ,State};
next_record_if_active(State) ->
next_record(State).
+
+passive_receive(State0 = #state{user_data_buffer = Buffer}, StateName) ->
+ case Buffer of
+ <<>> ->
+ {Record, State} = next_record(State0),
+ next_event(StateName, Record, State);
+ _ ->
+ {Record, State} = read_application_data(<<>>, State0),
+ next_event(StateName, Record, State)
+ end.
+
+next_event(StateName, Record, State) ->
+ next_event(StateName, Record, State, []).
+
+next_event(connection = StateName, no_record, State0, Actions) ->
+ case next_record_if_active(State0) of
+ {no_record, State} ->
+ ssl_connection:hibernate_after(StateName, State, Actions);
+ {#ssl_tls{} = Record, State} ->
+ {next_state, StateName, State, [{next_event, internal, {dtls_record, Record}} | Actions]};
+ {#alert{} = Alert, State} ->
+ {next_state, StateName, State, [{next_event, internal, Alert} | Actions]}
+ end;
+next_event(StateName, Record, State, Actions) ->
+ case Record of
+ no_record ->
+ {next_state, StateName, State, Actions};
+ #ssl_tls{} = Record ->
+ {next_state, StateName, State, [{next_event, internal, {dtls_record, Record}} | Actions]};
+ #alert{} = Alert ->
+ {next_state, StateName, State, [{next_event, internal, Alert} | Actions]}
+ end.
+
+read_application_data(_,State) ->
+ {#ssl_tls{fragment = <<"place holder">>}, State}.
+
+handle_own_alert(_,_,_, State) -> %% Place holder
+ {stop, {shutdown, own_alert}, State}.
+
+handle_normal_shutdown(_, _, _State) -> %% Place holder
+ ok.
+
+%% TODO This generates dialyzer warnings, has to be handled differently.
+%% handle_packet(Address, Port, Packet) ->
+%% try dtls_record:get_dtls_records(Packet, <<>>) of
+%% %% expect client hello
+%% {[#ssl_tls{type = ?HANDSHAKE, version = {254, _}} = Record], <<>>} ->
+%% handle_dtls_client_hello(Address, Port, Record);
+%% _Other ->
+%% {error, not_dtls}
+%% catch
+%% _Class:_Error ->
+%% {error, not_dtls}
+%% end.
+
+%% handle_dtls_client_hello(Address, Port,
+%% #ssl_tls{epoch = Epoch, sequence_number = Seq,
+%% version = Version} = Record) ->
+%% {[{Hello, _}], _} =
+%% dtls_handshake:get_dtls_handshake(Record,
+%% dtls_handshake:dtls_handshake_new_flight(undefined)),
+%% #client_hello{client_version = {Major, Minor},
+%% random = Random,
+%% session_id = SessionId,
+%% cipher_suites = CipherSuites,
+%% compression_methods = CompressionMethods} = Hello,
+%% CookieData = [address_to_bin(Address, Port),
+%% <<?BYTE(Major), ?BYTE(Minor)>>,
+%% Random, SessionId, CipherSuites, CompressionMethods],
+%% Cookie = crypto:hmac(sha, <<"secret">>, CookieData),
+
+%% case Hello of
+%% #client_hello{cookie = Cookie} ->
+%% accept;
+
+%% _ ->
+%% %% generate HelloVerifyRequest
+%% {RequestFragment, _} = dtls_handshake:encode_handshake(
+%% dtls_handshake:hello_verify_request(Cookie),
+%% Version, 0),
+%% HelloVerifyRequest =
+%% dtls_record:encode_tls_cipher_text(?HANDSHAKE, Version, Epoch, Seq, RequestFragment),
+%% {reply, HelloVerifyRequest}
+%% end.
+
+%% address_to_bin({A,B,C,D}, Port) ->
+%% <<0:80,16#ffff:16,A,B,C,D,Port:16>>;
+%% address_to_bin({A,B,C,D,E,F,G,H}, Port) ->
+%% <<A:16,B:16,C:16,D:16,E:16,F:16,G:16,H:16,Port:16>>.
+
+sequence(#connection_states{dtls_write_msg_seq = Seq} = CS) ->
+ {Seq, CS#connection_states{dtls_write_msg_seq = Seq + 1}}.
diff --git a/lib/ssl/src/dtls_connection.hrl b/lib/ssl/src/dtls_connection.hrl
index 69137b520b..ee3daa3c14 100644
--- a/lib/ssl/src/dtls_connection.hrl
+++ b/lib/ssl/src/dtls_connection.hrl
@@ -31,6 +31,7 @@
-record(protocol_buffers, {
dtls_packets = [], %%::[binary()], % Not yet handled decode ssl/tls packets.
dtls_record_buffer = <<>>, %%:: binary(), % Buffer of incomplete records
+ dtls_fragment_state, %%:: [], % DTLS fragments
dtls_handshake_buffer = <<>>, %%:: binary(), % Buffer of incomplete handshakes
dtls_cipher_texts = [], %%:: [binary()],
dtls_cipher_texts_next %%:: [binary()] % Received for Epoch not yet active
diff --git a/lib/ssl/src/dtls_handshake.erl b/lib/ssl/src/dtls_handshake.erl
index 4f48704cac..5a799cf441 100644
--- a/lib/ssl/src/dtls_handshake.erl
+++ b/lib/ssl/src/dtls_handshake.erl
@@ -24,8 +24,8 @@
-include("ssl_alert.hrl").
-export([client_hello/8, client_hello/9, hello/4,
- get_dtls_handshake/2,
- %%dtls_handshake_new_flight/1, dtls_handshake_new_epoch/1,
+ hello_verify_request/1, get_dtls_handshake/2,
+ dtls_handshake_new_flight/1, dtls_handshake_new_epoch/1,
encode_handshake/3]).
-type dtls_handshake() :: #client_hello{} | #hello_verify_request{} |
@@ -92,96 +92,135 @@ hello(#server_hello{server_version = Version, random = Random,
?ALERT_REC(?FATAL, ?PROTOCOL_VERSION)
end;
-hello(#client_hello{client_version = ClientVersion}, _Options, {_,_,_,_,ConnectionStates,_}, _Renegotiation) ->
- %% Return correct typ to make dialyzer happy until we have time to make the real imp.
- HashSigns = tls_v1:default_signature_algs(dtls_v1:corresponding_tls_version(ClientVersion)),
- {ClientVersion, {new, #session{}}, ConnectionStates, #hello_extensions{},
- %% Placeholder for real hasign handling
- hd(HashSigns)}.
-
-%% hello(Address, Port,
-%% #ssl_tls{epoch = _Epoch, sequence_number = _Seq,
-%% version = Version} = Record) ->
-%% case get_dtls_handshake(Record,
-%% dtls_handshake_new_flight(undefined)) of
-%% {[Hello | _], _} ->
-%% hello(Address, Port, Version, Hello);
-%% {retransmit, HandshakeState} ->
-%% {retransmit, HandshakeState}
-%% end.
-
-%% hello(Address, Port, Version, Hello) ->
-%% #client_hello{client_version = {Major, Minor},
-%% random = Random,
-%% session_id = SessionId,
-%% cipher_suites = CipherSuites,
-%% compression_methods = CompressionMethods} = Hello,
-%% CookieData = [address_to_bin(Address, Port),
-%% <<?BYTE(Major), ?BYTE(Minor)>>,
-%% Random, SessionId, CipherSuites, CompressionMethods],
-%% Cookie = crypto:hmac(sha, <<"secret">>, CookieData),
-
-%% case Hello of
-%% #client_hello{cookie = Cookie} ->
-%% accept;
-%% _ ->
-%% %% generate HelloVerifyRequest
-%% HelloVerifyRequest = enc_hs(#hello_verify_request{protocol_version = Version,
-%% cookie = Cookie},
-%% Version, 0, 1400),
-%% {reply, HelloVerifyRequest}
-%% end.
+hello(#client_hello{client_version = ClientVersion} = Hello,
+ #ssl_options{versions = Versions} = SslOpts,
+ Info, Renegotiation) ->
+ Version = ssl_handshake:select_version(dtls_record, ClientVersion, Versions),
+ %%
+ %% TODO: handle Cipher Fallback
+ %%
+ handle_client_hello(Version, Hello, SslOpts, Info, Renegotiation).
+
+-spec hello_verify_request(binary()) -> #hello_verify_request{}.
+%%
+%% Description: Creates a hello verify request message sent by server to
+%% verify client
+%%--------------------------------------------------------------------
+hello_verify_request(Cookie) ->
+ %% TODO: DTLS Versions?????
+ #hello_verify_request{protocol_version = {254, 255}, cookie = Cookie}.
+
+%%--------------------------------------------------------------------
%% %%--------------------------------------------------------------------
encode_handshake(Handshake, Version, MsgSeq) ->
{MsgType, Bin} = enc_handshake(Handshake, Version),
Len = byte_size(Bin),
- EncHandshake = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(0), ?uint24(Len), Bin],
- FragmentedHandshake = dtls_fragment(erlang:iolist_size(EncHandshake), MsgType, Len, MsgSeq, Bin, 0, []),
- {EncHandshake, FragmentedHandshake}.
+ Enc = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(0), ?uint24(Len), Bin],
+ Frag = {MsgType, MsgSeq, Bin},
+ {Enc, Frag}.
%%--------------------------------------------------------------------
--spec get_dtls_handshake(#ssl_tls{}, #dtls_hs_state{} | binary()) ->
+-spec get_dtls_handshake(#ssl_tls{}, #dtls_hs_state{} | undefined) ->
{[dtls_handshake()], #dtls_hs_state{}} | {retransmit, #dtls_hs_state{}}.
%%
%% Description: Given a DTLS state and new data from ssl_record, collects
%% and returns it as a list of handshake messages, also returns a new
%% DTLS state
%%--------------------------------------------------------------------
-get_dtls_handshake(Record, <<>>) ->
- get_dtls_handshake_aux(Record, #dtls_hs_state{}); %% Init handshake state!?
-get_dtls_handshake(Record, HsState) ->
- get_dtls_handshake_aux(Record, HsState).
+get_dtls_handshake(Records, undefined) ->
+ HsState = #dtls_hs_state{highest_record_seq = 0,
+ starting_read_seq = 0,
+ fragments = gb_trees:empty(),
+ completed = []},
+ get_dtls_handshake(Records, HsState);
+get_dtls_handshake(Records, HsState0) when is_list(Records) ->
+ HsState1 = lists:foldr(fun get_dtls_handshake_aux/2, HsState0, Records),
+ get_dtls_handshake_completed(HsState1);
+get_dtls_handshake(Record, HsState0) when is_record(Record, ssl_tls) ->
+ HsState1 = get_dtls_handshake_aux(Record, HsState0),
+ get_dtls_handshake_completed(HsState1).
-%% %%--------------------------------------------------------------------
-%% -spec dtls_handshake_new_epoch(#dtls_hs_state{}) -> #dtls_hs_state{}.
-%% %%
-%% %% Description: Reset the DTLS decoder state for a new Epoch
-%% %%--------------------------------------------------------------------
+%%--------------------------------------------------------------------
+-spec dtls_handshake_new_epoch(#dtls_hs_state{}) -> #dtls_hs_state{}.
+%%
+%% Description: Reset the DTLS decoder state for a new Epoch
+%%--------------------------------------------------------------------
%% dtls_handshake_new_epoch(<<>>) ->
%% dtls_hs_state_init();
-%% dtls_handshake_new_epoch(HsState) ->
-%% HsState#dtls_hs_state{highest_record_seq = 0,
-%% starting_read_seq = HsState#dtls_hs_state.current_read_seq,
-%% fragments = gb_trees:empty(), completed = []}.
-
-%% %--------------------------------------------------------------------
-%% -spec dtls_handshake_new_flight(integer() | undefined) -> #dtls_hs_state{}.
-%% %
-%% % Description: Init the DTLS decoder state for a new Flight
-%% dtls_handshake_new_flight(ExpectedReadReq) ->
-%% #dtls_hs_state{current_read_seq = ExpectedReadReq,
-%% highest_record_seq = 0,
-%% starting_read_seq = 0,
-%% fragments = gb_trees:empty(), completed = []}.
+dtls_handshake_new_epoch(HsState) ->
+ HsState#dtls_hs_state{highest_record_seq = 0,
+ starting_read_seq = HsState#dtls_hs_state.current_read_seq,
+ fragments = gb_trees:empty(), completed = []}.
+
+%--------------------------------------------------------------------
+-spec dtls_handshake_new_flight(integer() | undefined) -> #dtls_hs_state{}.
+%
+% Description: Init the DTLS decoder state for a new Flight
+dtls_handshake_new_flight(ExpectedReadReq) ->
+ #dtls_hs_state{current_read_seq = ExpectedReadReq,
+ highest_record_seq = 0,
+ starting_read_seq = 0,
+ fragments = gb_trees:empty(), completed = []}.
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
+handle_client_hello(Version, #client_hello{session_id = SugesstedId,
+ cipher_suites = CipherSuites,
+ compression_methods = Compressions,
+ random = Random,
+ extensions = #hello_extensions{elliptic_curves = Curves,
+ signature_algs = ClientHashSigns} = HelloExt},
+ #ssl_options{versions = Versions,
+ signature_algs = SupportedHashSigns} = SslOpts,
+ {Port, Session0, Cache, CacheCb, ConnectionStates0, Cert, _}, Renegotiation) ->
+ case dtls_record:is_acceptable_version(Version, Versions) of
+ true ->
+ AvailableHashSigns = ssl_handshake:available_signature_algs(
+ ClientHashSigns, SupportedHashSigns, Cert,
+ dtls_v1:corresponding_tls_version(Version)),
+ ECCCurve = ssl_handshake:select_curve(Curves, ssl_handshake:supported_ecc(Version)),
+ {Type, #session{cipher_suite = CipherSuite} = Session1}
+ = ssl_handshake:select_session(SugesstedId, CipherSuites, AvailableHashSigns, Compressions,
+ Port, Session0#session{ecc = ECCCurve}, Version,
+ SslOpts, Cache, CacheCb, Cert),
+ case CipherSuite of
+ no_suite ->
+ ?ALERT_REC(?FATAL, ?INSUFFICIENT_SECURITY);
+ _ ->
+ {KeyExAlg,_,_,_} = ssl_cipher:suite_definition(CipherSuite),
+ case ssl_handshake:select_hashsign(ClientHashSigns, Cert, KeyExAlg, SupportedHashSigns, Version) of
+ #alert{} = Alert ->
+ Alert;
+ HashSign ->
+ handle_client_hello_extensions(Version, Type, Random, CipherSuites, HelloExt,
+ SslOpts, Session1, ConnectionStates0,
+ Renegotiation, HashSign)
+ end
+ end;
+ false ->
+ ?ALERT_REC(?FATAL, ?PROTOCOL_VERSION)
+ end.
+
+handle_client_hello_extensions(Version, Type, Random, CipherSuites,
+ HelloExt, SslOpts, Session0, ConnectionStates0, Renegotiation, HashSign) ->
+ try ssl_handshake:handle_client_hello_extensions(dtls_record, Random, CipherSuites,
+ HelloExt, dtls_v1:corresponding_tls_version(Version),
+ SslOpts, Session0, ConnectionStates0, Renegotiation) of
+ #alert{} = Alert ->
+ Alert;
+ {Session, ConnectionStates, Protocol, ServerHelloExt} ->
+ {Version, {Type, Session}, ConnectionStates, Protocol, ServerHelloExt, HashSign}
+ catch throw:Alert ->
+ Alert
+ end.
+
handle_server_hello_extensions(Version, SessionId, Random, CipherSuite,
Compression, HelloExt, SslOpt, ConnectionStates0, Renegotiation) ->
case ssl_handshake:handle_server_hello_extensions(dtls_record, Random, CipherSuite,
- Compression, HelloExt, Version,
+ Compression, HelloExt,
+ dtls_v1:corresponding_tls_version(Version),
SslOpt, ConnectionStates0, Renegotiation) of
#alert{} = Alert ->
Alert;
@@ -189,16 +228,8 @@ handle_server_hello_extensions(Version, SessionId, Random, CipherSuite,
{Version, SessionId, ConnectionStates, ProtoExt, Protocol}
end.
-dtls_fragment(Mss, MsgType, Len, MsgSeq, Bin, Offset, Acc)
- when byte_size(Bin) + 12 < Mss ->
- FragmentLen = byte_size(Bin),
- BinMsg = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(Offset), ?uint24(FragmentLen), Bin],
- lists:reverse([BinMsg|Acc]);
-dtls_fragment(Mss, MsgType, Len, MsgSeq, Bin, Offset, Acc) ->
- FragmentLen = Mss - 12,
- <<Fragment:FragmentLen/bytes, Rest/binary>> = Bin,
- BinMsg = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(Offset), ?uint24(FragmentLen), Fragment],
- dtls_fragment(Mss, MsgType, Len, MsgSeq, Rest, Offset + FragmentLen, [BinMsg|Acc]).
+get_dtls_handshake_completed(HsState = #dtls_hs_state{completed = Completed}) ->
+ {lists:reverse(Completed), HsState#dtls_hs_state{completed = []}}.
get_dtls_handshake_aux(#ssl_tls{version = Version,
sequence_number = SeqNo,
@@ -214,25 +245,18 @@ get_dtls_handshake_aux(Version, SeqNo,
case reassemble_dtls_fragment(SeqNo, Type, Length, MessageSeq,
FragmentOffset, FragmentLength,
Body, HsState0) of
- {retransmit, HsState1} ->
- case Rest of
- <<>> ->
- {retransmit, HsState1};
- _ ->
- get_dtls_handshake_aux(Version, SeqNo, Rest, HsState1)
- end;
{HsState1, HighestSeqNo, MsgBody} ->
HsState2 = dec_dtls_fragment(Version, HighestSeqNo, Type, Length, MessageSeq, MsgBody, HsState1),
HsState3 = process_dtls_fragments(Version, HsState2),
get_dtls_handshake_aux(Version, SeqNo, Rest, HsState3);
+
HsState2 ->
HsState3 = process_dtls_fragments(Version, HsState2),
get_dtls_handshake_aux(Version, SeqNo, Rest, HsState3)
end;
get_dtls_handshake_aux(_Version, _SeqNo, <<>>, HsState) ->
- {lists:reverse(HsState#dtls_hs_state.completed),
- HsState#dtls_hs_state{completed = []}}.
+ HsState.
dec_dtls_fragment(Version, SeqNo, Type, Length, MessageSeq, MsgBody,
HsState = #dtls_hs_state{highest_record_seq = HighestSeqNo, completed = Acc}) ->
@@ -299,12 +323,6 @@ reassemble_dtls_fragment(SeqNo, _Type, Length, MessageSeq, 0, Length,
{HsState, SeqNo, Body};
reassemble_dtls_fragment(_SeqNo, _Type, Length, MessageSeq, 0, Length,
- _Body, HsState =
- #dtls_hs_state{current_read_seq = CurrentReadSeq})
- when MessageSeq < CurrentReadSeq ->
- {retransmit, HsState};
-
-reassemble_dtls_fragment(_SeqNo, _Type, Length, MessageSeq, 0, Length,
_Body, HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
when MessageSeq < CurrentReadSeq ->
HsState;
@@ -419,6 +437,8 @@ enc_handshake(#hello_verify_request{protocol_version = {Major, Minor},
?BYTE(CookieLength),
Cookie/binary>>};
+enc_handshake(#hello_request{}, _Version) ->
+ {?HELLO_REQUEST, <<>>};
enc_handshake(#client_hello{client_version = {Major, Minor},
random = Random,
session_id = SessionID,
diff --git a/lib/ssl/src/dtls_record.erl b/lib/ssl/src/dtls_record.erl
index e79e1cede0..5387fcafa8 100644
--- a/lib/ssl/src/dtls_record.erl
+++ b/lib/ssl/src/dtls_record.erl
@@ -36,11 +36,12 @@
-export([decode_cipher_text/2]).
%% Encoding
--export([encode_plain_text/4, encode_handshake/3, encode_change_cipher_spec/2]).
+-export([encode_plain_text/4, encode_tls_cipher_text/5, encode_change_cipher_spec/2]).
%% Protocol version handling
--export([protocol_version/1, lowest_protocol_version/2, lowest_protocol_version/1,
- highest_protocol_version/1, supported_protocol_versions/0,
+-export([protocol_version/1, lowest_protocol_version/1, lowest_protocol_version/2,
+ highest_protocol_version/1, highest_protocol_version/2,
+ is_higher/2, supported_protocol_versions/0,
is_acceptable_version/2]).
%% DTLS Epoch handling
@@ -208,14 +209,6 @@ decode_cipher_text(#ssl_tls{type = Type, version = Version,
false ->
?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
end.
-%%--------------------------------------------------------------------
--spec encode_handshake(iolist(), dtls_version(), #connection_states{}) ->
- {iolist(), #connection_states{}}.
-%%
-%% Description: Encodes a handshake message to send on the ssl-socket.
-%%--------------------------------------------------------------------
-encode_handshake(Frag, Version, ConnectionStates) ->
- encode_plain_text(?HANDSHAKE, Version, Frag, ConnectionStates).
%%--------------------------------------------------------------------
-spec encode_change_cipher_spec(dtls_version(), #connection_states{}) ->
@@ -271,20 +264,39 @@ lowest_protocol_version(Versions) ->
%%
%% Description: Highest protocol version present in a list
%%--------------------------------------------------------------------
-highest_protocol_version([Ver | Vers]) ->
- highest_protocol_version(Ver, Vers).
+highest_protocol_version([]) ->
+ highest_protocol_version();
+highest_protocol_version(Versions) ->
+ [Ver | Vers] = Versions,
+ highest_list_protocol_version(Ver, Vers).
-highest_protocol_version(Version, []) ->
+%%--------------------------------------------------------------------
+-spec highest_protocol_version(dtls_version(), dtls_version()) -> dtls_version().
+%%
+%% Description: Highest protocol version of two given versions
+%%--------------------------------------------------------------------
+highest_protocol_version(Version = {M, N}, {M, O}) when N < O ->
+ Version;
+highest_protocol_version({M, _},
+ Version = {M, _}) ->
Version;
-highest_protocol_version(Version = {N, M}, [{N, O} | Rest]) when M < O ->
- highest_protocol_version(Version, Rest);
-highest_protocol_version({M, _}, [Version = {M, _} | Rest]) ->
- highest_protocol_version(Version, Rest);
-highest_protocol_version(Version = {M,_}, [{N,_} | Rest]) when M < N ->
- highest_protocol_version(Version, Rest);
-highest_protocol_version(_, [Version | Rest]) ->
- highest_protocol_version(Version, Rest).
+highest_protocol_version(Version = {M,_},
+ {N, _}) when M < N ->
+ Version;
+highest_protocol_version(_,Version) ->
+ Version.
+%%--------------------------------------------------------------------
+-spec is_higher(V1 :: dtls_version(), V2::dtls_version()) -> boolean().
+%%
+%% Description: Is V1 > V2
+%%--------------------------------------------------------------------
+is_higher({M, N}, {M, O}) when N < O ->
+ true;
+is_higher({M, _}, {N, _}) when M < N ->
+ true;
+is_higher(_, _) ->
+ false.
%%--------------------------------------------------------------------
-spec supported_protocol_versions() -> [dtls_version()].
@@ -301,27 +313,33 @@ supported_protocol_versions() ->
{ok, []} ->
lists:map(Fun, supported_protocol_versions([]));
{ok, Vsns} when is_list(Vsns) ->
- supported_protocol_versions(Vsns);
+ supported_protocol_versions(lists:map(Fun, Vsns));
{ok, Vsn} ->
- supported_protocol_versions([Vsn])
+ supported_protocol_versions([Fun(Vsn)])
end.
supported_protocol_versions([]) ->
- Vsns = supported_connection_protocol_versions([]),
+ Vsns = case sufficient_dtlsv1_2_crypto_support() of
+ true ->
+ ?ALL_DATAGRAM_SUPPORTED_VERSIONS;
+ false ->
+ ?MIN_DATAGRAM_SUPPORTED_VERSIONS
+ end,
application:set_env(ssl, dtls_protocol_version, Vsns),
Vsns;
supported_protocol_versions([_|_] = Vsns) ->
- Vsns.
-
-%% highest_protocol_version() ->
-%% highest_protocol_version(supported_protocol_versions()).
-
-lowest_protocol_version() ->
- lowest_protocol_version(supported_protocol_versions()).
-
-supported_connection_protocol_versions([]) ->
- ?ALL_DATAGRAM_SUPPORTED_VERSIONS.
+ case sufficient_dtlsv1_2_crypto_support() of
+ true ->
+ Vsns;
+ false ->
+ case Vsns -- ['dtlsv1.2'] of
+ [] ->
+ ?MIN_SUPPORTED_VERSIONS;
+ NewVsns ->
+ NewVsns
+ end
+ end.
%%--------------------------------------------------------------------
-spec is_acceptable_version(dtls_version(), Supported :: [dtls_version()]) -> boolean().
@@ -419,6 +437,18 @@ set_connection_state_by_epoch(ConnectionStates0 =
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
+
+
+lowest_list_protocol_version(Ver, []) ->
+ Ver;
+lowest_list_protocol_version(Ver1, [Ver2 | Rest]) ->
+ lowest_list_protocol_version(lowest_protocol_version(Ver1, Ver2), Rest).
+
+highest_list_protocol_version(Ver, []) ->
+ Ver;
+highest_list_protocol_version(Ver1, [Ver2 | Rest]) ->
+ highest_list_protocol_version(highest_protocol_version(Ver1, Ver2), Rest).
+
encode_tls_cipher_text(Type, {MajVer, MinVer}, Epoch, Seq, Fragment) ->
Length = erlang:iolist_size(Fragment),
[<<?BYTE(Type), ?BYTE(MajVer), ?BYTE(MinVer), ?UINT16(Epoch),
@@ -432,6 +462,16 @@ calc_mac_hash(#connection_state{mac_secret = MacSecret,
mac_hash(Version, MacAlg, MacSecret, NewSeq, Type,
Length, Fragment).
+highest_protocol_version() ->
+ highest_protocol_version(supported_protocol_versions()).
+
+lowest_protocol_version() ->
+ lowest_protocol_version(supported_protocol_versions()).
+
+sufficient_dtlsv1_2_crypto_support() ->
+ CryptoSupport = crypto:supports(),
+ proplists:get_bool(sha256, proplists:get_value(hashs, CryptoSupport)).
+
mac_hash(Version, MacAlg, MacSecret, SeqNo, Type, Length, Fragment) ->
dtls_v1:mac_hash(Version, MacAlg, MacSecret, SeqNo, Type,
Length, Fragment).
@@ -439,8 +479,3 @@ mac_hash(Version, MacAlg, MacSecret, SeqNo, Type, Length, Fragment) ->
calc_aad(Type, {MajVer, MinVer}, Epoch, SeqNo) ->
NewSeq = (Epoch bsl 48) + SeqNo,
<<NewSeq:64/integer, ?BYTE(Type), ?BYTE(MajVer), ?BYTE(MinVer)>>.
-
-lowest_list_protocol_version(Ver, []) ->
- Ver;
-lowest_list_protocol_version(Ver1, [Ver2 | Rest]) ->
- lowest_list_protocol_version(lowest_protocol_version(Ver1, Ver2), Rest).
diff --git a/lib/ssl/src/ssl.app.src b/lib/ssl/src/ssl.app.src
index 6467cedf9d..b26efbd88f 100644
--- a/lib/ssl/src/ssl.app.src
+++ b/lib/ssl/src/ssl.app.src
@@ -55,7 +55,7 @@
{applications, [crypto, public_key, kernel, stdlib]},
{env, []},
{mod, {ssl_app, []}},
- {runtime_dependencies, ["stdlib-3.0","public_key-1.0","kernel-3.0",
+ {runtime_dependencies, ["stdlib-3.0","public_key-1.2","kernel-3.0",
"erts-7.0","crypto-3.3", "inets-5.10.7"]}]}.
diff --git a/lib/ssl/src/ssl.appup.src b/lib/ssl/src/ssl.appup.src
index 11728128c4..fadc67ef80 100644
--- a/lib/ssl/src/ssl.appup.src
+++ b/lib/ssl/src/ssl.appup.src
@@ -1,14 +1,20 @@
%% -*- erlang -*-
{"%VSN%",
[
- {<<"7\\..*">>, [{restart_application, ssl}]},
+ {<<"^8[.]0$">>,
+ [{load_module, ssl_handshake, soft_purge, soft_purge, []}
+ ]},
+ {<<"^7[.][^.].*">>, [{restart_application, ssl}]},
{<<"6\\..*">>, [{restart_application, ssl}]},
{<<"5\\..*">>, [{restart_application, ssl}]},
{<<"4\\..*">>, [{restart_application, ssl}]},
{<<"3\\..*">>, [{restart_application, ssl}]}
],
[
- {<<"7\\..*">>, [{restart_application, ssl}]},
+ {<<"^8[.]0$">>,
+ [{load_module, ssl_handshake, soft_purge, soft_purge, []}
+ ]},
+ {<<"^7[.][^.].*">>, [{restart_application, ssl}]},
{<<"6\\..*">>, [{restart_application, ssl}]},
{<<"5\\..*">>, [{restart_application, ssl}]},
{<<"4\\..*">>, [{restart_application, ssl}]},
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index 90e0810241..adee59393e 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -528,13 +528,12 @@ certify(internal, #server_key_exchange{exchange_keys = Keys},
end
end;
-certify(internal, #certificate_request{hashsign_algorithms = HashSigns},
+certify(internal, #certificate_request{} = CertRequest,
#state{session = #session{own_certificate = Cert},
- key_algorithm = KeyExAlg,
+ role = client,
ssl_options = #ssl_options{signature_algs = SupportedHashSigns},
negotiated_version = Version} = State0, Connection) ->
-
- case ssl_handshake:select_hashsign(HashSigns, Cert, KeyExAlg, SupportedHashSigns, Version) of
+ case ssl_handshake:select_hashsign(CertRequest, Cert, SupportedHashSigns, Version) of
#alert {} = Alert ->
Connection:handle_own_alert(Alert, Version, certify, State0);
NegotiatedHashSign ->
@@ -1049,9 +1048,9 @@ format_status(terminate, [_, StateName, State]) ->
srp_params = ?SECRET_PRINTOUT,
srp_keys = ?SECRET_PRINTOUT,
premaster_secret = ?SECRET_PRINTOUT,
- ssl_options = NewOptions}
+ ssl_options = NewOptions,
+ flight_buffer = ?SECRET_PRINTOUT}
}}]}].
-
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
@@ -1120,7 +1119,7 @@ resumed_server_hello(#state{session = Session,
server_hello(ServerHello, State0, Connection) ->
CipherSuite = ServerHello#server_hello.cipher_suite,
{KeyAlgorithm, _, _, _} = ssl_cipher:suite_definition(CipherSuite),
- State = Connection:send_handshake(ServerHello, State0),
+ State = Connection:queue_handshake(ServerHello, State0),
State#state{key_algorithm = KeyAlgorithm}.
server_hello_done(State, Connection) ->
@@ -1166,7 +1165,7 @@ certify_client(#state{client_certificate_requested = true, role = client,
session = #session{own_certificate = OwnCert}}
= State, Connection) ->
Certificate = ssl_handshake:certificate(OwnCert, CertDbHandle, CertDbRef, client),
- Connection:send_handshake(Certificate, State);
+ Connection:queue_handshake(Certificate, State);
certify_client(#state{client_certificate_requested = false} = State, _) ->
State.
@@ -1182,7 +1181,7 @@ verify_client_cert(#state{client_certificate_requested = true, role = client,
case ssl_handshake:client_certificate_verify(OwnCert, MasterSecret,
Version, HashSign, PrivateKey, Handshake0) of
#certificate_verify{} = Verified ->
- Connection:send_handshake(Verified, State);
+ Connection:queue_handshake(Verified, State);
ignore ->
State;
#alert{} = Alert ->
@@ -1276,7 +1275,7 @@ certify_server(#state{cert_db = CertDbHandle,
session = #session{own_certificate = OwnCert}} = State, Connection) ->
case ssl_handshake:certificate(OwnCert, CertDbHandle, CertDbRef, server) of
Cert = #certificate{} ->
- Connection:send_handshake(Cert, State);
+ Connection:queue_handshake(Cert, State);
Alert = #alert{} ->
throw(Alert)
end.
@@ -1303,7 +1302,7 @@ key_exchange(#state{role = server, key_algorithm = Algo,
HashSignAlgo, ClientRandom,
ServerRandom,
PrivateKey}),
- State = Connection:send_handshake(Msg, State0),
+ State = Connection:queue_handshake(Msg, State0),
State#state{diffie_hellman_keys = DHKeys};
key_exchange(#state{role = server, private_key = Key, key_algorithm = Algo} = State, _)
@@ -1328,7 +1327,7 @@ key_exchange(#state{role = server, key_algorithm = Algo,
HashSignAlgo, ClientRandom,
ServerRandom,
PrivateKey}),
- State = Connection:send_handshake(Msg, State0),
+ State = Connection:queue_handshake(Msg, State0),
State#state{diffie_hellman_keys = ECDHKeys};
key_exchange(#state{role = server, key_algorithm = psk,
@@ -1350,7 +1349,7 @@ key_exchange(#state{role = server, key_algorithm = psk,
HashSignAlgo, ClientRandom,
ServerRandom,
PrivateKey}),
- Connection:send_handshake(Msg, State0);
+ Connection:queue_handshake(Msg, State0);
key_exchange(#state{role = server, key_algorithm = dhe_psk,
ssl_options = #ssl_options{psk_identity = PskIdentityHint},
@@ -1371,7 +1370,7 @@ key_exchange(#state{role = server, key_algorithm = dhe_psk,
HashSignAlgo, ClientRandom,
ServerRandom,
PrivateKey}),
- State = Connection:send_handshake(Msg, State0),
+ State = Connection:queue_handshake(Msg, State0),
State#state{diffie_hellman_keys = DHKeys};
key_exchange(#state{role = server, key_algorithm = rsa_psk,
@@ -1393,7 +1392,7 @@ key_exchange(#state{role = server, key_algorithm = rsa_psk,
HashSignAlgo, ClientRandom,
ServerRandom,
PrivateKey}),
- Connection:send_handshake(Msg, State0);
+ Connection:queue_handshake(Msg, State0);
key_exchange(#state{role = server, key_algorithm = Algo,
ssl_options = #ssl_options{user_lookup_fun = LookupFun},
@@ -1422,7 +1421,7 @@ key_exchange(#state{role = server, key_algorithm = Algo,
HashSignAlgo, ClientRandom,
ServerRandom,
PrivateKey}),
- State = Connection:send_handshake(Msg, State0),
+ State = Connection:queue_handshake(Msg, State0),
State#state{srp_params = SrpParams,
srp_keys = Keys};
@@ -1432,7 +1431,7 @@ key_exchange(#state{role = client,
negotiated_version = Version,
premaster_secret = PremasterSecret} = State0, Connection) ->
Msg = rsa_key_exchange(Version, PremasterSecret, PublicKeyInfo),
- Connection:send_handshake(Msg, State0);
+ Connection:queue_handshake(Msg, State0);
key_exchange(#state{role = client,
key_algorithm = Algorithm,
@@ -1443,7 +1442,7 @@ key_exchange(#state{role = client,
Algorithm == dhe_rsa;
Algorithm == dh_anon ->
Msg = ssl_handshake:key_exchange(client, Version, {dh, DhPubKey}),
- Connection:send_handshake(Msg, State0);
+ Connection:queue_handshake(Msg, State0);
key_exchange(#state{role = client,
key_algorithm = Algorithm,
@@ -1453,7 +1452,7 @@ key_exchange(#state{role = client,
Algorithm == ecdh_ecdsa; Algorithm == ecdh_rsa;
Algorithm == ecdh_anon ->
Msg = ssl_handshake:key_exchange(client, Version, {ecdh, Keys}),
- Connection:send_handshake(Msg, State0);
+ Connection:queue_handshake(Msg, State0);
key_exchange(#state{role = client,
ssl_options = SslOpts,
@@ -1461,7 +1460,7 @@ key_exchange(#state{role = client,
negotiated_version = Version} = State0, Connection) ->
Msg = ssl_handshake:key_exchange(client, Version,
{psk, SslOpts#ssl_options.psk_identity}),
- Connection:send_handshake(Msg, State0);
+ Connection:queue_handshake(Msg, State0);
key_exchange(#state{role = client,
ssl_options = SslOpts,
@@ -1471,7 +1470,7 @@ key_exchange(#state{role = client,
Msg = ssl_handshake:key_exchange(client, Version,
{dhe_psk,
SslOpts#ssl_options.psk_identity, DhPubKey}),
- Connection:send_handshake(Msg, State0);
+ Connection:queue_handshake(Msg, State0);
key_exchange(#state{role = client,
ssl_options = SslOpts,
key_algorithm = rsa_psk,
@@ -1481,7 +1480,7 @@ key_exchange(#state{role = client,
= State0, Connection) ->
Msg = rsa_psk_key_exchange(Version, SslOpts#ssl_options.psk_identity,
PremasterSecret, PublicKeyInfo),
- Connection:send_handshake(Msg, State0);
+ Connection:queue_handshake(Msg, State0);
key_exchange(#state{role = client,
key_algorithm = Algorithm,
@@ -1492,7 +1491,7 @@ key_exchange(#state{role = client,
Algorithm == srp_rsa;
Algorithm == srp_anon ->
Msg = ssl_handshake:key_exchange(client, Version, {srp, ClientPubKey}),
- Connection:send_handshake(Msg, State0).
+ Connection:queue_handshake(Msg, State0).
rsa_key_exchange(Version, PremasterSecret, PublicKeyInfo = {Algorithm, _, _})
when Algorithm == ?rsaEncryption;
@@ -1539,7 +1538,7 @@ request_client_cert(#state{ssl_options = #ssl_options{verify = verify_peer,
HashSigns = ssl_handshake:available_signature_algs(SupportedHashSigns, Version, [Version]),
Msg = ssl_handshake:certificate_request(CipherSuite, CertDbHandle, CertDbRef,
HashSigns, Version),
- State = Connection:send_handshake(Msg, State0),
+ State = Connection:queue_handshake(Msg, State0),
State#state{client_certificate_requested = true};
request_client_cert(#state{ssl_options = #ssl_options{verify = verify_none}} =
@@ -1583,10 +1582,10 @@ next_protocol(#state{expecting_next_protocol_negotiation = false} = State, _) ->
State;
next_protocol(#state{negotiated_protocol = NextProtocol} = State0, Connection) ->
NextProtocolMessage = ssl_handshake:next_protocol(NextProtocol),
- Connection:send_handshake(NextProtocolMessage, State0).
+ Connection:queue_handshake(NextProtocolMessage, State0).
cipher_protocol(State, Connection) ->
- Connection:send_change_cipher(#change_cipher_spec{}, State).
+ Connection:queue_change_cipher(#change_cipher_spec{}, State).
finished(#state{role = Role, negotiated_version = Version,
session = Session,
diff --git a/lib/ssl/src/ssl_connection.hrl b/lib/ssl/src/ssl_connection.hrl
index 7682cb86ea..4b54943ddf 100644
--- a/lib/ssl/src/ssl_connection.hrl
+++ b/lib/ssl/src/ssl_connection.hrl
@@ -84,7 +84,12 @@
client_ecc, % {Curves, PointFmt}
tracker :: pid() | 'undefined', %% Tracker process for listen socket
sni_hostname = undefined,
- downgrade
+ downgrade,
+ flight_buffer = [] :: list() %% Buffer of TLS/DTLS records, used during the TLS handshake
+ %% to when possible pack more than on TLS record into the
+ %% underlaying packet format. Introduced by DTLS - RFC 4347.
+ %% The mecahnism is also usefull in TLS although we do not
+ %% need to worry about packet loss in TLS.
}).
-define(DEFAULT_DIFFIE_HELLMAN_PARAMS,
diff --git a/lib/ssl/src/ssl_handshake.erl b/lib/ssl/src/ssl_handshake.erl
index acc5ae6bd7..081efda768 100644
--- a/lib/ssl/src/ssl_handshake.erl
+++ b/lib/ssl/src/ssl_handshake.erl
@@ -65,7 +65,7 @@
%% Cipher suites handling
-export([available_suites/2, available_signature_algs/3, cipher_suites/2,
- select_session/11, supported_ecc/1]).
+ select_session/11, supported_ecc/1, available_signature_algs/4]).
%% Extensions handling
-export([client_hello_extensions/6,
@@ -74,7 +74,7 @@
]).
%% MISC
--export([select_version/3, prf/6, select_hashsign/5,
+-export([select_version/3, prf/6, select_hashsign/4, select_hashsign/5,
select_hashsign_algs/3,
premaster_secret/2, premaster_secret/3, premaster_secret/4]).
@@ -581,7 +581,7 @@ prf({3,_N}, PRFAlgo, Secret, Label, Seed, WantedLength) ->
{atom(), atom()} | undefined | #alert{}.
%%
-%% Description: Handles signature_algorithms extension
+%% Description: Handles signature_algorithms hello extension (server)
%%--------------------------------------------------------------------
select_hashsign(_, undefined, _, _, _Version) ->
{null, anon};
@@ -593,14 +593,17 @@ select_hashsign(HashSigns, Cert, KeyExAlgo,
select_hashsign(#hash_sign_algos{hash_sign_algos = HashSigns}, Cert, KeyExAlgo, SupportedHashSigns,
{Major, Minor}) when Major >= 3 andalso Minor >= 3 ->
#'OTPCertificate'{tbsCertificate = TBSCert} = public_key:pkix_decode_cert(Cert, otp),
- #'OTPSubjectPublicKeyInfo'{algorithm = {_,Algo, _}} = TBSCert#'OTPTBSCertificate'.subjectPublicKeyInfo,
- Sign = cert_sign(Algo),
- case lists:filter(fun({sha, dsa = S}) when S == Sign ->
- true;
- ({_, dsa}) ->
- false;
- ({_, _} = Algos) ->
- is_acceptable_hash_sign(Algos, Sign, KeyExAlgo, SupportedHashSigns);
+ #'OTPCertificate'{tbsCertificate = TBSCert,
+ signatureAlgorithm = {_,SignAlgo, _}} = public_key:pkix_decode_cert(Cert, otp),
+ #'OTPSubjectPublicKeyInfo'{algorithm = {_, SubjAlgo, _}} =
+ TBSCert#'OTPTBSCertificate'.subjectPublicKeyInfo,
+
+ Sign = sign_algo(SignAlgo),
+ SubSing = sign_algo(SubjAlgo),
+
+ case lists:filter(fun({_, S} = Algos) when S == Sign ->
+ is_acceptable_hash_sign(Algos, Sign,
+ SubSing, KeyExAlgo, SupportedHashSigns);
(_) ->
false
end, HashSigns) of
@@ -613,6 +616,49 @@ select_hashsign(_, Cert, _, _, Version) ->
#'OTPCertificate'{tbsCertificate = TBSCert} = public_key:pkix_decode_cert(Cert, otp),
#'OTPSubjectPublicKeyInfo'{algorithm = {_,Algo, _}} = TBSCert#'OTPTBSCertificate'.subjectPublicKeyInfo,
select_hashsign_algs(undefined, Algo, Version).
+%%--------------------------------------------------------------------
+-spec select_hashsign(#certificate_request{}, binary(),
+ [atom()], ssl_record:ssl_version()) ->
+ {atom(), atom()} | #alert{}.
+
+%%
+%% Description: Handles signature algorithms selection for certificate requests (client)
+%%--------------------------------------------------------------------
+select_hashsign(#certificate_request{}, undefined, _, {Major, Minor}) when Major >= 3 andalso Minor >= 3->
+ %% There client does not have a certificate and will send an empty reply, the server may fail
+ %% or accept the connection by its own preference. No signature algorihms needed as there is
+ %% no certificate to verify.
+ {undefined, undefined};
+
+select_hashsign(#certificate_request{hashsign_algorithms = #hash_sign_algos{hash_sign_algos = HashSigns},
+ certificate_types = Types}, Cert, SupportedHashSigns,
+ {Major, Minor}) when Major >= 3 andalso Minor >= 3->
+ #'OTPCertificate'{tbsCertificate = TBSCert} = public_key:pkix_decode_cert(Cert, otp),
+ #'OTPCertificate'{tbsCertificate = TBSCert,
+ signatureAlgorithm = {_,SignAlgo, _}} = public_key:pkix_decode_cert(Cert, otp),
+ #'OTPSubjectPublicKeyInfo'{algorithm = {_, SubjAlgo, _}} =
+ TBSCert#'OTPTBSCertificate'.subjectPublicKeyInfo,
+
+ Sign = sign_algo(SignAlgo),
+ SubSign = sign_algo(SubjAlgo),
+
+ case is_acceptable_cert_type(SubSign, HashSigns, Types) andalso is_supported_sign(Sign, HashSigns) of
+ true ->
+ case lists:filter(fun({_, S} = Algos) when S == SubSign ->
+ is_acceptable_hash_sign(Algos, SupportedHashSigns);
+ (_) ->
+ false
+ end, HashSigns) of
+ [] ->
+ ?ALERT_REC(?FATAL, ?INSUFFICIENT_SECURITY, no_suitable_signature_algorithm);
+ [HashSign | _] ->
+ HashSign
+ end;
+ false ->
+ ?ALERT_REC(?FATAL, ?INSUFFICIENT_SECURITY, no_suitable_signature_algorithm)
+ end;
+select_hashsign(#certificate_request{}, Cert, _, Version) ->
+ select_hashsign(undefined, Cert, undefined, [], Version).
%%--------------------------------------------------------------------
-spec select_hashsign_algs({atom(), atom()}| undefined, oid(), ssl_record:ssl_version()) ->
@@ -648,6 +694,7 @@ select_hashsign_algs(undefined, ?rsaEncryption, _) ->
select_hashsign_algs(undefined, ?'id-dsa', _) ->
{sha, dsa}.
+
%%--------------------------------------------------------------------
-spec master_secret(atom(), ssl_record:ssl_version(), #session{} | binary(), #connection_states{},
client | server) -> {binary(), #connection_states{}} | #alert{}.
@@ -1143,11 +1190,13 @@ certificate_types(_, {N, M}) when N >= 3 andalso M >= 3 ->
end;
certificate_types({KeyExchange, _, _, _}, _) when KeyExchange == rsa;
+ KeyExchange == dh_rsa;
KeyExchange == dhe_rsa;
KeyExchange == ecdhe_rsa ->
<<?BYTE(?RSA_SIGN)>>;
-certificate_types({KeyExchange, _, _, _}, _) when KeyExchange == dhe_dss;
+certificate_types({KeyExchange, _, _, _}, _) when KeyExchange == dh_dss;
+ KeyExchange == dhe_dss;
KeyExchange == srp_dss ->
<<?BYTE(?DSS_SIGN)>>;
@@ -1256,8 +1305,40 @@ handle_server_hello_extensions(RecordCB, Random, CipherSuite, Compression,
end.
select_version(RecordCB, ClientVersion, Versions) ->
- ServerVersion = RecordCB:highest_protocol_version(Versions),
- RecordCB:lowest_protocol_version(ClientVersion, ServerVersion).
+ do_select_version(RecordCB, ClientVersion, Versions).
+
+do_select_version(_, ClientVersion, []) ->
+ ClientVersion;
+do_select_version(RecordCB, ClientVersion, [Version | Versions]) ->
+ case RecordCB:is_higher(Version, ClientVersion) of
+ true ->
+ %% Version too high for client - keep looking
+ do_select_version(RecordCB, ClientVersion, Versions);
+ false ->
+ %% Version ok for client - look for a higher
+ do_select_version(RecordCB, ClientVersion, Versions, Version)
+ end.
+%%
+do_select_version(_, _, [], GoodVersion) ->
+ GoodVersion;
+do_select_version(
+ RecordCB, ClientVersion, [Version | Versions], GoodVersion) ->
+ BetterVersion =
+ case RecordCB:is_higher(Version, ClientVersion) of
+ true ->
+ %% Version too high for client
+ GoodVersion;
+ false ->
+ %% Version ok for client
+ case RecordCB:is_higher(Version, GoodVersion) of
+ true ->
+ %% Use higher version
+ Version;
+ false ->
+ GoodVersion
+ end
+ end,
+ do_select_version(RecordCB, ClientVersion, Versions, BetterVersion).
renegotiation_info(_, client, _, false) ->
#renegotiation_info{renegotiated_connection = undefined};
@@ -2164,30 +2245,87 @@ distpoints_lookup([DistPoint | Rest], Issuer, Callback, CRLDbHandle) ->
[{DistPoint, {CRL, public_key:der_decode('CertificateList', CRL)}} || CRL <- CRLs]
end.
-cert_sign(?rsaEncryption) ->
+sign_algo(?rsaEncryption) ->
rsa;
-cert_sign(?'id-ecPublicKey') ->
+sign_algo(?'id-ecPublicKey') ->
ecdsa;
-cert_sign(?'id-dsa') ->
+sign_algo(?'id-dsa') ->
dsa;
-cert_sign(Alg) ->
+sign_algo(Alg) ->
{_, Sign} =public_key:pkix_sign_types(Alg),
Sign.
-is_acceptable_hash_sign({_, Sign} = Algos, Sign, _, SupportedHashSigns) ->
- is_acceptable_hash_sign(Algos, SupportedHashSigns);
-is_acceptable_hash_sign(Algos,_, KeyExAlgo, SupportedHashSigns) when KeyExAlgo == dh_ecdsa;
- KeyExAlgo == ecdh_rsa;
- KeyExAlgo == ecdh_ecdsa ->
+is_acceptable_hash_sign(Algos, _, _, KeyExAlgo, SupportedHashSigns) when
+ KeyExAlgo == dh_dss;
+ KeyExAlgo == dh_rsa;
+ KeyExAlgo == dh_ecdsa ->
+ %% dh_* could be called only dh in TLS-1.2
+ is_acceptable_hash_sign(Algos, SupportedHashSigns);
+is_acceptable_hash_sign(Algos, rsa, ecdsa, ecdh_rsa, SupportedHashSigns) ->
+ is_acceptable_hash_sign(Algos, SupportedHashSigns);
+is_acceptable_hash_sign({_, rsa} = Algos, rsa, _, dhe_rsa, SupportedHashSigns) ->
+ is_acceptable_hash_sign(Algos, SupportedHashSigns);
+is_acceptable_hash_sign({_, rsa} = Algos, rsa, rsa, ecdhe_rsa, SupportedHashSigns) ->
+ is_acceptable_hash_sign(Algos, SupportedHashSigns);
+is_acceptable_hash_sign({_, rsa} = Algos, rsa, rsa, rsa, SupportedHashSigns) ->
+ is_acceptable_hash_sign(Algos, SupportedHashSigns);
+is_acceptable_hash_sign({_, rsa} = Algos, rsa, _, srp_rsa, SupportedHashSigns) ->
+ is_acceptable_hash_sign(Algos, SupportedHashSigns);
+is_acceptable_hash_sign({_, rsa} = Algos, rsa, _, rsa_psk, SupportedHashSigns) ->
+ is_acceptable_hash_sign(Algos, SupportedHashSigns);
+is_acceptable_hash_sign({_, dsa} = Algos, dsa, _, dhe_dss, SupportedHashSigns) ->
+ is_acceptable_hash_sign(Algos, SupportedHashSigns);
+is_acceptable_hash_sign({_, dsa} = Algos, dsa, _, srp_dss, SupportedHashSigns) ->
is_acceptable_hash_sign(Algos, SupportedHashSigns);
-is_acceptable_hash_sign(_,_,_,_) ->
- false.
+is_acceptable_hash_sign({_, ecdsa} = Algos, ecdsa, _, dhe_ecdsa, SupportedHashSigns) ->
+ is_acceptable_hash_sign(Algos, SupportedHashSigns);
+is_acceptable_hash_sign({_, ecdsa} = Algos, ecdsa, ecdsa, ecdhe_ecdsa, SupportedHashSigns) ->
+ is_acceptable_hash_sign(Algos, SupportedHashSigns);
+is_acceptable_hash_sign(_, _, _, KeyExAlgo, _) when
+ KeyExAlgo == psk;
+ KeyExAlgo == dhe_psk;
+ KeyExAlgo == srp_anon;
+ KeyExAlgo == dh_anon;
+ KeyExAlgo == ecdhe_anon
+ ->
+ true;
+is_acceptable_hash_sign(_,_, _,_,_) ->
+ false.
+
is_acceptable_hash_sign(Algos, SupportedHashSigns) ->
lists:member(Algos, SupportedHashSigns).
+is_acceptable_cert_type(Sign, _HashSigns, Types) ->
+ lists:member(sign_type(Sign), binary_to_list(Types)).
+
+is_supported_sign(Sign, HashSigns) ->
+ [] =/= lists:dropwhile(fun({_, S}) when S =/= Sign ->
+ true;
+ (_)->
+ false
+ end, HashSigns).
+sign_type(rsa) ->
+ ?RSA_SIGN;
+sign_type(dsa) ->
+ ?DSS_SIGN;
+sign_type(ecdsa) ->
+ ?ECDSA_SIGN.
+
+
bad_key(#'DSAPrivateKey'{}) ->
unacceptable_dsa_key;
bad_key(#'RSAPrivateKey'{}) ->
unacceptable_rsa_key;
bad_key(#'ECPrivateKey'{}) ->
unacceptable_ecdsa_key.
+
+available_signature_algs(undefined, SupportedHashSigns, _, {Major, Minor}) when
+ (Major >= 3) andalso (Minor >= 3) ->
+ SupportedHashSigns;
+available_signature_algs(#hash_sign_algos{hash_sign_algos = ClientHashSigns}, SupportedHashSigns,
+ _, {Major, Minor}) when (Major >= 3) andalso (Minor >= 3) ->
+ sets:to_list(sets:intersection(sets:from_list(ClientHashSigns),
+ sets:from_list(SupportedHashSigns)));
+available_signature_algs(_, _, _, _) ->
+ undefined.
+
diff --git a/lib/ssl/src/ssl_record.erl b/lib/ssl/src/ssl_record.erl
index 0a086f5eeb..5bb1c92c2d 100644
--- a/lib/ssl/src/ssl_record.erl
+++ b/lib/ssl/src/ssl_record.erl
@@ -72,7 +72,8 @@ init_connection_states(Role, BeastMitigation) ->
ConnectionEnd = record_protocol_role(Role),
Current = initial_connection_state(ConnectionEnd, BeastMitigation),
Pending = empty_connection_state(ConnectionEnd, BeastMitigation),
- #connection_states{current_read = Current,
+ #connection_states{dtls_write_msg_seq = 1, % only used by dtls
+ current_read = Current,
pending_read = Pending,
current_write = Current,
pending_write = Pending
@@ -320,14 +321,25 @@ encode_handshake(Frag, Version,
beast_mitigation = BeastMitigation,
security_parameters =
#security_parameters{bulk_cipher_algorithm = BCA}}} =
- ConnectionStates) ->
+ ConnectionStates)
+when is_list(Frag) ->
case iolist_size(Frag) of
N when N > ?MAX_PLAIN_TEXT_LENGTH ->
Data = split_bin(iolist_to_binary(Frag), ?MAX_PLAIN_TEXT_LENGTH, Version, BCA, BeastMitigation),
encode_iolist(?HANDSHAKE, Data, Version, ConnectionStates);
_ ->
encode_plain_text(?HANDSHAKE, Version, Frag, ConnectionStates)
- end.
+ end;
+%% TODO: this is a workarround for DTLS
+%%
+%% DTLS need to select the connection write state based on Epoch it wants to
+%% send this fragment in. That Epoch does not nessarily has to be the same
+%% as the current_write epoch.
+%% The right solution might be to pass the WriteState instead of the ConnectionStates,
+%% however, this will require substantion API changes.
+encode_handshake(Frag, Version, ConnectionStates) ->
+ encode_plain_text(?HANDSHAKE, Version, Frag, ConnectionStates).
+
%%--------------------------------------------------------------------
-spec encode_alert_record(#alert{}, ssl_version(), #connection_states{}) ->
{iolist(), #connection_states{}}.
diff --git a/lib/ssl/src/ssl_record.hrl b/lib/ssl/src/ssl_record.hrl
index 87fde35258..a41264ff9b 100644
--- a/lib/ssl/src/ssl_record.hrl
+++ b/lib/ssl/src/ssl_record.hrl
@@ -46,6 +46,8 @@
}).
-record(connection_states, {
+ dtls_write_msg_seq, %% Only used by DTLS
+
current_read,
pending_read,
current_write,
diff --git a/lib/ssl/src/ssl_tls_dist_proxy.erl b/lib/ssl/src/ssl_tls_dist_proxy.erl
index a920f54ed2..08947f24dd 100644
--- a/lib/ssl/src/ssl_tls_dist_proxy.erl
+++ b/lib/ssl/src/ssl_tls_dist_proxy.erl
@@ -117,7 +117,7 @@ handle_call({listen, Driver, Name}, _From, State) ->
{ok, WorldTcpAddress} = get_tcp_address(World),
{_,Port} = WorldTcpAddress#net_address.address,
ErlEpmd = net_kernel:epmd_module(),
- case ErlEpmd:register_node(Name, Port) of
+ case ErlEpmd:register_node(Name, Port, Driver) of
{ok, Creation} ->
{reply, {ok, {Socket, TcpAddress, Creation}},
State#state{listen={Socket, World}}};
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl
index eaf2dd002d..9880befa94 100644
--- a/lib/ssl/src/tls_connection.erl
+++ b/lib/ssl/src/tls_connection.erl
@@ -49,8 +49,9 @@
-export([next_record/1, next_event/3]).
%% Handshake handling
--export([renegotiate/2, send_handshake/2, send_change_cipher/2,
- reinit_handshake_data/1, handle_sni_extension/2]).
+-export([renegotiate/2, send_handshake/2,
+ queue_handshake/2, queue_change_cipher/2,
+ reinit_handshake_data/1, handle_sni_extension/2]).
%% Alert and close handling
-export([send_alert/2, handle_own_alert/4, handle_close_alert/3,
@@ -102,17 +103,32 @@ start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = true},_, Tracker} =
Error
end.
-send_handshake(Handshake, #state{negotiated_version = Version,
- socket = Socket,
- transport_cb = Transport,
- tls_handshake_history = Hist0,
- connection_states = ConnectionStates0} = State0) ->
+send_handshake(Handshake, State) ->
+ send_handshake_flight(queue_handshake(Handshake, State)).
+
+queue_handshake(Handshake, #state{negotiated_version = Version,
+ tls_handshake_history = Hist0,
+ flight_buffer = Flight0,
+ connection_states = ConnectionStates0} = State0) ->
{BinHandshake, ConnectionStates, Hist} =
encode_handshake(Handshake, Version, ConnectionStates0, Hist0),
- Transport:send(Socket, BinHandshake),
State0#state{connection_states = ConnectionStates,
- tls_handshake_history = Hist
- }.
+ tls_handshake_history = Hist,
+ flight_buffer = Flight0 ++ [BinHandshake]}.
+
+send_handshake_flight(#state{socket = Socket,
+ transport_cb = Transport,
+ flight_buffer = Flight} = State0) ->
+ Transport:send(Socket, Flight),
+ State0#state{flight_buffer = []}.
+
+queue_change_cipher(Msg, #state{negotiated_version = Version,
+ flight_buffer = Flight0,
+ connection_states = ConnectionStates0} = State0) ->
+ {BinChangeCipher, ConnectionStates} =
+ encode_change_cipher(Msg, Version, ConnectionStates0),
+ State0#state{connection_states = ConnectionStates,
+ flight_buffer = Flight0 ++ [BinChangeCipher]}.
send_alert(Alert, #state{negotiated_version = Version,
socket = Socket,
@@ -123,15 +139,6 @@ send_alert(Alert, #state{negotiated_version = Version,
Transport:send(Socket, BinMsg),
State0#state{connection_states = ConnectionStates}.
-send_change_cipher(Msg, #state{connection_states = ConnectionStates0,
- socket = Socket,
- negotiated_version = Version,
- transport_cb = Transport} = State0) ->
- {BinChangeCipher, ConnectionStates} =
- encode_change_cipher(Msg, Version, ConnectionStates0),
- Transport:send(Socket, BinChangeCipher),
- State0#state{connection_states = ConnectionStates}.
-
reinit_handshake_data(State) ->
%% premaster_secret, public_key_info and tls_handshake_info
%% are only needed during the handshake phase.
@@ -141,7 +148,7 @@ reinit_handshake_data(State) ->
public_key_info = undefined,
tls_handshake_history = ssl_handshake:init_handshake_history()
}.
-
+
%%====================================================================
%% tls_connection_sup API
%%====================================================================
@@ -504,7 +511,8 @@ initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions, Tracker}, Us
allow_renegotiate = SSLOptions#ssl_options.client_renegotiation,
start_or_recv_from = undefined,
protocol_cb = ?MODULE,
- tracker = Tracker
+ tracker = Tracker,
+ flight_buffer = []
}.
diff --git a/lib/ssl/src/tls_handshake.erl b/lib/ssl/src/tls_handshake.erl
index 397f963ad5..566b7db332 100644
--- a/lib/ssl/src/tls_handshake.erl
+++ b/lib/ssl/src/tls_handshake.erl
@@ -159,7 +159,8 @@ handle_client_hello(Version, #client_hello{session_id = SugesstedId,
{Port, Session0, Cache, CacheCb, ConnectionStates0, Cert, _}, Renegotiation) ->
case tls_record:is_acceptable_version(Version, Versions) of
true ->
- AvailableHashSigns = available_signature_algs(ClientHashSigns, SupportedHashSigns, Cert, Version),
+ AvailableHashSigns = ssl_handshake:available_signature_algs(
+ ClientHashSigns, SupportedHashSigns, Cert, Version),
ECCCurve = ssl_handshake:select_curve(Curves, ssl_handshake:supported_ecc(Version)),
{Type, #session{cipher_suite = CipherSuite} = Session1}
= ssl_handshake:select_session(SugesstedId, CipherSuites, AvailableHashSigns, Compressions,
@@ -284,14 +285,3 @@ handle_server_hello_extensions(Version, SessionId, Random, CipherSuite,
{Version, SessionId, ConnectionStates, ProtoExt, Protocol}
end.
-available_signature_algs(undefined, SupportedHashSigns, _, {Major, Minor}) when
- (Major >= 3) andalso (Minor >= 3) ->
- SupportedHashSigns;
-available_signature_algs(#hash_sign_algos{hash_sign_algos = ClientHashSigns}, SupportedHashSigns,
- _, {Major, Minor}) when (Major >= 3) andalso (Minor >= 3) ->
- sets:to_list(sets:intersection(sets:from_list(ClientHashSigns),
- sets:from_list(SupportedHashSigns)));
-available_signature_algs(_, _, _, _) ->
- undefined.
-
-
diff --git a/lib/ssl/test/ssl_ECC_SUITE.erl b/lib/ssl/test/ssl_ECC_SUITE.erl
index b8a03f578d..69ac9908fa 100644
--- a/lib/ssl/test/ssl_ECC_SUITE.erl
+++ b/lib/ssl/test/ssl_ECC_SUITE.erl
@@ -159,42 +159,42 @@ end_per_testcase(_TestCase, Config) ->
client_ecdh_server_ecdh(Config) when is_list(Config) ->
COpts = proplists:get_value(client_ecdh_rsa_opts, Config),
- SOpts = proplists:get_value(server_ecdh_rsa_verify_opts, Config),
+ SOpts = proplists:get_value(server_ecdh_rsa_opts, Config),
basic_test(COpts, SOpts, Config).
client_ecdh_server_rsa(Config) when is_list(Config) ->
COpts = proplists:get_value(client_ecdh_rsa_opts, Config),
- SOpts = proplists:get_value(server_ecdh_rsa_verify_opts, Config),
+ SOpts = proplists:get_value(server_opts, Config),
basic_test(COpts, SOpts, Config).
client_rsa_server_ecdh(Config) when is_list(Config) ->
- COpts = proplists:get_value(client_ecdh_rsa_opts, Config),
- SOpts = proplists:get_value(server_ecdh_rsa_verify_opts, Config),
+ COpts = proplists:get_value(client_opts, Config),
+ SOpts = proplists:get_value(server_ecdh_rsa_opts, Config),
basic_test(COpts, SOpts, Config).
client_rsa_server_rsa(Config) when is_list(Config) ->
- COpts = proplists:get_value(client_verification_opts, Config),
- SOpts = proplists:get_value(server_verification_opts, Config),
+ COpts = proplists:get_value(client_opts, Config),
+ SOpts = proplists:get_value(server_opts, Config),
basic_test(COpts, SOpts, Config).
client_ecdsa_server_ecdsa(Config) when is_list(Config) ->
COpts = proplists:get_value(client_ecdsa_opts, Config),
- SOpts = proplists:get_value(server_ecdsa_verify_opts, Config),
+ SOpts = proplists:get_value(server_ecdsa_opts, Config),
basic_test(COpts, SOpts, Config).
client_ecdsa_server_rsa(Config) when is_list(Config) ->
COpts = proplists:get_value(client_ecdsa_opts, Config),
- SOpts = proplists:get_value(server_ecdsa_verify_opts, Config),
+ SOpts = proplists:get_value(server_opts, Config),
basic_test(COpts, SOpts, Config).
client_rsa_server_ecdsa(Config) when is_list(Config) ->
- COpts = proplists:get_value(client_ecdsa_opts, Config),
- SOpts = proplists:get_value(server_ecdsa_verify_opts, Config),
+ COpts = proplists:get_value(client_opts, Config),
+ SOpts = proplists:get_value(server_ecdsa_opts, Config),
basic_test(COpts, SOpts, Config).
client_ecdsa_server_ecdsa_with_raw_key(Config) when is_list(Config) ->
COpts = proplists:get_value(client_ecdsa_opts, Config),
- SOpts = proplists:get_value(server_ecdsa_verify_opts, Config),
+ SOpts = proplists:get_value(server_ecdsa_opts, Config),
ServerCert = proplists:get_value(certfile, SOpts),
ServerKeyFile = proplists:get_value(keyfile, SOpts),
{ok, PemBin} = file:read_file(ServerKeyFile),
@@ -244,20 +244,20 @@ basic_test(ClientCert, ClientKey, ClientCA, ServerCert, ServerKey, ServerCA, Con
check_result(Server, SType, Client, CType),
close(Server, Client).
-start_client(openssl, Port, CA, OwnCa, Cert, Key, Config) ->
- PrivDir = proplists:get_value(priv_dir, Config),
- NewCA = new_ca(filename:join(PrivDir, "new_ca.pem"), CA, OwnCa),
+start_client(openssl, Port, PeerCA, OwnCa, Cert, Key, _Config) ->
+ CA = new_openssl_ca("openssl_client_ca", PeerCA, OwnCa),
Version = tls_record:protocol_version(tls_record:highest_protocol_version([])),
Exe = "openssl",
Args = ["s_client", "-verify", "2", "-port", integer_to_list(Port),
ssl_test_lib:version_flag(Version),
- "-cert", Cert, "-CAfile", NewCA,
+ "-cert", Cert, "-CAfile", CA,
"-key", Key, "-host","localhost", "-msg", "-debug"],
OpenSslPort = ssl_test_lib:portable_open_port(Exe, Args),
true = port_command(OpenSslPort, "Hello world"),
OpenSslPort;
-start_client(erlang, Port, CA, _, Cert, Key, Config) ->
+start_client(erlang, Port, PeerCA, OwnCa, Cert, Key, Config) ->
+ CA = new_ca("erlang_client_ca", PeerCA, OwnCa),
{ClientNode, _, Hostname} = ssl_test_lib:run_where(Config),
ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
{host, Hostname},
@@ -267,20 +267,19 @@ start_client(erlang, Port, CA, _, Cert, Key, Config) ->
{cacertfile, CA},
{certfile, Cert}, {keyfile, Key}]}]).
-start_server(openssl, CA, OwnCa, Cert, Key, Config) ->
- PrivDir = proplists:get_value(priv_dir, Config),
- NewCA = new_ca(filename:join(PrivDir, "new_ca.pem"), CA, OwnCa),
-
+start_server(openssl, PeerCA, OwnCa, Cert, Key, _Config) ->
+ CA = new_openssl_ca("openssl_server_ca", PeerCA, OwnCa),
Port = ssl_test_lib:inet_port(node()),
Version = tls_record:protocol_version(tls_record:highest_protocol_version([])),
Exe = "openssl",
Args = ["s_server", "-accept", integer_to_list(Port), ssl_test_lib:version_flag(Version),
- "-verify", "2", "-cert", Cert, "-CAfile", NewCA,
+ "-verify", "2", "-cert", Cert, "-CAfile", CA,
"-key", Key, "-msg", "-debug"],
OpenSslPort = ssl_test_lib:portable_open_port(Exe, Args),
true = port_command(OpenSslPort, "Hello world"),
{OpenSslPort, Port};
-start_server(erlang, CA, _, Cert, Key, Config) ->
+start_server(erlang, PeerCA, OwnCa, Cert, Key, Config) ->
+ CA = new_ca("erlang_server_ca", PeerCA, OwnCa),
{_, ServerNode, _} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
{from, self()},
@@ -291,7 +290,8 @@ start_server(erlang, CA, _, Cert, Key, Config) ->
[{verify, verify_peer}, {cacertfile, CA},
{certfile, Cert}, {keyfile, Key}]}]),
{Server, ssl_test_lib:inet_port(Server)}.
-start_server_with_raw_key(erlang, CA, _, Cert, Key, Config) ->
+start_server_with_raw_key(erlang, PeerCA, OwnCa, Cert, Key, Config) ->
+ CA = new_ca("erlang_server_ca", PeerCA, OwnCa),
{_, ServerNode, _} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
{from, self()},
@@ -336,17 +336,27 @@ close(Client, Server) ->
ssl_test_lib:close(Server),
ssl_test_lib:close(Client).
-%% Work around OpenSSL bug, apparently the same bug as we had fixed in
-%% 11629690ba61f8e0c93ef9b2b6102fd279825977
new_ca(FileName, CA, OwnCa) ->
{ok, P1} = file:read_file(CA),
E1 = public_key:pem_decode(P1),
{ok, P2} = file:read_file(OwnCa),
E2 = public_key:pem_decode(P2),
+ Pem = public_key:pem_encode(E1 ++E2),
+ file:write_file(FileName, Pem),
+ FileName.
+
+new_openssl_ca(FileName, CA, OwnCa) ->
+ {ok, P1} = file:read_file(CA),
+ E1 = public_key:pem_decode(P1),
+ {ok, P2} = file:read_file(OwnCa),
+ E2 = public_key:pem_decode(P2),
case os:cmd("openssl version") of
"OpenSSL 1.0.1p-freebsd" ++ _ ->
Pem = public_key:pem_encode(E1 ++E2),
file:write_file(FileName, Pem);
+ "LibreSSL" ++ _ ->
+ Pem = public_key:pem_encode(E1 ++E2),
+ file:write_file(FileName, Pem);
_ ->
Pem = public_key:pem_encode(E2 ++E1),
file:write_file(FileName, Pem)
diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl
index 93b6ae66dc..665dbb1df3 100644
--- a/lib/ssl/test/ssl_basic_SUITE.erl
+++ b/lib/ssl/test/ssl_basic_SUITE.erl
@@ -347,10 +347,13 @@ init_per_testcase(TestCase, Config) when TestCase == psk_cipher_suites;
TestCase == psk_with_hint_cipher_suites;
TestCase == ciphers_rsa_signed_certs;
TestCase == ciphers_rsa_signed_certs_openssl_names;
+ TestCase == ciphers_dsa_signed_certs;
+ TestCase == ciphers_dsa_signed_certs_openssl_names;
+ TestCase == anonymous_cipher_suites;
TestCase == versions_option,
TestCase == tls_tcp_connect_big ->
ssl_test_lib:ct_log_supported_protocol_versions(Config),
- ct:timetrap({seconds, 30}),
+ ct:timetrap({seconds, 60}),
Config;
init_per_testcase(rizzo, Config) ->
@@ -405,8 +408,13 @@ init_per_testcase(TestCase, Config) when TestCase == tls_ssl_accept_timeout;
ssl_test_lib:ct_log_supported_protocol_versions(Config),
ct:timetrap({seconds, 15}),
Config;
-init_per_testcase(clear_pem_cache, Config) ->
+init_per_testcase(TestCase, Config) when TestCase == clear_pem_cache;
+ TestCase == der_input;
+ TestCase == defaults ->
ssl_test_lib:ct_log_supported_protocol_versions(Config),
+ %% White box test need clean start
+ ssl:stop(),
+ ssl:start(),
ct:timetrap({seconds, 20}),
Config;
init_per_testcase(raw_ssl_option, Config) ->
@@ -564,8 +572,8 @@ prf(Config) when is_list(Config) ->
connection_info() ->
[{doc,"Test the API function ssl:connection_information/1"}].
connection_info(Config) when is_list(Config) ->
- ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
- ServerOpts = ssl_test_lib:ssl_options(server_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
+ ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
@@ -1141,8 +1149,8 @@ cipher_suites_mix() ->
cipher_suites_mix(Config) when is_list(Config) ->
CipherSuites = [{ecdh_rsa,aes_128_cbc,sha256,sha256}, {rsa,aes_128_cbc,sha}],
- ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
- ServerOpts = ssl_test_lib:ssl_options(server_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
+ ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
@@ -4406,14 +4414,14 @@ run_suites(Ciphers, Version, Config, Type) ->
{ClientOpts, ServerOpts} =
case Type of
rsa ->
- {ssl_test_lib:ssl_options(client_opts, Config),
- ssl_test_lib:ssl_options(server_opts, Config)};
+ {ssl_test_lib:ssl_options(client_verification_opts, Config),
+ ssl_test_lib:ssl_options(server_verification_opts, Config)};
dsa ->
- {ssl_test_lib:ssl_options(client_opts, Config),
+ {ssl_test_lib:ssl_options(client_verification_opts, Config),
ssl_test_lib:ssl_options(server_dsa_opts, Config)};
anonymous ->
%% No certs in opts!
- {ssl_test_lib:ssl_options(client_opts, Config),
+ {ssl_test_lib:ssl_options(client_verification_opts, Config),
ssl_test_lib:ssl_options(server_anon, Config)};
psk ->
{ssl_test_lib:ssl_options(client_psk, Config),
@@ -4437,31 +4445,31 @@ run_suites(Ciphers, Version, Config, Type) ->
{ssl_test_lib:ssl_options(client_srp_dsa, Config),
ssl_test_lib:ssl_options(server_srp_dsa, Config)};
ecdsa ->
- {ssl_test_lib:ssl_options(client_opts, Config),
+ {ssl_test_lib:ssl_options(client_verification_opts, Config),
ssl_test_lib:ssl_options(server_ecdsa_opts, Config)};
ecdh_rsa ->
- {ssl_test_lib:ssl_options(client_opts, Config),
+ {ssl_test_lib:ssl_options(client_verification_opts, Config),
ssl_test_lib:ssl_options(server_ecdh_rsa_opts, Config)};
rc4_rsa ->
- {ssl_test_lib:ssl_options(client_opts, Config),
+ {ssl_test_lib:ssl_options(client_verification_opts, Config),
[{ciphers, Ciphers} |
- ssl_test_lib:ssl_options(server_opts, Config)]};
+ ssl_test_lib:ssl_options(server_verification_opts, Config)]};
rc4_ecdh_rsa ->
- {ssl_test_lib:ssl_options(client_opts, Config),
+ {ssl_test_lib:ssl_options(client_verification_opts, Config),
[{ciphers, Ciphers} |
ssl_test_lib:ssl_options(server_ecdh_rsa_opts, Config)]};
rc4_ecdsa ->
- {ssl_test_lib:ssl_options(client_opts, Config),
+ {ssl_test_lib:ssl_options(client_verification_opts, Config),
[{ciphers, Ciphers} |
ssl_test_lib:ssl_options(server_ecdsa_opts, Config)]};
des_dhe_rsa ->
- {ssl_test_lib:ssl_options(client_opts, Config),
+ {ssl_test_lib:ssl_options(client_verification_opts, Config),
[{ciphers, Ciphers} |
- ssl_test_lib:ssl_options(server_opts, Config)]};
+ ssl_test_lib:ssl_options(server_verification_opts, Config)]};
des_rsa ->
- {ssl_test_lib:ssl_options(client_opts, Config),
+ {ssl_test_lib:ssl_options(client_verification_opts, Config),
[{ciphers, Ciphers} |
- ssl_test_lib:ssl_options(server_opts, Config)]}
+ ssl_test_lib:ssl_options(server_verification_opts, Config)]}
end,
Result = lists:map(fun(Cipher) ->
diff --git a/lib/ssl/test/ssl_certificate_verify_SUITE.erl b/lib/ssl/test/ssl_certificate_verify_SUITE.erl
index 20165c70f0..c83c513eb3 100644
--- a/lib/ssl/test/ssl_certificate_verify_SUITE.erl
+++ b/lib/ssl/test/ssl_certificate_verify_SUITE.erl
@@ -65,9 +65,10 @@ tests() ->
cert_expired,
invalid_signature_client,
invalid_signature_server,
- extended_key_usage_verify_peer,
- extended_key_usage_verify_none,
- critical_extension_verify_peer,
+ extended_key_usage_verify_client,
+ extended_key_usage_verify_server,
+ critical_extension_verify_client,
+ critical_extension_verify_server,
critical_extension_verify_none].
error_handling_tests()->
@@ -122,6 +123,8 @@ init_per_testcase(TestCase, Config) when TestCase == cert_expired;
ssl:clear_pem_cache(),
init_per_testcase(common, Config);
init_per_testcase(_TestCase, Config) ->
+ ssl:stop(),
+ ssl:start(),
ssl_test_lib:ct_log_supported_protocol_versions(Config),
ct:timetrap({seconds, 5}),
Config.
@@ -136,7 +139,7 @@ end_per_testcase(_TestCase, Config) ->
verify_peer() ->
[{doc,"Test option verify_peer"}].
verify_peer(Config) when is_list(Config) ->
- ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
Active = proplists:get_value(active, Config),
ReceiveFunction = proplists:get_value(receive_function, Config),
@@ -190,7 +193,7 @@ server_verify_client_once() ->
[{doc,"Test server option verify_client_once"}].
server_verify_client_once(Config) when is_list(Config) ->
- ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, []),
ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
Active = proplists:get_value(active, Config),
ReceiveFunction = proplists:get_value(receive_function, Config),
@@ -230,7 +233,7 @@ server_require_peer_cert_ok() ->
server_require_peer_cert_ok(Config) when is_list(Config) ->
ServerOpts = [{verify, verify_peer}, {fail_if_no_peer_cert, true}
| ssl_test_lib:ssl_options(server_verification_opts, Config)],
- ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
Active = proplists:get_value(active, Config),
ReceiveFunction = proplists:get_value(receive_function, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
@@ -259,7 +262,7 @@ server_require_peer_cert_fail() ->
server_require_peer_cert_fail(Config) when is_list(Config) ->
ServerOpts = [{verify, verify_peer}, {fail_if_no_peer_cert, true}
| ssl_test_lib:ssl_options(server_verification_opts, Config)],
- BadClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
+ BadClientOpts = ssl_test_lib:ssl_options(client_opts, []),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server_error([{node, ServerNode}, {port, 0},
@@ -290,7 +293,7 @@ server_require_peer_cert_partial_chain() ->
server_require_peer_cert_partial_chain(Config) when is_list(Config) ->
ServerOpts = [{verify, verify_peer}, {fail_if_no_peer_cert, true}
| ssl_test_lib:ssl_options(server_verification_opts, Config)],
- ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
{ok, ClientCAs} = file:read_file(proplists:get_value(cacertfile, ClientOpts)),
@@ -325,13 +328,13 @@ server_require_peer_cert_allow_partial_chain() ->
server_require_peer_cert_allow_partial_chain(Config) when is_list(Config) ->
ServerOpts = [{verify, verify_peer}, {fail_if_no_peer_cert, true}
| ssl_test_lib:ssl_options(server_verification_opts, Config)],
- ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Active = proplists:get_value(active, Config),
ReceiveFunction = proplists:get_value(receive_function, Config),
- {ok, ServerCAs} = file:read_file(proplists:get_value(cacertfile, ServerOpts)),
- [{_,_,_}, {_, IntermidiateCA, _}] = public_key:pem_decode(ServerCAs),
+ {ok, ClientCAs} = file:read_file(proplists:get_value(cacertfile, ClientOpts)),
+ [{_,_,_}, {_, IntermidiateCA, _}] = public_key:pem_decode(ClientCAs),
PartialChain = fun(CertChain) ->
case lists:member(IntermidiateCA, CertChain) of
@@ -367,7 +370,7 @@ server_require_peer_cert_do_not_allow_partial_chain() ->
server_require_peer_cert_do_not_allow_partial_chain(Config) when is_list(Config) ->
ServerOpts = [{verify, verify_peer}, {fail_if_no_peer_cert, true}
| ssl_test_lib:ssl_options(server_verification_opts, Config)],
- ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
{ok, ServerCAs} = file:read_file(proplists:get_value(cacertfile, ServerOpts)),
@@ -408,7 +411,7 @@ server_require_peer_cert_partial_chain_fun_fail() ->
server_require_peer_cert_partial_chain_fun_fail(Config) when is_list(Config) ->
ServerOpts = [{verify, verify_peer}, {fail_if_no_peer_cert, true}
| ssl_test_lib:ssl_options(server_verification_opts, Config)],
- ClientOpts = proplists:get_value(client_verification_opts, Config),
+ ClientOpts = proplists:get_value(client_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
{ok, ServerCAs} = file:read_file(proplists:get_value(cacertfile, ServerOpts)),
@@ -448,7 +451,7 @@ verify_fun_always_run_client() ->
verify_fun_always_run_client(Config) when is_list(Config) ->
ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
- ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
+ ServerOpts = ssl_test_lib:ssl_options(server_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server_error([{node, ServerNode}, {port, 0},
{from, self()},
@@ -492,7 +495,7 @@ verify_fun_always_run_client(Config) when is_list(Config) ->
verify_fun_always_run_server() ->
[{doc,"Verify that user verify_fun is always run (for valid and valid_peer not only unknown_extension)"}].
verify_fun_always_run_server(Config) when is_list(Config) ->
- ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
@@ -524,9 +527,7 @@ verify_fun_always_run_server(Config) when is_list(Config) ->
{from, self()},
{mfa, {ssl_test_lib,
no_result, []}},
- {options,
- [{verify, verify_peer}
- | ClientOpts]}]),
+ {options, ClientOpts}]),
%% Client error may be {tls_alert, "handshake failure" } or closed depending on timing
%% this is not a bug it is a circumstance of how tcp works!
@@ -544,7 +545,7 @@ cert_expired() ->
cert_expired(Config) when is_list(Config) ->
ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
- ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
+ ServerOpts = ssl_test_lib:ssl_options(server_opts, Config),
PrivDir = proplists:get_value(priv_dir, Config),
KeyFile = filename:join(PrivDir, "otpCA/private/key.pem"),
@@ -607,11 +608,11 @@ two_digits_str(N) ->
lists:flatten(io_lib:format("~p", [N])).
%%--------------------------------------------------------------------
-extended_key_usage_verify_peer() ->
- [{doc,"Test cert that has a critical extended_key_usage extension in verify_peer mode"}].
+extended_key_usage_verify_server() ->
+ [{doc,"Test cert that has a critical extended_key_usage extension in verify_peer mode for server"}].
-extended_key_usage_verify_peer(Config) when is_list(Config) ->
- ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
+extended_key_usage_verify_server(Config) when is_list(Config) ->
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
PrivDir = proplists:get_value(priv_dir, Config),
Active = proplists:get_value(active, Config),
@@ -660,7 +661,7 @@ extended_key_usage_verify_peer(Config) when is_list(Config) ->
{host, Hostname},
{from, self()},
{mfa, {ssl_test_lib, ReceiveFunction, []}},
- {options, [{verify, verify_peer}, {active, Active} |
+ {options, [{verify, verify_none}, {active, Active} |
NewClientOpts]}]),
ssl_test_lib:check_result(Server, ok, Client, ok),
@@ -669,12 +670,12 @@ extended_key_usage_verify_peer(Config) when is_list(Config) ->
ssl_test_lib:close(Client).
%%--------------------------------------------------------------------
-extended_key_usage_verify_none() ->
- [{doc,"Test cert that has a critical extended_key_usage extension in verify_none mode"}].
+extended_key_usage_verify_client() ->
+ [{doc,"Test cert that has a critical extended_key_usage extension in client verify_peer mode"}].
-extended_key_usage_verify_none(Config) when is_list(Config) ->
+extended_key_usage_verify_client(Config) when is_list(Config) ->
ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
- ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
+ ServerOpts = ssl_test_lib:ssl_options(server_opts, Config),
PrivDir = proplists:get_value(priv_dir, Config),
Active = proplists:get_value(active, Config),
ReceiveFunction = proplists:get_value(receive_function, Config),
@@ -730,11 +731,11 @@ extended_key_usage_verify_none(Config) when is_list(Config) ->
ssl_test_lib:close(Client).
%%--------------------------------------------------------------------
-critical_extension_verify_peer() ->
+critical_extension_verify_server() ->
[{doc,"Test cert that has a critical unknown extension in verify_peer mode"}].
-critical_extension_verify_peer(Config) when is_list(Config) ->
- ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
+critical_extension_verify_server(Config) when is_list(Config) ->
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
PrivDir = proplists:get_value(priv_dir, Config),
Active = proplists:get_value(active, Config),
@@ -766,7 +767,7 @@ critical_extension_verify_peer(Config) when is_list(Config) ->
{host, Hostname},
{from, self()},
{mfa, {ssl_test_lib, ReceiveFunction, []}},
- {options, [{verify, verify_peer}, {active, Active} | NewClientOpts]}]),
+ {options, [{verify, verify_none}, {active, Active} | NewClientOpts]}]),
%% This certificate has a critical extension that we don't
%% understand. Therefore, verification should fail.
@@ -775,14 +776,60 @@ critical_extension_verify_peer(Config) when is_list(Config) ->
ssl_test_lib:close(Server),
ok.
+%%--------------------------------------------------------------------
+
+critical_extension_verify_client() ->
+ [{doc,"Test cert that has a critical unknown extension in verify_peer mode"}].
+
+critical_extension_verify_client(Config) when is_list(Config) ->
+ ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
+ ServerOpts = ssl_test_lib:ssl_options(server_opts, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ Active = proplists:get_value(active, Config),
+ ReceiveFunction = proplists:get_value(receive_function, Config),
+
+ KeyFile = filename:join(PrivDir, "otpCA/private/key.pem"),
+ NewCertName = integer_to_list(erlang:unique_integer()) ++ ".pem",
+
+ ServerCertFile = proplists:get_value(certfile, ServerOpts),
+ NewServerCertFile = filename:join([PrivDir, "server", NewCertName]),
+ add_critical_netscape_cert_type(ServerCertFile, NewServerCertFile, KeyFile),
+ NewServerOpts = [{certfile, NewServerCertFile} | proplists:delete(certfile, ServerOpts)],
+
+ ClientCertFile = proplists:get_value(certfile, ClientOpts),
+ NewClientCertFile = filename:join([PrivDir, "client", NewCertName]),
+ add_critical_netscape_cert_type(ClientCertFile, NewClientCertFile, KeyFile),
+ NewClientOpts = [{certfile, NewClientCertFile} | proplists:delete(certfile, ClientOpts)],
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ Server = ssl_test_lib:start_server_error(
+ [{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, ReceiveFunction, []}},
+ {options, [{verify, verify_none}, {active, Active} | NewServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+ Client = ssl_test_lib:start_client_error(
+ [{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, ReceiveFunction, []}},
+ {options, [{verify, verify_peer}, {active, Active} | NewClientOpts]}]),
+
+ %% This certificate has a critical extension that we don't
+ %% understand. Therefore, verification should fail.
+ tcp_delivery_workaround(Server, {error, {tls_alert, "unsupported certificate"}},
+ Client, {error, {tls_alert, "unsupported certificate"}}),
+ ssl_test_lib:close(Server),
+ ok.
%%--------------------------------------------------------------------
critical_extension_verify_none() ->
[{doc,"Test cert that has a critical unknown extension in verify_none mode"}].
critical_extension_verify_none(Config) when is_list(Config) ->
ClientOpts = ssl_test_lib:ssl_options(client_verification_opts, Config),
- ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
+ ServerOpts = ssl_test_lib:ssl_options(server_opts, Config),
PrivDir = proplists:get_value(priv_dir, Config),
Active = proplists:get_value(active, Config),
ReceiveFunction = proplists:get_value(receive_function, Config),
@@ -1070,7 +1117,7 @@ client_with_cert_cipher_suites_handshake(Config) when is_list(Config) ->
server_verify_no_cacerts() ->
[{doc,"Test server must have cacerts if it wants to verify client"}].
server_verify_no_cacerts(Config) when is_list(Config) ->
- ServerOpts = ssl_test_lib:ssl_options(server_opts, Config),
+ ServerOpts = proplists:delete(cacertfile, ssl_test_lib:ssl_options(server_opts, Config)),
{_, ServerNode, _} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server_error([{node, ServerNode}, {port, 0},
{from, self()},
@@ -1084,7 +1131,7 @@ server_verify_no_cacerts(Config) when is_list(Config) ->
unknown_server_ca_fail() ->
[{doc,"Test that the client fails if the ca is unknown in verify_peer mode"}].
unknown_server_ca_fail(Config) when is_list(Config) ->
- ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, []),
ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server_error([{node, ServerNode}, {port, 0},
@@ -1128,7 +1175,7 @@ unknown_server_ca_fail(Config) when is_list(Config) ->
unknown_server_ca_accept_verify_none() ->
[{doc,"Test that the client succeds if the ca is unknown in verify_none mode"}].
unknown_server_ca_accept_verify_none(Config) when is_list(Config) ->
- ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, []),
ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
@@ -1153,7 +1200,7 @@ unknown_server_ca_accept_verify_peer() ->
[{doc, "Test that the client succeds if the ca is unknown in verify_peer mode"
" with a verify_fun that accepts the unknown ca error"}].
unknown_server_ca_accept_verify_peer(Config) when is_list(Config) ->
- ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
+ ClientOpts =ssl_test_lib:ssl_options(client_opts, []),
ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
@@ -1192,7 +1239,7 @@ unknown_server_ca_accept_verify_peer(Config) when is_list(Config) ->
unknown_server_ca_accept_backwardscompatibility() ->
[{doc,"Test that old style verify_funs will work"}].
unknown_server_ca_accept_backwardscompatibility(Config) when is_list(Config) ->
- ClientOpts = ssl_test_lib:ssl_options(client_opts, Config),
+ ClientOpts = ssl_test_lib:ssl_options(client_opts, []),
ServerOpts = ssl_test_lib:ssl_options(server_verification_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
diff --git a/lib/ssl/test/ssl_dist_SUITE.erl b/lib/ssl/test/ssl_dist_SUITE.erl
index 5ebf9bb2de..8740e8c8f0 100644
--- a/lib/ssl/test/ssl_dist_SUITE.erl
+++ b/lib/ssl/test/ssl_dist_SUITE.erl
@@ -109,11 +109,11 @@ common_end(_, _Config) ->
basic() ->
[{doc,"Test that two nodes can connect via ssl distribution"}].
basic(Config) when is_list(Config) ->
- NH1 = start_ssl_node(Config),
+ gen_dist_test(basic_test, Config).
+
+basic_test(NH1, NH2, _) ->
Node1 = NH1#node_handle.nodename,
- NH2 = start_ssl_node(Config),
Node2 = NH2#node_handle.nodename,
-
pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
[Node2] = apply_on_ssl_node(NH1, fun () -> nodes() end),
@@ -161,18 +161,16 @@ basic(Config) when is_list(Config) ->
ok
end
end)
- end,
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
+ end.
%%--------------------------------------------------------------------
payload() ->
[{doc,"Test that send a lot of data between the ssl distributed noes"}].
payload(Config) when is_list(Config) ->
- NH1 = start_ssl_node(Config),
+ gen_dist_test(payload_test, Config).
+
+payload_test(NH1, NH2, _) ->
Node1 = NH1#node_handle.nodename,
- NH2 = start_ssl_node(Config),
Node2 = NH2#node_handle.nodename,
pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
@@ -204,10 +202,8 @@ payload(Config) when is_list(Config) ->
ok
end
end)
- end,
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
+ end.
+
%%--------------------------------------------------------------------
plain_options() ->
[{doc,"Test specifying additional options"}].
@@ -218,20 +214,17 @@ plain_options(Config) when is_list(Config) ->
"client_verify verify_none server_verify verify_none "
"server_depth 1 client_depth 1 "
"server_hibernate_after 500 client_hibernate_after 500",
+ gen_dist_test(plain_options_test, [{additional_dist_opts, DistOpts} | Config]).
- NH1 = start_ssl_node([{additional_dist_opts, DistOpts} | Config]),
+plain_options_test(NH1, NH2, _) ->
Node1 = NH1#node_handle.nodename,
- NH2 = start_ssl_node([{additional_dist_opts, DistOpts} | Config]),
Node2 = NH2#node_handle.nodename,
pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
[Node2] = apply_on_ssl_node(NH1, fun () -> nodes() end),
- [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end),
+ [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end).
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
%%--------------------------------------------------------------------
plain_verify_options() ->
[{doc,"Test specifying additional options"}].
@@ -240,20 +233,18 @@ plain_verify_options(Config) when is_list(Config) ->
"client_secure_renegotiate true "
"server_reuse_sessions true client_reuse_sessions true "
"server_hibernate_after 500 client_hibernate_after 500",
+ gen_dist_test(plain_verify_options_test, [{additional_dist_opts, DistOpts} | Config]).
- NH1 = start_ssl_node([{additional_dist_opts, DistOpts} | Config]),
+plain_verify_options_test(NH1, NH2, _) ->
Node1 = NH1#node_handle.nodename,
- NH2 = start_ssl_node([{additional_dist_opts, DistOpts} | Config]),
Node2 = NH2#node_handle.nodename,
-
+
pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
-
+
[Node2] = apply_on_ssl_node(NH1, fun () -> nodes() end),
- [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end),
+ [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end).
+
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
%%--------------------------------------------------------------------
nodelay_option() ->
[{doc,"Test specifying dist_nodelay option"}].
@@ -265,6 +256,7 @@ nodelay_option(Config) ->
after
application:unset_env(kernel, dist_nodelay)
end.
+%%--------------------------------------------------------------------
listen_port_options() ->
[{doc, "Test specifying listening ports"}].
@@ -285,32 +277,39 @@ listen_port_options(Config) when is_list(Config) ->
#node_handle{} ->
%% If the node was able to start, it didn't take the port
%% option into account.
+ stop_ssl_node(NH1),
exit(unexpected_success)
catch
exit:{accept_failed, timeout} ->
%% The node failed to start, as expected.
ok
end,
-
+
%% Try again, now specifying a high max port.
PortOpt2 = "-kernel inet_dist_listen_min " ++ integer_to_list(Port1) ++
- " inet_dist_listen_max 65535",
+ " inet_dist_listen_max 65535",
NH2 = start_ssl_node([{additional_dist_opts, PortOpt2} | Config]),
- Node2 = NH2#node_handle.nodename,
- Name2 = lists:takewhile(fun(C) -> C =/= $@ end, atom_to_list(Node2)),
- {ok, NodesPorts2} = apply_on_ssl_node(NH2, fun net_adm:names/0),
- {Name2, Port2} = lists:keyfind(Name2, 1, NodesPorts2),
-
- %% The new port should be higher:
- if Port2 > Port1 ->
- ok;
- true ->
- error({port, Port2, not_higher_than, Port1})
+
+ try
+ Node2 = NH2#node_handle.nodename,
+ Name2 = lists:takewhile(fun(C) -> C =/= $@ end, atom_to_list(Node2)),
+ {ok, NodesPorts2} = apply_on_ssl_node(NH2, fun net_adm:names/0),
+ {Name2, Port2} = lists:keyfind(Name2, 1, NodesPorts2),
+
+ %% The new port should be higher:
+ if Port2 > Port1 ->
+ ok;
+ true ->
+ error({port, Port2, not_higher_than, Port1})
+ end
+ catch
+ _:Reason ->
+ stop_ssl_node(NH2),
+ ct:fail(Reason)
end,
-
- stop_ssl_node(NH1),
stop_ssl_node(NH2),
success(Config).
+
%%--------------------------------------------------------------------
listen_options() ->
[{doc, "Test inet_dist_listen_options"}].
@@ -329,28 +328,25 @@ do_listen_options(Prio, Config) ->
end,
Options = "-kernel inet_dist_listen_options " ++ PriorityString,
-
- NH1 = start_ssl_node([{additional_dist_opts, Options} | Config]),
- NH2 = start_ssl_node([{additional_dist_opts, Options} | Config]),
- Node2 = NH2#node_handle.nodename,
-
+ gen_dist_test(listen_options_test, [{prio, Prio}, {additional_dist_opts, Options} | Config]).
+
+listen_options_test(NH1, NH2, Config) ->
+ Prio = proplists:get_value(prio, Config),
+ Node2 = NH2#node_handle.nodename,
pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
PrioritiesNode1 =
apply_on_ssl_node(NH1, fun get_socket_priorities/0),
PrioritiesNode2 =
apply_on_ssl_node(NH2, fun get_socket_priorities/0),
-
+
Elevated1 = [P || P <- PrioritiesNode1, P =:= Prio],
- ?t:format("Elevated1: ~p~n", [Elevated1]),
+ ct:pal("Elevated1: ~p~n", [Elevated1]),
Elevated2 = [P || P <- PrioritiesNode2, P =:= Prio],
- ?t:format("Elevated2: ~p~n", [Elevated2]),
+ ct:pal("Elevated2: ~p~n", [Elevated2]),
[_|_] = Elevated1,
- [_|_] = Elevated2,
+ [_|_] = Elevated2.
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
%%--------------------------------------------------------------------
connect_options() ->
[{doc, "Test inet_dist_connect_options"}].
@@ -369,9 +365,11 @@ do_connect_options(Prio, Config) ->
end,
Options = "-kernel inet_dist_connect_options " ++ PriorityString,
+ gen_dist_test(connect_options_test,
+ [{prio, Prio}, {additional_dist_opts, Options} | Config]).
- NH1 = start_ssl_node([{additional_dist_opts, Options} | Config]),
- NH2 = start_ssl_node([{additional_dist_opts, Options} | Config]),
+connect_options_test(NH1, NH2, Config) ->
+ Prio = proplists:get_value(prio, Config),
Node2 = NH2#node_handle.nodename,
pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
@@ -382,17 +380,14 @@ do_connect_options(Prio, Config) ->
apply_on_ssl_node(NH2, fun get_socket_priorities/0),
Elevated1 = [P || P <- PrioritiesNode1, P =:= Prio],
- ?t:format("Elevated1: ~p~n", [Elevated1]),
+ ct:pal("Elevated1: ~p~n", [Elevated1]),
Elevated2 = [P || P <- PrioritiesNode2, P =:= Prio],
- ?t:format("Elevated2: ~p~n", [Elevated2]),
+ ct:pal("Elevated2: ~p~n", [Elevated2]),
%% Node 1 will have a socket with elevated priority.
[_|_] = Elevated1,
%% Node 2 will not, since it only applies to outbound connections.
- [] = Elevated2,
+ [] = Elevated2.
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
%%--------------------------------------------------------------------
use_interface() ->
[{doc, "Test inet_dist_use_interface"}].
@@ -403,22 +398,28 @@ use_interface(Config) when is_list(Config) ->
%% Start a node, and get the port number it's listening on.
NH1 = start_ssl_node([{additional_dist_opts, Options} | Config]),
- Node1 = NH1#node_handle.nodename,
- Name = lists:takewhile(fun(C) -> C =/= $@ end, atom_to_list(Node1)),
- {ok, NodesPorts} = apply_on_ssl_node(NH1, fun net_adm:names/0),
- {Name, Port} = lists:keyfind(Name, 1, NodesPorts),
-
- %% Now find the socket listening on that port, and check its sockname.
- Sockets = apply_on_ssl_node(
- NH1,
- fun() ->
- [inet:sockname(P) ||
- P <- inet_ports(),
- {ok, Port} =:= (catch inet:port(P))]
- end),
- %% And check that it's actually listening on localhost.
- [{ok,{{127,0,0,1},Port}}] = Sockets,
-
+
+ try
+ Node1 = NH1#node_handle.nodename,
+ Name = lists:takewhile(fun(C) -> C =/= $@ end, atom_to_list(Node1)),
+ {ok, NodesPorts} = apply_on_ssl_node(NH1, fun net_adm:names/0),
+ {Name, Port} = lists:keyfind(Name, 1, NodesPorts),
+
+ %% Now find the socket listening on that port, and check its sockname.
+ Sockets = apply_on_ssl_node(
+ NH1,
+ fun() ->
+ [inet:sockname(P) ||
+ P <- inet_ports(),
+ {ok, Port} =:= (catch inet:port(P))]
+ end),
+ %% And check that it's actually listening on localhost.
+ [{ok,{{127,0,0,1},Port}}] = Sockets
+ catch
+ _:Reason ->
+ stop_ssl_node(NH1),
+ ct:fail(Reason)
+ end,
stop_ssl_node(NH1),
success(Config).
%%--------------------------------------------------------------------
@@ -430,11 +431,11 @@ verify_fun_fail(Config) when is_list(Config) ->
"\"{ssl_dist_SUITE,verify_fail_always,{}}\" "
"client_verify verify_peer client_verify_fun "
"\"{ssl_dist_SUITE,verify_fail_always,{}}\" ",
+ gen_dist_test(verify_fun_fail_test, [{additional_dist_opts, DistOpts} | Config]).
- NH1 = start_ssl_node([{additional_dist_opts, DistOpts} | Config]),
- NH2 = start_ssl_node([{additional_dist_opts, DistOpts} | Config]),
+verify_fun_fail_test(NH1, NH2, _) ->
Node2 = NH2#node_handle.nodename,
-
+
pang = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
[] = apply_on_ssl_node(NH1, fun () -> nodes() end),
@@ -446,25 +447,9 @@ verify_fun_fail(Config) when is_list(Config) ->
%% On the server node, it wouldn't run, because the server didn't
%% request a certificate from the client.
undefined =
- apply_on_ssl_node(NH2, fun () -> ets:info(verify_fun_ran) end),
+ apply_on_ssl_node(NH2, fun () -> ets:info(verify_fun_ran) end).
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
-verify_fail_always(_Certificate, _Event, _State) ->
- %% Create an ETS table, to record the fact that the verify function ran.
- %% Spawn a new process, to avoid the ETS table disappearing.
- Parent = self(),
- spawn(
- fun() ->
- ets:new(verify_fun_ran, [public, named_table]),
- ets:insert(verify_fun_ran, {verify_fail_always_ran, true}),
- Parent ! go_ahead,
- timer:sleep(infinity)
- end),
- receive go_ahead -> ok end,
- {fail, bad_certificate}.
%%--------------------------------------------------------------------
verify_fun_pass() ->
@@ -476,10 +461,10 @@ verify_fun_pass(Config) when is_list(Config) ->
"server_fail_if_no_peer_cert true "
"client_verify verify_peer client_verify_fun "
"\"{ssl_dist_SUITE,verify_pass_always,{}}\" ",
+ gen_dist_test(verify_fun_pass_test, [{additional_dist_opts, DistOpts} | Config]).
- NH1 = start_ssl_node([{additional_dist_opts, DistOpts} | Config]),
+verify_fun_pass_test(NH1, NH2, _) ->
Node1 = NH1#node_handle.nodename,
- NH2 = start_ssl_node([{additional_dist_opts, DistOpts} | Config]),
Node2 = NH2#node_handle.nodename,
pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
@@ -494,25 +479,8 @@ verify_fun_pass(Config) when is_list(Config) ->
%% requested and verified the client's certificate because we
%% passed fail_if_no_peer_cert.
[{verify_pass_always_ran, true}] =
- apply_on_ssl_node(NH2, fun () -> ets:tab2list(verify_fun_ran) end),
+ apply_on_ssl_node(NH2, fun () -> ets:tab2list(verify_fun_ran) end).
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
-
-verify_pass_always(_Certificate, _Event, State) ->
- %% Create an ETS table, to record the fact that the verify function ran.
- %% Spawn a new process, to avoid the ETS table disappearing.
- Parent = self(),
- spawn(
- fun() ->
- ets:new(verify_fun_ran, [public, named_table]),
- ets:insert(verify_fun_ran, {verify_pass_always_ran, true}),
- Parent ! go_ahead,
- timer:sleep(infinity)
- end),
- receive go_ahead -> ok end,
- {valid, State}.
%%--------------------------------------------------------------------
crl_check_pass() ->
[{doc,"Test crl_check with non-revoked certificate"}].
@@ -520,10 +488,10 @@ crl_check_pass(Config) when is_list(Config) ->
DistOpts = "-ssl_dist_opt client_crl_check true",
NewConfig =
[{many_verify_opts, true}, {additional_dist_opts, DistOpts}] ++ Config,
+ gen_dist_test(crl_check_pass_test, NewConfig).
- NH1 = start_ssl_node(NewConfig),
+crl_check_pass_test(NH1, NH2, Config) ->
Node1 = NH1#node_handle.nodename,
- NH2 = start_ssl_node(NewConfig),
Node2 = NH2#node_handle.nodename,
PrivDir = ?config(priv_dir, Config),
@@ -533,11 +501,7 @@ crl_check_pass(Config) when is_list(Config) ->
pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
[Node2] = apply_on_ssl_node(NH1, fun () -> nodes() end),
- [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end),
-
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
+ [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end).
%%--------------------------------------------------------------------
crl_check_fail() ->
@@ -549,10 +513,9 @@ crl_check_fail(Config) when is_list(Config) ->
%% The server uses a revoked certificate.
{server_cert_dir, "revoked"},
{additional_dist_opts, DistOpts}] ++ Config,
+ gen_dist_test(crl_check_fail_test, NewConfig).
- NH1 = start_ssl_node(NewConfig),
- %%Node1 = NH1#node_handle.nodename,
- NH2 = start_ssl_node(NewConfig),
+crl_check_fail_test(NH1, NH2, Config) ->
Node2 = NH2#node_handle.nodename,
PrivDir = ?config(priv_dir, Config),
@@ -562,11 +525,7 @@ crl_check_fail(Config) when is_list(Config) ->
pang = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
[] = apply_on_ssl_node(NH1, fun () -> nodes() end),
- [] = apply_on_ssl_node(NH2, fun () -> nodes() end),
-
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
+ [] = apply_on_ssl_node(NH2, fun () -> nodes() end).
%%--------------------------------------------------------------------
crl_check_best_effort() ->
@@ -576,22 +535,18 @@ crl_check_best_effort(Config) when is_list(Config) ->
"server_verify verify_peer server_crl_check best_effort",
NewConfig =
[{many_verify_opts, true}, {additional_dist_opts, DistOpts}] ++ Config,
+ gen_dist_test(crl_check_best_effort_test, NewConfig).
+crl_check_best_effort_test(NH1, NH2, _Config) ->
%% We don't have the correct CRL at hand, but since crl_check is
%% best_effort, we accept it anyway.
- NH1 = start_ssl_node(NewConfig),
Node1 = NH1#node_handle.nodename,
- NH2 = start_ssl_node(NewConfig),
Node2 = NH2#node_handle.nodename,
pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
[Node2] = apply_on_ssl_node(NH1, fun () -> nodes() end),
- [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end),
-
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
+ [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end).
%%--------------------------------------------------------------------
crl_cache_check_pass() ->
@@ -605,20 +560,16 @@ crl_cache_check_pass(Config) when is_list(Config) ->
"\"{ssl_dist_SUITE,{\\\"" ++ NodeDir ++ "\\\",[]}}\"",
NewConfig =
[{many_verify_opts, true}, {additional_dist_opts, DistOpts}] ++ Config,
+ gen_dist_test(crl_cache_check_pass_test, NewConfig).
- NH1 = start_ssl_node(NewConfig),
+crl_cache_check_pass_test(NH1, NH2, _) ->
Node1 = NH1#node_handle.nodename,
- NH2 = start_ssl_node(NewConfig),
Node2 = NH2#node_handle.nodename,
pong = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
[Node2] = apply_on_ssl_node(NH1, fun () -> nodes() end),
- [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end),
-
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
+ [Node1] = apply_on_ssl_node(NH2, fun () -> nodes() end).
%%--------------------------------------------------------------------
crl_cache_check_fail() ->
@@ -636,44 +587,31 @@ crl_cache_check_fail(Config) when is_list(Config) ->
{server_cert_dir, "revoked"},
{additional_dist_opts, DistOpts}] ++ Config,
- NH1 = start_ssl_node(NewConfig),
- NH2 = start_ssl_node(NewConfig),
- Node2 = NH2#node_handle.nodename,
+ gen_dist_test(crl_cache_check_fail_test, NewConfig).
+crl_cache_check_fail_test(NH1, NH2, _) ->
+ Node2 = NH2#node_handle.nodename,
pang = apply_on_ssl_node(NH1, fun () -> net_adm:ping(Node2) end),
[] = apply_on_ssl_node(NH1, fun () -> nodes() end),
- [] = apply_on_ssl_node(NH2, fun () -> nodes() end),
-
- stop_ssl_node(NH1),
- stop_ssl_node(NH2),
- success(Config).
-
-%% ssl_crl_cache_api callbacks
-lookup(_DistributionPoint, _DbHandle) ->
- not_available.
-
-select({rdnSequence, NameParts}, {NodeDir, _}) ->
- %% Extract the CN from the issuer name...
- [CN] = [CN ||
- [#'AttributeTypeAndValue'{
- type = ?'id-at-commonName',
- value = <<_, _, CN/binary>>}] <- NameParts],
- %% ...and use that as the directory name to find the CRL.
- error_logger:info_report([{found_cn, CN}]),
- CRLFile = filename:join([NodeDir, CN, "crl.pem"]),
- {ok, PemBin} = file:read_file(CRLFile),
- PemEntries = public_key:pem_decode(PemBin),
- CRLs = [ CRL || {'CertificateList', CRL, not_encrypted}
- <- PemEntries],
- CRLs.
-
-fresh_crl(_DistributionPoint, CRL) ->
- CRL.
-
+ [] = apply_on_ssl_node(NH2, fun () -> nodes() end).
%%--------------------------------------------------------------------
%%% Internal functions -----------------------------------------------
%%--------------------------------------------------------------------
+gen_dist_test(Test, Config) ->
+ NH1 = start_ssl_node(Config),
+ NH2 = start_ssl_node(Config),
+ try
+ ?MODULE:Test(NH1, NH2, Config)
+ catch
+ _:Reason ->
+ stop_ssl_node(NH1),
+ stop_ssl_node(NH2),
+ ct:fail(Reason)
+ end,
+ stop_ssl_node(NH1),
+ stop_ssl_node(NH2),
+ success(Config).
%% ssl_node side api
%%
@@ -742,13 +680,15 @@ stop_ssl_node(#node_handle{connection_handler = Handler,
receive
{'DOWN', Mon, process, Handler, Reason} ->
case Reason of
- normal -> ok;
- _ -> exit(Reason)
+ normal ->
+ ok;
+ _ ->
+ ct:pal("Down ~p ~n", [Reason])
end
end;
Error ->
erlang:demonitor(Mon, [flush]),
- exit(Error)
+ ct:pal("Warning ~p ~n", [Error])
end.
start_ssl_node(Config) ->
@@ -1226,3 +1166,53 @@ vsn(App) ->
after
application:stop(ssl)
end.
+
+verify_fail_always(_Certificate, _Event, _State) ->
+ %% Create an ETS table, to record the fact that the verify function ran.
+ %% Spawn a new process, to avoid the ETS table disappearing.
+ Parent = self(),
+ spawn(
+ fun() ->
+ ets:new(verify_fun_ran, [public, named_table]),
+ ets:insert(verify_fun_ran, {verify_fail_always_ran, true}),
+ Parent ! go_ahead,
+ timer:sleep(infinity)
+ end),
+ receive go_ahead -> ok end,
+ {fail, bad_certificate}.
+
+verify_pass_always(_Certificate, _Event, State) ->
+ %% Create an ETS table, to record the fact that the verify function ran.
+ %% Spawn a new process, to avoid the ETS table disappearing.
+ Parent = self(),
+ spawn(
+ fun() ->
+ ets:new(verify_fun_ran, [public, named_table]),
+ ets:insert(verify_fun_ran, {verify_pass_always_ran, true}),
+ Parent ! go_ahead,
+ timer:sleep(infinity)
+ end),
+ receive go_ahead -> ok end,
+ {valid, State}.
+
+%% ssl_crl_cache_api callbacks
+lookup(_DistributionPoint, _DbHandle) ->
+ not_available.
+
+select({rdnSequence, NameParts}, {NodeDir, _}) ->
+ %% Extract the CN from the issuer name...
+ [CN] = [CN ||
+ [#'AttributeTypeAndValue'{
+ type = ?'id-at-commonName',
+ value = <<_, _, CN/binary>>}] <- NameParts],
+ %% ...and use that as the directory name to find the CRL.
+ error_logger:info_report([{found_cn, CN}]),
+ CRLFile = filename:join([NodeDir, CN, "crl.pem"]),
+ {ok, PemBin} = file:read_file(CRLFile),
+ PemEntries = public_key:pem_decode(PemBin),
+ CRLs = [ CRL || {'CertificateList', CRL, not_encrypted}
+ <- PemEntries],
+ CRLs.
+
+fresh_crl(_DistributionPoint, CRL) ->
+ CRL.
diff --git a/lib/ssl/test/ssl_packet_SUITE.erl b/lib/ssl/test/ssl_packet_SUITE.erl
index 042d57c0e2..e49d432c21 100644
--- a/lib/ssl/test/ssl_packet_SUITE.erl
+++ b/lib/ssl/test/ssl_packet_SUITE.erl
@@ -41,6 +41,10 @@
-define(MANY, 1000).
-define(SOME, 50).
+-define(BASE_TIMEOUT_SECONDS, 15).
+-define(SOME_SCALE, 20).
+-define(MANY_SCALE, 20).
+
%%--------------------------------------------------------------------
%% Common Test interface functions -----------------------------------
%%--------------------------------------------------------------------
@@ -167,7 +171,7 @@ end_per_group(_GroupName, Config) ->
Config.
init_per_testcase(_TestCase, Config) ->
- ct:timetrap({seconds, 90}),
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS}),
Config.
@@ -182,6 +186,7 @@ packet_raw_passive_many_small() ->
[{doc,"Test packet option {packet, raw} in passive mode."}].
packet_raw_passive_many_small(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
Data = "Packet option is {packet, raw}",
packet(Config, Data, send, passive_raw, ?MANY, raw, false).
@@ -191,6 +196,7 @@ packet_raw_passive_some_big() ->
[{doc,"Test packet option {packet, raw} in passive mode."}].
packet_raw_passive_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(100, "1234567890")),
packet(Config, Data, send, passive_raw, ?SOME, raw, false).
%%--------------------------------------------------------------------
@@ -198,6 +204,7 @@ packet_0_passive_many_small() ->
[{doc,"Test packet option {packet, 0} in passive mode."}].
packet_0_passive_many_small(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
Data = "Packet option is {packet, 0}, equivalent to packet raw.",
packet(Config, Data, send, passive_raw, ?MANY, 0, false).
@@ -206,6 +213,7 @@ packet_0_passive_some_big() ->
[{doc,"Test packet option {packet, 0} in passive mode."}].
packet_0_passive_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(100, "1234567890")),
packet(Config, Data, send, passive_raw, ?SOME, 0, false).
@@ -214,6 +222,7 @@ packet_1_passive_many_small() ->
[{doc,"Test packet option {packet, 1} in passive mode."}].
packet_1_passive_many_small(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
Data = "Packet option is {packet, 1}",
packet(Config, Data, send, passive_recv_packet, ?MANY, 1, false).
@@ -222,6 +231,7 @@ packet_1_passive_some_big() ->
[{doc,"Test packet option {packet, 1} in passive mode."}].
packet_1_passive_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(255, "1")),
packet(Config, Data, send, passive_recv_packet, ?SOME, 1, false).
@@ -230,6 +240,7 @@ packet_2_passive_many_small() ->
[{doc,"Test packet option {packet, 2} in passive mode"}].
packet_2_passive_many_small(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
Data = "Packet option is {packet, 2}",
packet(Config, Data, send, passive_recv_packet, ?MANY, 2, false).
@@ -238,6 +249,7 @@ packet_2_passive_some_big() ->
[{doc,"Test packet option {packet, 2} in passive mode"}].
packet_2_passive_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(100, "1234567890")),
packet(Config, Data, send, passive_recv_packet, ?SOME, 2, false).
@@ -246,6 +258,7 @@ packet_4_passive_many_small() ->
[{doc,"Test packet option {packet, 4} in passive mode"}].
packet_4_passive_many_small(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
Data = "Packet option is {packet, 4}",
packet(Config, Data, send, passive_recv_packet, ?MANY, 4, false).
@@ -254,6 +267,7 @@ packet_4_passive_some_big() ->
[{doc,"Test packet option {packet, 4} in passive mode"}].
packet_4_passive_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(100, "1234567890")),
packet(Config, Data, send, passive_recv_packet, ?SOME, 4, false).
@@ -270,6 +284,7 @@ packet_raw_active_once_some_big() ->
[{doc,"Test packet option {packet, raw} in active once mode."}].
packet_raw_active_once_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(100, "1234567890")),
packet(Config, Data, send_raw, active_once_raw, ?SOME, raw, once).
@@ -278,6 +293,7 @@ packet_0_active_once_many_small() ->
[{doc,"Test packet option {packet, 0} in active once mode."}].
packet_0_active_once_many_small(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
Data = "Packet option is {packet, 0}",
packet(Config, Data, send_raw, active_once_raw, ?MANY, 0, once).
@@ -286,6 +302,7 @@ packet_0_active_once_some_big() ->
[{doc,"Test packet option {packet, 0} in active once mode."}].
packet_0_active_once_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(100, "1234567890")),
packet(Config, Data, send_raw, active_once_raw, ?SOME, 0, once).
@@ -302,6 +319,7 @@ packet_1_active_once_some_big() ->
[{doc,"Test packet option {packet, 1} in active once mode."}].
packet_1_active_once_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(255, "1")),
packet(Config, Data, send, active_once_packet, ?SOME, 1, once).
@@ -311,6 +329,7 @@ packet_2_active_once_many_small() ->
[{doc,"Test packet option {packet, 2} in active once mode"}].
packet_2_active_once_many_small(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
Data = "Packet option is {packet, 2}",
packet(Config, Data, send, active_once_packet, ?MANY, 2, once).
@@ -319,6 +338,7 @@ packet_2_active_once_some_big() ->
[{doc,"Test packet option {packet, 2} in active once mode"}].
packet_2_active_once_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(100, "1234567890")),
packet(Config, Data, send, active_once_raw, ?SOME, 2, once).
@@ -328,6 +348,7 @@ packet_4_active_once_many_small() ->
packet_4_active_once_many_small(Config) when is_list(Config) ->
Data = "Packet option is {packet, 4}",
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
packet(Config, Data, send, active_once_packet, ?MANY, 4, once).
%%--------------------------------------------------------------------
@@ -335,6 +356,7 @@ packet_4_active_once_some_big() ->
[{doc,"Test packet option {packet, 4} in active once mode"}].
packet_4_active_once_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(100, "1234567890")),
packet(Config, Data, send, active_once_packet, ?SOME, 4, once).
@@ -343,6 +365,7 @@ packet_raw_active_many_small() ->
[{doc,"Test packet option {packet, raw} in active mode."}].
packet_raw_active_many_small(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
Data = "Packet option is {packet, raw}",
packet(Config, Data, send_raw, active_raw, ?MANY, raw, true).
@@ -351,6 +374,7 @@ packet_raw_active_some_big() ->
[{doc,"Test packet option {packet, raw} in active mode."}].
packet_raw_active_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(100, "1234567890")),
packet(Config, Data, send_raw, active_raw, ?SOME, raw, true).
@@ -359,6 +383,7 @@ packet_0_active_many_small() ->
[{doc,"Test packet option {packet, 0} in active mode."}].
packet_0_active_many_small(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
Data = "Packet option is {packet, 0}",
packet(Config, Data, send_raw, active_raw, ?MANY, 0, true).
@@ -375,6 +400,7 @@ packet_1_active_many_small() ->
[{doc,"Test packet option {packet, 1} in active mode."}].
packet_1_active_many_small(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
Data = "Packet option is {packet, 1}",
packet(Config, Data, send, active_packet, ?MANY, 1, true).
@@ -383,6 +409,7 @@ packet_1_active_some_big() ->
[{doc,"Test packet option {packet, 1} in active mode."}].
packet_1_active_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(255, "1")),
packet(Config, Data, send, active_packet, ?SOME, 1, true).
@@ -391,6 +418,7 @@ packet_2_active_many_small() ->
[{doc,"Test packet option {packet, 2} in active mode"}].
packet_2_active_many_small(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
Data = "Packet option is {packet, 2}",
packet(Config, Data, send, active_packet, ?MANY, 2, true).
@@ -407,6 +435,7 @@ packet_4_active_many_small() ->
[{doc,"Test packet option {packet, 4} in active mode"}].
packet_4_active_many_small(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?MANY_SCALE}),
Data = "Packet option is {packet, 4}",
packet(Config, Data, send, active_packet, ?MANY, 4, true).
@@ -415,6 +444,7 @@ packet_4_active_some_big() ->
[{doc,"Test packet option {packet, 4} in active mode"}].
packet_4_active_some_big(Config) when is_list(Config) ->
+ ct:timetrap({seconds, ?BASE_TIMEOUT_SECONDS * ?SOME_SCALE}),
Data = lists:append(lists:duplicate(100, "1234567890")),
packet(Config, Data, send, active_packet, ?SOME, 4, true).
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index 27c670cdc2..fd8af5efaa 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -385,7 +385,9 @@ cert_options(Config) ->
SNIServerAKeyFile = filename:join([proplists:get_value(priv_dir, Config), "a.server", "key.pem"]),
SNIServerBCertFile = filename:join([proplists:get_value(priv_dir, Config), "b.server", "cert.pem"]),
SNIServerBKeyFile = filename:join([proplists:get_value(priv_dir, Config), "b.server", "key.pem"]),
- [{client_opts, []},
+ [{client_opts, [{cacertfile, ClientCaCertFile},
+ {certfile, ClientCertFile},
+ {keyfile, ClientKeyFile}]},
{client_verification_opts, [{cacertfile, ServerCaCertFile},
{certfile, ClientCertFile},
{keyfile, ClientKeyFile},
@@ -394,7 +396,7 @@ cert_options(Config) ->
{certfile, ClientCertFileDigitalSignatureOnly},
{keyfile, ClientKeyFile},
{ssl_imp, new}]},
- {server_opts, [{ssl_imp, new},{reuseaddr, true},
+ {server_opts, [{ssl_imp, new},{reuseaddr, true}, {cacertfile, ServerCaCertFile},
{certfile, ServerCertFile}, {keyfile, ServerKeyFile}]},
{server_anon, [{ssl_imp, new},{reuseaddr, true}, {ciphers, anonymous_suites()}]},
{client_psk, [{ssl_imp, new},{reuseaddr, true},
@@ -494,7 +496,7 @@ make_ecdsa_cert(Config) ->
{cacertfile, ServerCaCertFile},
{certfile, ServerCertFile}, {keyfile, ServerKeyFile}]},
{server_ecdsa_verify_opts, [{ssl_imp, new},{reuseaddr, true},
- {cacertfile, ServerCaCertFile},
+ {cacertfile, ClientCaCertFile},
{certfile, ServerCertFile}, {keyfile, ServerKeyFile},
{verify, verify_peer}]},
{client_ecdsa_opts, [{ssl_imp, new},{reuseaddr, true},
@@ -519,7 +521,7 @@ make_ecdh_rsa_cert(Config) ->
{cacertfile, ServerCaCertFile},
{certfile, ServerCertFile}, {keyfile, ServerKeyFile}]},
{server_ecdh_rsa_verify_opts, [{ssl_imp, new},{reuseaddr, true},
- {cacertfile, ServerCaCertFile},
+ {cacertfile, ClientCaCertFile},
{certfile, ServerCertFile}, {keyfile, ServerKeyFile},
{verify, verify_peer}]},
{client_ecdh_rsa_opts, [{ssl_imp, new},{reuseaddr, true},
@@ -815,6 +817,12 @@ rsa_suites(CounterPart) ->
true;
({ecdhe_rsa, _, _}) when ECC == true ->
true;
+ ({rsa, _, _, _}) ->
+ true;
+ ({dhe_rsa, _, _,_}) ->
+ true;
+ ({ecdhe_rsa, _, _,_}) when ECC == true ->
+ true;
(_) ->
false
end,
diff --git a/lib/ssl/test/ssl_to_openssl_SUITE.erl b/lib/ssl/test/ssl_to_openssl_SUITE.erl
index d9a4657a79..b3109b5de9 100644
--- a/lib/ssl/test/ssl_to_openssl_SUITE.erl
+++ b/lib/ssl/test/ssl_to_openssl_SUITE.erl
@@ -169,7 +169,7 @@ init_per_testcase(TestCase, Config) when TestCase == ciphers_rsa_signed_certs;
special_init(TestCase, Config);
init_per_testcase(TestCase, Config) ->
- ct:timetrap({seconds, 10}),
+ ct:timetrap({seconds, 20}),
special_init(TestCase, Config).
special_init(TestCase, Config)
@@ -1290,13 +1290,13 @@ erlang_server_openssl_client_sni_test(Config, SNIHostname, ExpectedSNIHostname,
Port = ssl_test_lib:inet_port(Server),
Exe = "openssl",
ClientArgs = case SNIHostname of
- undefined ->
- ["s_client", "-connect", Hostname ++ ":" ++ integer_to_list(Port)];
- _ ->
- ["s_client", "-connect", Hostname ++ ":" ++ integer_to_list(Port), "-servername", SNIHostname]
- end,
+ undefined ->
+ openssl_client_args(ssl_test_lib:supports_ssl_tls_version(sslv2), Hostname,Port);
+ _ ->
+ openssl_client_args(ssl_test_lib:supports_ssl_tls_version(sslv2), Hostname, Port, SNIHostname)
+ end,
ClientPort = ssl_test_lib:portable_open_port(Exe, ClientArgs),
-
+
%% Client check needs to be done befor server check,
%% or server check might consume client messages
ExpectedClientOutput = ["OK", "/CN=" ++ ExpectedCN ++ "/"],
@@ -1319,13 +1319,14 @@ erlang_server_openssl_client_sni_test_sni_fun(Config, SNIHostname, ExpectedSNIHo
Port = ssl_test_lib:inet_port(Server),
Exe = "openssl",
ClientArgs = case SNIHostname of
- undefined ->
- ["s_client", "-connect", Hostname ++ ":" ++ integer_to_list(Port)];
- _ ->
- ["s_client", "-connect", Hostname ++ ":" ++ integer_to_list(Port), "-servername", SNIHostname]
- end,
+ undefined ->
+ openssl_client_args(ssl_test_lib:supports_ssl_tls_version(sslv2), Hostname,Port);
+ _ ->
+ openssl_client_args(ssl_test_lib:supports_ssl_tls_version(sslv2), Hostname, Port, SNIHostname)
+ end,
+
ClientPort = ssl_test_lib:portable_open_port(Exe, ClientArgs),
-
+
%% Client check needs to be done befor server check,
%% or server check might consume client messages
ExpectedClientOutput = ["OK", "/CN=" ++ ExpectedCN ++ "/"],
@@ -1787,3 +1788,15 @@ workaround_openssl_s_clinent() ->
_ ->
[]
end.
+
+openssl_client_args(false, Hostname, Port) ->
+ ["s_client", "-connect", Hostname ++ ":" ++ integer_to_list(Port)];
+openssl_client_args(true, Hostname, Port) ->
+ ["s_client", "-no_ssl2", "-connect", Hostname ++ ":" ++ integer_to_list(Port)].
+
+openssl_client_args(false, Hostname, Port, ServerName) ->
+ ["s_client", "-connect", Hostname ++ ":" ++
+ integer_to_list(Port), "-servername", ServerName];
+openssl_client_args(true, Hostname, Port, ServerName) ->
+ ["s_client", "-no_ssl2", "-connect", Hostname ++ ":" ++
+ integer_to_list(Port), "-servername", ServerName].
diff --git a/lib/ssl/vsn.mk b/lib/ssl/vsn.mk
index 3b51fa8c6b..6afac59109 100644
--- a/lib/ssl/vsn.mk
+++ b/lib/ssl/vsn.mk
@@ -1 +1 @@
-SSL_VSN = 8.0
+SSL_VSN = 8.0.1
diff --git a/lib/stdlib/doc/src/gen_statem.xml b/lib/stdlib/doc/src/gen_statem.xml
index c57a31fa21..ed44eef912 100644
--- a/lib/stdlib/doc/src/gen_statem.xml
+++ b/lib/stdlib/doc/src/gen_statem.xml
@@ -1262,9 +1262,9 @@ handle_event(_, _, State, Data) ->
<v>&nbsp;&nbsp;Vsn = term()</v>
<v>OldState = NewState = term()</v>
<v>Extra = term()</v>
- <v>Result = {NewCallbackMode,NewState,NewData} | Reason</v>
+ <v>Result = {CallbackMode,NewState,NewData} | Reason</v>
<v>
- NewCallbackMode =
+ CallbackMode =
<seealso marker="#type-callback_mode">callback_mode()</seealso>
</v>
<v>
@@ -1321,11 +1321,19 @@ handle_event(_, _, State, Data) ->
<p>
If successful, the function must return the updated
internal state in an
- <c>{NewCallbackMode,NewState,NewData}</c> tuple.
+ <c>{CallbackMode,NewState,NewData}</c> tuple.
</p>
<p>
- If the function returns <c>Reason</c>, the ongoing
- upgrade fails and rolls back to the old release.</p>
+ If the function returns a failure <c>Reason</c>, the ongoing
+ upgrade fails and rolls back to the old release.
+ Note that <c>Reason</c> can not be a 3-tuple since that
+ will be regarded as a
+ <c>{CallbackMode,NewState,NewData}</c> tuple,
+ and that a tuple matching <c>{ok,_}</c>
+ is an invalid failure <c>Reason</c>.
+ It is recommended to use an atom as <c>Reason</c> since
+ it will be wrapped in an <c>{error,Reason}</c> tuple.
+ </p>
<p>
This function can use
<seealso marker="erts:erlang#throw/1"><c>erlang:throw/1</c></seealso>
diff --git a/lib/stdlib/doc/src/notes.xml b/lib/stdlib/doc/src/notes.xml
index 87f5335723..d8fec1147f 100644
--- a/lib/stdlib/doc/src/notes.xml
+++ b/lib/stdlib/doc/src/notes.xml
@@ -31,6 +31,335 @@
</header>
<p>This document describes the changes made to the STDLIB application.</p>
+<section><title>STDLIB 3.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> Correct a bug regarding typed records in the Erlang
+ shell. The bug was introduced in OTP-19.0. </p>
+ <p>
+ Own Id: OTP-13719 Aux Id: ERL-182 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>STDLIB 3.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> Fix a race bug affecting <c>dets:open_file/2</c>.
+ </p>
+ <p>
+ Own Id: OTP-13260 Aux Id: seq13002 </p>
+ </item>
+ <item>
+ <p>Don't search for non-existing Map keys twice</p>
+ <p>For <c>maps:get/2,3</c> and <c>maps:find/2</c>,
+ searching for an immediate key, e.g. an atom, in a small
+ map, the search was performed twice if the key did not
+ exist.</p>
+ <p>
+ Own Id: OTP-13459</p>
+ </item>
+ <item>
+ <p>
+ Avoid stray corner-case math errors on Solaris, e.g. an
+ error is thrown on underflows in exp() and pow() when it
+ shouldn't be.</p>
+ <p>
+ Own Id: OTP-13531</p>
+ </item>
+ <item>
+ <p>Fix linting of map key variables</p>
+ <p>Map keys cannot be unbound and then used in parallel
+ matching.</p>
+ <p>Example: <c> #{ K := V } = #{ k := K } = M.</c> This
+ is illegal if <c>'K'</c> is not bound.</p>
+ <p>
+ Own Id: OTP-13534 Aux Id: ERL-135 </p>
+ </item>
+ <item>
+ <p>
+ Fixed a bug in re on openbsd where sometimes re:run would
+ return an incorrect result.</p>
+ <p>
+ Own Id: OTP-13602</p>
+ </item>
+ <item>
+ <p>
+ To avoid potential timer bottleneck on supervisor
+ restart, timer server is no longer used when the
+ supervisor is unable to restart a child.</p>
+ <p>
+ Own Id: OTP-13618 Aux Id: PR-1001 </p>
+ </item>
+ <item>
+ <p> The Erlang code preprocessor (<c>epp</c>) can handle
+ file names spanning over many tokens. Example:
+ <c>-include("a" "file" "name").</c>. </p>
+ <p>
+ Own Id: OTP-13662 Aux Id: seq13136 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>The types of The Abstract Format in the
+ <c>erl_parse</c> module have been refined. </p>
+ <p>
+ Own Id: OTP-10292</p>
+ </item>
+ <item>
+ <p> Undocumented syntax for function specifications,
+ <c>-spec F/A :: Domain -&gt; Range</c>, has been removed
+ (without deprecation). </p> <p> Using the
+ <c>is_subtype(V, T)</c> syntax for constraints (in
+ function specifications) is no longer documented, and the
+ newer syntax <c>V :: T</c> should be used instead. The
+ Erlang Parser still recognizes the <c>is_subtype</c>
+ syntax, and will continue to do so for some time. </p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11879</p>
+ </item>
+ <item>
+ <p>The '<c>random</c>' module has been deprecated. Use
+ the '<c>rand</c>' module instead.</p>
+ <p>
+ Own Id: OTP-12502 Aux Id: OTP-12501 </p>
+ </item>
+ <item>
+ <p>Background: In record fields with a type declaration
+ but without an initializer, the Erlang parser inserted
+ automatically the singleton type <c>'undefined'</c> to
+ the list of declared types, if that value was not present
+ there. That is, the record declaration:</p>
+ <p>
+ -record(rec, {f1 :: float(), f2 = 42 :: integer(), f3 ::
+ some_mod:some_typ()}).</p>
+ <p>was translated by the parser to:</p>
+ <p>
+ -record(rec, {f1 :: float() | 'undefined', f2 = 42 ::
+ integer(), f3 :: some_mod:some_typ() | 'undefined'}).</p>
+ <p>The rationale for this was that creation of a "dummy"
+ <c>#rec{}</c> record should not result in a warning from
+ dialyzer that, for example, the implicit initialization
+ of the <c>#rec.f1</c> field violates its type
+ declaration.</p>
+ <p>Problems: This seemingly innocent action has some
+ unforeseen consequences.</p>
+ <p>For starters, there is no way for programmers to
+ declare that e.g. only floats make sense for the
+ <c>f1</c> field of <c>#rec{}</c> records when there is no
+ "obvious" default initializer for this field. (This also
+ affects tools like PropEr that use these declarations
+ produced by the Erlang parser to generate random
+ instances of records for testing purposes.)</p>
+ <p>It also means that dialyzer does not warn if e.g. an
+ <c>is_atom/1</c> test or something more exotic like an
+ <c>atom_to_list/1</c> call is performed on the value of
+ the <c>f1</c> field.</p>
+ <p>Similarly, there is no way to extend dialyzer to warn
+ if it finds record constructions where <c>f1</c> is not
+ initialized to some float.</p>
+ <p>Last but not least, it is semantically problematic
+ when the type of the field is an opaque type: creating a
+ union of an opaque and a structured type is very
+ problematic for analysis because it fundamentally breaks
+ the opacity of the term at that point.</p>
+ <p>Change: To solve these problems the parser will not
+ automatically insert the <c>'undefined'</c> value
+ anymore; instead the user has the option to choose the
+ places where this value makes sense (for the field) and
+ where it does not and insert the <c>| 'undefined'</c>
+ there manually.</p>
+ <p>Consequences of this change: This change means that
+ dialyzer will issue a warning for all places where
+ records with uninitialized fields are created and those
+ fields have a declared type that is incompatible with
+ <c>'undefined'</c> (e.g. <c>float()</c>). This warning
+ can be suppressed easily by adding <c>| 'undefined'</c>
+ to the type of this field. This also adds documentation
+ that the user really intends to create records where this
+ field is uninitialized.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-12719</p>
+ </item>
+ <item>
+ <p> Remove deprecated functions in the modules
+ <c>erl_scan</c> and <c>erl_parse</c>. </p>
+ <p>
+ Own Id: OTP-12861</p>
+ </item>
+ <item>
+ <p>The pre-processor can now expand the ?FUNCTION_NAME
+ and ?FUNCTION_ARITY macros.</p>
+ <p>
+ Own Id: OTP-13059</p>
+ </item>
+ <item>
+ <p> A new behaviour <c>gen_statem</c> has been
+ implemented. It has been thoroughly reviewed, is stable
+ enough to be used by at least two heavy OTP applications,
+ and is here to stay. But depending on user feedback, we
+ do not expect but might find it necessary to make minor
+ not backwards compatible changes into OTP-20.0, so its
+ state can be designated as "not quite experimental"...
+ </p> <p> The <c>gen_statem</c> behaviour is intended to
+ replace <c>gen_fsm</c> for new code. It has the same
+ features and add some really useful: </p> <list
+ type="bulleted"> <item>State code is gathered</item>
+ <item>The state can be any term</item> <item>Events can
+ be postponed</item> <item>Events can be self
+ generated</item> <item>A reply can be sent from a later
+ state</item> <item>There can be multiple sys traceable
+ replies</item> </list> <p> The callback model(s) for
+ <c>gen_statem</c> differs from the one for
+ <c>gen_fsm</c>, but it is still fairly easy to rewrite
+ from <c>gen_fsm</c> to <c>gen_statem</c>. </p>
+ <p>
+ Own Id: OTP-13065 Aux Id: PR-960 </p>
+ </item>
+ <item>
+ <p>
+ Optimize binary:split/2 and binary:split/3 with native
+ BIF implementation.</p>
+ <p>
+ Own Id: OTP-13082</p>
+ </item>
+ <item>
+ <p>Background: The types of record fields have since R12B
+ been put in a separate form by <c>epp:parse_file()</c>,
+ leaving the record declaration form untyped. The separate
+ form, however, does not follow the syntax of type
+ declarations, and parse transforms inspecting
+ <c>-type()</c> attributes need to know about the special
+ syntax. Since the compiler stores the return value of
+ <c>epp:parse_file()</c> as debug information in the
+ abstract code chunk (<c>"Abst"</c> or
+ <c>abstract_code</c>), tools too need to know about the
+ special syntax, if they inspect <c>-type()</c> attributes
+ in abstract code.</p>
+ <p>Change: No separate type form is created by
+ <c>epp:parse_file()</c>, but the type information is kept
+ in the record fields. This means that all parse
+ transforms and all tools inspecting <c>-record()</c>
+ declarations need to recognize <c>{typed_record_field,
+ Field, Type}</c>.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-13148</p>
+ </item>
+ <item>
+ <p>
+ Unsized fields of the type <c>bytes</c> in binary
+ generators are now forbidden. (The other ways of writing
+ unsized fields, such as <c>binary</c>, are already
+ forbidden.)</p>
+ <p>
+ Own Id: OTP-13152</p>
+ </item>
+ <item>
+ <p> The type <c>map()</c> is built-in, and cannot be
+ redefined. </p>
+ <p>
+ Own Id: OTP-13153</p>
+ </item>
+ <item>
+ <p> Let <c>dets:open_file()</c> exit with a <c>badarg</c>
+ message if given a raw file name (a binary). </p>
+ <p>
+ Own Id: OTP-13229 Aux Id: ERL-55 </p>
+ </item>
+ <item>
+ <p> Add <c>filename:basedir/2,3</c></p> <p>basedir
+ returns suitable path(s) for 'user_cache', 'user_config',
+ 'user_data', 'user_log', 'site_config' and 'site_data'.
+ On linux and linux like systems the paths will respect
+ the XDG environment variables.</p>
+ <p>
+ Own Id: OTP-13392</p>
+ </item>
+ <item>
+ <p>There are new preprocessor directives
+ <c>-error(Term)</c> and <c>-warning(Term)</c> to cause a
+ compilation error or a compilation warning,
+ respectively.</p>
+ <p>
+ Own Id: OTP-13476</p>
+ </item>
+ <item>
+ <p>
+ Optimize <c>'++'</c> operator and <c>lists:append/2</c>
+ by using a single pass to build a new list while checking
+ for properness.</p>
+ <p>
+ Own Id: OTP-13487</p>
+ </item>
+ <item>
+ <p>
+ Add <c>maps:update_with/3,4</c> and <c>maps:take/2</c></p>
+ <p>
+ Own Id: OTP-13522 Aux Id: PR-1025 </p>
+ </item>
+ <item>
+ <p><c>lists:join/2</c> has been added. Similar to
+ <c>string:join/2</c> but works with arbitrary lists.</p>
+ <p>
+ Own Id: OTP-13523</p>
+ </item>
+ <item>
+ <p>Obfuscate asserts to make Dialyzer shut up.</p>
+ <p>
+ Own Id: OTP-13524 Aux Id: PR-1002 </p>
+ </item>
+ <item>
+ <p>
+ Supervisors now explicitly add their callback module in
+ the return from sys:get_status/1,2. This is to simplify
+ custom supervisor implementations. The Misc part of the
+ return value from sys:get_status/1,2 for a supervisor is
+ now:</p>
+ <p>
+ [{data, [{"State",
+ State}]},{supervisor,[{"Callback",Module}]}]</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-13619 Aux Id: PR-1000 </p>
+ </item>
+ <item>
+ <p>
+ Relax translation of initial calls in <c>proc_lib</c>,
+ i.e. remove the restriction to only do the translation
+ for <c>gen_server</c> and <c>gen_fsm</c>. This enables
+ user defined <c>gen</c> based generic callback modules to
+ be displayed nicely in <c>c:i()</c> and observer.</p>
+ <p>
+ Own Id: OTP-13623</p>
+ </item>
+ <item>
+ <p>The function <c>queue:lait/1</c> (misspelling of
+ <c>liat/1</c>) is now deprecated.</p>
+ <p>
+ Own Id: OTP-13658</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>STDLIB 2.8</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/stdlib/src/ets.erl b/lib/stdlib/src/ets.erl
index 3f74e01692..20de06fd0b 100644
--- a/lib/stdlib/src/ets.erl
+++ b/lib/stdlib/src/ets.erl
@@ -232,20 +232,20 @@ match(_) ->
match_object(_, _) ->
erlang:nif_error(undef).
--spec match_object(Tab, Pattern, Limit) -> {[Match], Continuation} |
+-spec match_object(Tab, Pattern, Limit) -> {[Object], Continuation} |
'$end_of_table' when
Tab :: tab(),
Pattern :: match_pattern(),
Limit :: pos_integer(),
- Match :: [term()],
+ Object :: tuple(),
Continuation :: continuation().
match_object(_, _, _) ->
erlang:nif_error(undef).
--spec match_object(Continuation) -> {[Match], Continuation} |
+-spec match_object(Continuation) -> {[Object], Continuation} |
'$end_of_table' when
- Match :: [term()],
+ Object :: tuple(),
Continuation :: continuation().
match_object(_) ->
diff --git a/lib/stdlib/src/gen_statem.erl b/lib/stdlib/src/gen_statem.erl
index 23bddafeed..c02e6a1a19 100644
--- a/lib/stdlib/src/gen_statem.erl
+++ b/lib/stdlib/src/gen_statem.erl
@@ -219,9 +219,10 @@
OldState :: state(),
OldData :: data(),
Extra :: term()) ->
- {NewCallbackMode :: callback_mode(),
+ {CallbackMode :: callback_mode(),
NewState :: state(),
- NewData :: data()}.
+ NewData :: data()} |
+ (Reason :: term()).
%% Format the callback module state in some sensible that is
%% often condensed way. For StatusOption =:= 'normal' the perferred
@@ -630,11 +631,11 @@ system_code_change(
Result -> Result
end
of
- {NewCallbackMode,NewState,NewData} ->
- callback_mode(NewCallbackMode) orelse
- error({callback_mode,NewCallbackMode}),
+ {CallbackMode,NewState,NewData} ->
+ callback_mode(CallbackMode) orelse
+ error({callback_mode,CallbackMode}),
{ok,
- S#{callback_mode := NewCallbackMode,
+ S#{callback_mode := CallbackMode,
state := NewState,
data := NewData}};
{ok,_} = Error ->
diff --git a/lib/stdlib/src/shell.erl b/lib/stdlib/src/shell.erl
index 82a3a2be4f..28f37ef8bf 100644
--- a/lib/stdlib/src/shell.erl
+++ b/lib/stdlib/src/shell.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2015. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2016. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -768,6 +768,8 @@ used_records({call,_,{atom,_,record_info},[A,{atom,_,Name}]}) ->
{name, Name, A};
used_records({call,Line,{tuple,_,[M,F]},As}) ->
used_records({call,Line,{remote,Line,M,F},As});
+used_records({type,_,record,[{atom,_,Name}|Fs]}) ->
+ {name, Name, Fs};
used_records(T) when is_tuple(T) ->
{expr, tuple_to_list(T)};
used_records(E) ->
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index 40764a943d..b02d17bdb6 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -47,6 +47,7 @@
fixtable_next/1, fixtable_insert/1, rename/1, rename_unnamed/1, evil_rename/1,
update_element/1, update_counter/1, evil_update_counter/1, partly_bound/1, match_heavy/1]).
-export([update_counter_with_default/1]).
+-export([update_counter_table_growth/1]).
-export([member/1]).
-export([memory/1]).
-export([select_fail/1]).
@@ -100,6 +101,7 @@
heavy_lookup_element_do/1, member_do/1, otp_5340_do/1, otp_7665_do/1, meta_wb_do/1,
do_heavy_concurrent/1, tab2file2_do/2, exit_large_table_owner_do/2,
types_do/1, sleeper/0, memory_do/1, update_counter_with_default_do/1,
+ update_counter_table_growth_do/1,
ms_tracee_dummy/1, ms_tracee_dummy/2, ms_tracee_dummy/3, ms_tracee_dummy/4
]).
@@ -137,6 +139,7 @@ all() ->
rename, rename_unnamed, evil_rename, update_element,
update_counter, evil_update_counter,
update_counter_with_default, partly_bound,
+ update_counter_table_growth,
match_heavy, {group, fold}, member, t_delete_object,
t_init_table, t_whitebox, t_delete_all_objects,
t_insert_list, t_test_ms, t_select_delete, t_ets_dets,
@@ -215,7 +218,7 @@ memory_check_summary(_Config) ->
receive {get_failed_memchecks, FailedMemchecks} -> ok end,
io:format("Failed memchecks: ~p\n",[FailedMemchecks]),
NoFailedMemchecks = length(FailedMemchecks),
- if NoFailedMemchecks > 300 ->
+ if NoFailedMemchecks > 3 ->
ct:fail("Too many failed (~p) memchecks", [NoFailedMemchecks]);
true ->
ok
@@ -604,9 +607,9 @@ memory(Config) when is_list(Config) ->
memory_do(Opts) ->
L = [T1,T2,T3,T4] = fill_sets_int(1000,Opts),
XR1 = case mem_mode(T1) of
- {normal,_} -> {13836,13560,13560,13566}; %{13836,13046,13046,13052}
- {compressed,4} -> {11041,10865,10865,10866}; %{11041,10251,10251,10252}
- {compressed,8} -> {10050,9774,9774,9774} % {10050,9260,9260,9260}
+ {normal,_} -> {13836,13046,13046,13052}; %{13862,13072,13072,13078};
+ {compressed,4} -> {11041,10251,10251,10252}; %{11067,10277,10277,10278};
+ {compressed,8} -> {10050,9260,9260,9260} %{10076,9286,9286,9286}
end,
XRes1 = adjust_xmem(L, XR1),
Res1 = {?S(T1),?S(T2),?S(T3),?S(T4)},
@@ -620,9 +623,9 @@ memory_do(Opts) ->
end,
L),
XR2 = case mem_mode(T1) of
- {normal,_} -> {13826,13551,13542,13548}; %{13826,13037,13028,13034};
- {compressed,4} -> {11031,10856,10747,10748}; %{11031,10242,10233,10234};
- {compressed,8} -> {10040,9765,9756,9756} %{10040,9251,9242,9242}
+ {normal,_} -> {13826,13037,13028,13034}; %{13852,13063,13054,13060};
+ {compressed,4} -> {11031,10242,10233,10234}; %{11057,10268,10259,10260};
+ {compressed,8} -> {10040,9251,9242,9242} %10066,9277,9268,9268}
end,
XRes2 = adjust_xmem(L, XR2),
Res2 = {?S(T1),?S(T2),?S(T3),?S(T4)},
@@ -636,9 +639,9 @@ memory_do(Opts) ->
end,
L),
XR3 = case mem_mode(T1) of
- {normal,_} -> {13816,13542,13524,13530}; %{13816,13028,13010,13016}
- {compressed,4} -> {11021,10747,10729,10730}; %{11021,10233,10215,10216}
- {compressed,8} -> {10030,9756,9738,9738} %{10030,9242,9224,9224}
+ {normal,_} -> {13816,13028,13010,13016}; %{13842,13054,13036,13042};
+ {compressed,4} -> {11021,10233,10215,10216}; %{11047,10259,10241,10242};
+ {compressed,8} -> {10030,9242,9224,9224} %{10056,9268,9250,9250}
end,
XRes3 = adjust_xmem(L, XR3),
Res3 = {?S(T1),?S(T2),?S(T3),?S(T4)},
@@ -1955,6 +1958,16 @@ update_counter_with_default_do(Opts) ->
ok.
+update_counter_table_growth(_Config) ->
+ repeat_for_opts(update_counter_table_growth_do).
+
+update_counter_table_growth_do(Opts) ->
+ Set = ets_new(b, [set | Opts]),
+ [ets:update_counter(Set, N, {2, 1}, {N, 1}) || N <- lists:seq(1,10000)],
+ OrderedSet = ets_new(b, [ordered_set | Opts]),
+ [ets:update_counter(OrderedSet, N, {2, 1}, {N, 1}) || N <- lists:seq(1,10000)],
+ ok.
+
%% Check that a first-next sequence always works on a fixed table.
fixtable_next(Config) when is_list(Config) ->
repeat_for_opts(fixtable_next_do, [write_concurrency,all_types]).
@@ -5350,12 +5363,12 @@ verify_table_load(T) ->
Stats = ets:info(T,stats),
{Buckets,AvgLen,StdDev,ExpSD,_MinLen,_MaxLen,_} = Stats,
ok = if
- AvgLen > 2 ->
+ AvgLen > 7 ->
io:format("Table overloaded: Stats=~p\n~p\n",
[Stats, ets:info(T)]),
false;
- Buckets>256, AvgLen < 0.5 ->
+ Buckets>256, AvgLen < 6 ->
io:format("Table underloaded: Stats=~p\n~p\n",
[Stats, ets:info(T)]),
false;
diff --git a/lib/stdlib/test/shell_SUITE.erl b/lib/stdlib/test/shell_SUITE.erl
index dc82e92876..c409a6949b 100644
--- a/lib/stdlib/test/shell_SUITE.erl
+++ b/lib/stdlib/test/shell_SUITE.erl
@@ -30,7 +30,7 @@
progex_bit_syntax/1, progex_records/1,
progex_lc/1, progex_funs/1,
otp_5990/1, otp_6166/1, otp_6554/1,
- otp_7184/1, otp_7232/1, otp_8393/1, otp_10302/1]).
+ otp_7184/1, otp_7232/1, otp_8393/1, otp_10302/1, otp_13719/1]).
-export([ start_restricted_from_shell/1,
start_restricted_on_command_line/1,restricted_local/1]).
@@ -91,7 +91,7 @@ groups() ->
progex_funs]},
{tickets, [],
[otp_5990, otp_6166, otp_6554, otp_7184,
- otp_7232, otp_8393, otp_10302]}].
+ otp_7232, otp_8393, otp_10302, otp_13719]}].
init_per_suite(Config) ->
Config.
@@ -2810,6 +2810,19 @@ otp_10302(Config) when is_list(Config) ->
test_server:stop_node(Node),
ok.
+otp_13719(Config) when is_list(Config) ->
+ Test = <<"-module(otp_13719).
+ -record(bar, {}).
+ -record(foo, {bar :: #bar{}}).">>,
+ File = filename("otp_13719.erl", Config),
+ Beam = filename("otp_13719.beam", Config),
+ ok = compile_file(Config, File, Test, []),
+ RR = "rr(\"" ++ Beam ++ "\"). #foo{}.",
+ "[bar,foo]\n#foo{bar = undefined}.\n" = t(RR),
+ file:delete(filename("test.beam", Config)),
+ file:delete(File),
+ ok.
+
scan(B) ->
F = fun(Ts) ->
case erl_parse:parse_term(Ts) of
diff --git a/lib/stdlib/test/slave_SUITE.erl b/lib/stdlib/test/slave_SUITE.erl
index 25b706e81f..7525cf78de 100644
--- a/lib/stdlib/test/slave_SUITE.erl
+++ b/lib/stdlib/test/slave_SUITE.erl
@@ -71,6 +71,7 @@ t_start_link(Config) when is_list(Config) ->
rpc:cast(Slave1, erlang, halt, []),
rpc:cast(Slave2, erlang, halt, []),
+ ct:sleep(250),
is_dead(Slave1),
is_dead(Slave2),
diff --git a/lib/stdlib/vsn.mk b/lib/stdlib/vsn.mk
index 46e3ceac03..41037b8f53 100644
--- a/lib/stdlib/vsn.mk
+++ b/lib/stdlib/vsn.mk
@@ -1 +1 @@
-STDLIB_VSN = 3.0
+STDLIB_VSN = 3.0.1
diff --git a/lib/syntax_tools/doc/specs/.gitignore b/lib/syntax_tools/doc/specs/.gitignore
new file mode 100644
index 0000000000..322eebcb06
--- /dev/null
+++ b/lib/syntax_tools/doc/specs/.gitignore
@@ -0,0 +1 @@
+specs_*.xml
diff --git a/lib/syntax_tools/doc/src/Makefile b/lib/syntax_tools/doc/src/Makefile
index ff4f3f78ff..e55222e59c 100644
--- a/lib/syntax_tools/doc/src/Makefile
+++ b/lib/syntax_tools/doc/src/Makefile
@@ -81,10 +81,15 @@ HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
+
+TOP_SPECS_FILE = specs.xml
+
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
XML_FLAGS +=
+SPECS_FLAGS = -I../../include
DVIPS_FLAGS +=
# ----------------------------------------------------
@@ -93,7 +98,7 @@ DVIPS_FLAGS +=
$(HTMLDIR)/%.gif: %.gif
$(INSTALL_DATA) $< $@
-docs: pdf html man
+docs: man pdf html
$(TOP_PDF_FILE): $(XML_FILES)
@@ -120,6 +125,7 @@ clean clean_docs:
rm -f $(MAN3DIR)/*
rm -f $(XML_REF3_FILES) $(XML_CHAPTER_FILES) *.html
rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
+ rm -f $(SPECDIR)/*
rm -f errs core *~
# ----------------------------------------------------
diff --git a/lib/syntax_tools/doc/src/notes.xml b/lib/syntax_tools/doc/src/notes.xml
index 78b2c7c7a4..ef207f7c3d 100644
--- a/lib/syntax_tools/doc/src/notes.xml
+++ b/lib/syntax_tools/doc/src/notes.xml
@@ -32,6 +32,32 @@
<p>This document describes the changes made to the Syntax_Tools
application.</p>
+<section><title>Syntax_Tools 2.0</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>The abstract data type in <c>erl_syntax</c> is
+ augmented with types and function specifications.</p>
+ <p>The module <c>erl_prettypr</c> pretty prints types and
+ function specification, and the output can be parsed.</p>
+ <p>The types of record fields are no longer ignored. As a
+ consequence <c>erl_syntax_lib:analyze_record_field/1</c>
+ returns <c>{Default, Type}</c> instead of <c>Default</c>.
+ The functions <c>analyze_record_attribute</c>,
+ <c>analyze_attribute</c>, <c>analyze_form</c>, and
+ <c>analyze_forms</c> in the <c>erl_syntax_lib</c> module
+ are also affected by this incompatible change.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-12863</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Syntax_Tools 1.7</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/syntax_tools/doc/src/specs.xml b/lib/syntax_tools/doc/src/specs.xml
new file mode 100644
index 0000000000..04c3a494e7
--- /dev/null
+++ b/lib/syntax_tools/doc/src/specs.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<specs xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="../specs/specs_epp_dodger.xml"/>
+ <xi:include href="../specs/specs_erl_comment_scan.xml"/>
+ <xi:include href="../specs/specs_erl_prettypr.xml"/>
+ <xi:include href="../specs/specs_erl_recomment.xml"/>
+ <xi:include href="../specs/specs_erl_syntax.xml"/>
+ <xi:include href="../specs/specs_erl_syntax_lib.xml"/>
+ <xi:include href="../specs/specs_erl_tidy.xml"/>
+ <xi:include href="../specs/specs_igor.xml"/>
+ <xi:include href="../specs/specs_merl.xml"/>
+ <xi:include href="../specs/specs_merl_transform.xml"/>
+ <xi:include href="../specs/specs_prettypr.xml"/>
+</specs>
diff --git a/lib/syntax_tools/src/erl_comment_scan.erl b/lib/syntax_tools/src/erl_comment_scan.erl
index 03429d4d42..b5ac564146 100644
--- a/lib/syntax_tools/src/erl_comment_scan.erl
+++ b/lib/syntax_tools/src/erl_comment_scan.erl
@@ -30,8 +30,14 @@
%% =====================================================================
--type comment() :: {integer(), integer(), integer(), [string()]}.
--type commentLine() :: {integer(), integer(), integer(), string()}.
+-type comment() :: {Line:: integer(),
+ Column:: integer(),
+ Indentation :: integer(),
+ Text :: [string()]}.
+-type commentLine() :: {Line :: integer(),
+ Column :: integer(),
+ Indent :: integer(),
+ Text :: string()}.
%% =====================================================================
%% @spec file(FileName::file:filename()) -> [Comment]
diff --git a/lib/syntax_tools/src/erl_prettypr.erl b/lib/syntax_tools/src/erl_prettypr.erl
index f1615b2610..df0d78031c 100644
--- a/lib/syntax_tools/src/erl_prettypr.erl
+++ b/lib/syntax_tools/src/erl_prettypr.erl
@@ -195,10 +195,16 @@ format(Node) ->
%% =====================================================================
%% @spec format(Tree::syntaxTree(), Options::[term()]) -> string()
-%% syntaxTree() = erl_syntax:syntaxTree()
%%
-%% @type hook() = (syntaxTree(), context(), Continuation) -> document()
-%% Continuation = (syntaxTree(), context()) -> document().
+%% @type syntaxTree() = erl_syntax:syntaxTree().
+%%
+%% An abstract syntax tree. See the {@link erl_syntax} module for
+%% details.
+%%
+%% @type hook() = (syntaxTree(), context(), Continuation) ->
+%% prettypr:document()
+%% Continuation = (syntaxTree(), context()) ->
+%% prettypr:document().
%%
%% A call-back function for user-controlled formatting. See {@link
%% format/2}.
@@ -277,7 +283,7 @@ format(Node, Options) ->
%% =====================================================================
-%% @spec best(Tree::syntaxTree()) -> empty | document()
+%% @spec best(Tree::syntaxTree()) -> empty | prettypr:document()
%% @equiv best(Tree, [])
-spec best(erl_syntax:syntaxTree()) -> 'empty' | prettypr:document().
@@ -288,7 +294,7 @@ best(Node) ->
%% =====================================================================
%% @spec best(Tree::syntaxTree(), Options::[term()]) ->
-%% empty | document()
+%% empty | prettypr:document()
%%
%% @doc Creates a fixed "best" abstract layout for a syntax tree. This
%% is similar to the `layout/2' function, except that here, the final
@@ -310,7 +316,7 @@ best(Node, Options) ->
%% =====================================================================
-%% @spec layout(Tree::syntaxTree()) -> document()
+%% @spec layout(Tree::syntaxTree()) -> prettypr:document()
%% @equiv layout(Tree, [])
-spec layout(erl_syntax:syntaxTree()) -> prettypr:document().
@@ -320,8 +326,7 @@ layout(Node) ->
%% =====================================================================
-%% @spec layout(Tree::syntaxTree(), Options::[term()]) -> document()
-%% document() = prettypr:document()
+%% @spec layout(Tree::syntaxTree(), Options::[term()]) -> prettypr:document()
%%
%% @doc Creates an abstract document layout for a syntax tree. The
%% result represents a set of possible layouts (cf. module `prettypr').
diff --git a/lib/syntax_tools/src/erl_recomment.erl b/lib/syntax_tools/src/erl_recomment.erl
index c1141b2bc6..1d23034991 100644
--- a/lib/syntax_tools/src/erl_recomment.erl
+++ b/lib/syntax_tools/src/erl_recomment.erl
@@ -30,6 +30,9 @@
-export([recomment_forms/2, quick_recomment_forms/2, recomment_tree/2]).
+%% @type syntaxTree() = erl_syntax:syntaxTree(). An abstract syntax
+%% tree. See the {@link erl_syntax} module for details.
+
%% =====================================================================
%% @spec quick_recomment_forms(Forms, Comments::[Comment]) ->
%% syntaxTree()
@@ -55,7 +58,6 @@ quick_recomment_forms(Tree, Cs) ->
%% =====================================================================
%% @spec recomment_forms(Forms, Comments::[Comment]) -> syntaxTree()
%%
-%% syntaxTree() = erl_syntax:syntaxTree()
%% Forms = syntaxTree() | [syntaxTree()]
%% Comment = {Line, Column, Indentation, Text}
%% Line = integer()
diff --git a/lib/syntax_tools/src/erl_syntax_lib.erl b/lib/syntax_tools/src/erl_syntax_lib.erl
index 9815559779..5aecf5d774 100644
--- a/lib/syntax_tools/src/erl_syntax_lib.erl
+++ b/lib/syntax_tools/src/erl_syntax_lib.erl
@@ -280,7 +280,7 @@ mapfoldl(_, S, []) ->
%% =====================================================================
%% @spec variables(syntaxTree()) -> set(atom())
%%
-%% set(T) = //stdlib/sets:set(T)
+%% @type set(T) = //stdlib/sets:set(T)
%%
%% @doc Returns the names of variables occurring in a syntax tree, The
%% result is a set of variable names represented by atoms. Macro names
@@ -1955,7 +1955,7 @@ analyze_application(Node) ->
%% =====================================================================
-%% @spec analyze_type_application(Node::syntaxTree()) -> typeName()
+%% @spec analyze_type_application(Node::syntaxTree()) -> TypeName
%%
%% TypeName = {atom(), integer()}
%% | {ModuleName, {atom(), integer()}}
diff --git a/lib/syntax_tools/src/erl_tidy.erl b/lib/syntax_tools/src/erl_tidy.erl
index f2de12b410..5d3fc6f062 100644
--- a/lib/syntax_tools/src/erl_tidy.erl
+++ b/lib/syntax_tools/src/erl_tidy.erl
@@ -36,6 +36,11 @@
%% been reasonably well tested, but the possibility of errors remains.
%% Keep backups of your original code safely stored, until you feel
%% confident that the new, modified code can be trusted.
+%%
+%% @type syntaxTree() = erl_syntax:syntaxTree(). An abstract syntax
+%% tree. See the {@link erl_syntax} module for details.
+%%
+%% @type filename() = file:filename().
-module(erl_tidy).
@@ -79,7 +84,6 @@ dir(Dir) ->
%% =====================================================================
%% @spec dir(Directory::filename(), Options::[term()]) -> ok
-%% filename() = file:filename()
%%
%% @doc Tidies Erlang source files in a directory and its
%% subdirectories.
@@ -414,7 +418,7 @@ write_module(Tree, Name, Opts) ->
print_module(Tree, Opts) ->
Printer = proplists:get_value(printer, Opts),
- io:format(Printer(Tree, Opts)).
+ io:put_chars(Printer(Tree, Opts)).
output(FD, Printer, Tree, Opts) ->
io:put_chars(FD, Printer(Tree, Opts)),
@@ -513,7 +517,6 @@ module(Forms) ->
%% @spec module(Forms, Options::[term()]) -> syntaxTree()
%%
%% Forms = syntaxTree() | [syntaxTree()]
-%% syntaxTree() = erl_syntax:syntaxTree()
%%
%% @doc Tidies a syntax tree representation of a module
%% definition. The given `Forms' may be either a single
diff --git a/lib/syntax_tools/src/igor.erl b/lib/syntax_tools/src/igor.erl
index 1d14bd7c3a..943250e5cd 100644
--- a/lib/syntax_tools/src/igor.erl
+++ b/lib/syntax_tools/src/igor.erl
@@ -151,7 +151,8 @@ default_printer(Tree, Options) ->
%% @spec parse_transform(Forms::[syntaxTree()], Options::[term()]) ->
%% [syntaxTree()]
%%
-%% syntaxTree() = erl_syntax:syntaxTree()
+%% @type syntaxTree() = erl_syntax:syntaxTree(). An abstract syntax
+%% tree. See the {@link erl_syntax} module for details.
%%
%% @doc Allows Igor to work as a component of the Erlang compiler.
%% Including the term `{parse_transform, igor}' in the
@@ -212,7 +213,7 @@ merge(Name, Files) ->
%% @spec merge(Name::atom(), Files::[filename()], Options::[term()]) ->
%% [filename()]
%%
-%% filename() = file:filename()
+%% @type filename() = file:filename()
%%
%% @doc Merges source code files to a single file. `Name'
%% specifies the name of the resulting module - not the name of the
@@ -367,6 +368,7 @@ merge_files(Name, Files, Options) ->
%% @spec merge_files(Name::atom(), Sources::[Forms],
%% Files::[filename()], Options::[term()]) ->
%% {syntaxTree(), [stubDescriptor()]}
+%%
%% Forms = syntaxTree() | [syntaxTree()]
%%
%% @doc Merges source code files and syntax trees to a single syntax
diff --git a/lib/syntax_tools/test/syntax_tools_SUITE.erl b/lib/syntax_tools/test/syntax_tools_SUITE.erl
index b935d42bb7..43c17e9f1f 100644
--- a/lib/syntax_tools/test/syntax_tools_SUITE.erl
+++ b/lib/syntax_tools/test/syntax_tools_SUITE.erl
@@ -27,14 +27,14 @@
%% Test cases
-export([app_test/1,appup_test/1,smoke_test/1,revert/1,revert_map/1,
t_abstract_type/1,t_erl_parse_type/1,t_epp_dodger/1,
- t_comment_scan/1,t_igor/1]).
+ t_comment_scan/1,t_igor/1,t_erl_tidy/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[app_test,appup_test,smoke_test,revert,revert_map,
t_abstract_type,t_erl_parse_type,t_epp_dodger,
- t_comment_scan,t_igor].
+ t_comment_scan,t_igor,t_erl_tidy].
groups() ->
[].
@@ -237,6 +237,12 @@ t_igor(Config) when is_list(Config) ->
ok.
+t_erl_tidy(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ File = filename:join(DataDir,"erl_tidy_tilde.erl"),
+ ok = erl_tidy:file(File, [{stdout, true}]),
+ ok.
+
test_comment_scan([],_) -> ok;
test_comment_scan([File|Files],DataDir) ->
Filename = filename:join(DataDir,File),
diff --git a/lib/syntax_tools/test/syntax_tools_SUITE_data/erl_tidy_tilde.erl b/lib/syntax_tools/test/syntax_tools_SUITE_data/erl_tidy_tilde.erl
new file mode 100644
index 0000000000..888264bad6
--- /dev/null
+++ b/lib/syntax_tools/test/syntax_tools_SUITE_data/erl_tidy_tilde.erl
@@ -0,0 +1,13 @@
+%%
+%% File: erl_tidy_tilde.erl
+%% Author: Mark Bucciarelli
+%% Created: 2016-06-05
+%%
+
+-module(erl_tidy_tilde).
+
+-export([start/0]).
+
+start() ->
+ io:put_chars("tilde characters ('~')in source were "
+ "breaking erl_tidy\n").
diff --git a/lib/tools/doc/src/notes.xml b/lib/tools/doc/src/notes.xml
index 3a6ac37eef..a0a817c0f2 100644
--- a/lib/tools/doc/src/notes.xml
+++ b/lib/tools/doc/src/notes.xml
@@ -31,6 +31,56 @@
</header>
<p>This document describes the changes made to the Tools application.</p>
+<section><title>Tools 2.8.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>Correct a bug when adding multiple modules to an Xref
+ server. The bug was introduced in OTP-19.0. </p>
+ <p>
+ Own Id: OTP-13708 Aux Id: ERL-173 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Tools 2.8.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Update fprof to use the new 'spawned' trace event to
+ determine when a process has been created.</p>
+ <p>
+ Own Id: OTP-13499</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>Optimize adding multiple modules to an Xref server.
+ </p>
+ <p>
+ Own Id: OTP-13593</p>
+ </item>
+ <item>
+ <p>
+ Various emacs mode improvements, such as better tags
+ support.</p>
+ <p>
+ Own Id: OTP-13610</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Tools 2.8.3</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/tools/emacs/erlang-skels.el b/lib/tools/emacs/erlang-skels.el
index ce26c83295..c1152f31a4 100644
--- a/lib/tools/emacs/erlang-skels.el
+++ b/lib/tools/emacs/erlang-skels.el
@@ -903,7 +903,7 @@ Please see the function `tempo-define-template'.")
"%% gen_statem:start_link/[3,4], this function is called by the new" n
"%% process to initialize." n
(erlang-skel-separator-end 2)
- "-spec init(Args :: term()) -> " n>
+ "-spec init(Args :: term()) ->" n>
"{gen_statem:callback_mode()," n>
"State :: term(), Data :: term()} |" n>
"{gen_statem:callback_mode()," n>
@@ -927,7 +927,7 @@ Please see the function `tempo-define-template'.")
"-spec state_name(" n>
"gen_statem:event_type(), Msg :: term()," n>
"Data :: term()) ->" n>
- "gen_statem:state_function_result(). " n
+ "gen_statem:state_function_result()." n
"state_name({call,Caller}, _Msg, Data) ->" n>
"{next_state, state_name, Data, [{reply,Caller,ok}]}." n
n
@@ -940,7 +940,7 @@ Please see the function `tempo-define-template'.")
"-spec handle_event(" n>
"gen_statem:event_type(), Msg :: term()," n>
"State :: term(), Data :: term()) ->" n>
- "gen_statem:handle_event_result(). " n
+ "gen_statem:handle_event_result()." n
"handle_event({call,From}, _Msg, State, Data) ->" n>
"{next_state, State, Data, [{reply,From,ok}]}." n
n
@@ -965,9 +965,11 @@ Please see the function `tempo-define-template'.")
"-spec code_change(" n>
"OldVsn :: term() | {down,term()}," n>
"State :: term(), Data :: term(), Extra :: term()) ->" n>
- "{ok, NewState :: term(), NewData :: term()}." n
+ "{gen_statem:callback_mode()," n>
+ "NewState :: term(), NewData :: term()} |" n>
+ "(Reason :: term())." n
"code_change(_OldVsn, State, Data, _Extra) ->" n>
- "{ok, State, Data}." n
+ "{state_functions, State, Data}." n
n
(erlang-skel-double-separator-start 3)
"%%% Internal functions" n
diff --git a/lib/tools/emacs/erlang-test.el b/lib/tools/emacs/erlang-test.el
index a5aab04953..9a146632c5 100644
--- a/lib/tools/emacs/erlang-test.el
+++ b/lib/tools/emacs/erlang-test.el
@@ -33,6 +33,7 @@
(require 'ert)
(require 'cl-lib)
+(require 'erlang)
(defvar erlang-test-code
'((nil . "-module(erlang_test).")
@@ -51,27 +52,28 @@ concatenated to form an erlang file to test on.")
(ert-deftest erlang-test-tags ()
(let* ((dir (make-temp-file "erlang-test" t))
- (erlang-file (expand-file-name "erlang_test.erl" dir))
- (tags-file (expand-file-name "TAGS" dir))
- tags-file-name tags-table-list erlang-buffer)
- (unwind-protect
- (progn
- (erlang-test-create-erlang-file erlang-file)
- (erlang-test-compile-tags erlang-file tags-file)
- (setq erlang-buffer (find-file-noselect erlang-file))
- (with-current-buffer erlang-buffer
- (setq-local tags-file-name tags-file))
- ;; PENDING - setting global tags-file-name is a workaround
- ;; for GNU Emacs bug23164.
- (setq tags-file-name tags-file)
- (erlang-test-xref-find-definitions erlang-file erlang-buffer))
- (when (buffer-live-p erlang-buffer)
- (kill-buffer erlang-buffer))
- (let ((tags-buffer (find-buffer-visiting tags-file)))
- (when (buffer-live-p tags-buffer)
- (kill-buffer tags-buffer)))
- (when (file-exists-p dir)
- (delete-directory dir t)))))
+ (erlang-file (expand-file-name "erlang_test.erl" dir))
+ (tags-file (expand-file-name "TAGS" dir))
+ tags-file-name tags-table-list erlang-buffer)
+ (unwind-protect
+ (progn
+ (erlang-test-create-erlang-file erlang-file)
+ (erlang-test-compile-tags erlang-file tags-file)
+ (setq erlang-buffer (find-file-noselect erlang-file))
+ (with-current-buffer erlang-buffer
+ (setq-local tags-file-name tags-file))
+ ;; Setting global tags-file-name is a workaround for
+ ;; GNU Emacs bug#23164.
+ (setq tags-file-name tags-file)
+ (erlang-test-completion-table)
+ (erlang-test-xref-find-definitions erlang-file erlang-buffer))
+ (when (buffer-live-p erlang-buffer)
+ (kill-buffer erlang-buffer))
+ (let ((tags-buffer (find-buffer-visiting tags-file)))
+ (when (buffer-live-p tags-buffer)
+ (kill-buffer tags-buffer)))
+ (when (file-exists-p dir)
+ (delete-directory dir t)))))
(defun erlang-test-create-erlang-file (erlang-file)
(with-temp-file erlang-file
@@ -83,6 +85,19 @@ concatenated to form an erlang file to test on.")
"-o" tags-file
erlang-file))))
+(defun erlang-test-completion-table ()
+ (let ((erlang-replace-etags-tags-completion-table t))
+ (setq tags-completion-table nil)
+ (tags-completion-table))
+ (should (equal (sort tags-completion-table #'string-lessp)
+ (sort (erlang-expected-completion-table) #'string-lessp))))
+
+(defun erlang-expected-completion-table ()
+ (append (cl-loop for (symbol . _) in erlang-test-code
+ when (stringp symbol)
+ append (list symbol (concat "erlang_test:" symbol)))
+ (list "erlang_test:" "erlang_test:module_info")))
+
(defun erlang-test-xref-find-definitions (erlang-file erlang-buffer)
(cl-loop for (tagname . code) in erlang-test-code
for line = 1 then (1+ line)
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index 3d20d86f43..a2062180f3 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -971,7 +971,7 @@ resulting regexp is surrounded by \\_< and \\_>."
(defvar erlang-defun-prompt-regexp (concat "^" erlang-atom-regexp "\\s *(")
"Regexp which should match beginning of a clause.")
-(defvar erlang-file-name-extension-regexp "\\.[eh]rl$"
+(defvar erlang-file-name-extension-regexp "\\.erl$"
"*Regexp which should match an Erlang file name.
This regexp is used when an Erlang module name is extracted from the
@@ -1291,6 +1291,11 @@ Unfortunately, XEmacs hasn't got support for a special Font
Lock syntax table. The effect is that `apply' in the atom
`foo_apply' will be highlighted as a bif.")
+(defvar erlang-replace-etags-tags-completion-table nil
+ "Internal flag used by advice `erlang-replace-tags-table'.
+This is non-nil when `etags-tags-completion-table' should be
+replaced by `erlang-etags-tags-completion-table'.")
+
;;; Avoid errors while compiling this file.
@@ -1354,6 +1359,10 @@ Lock syntax table. The effect is that `apply' in the atom
(called-interactively-p 'interactive)
(funcall (symbol-function 'interactive-p))))
+(unless (fboundp 'prog-mode)
+ (defun prog-mode ()
+ (use-local-map (make-keymap))))
+
;;;###autoload
(define-derived-mode erlang-mode prog-mode "Erlang"
"Major mode for editing Erlang source files in Emacs.
@@ -1539,7 +1548,9 @@ Other commands:
(set (make-local-variable 'outline-regexp) "[[:lower:]0-9_]+ *(.*) *-> *$")
(set (make-local-variable 'outline-level) (lambda () 1))
(set (make-local-variable 'add-log-current-defun-function)
- 'erlang-current-defun))
+ 'erlang-current-defun)
+ (set (make-local-variable 'find-tag-default-function)
+ 'erlang-find-tag-for-completion))
(defun erlang-font-lock-init ()
"Initialize Font Lock for Erlang mode."
@@ -4358,12 +4369,12 @@ works under XEmacs.)"
(require 'etags)
;; Test on a function available in the Emacs 19 version
;; of tags but not in the XEmacs version.
- (if (not (fboundp 'find-tag-noselect))
- ()
+ (when (fboundp 'find-tag-noselect)
(erlang-tags-define-keys (current-local-map))
(setq erlang-tags-installed t)))))
+
;; Set all keys bound to `find-tag' et.al. in the global map and the
;; menu to `erlang-find-tag' et.al. in `map'.
;;
@@ -4386,10 +4397,6 @@ works under XEmacs.)"
(erlang-menu-init))
-;; There exists a variable `find-tag-default-function'. It is not used
-;; since `complete-tag' uses it to get current word under point. In that
-;; situation we don't want the module to be prepended.
-
(defun erlang-find-tag-default ()
"Return the default tag.
Search `-import' list of imported functions.
@@ -4766,26 +4773,30 @@ for a tag on the form `module:tag'."
;;;
;;; The basic idea is to create a second completion table `erlang-tags-
;;; completion-table' containing all normal tags plus tags on the form
-;;; `module:tag'.
-
+;;; `module:tag' and `module:'.
-(when (and (fboundp 'etags-tags-completion-table)
+;; PENDING - Should probably make use of the
+;; `completion-at-point-functions' hook instead of this advice.
+(when (and (locate-library "etags")
+ (require 'etags)
+ (fboundp 'etags-tags-completion-table)
(fboundp 'tags-lazy-completion-table)) ; Emacs 23.1+
(if (fboundp 'advice-add)
;; Emacs 24.4+
(advice-add 'etags-tags-completion-table :around
(lambda (oldfun)
- (if (eq find-tag-default-function 'erlang-find-tag-for-completion)
+ (if erlang-replace-etags-tags-completion-table
(erlang-etags-tags-completion-table)
(funcall oldfun)))
(list :name 'erlang-replace-tags-table))
;; Emacs 23.1-24.3
- (defadvice etags-tags-completion-table (around erlang-replace-tags-table activate)
- (if (eq find-tag-default-function 'erlang-find-tag-for-completion)
+ (defadvice etags-tags-completion-table (around
+ erlang-replace-tags-table
+ activate)
+ (if erlang-replace-etags-tags-completion-table
(setq ad-return-value (erlang-etags-tags-completion-table))
ad-do-it))))
-
(defun erlang-complete-tag ()
"Perform tags completion on the text around point.
Completes to the set of names listed in the current tags table.
@@ -4799,23 +4810,19 @@ about Erlang modules."
(cond ((and erlang-tags-installed
(fboundp 'etags-tags-completion-table)
(fboundp 'tags-lazy-completion-table)) ; Emacs 23.1+
- ;; This depends on the advice called
- ;; erlang-replace-tags-table above. It is not enough to
- ;; let-bind tags-completion-table-function since that may be
- ;; overwritten in etags-recognize-tags-table.
- (let ((find-tag-default-function 'erlang-find-tag-for-completion))
+ (let ((erlang-replace-etags-tags-completion-table t))
(complete-tag)))
((and erlang-tags-installed
- (fboundp 'complete-tag)
- (fboundp 'tags-complete-tag)) ; Emacs 19
+ (fboundp 'complete-tag)
+ (fboundp 'tags-complete-tag)) ; Emacs 19-22
(let ((orig-tags-complete-tag (symbol-function 'tags-complete-tag)))
(fset 'tags-complete-tag
(symbol-function 'erlang-tags-complete-tag))
(unwind-protect
- (funcall (symbol-function 'complete-tag))
+ (complete-tag)
(fset 'tags-complete-tag orig-tags-complete-tag))))
((fboundp 'complete-tag) ; Emacs 19
- (funcall (symbol-function 'complete-tag)))
+ (complete-tag))
((fboundp 'tag-complete-symbol) ; XEmacs
(funcall (symbol-function 'tag-complete-symbol)))
(t
@@ -4830,19 +4837,22 @@ about Erlang modules."
(buffer-substring-no-properties start (point)))))
-
;; Based on `tags-complete-tag', but this one uses
;; `erlang-tags-completion-table' instead of `tags-completion-table'.
;;
;; This is the entry-point called by system function `completing-read'.
+;;
+;; Used for minibuffer completion in Emacs 19-24 and completion in
+;; erlang buffers in Emacs 19-22.
(defun erlang-tags-complete-tag (string predicate what)
- (save-excursion
- ;; If we need to ask for the tag table, allow that.
- (let ((enable-recursive-minibuffers t))
- (visit-tags-table-buffer))
+ (with-current-buffer (window-buffer (minibuffer-selected-window))
+ (save-excursion
+ ;; If we need to ask for the tag table, allow that.
+ (let ((enable-recursive-minibuffers t))
+ (visit-tags-table-buffer))
(if (eq what t)
(all-completions string (erlang-tags-completion-table) predicate)
- (try-completion string (erlang-tags-completion-table) predicate))))
+ (try-completion string (erlang-tags-completion-table) predicate)))))
;; `tags-completion-table' calls itself recursively, make it
@@ -4860,7 +4870,6 @@ about Erlang modules."
(fset 'tags-completion-table
erlang-tags-orig-completion-table)))
-
(defun erlang-tags-completion-table-1 ()
(make-local-variable 'erlang-tags-completion-table)
(or erlang-tags-completion-table
@@ -4871,60 +4880,63 @@ about Erlang modules."
(setq erlang-tags-completion-table tags-completion-table))))
+
+;; Emacs 25 expects this function to return a list (and it is ok for
+;; it to include duplicates). Older emacsen expects an obarray.
+(defun erlang-etags-tags-completion-table ()
+ (if (>= emacs-major-version 25)
+ (erlang-etags-tags-completion-table-list)
+ (let ((obarray (make-vector 511 0)))
+ (dolist (tag (erlang-etags-tags-completion-table-list))
+ (intern tag obarray))
+ obarray)))
+
;; Based on `etags-tags-completion-table'. The difference is that we
-;; add three symbols to the vector, the tag, module: and module:tag.
+;; add three strings to the list, the tag, module: and module:tag.
;; The module is extracted from the file name of a tag. (This one
;; only works if we are looking at an `etags' file. However, this is
;; the only format supported by Emacs, so far.)
-(defun erlang-etags-tags-completion-table ()
- (let ((table (make-vector 511 0))
- (file nil)
- (progress-reporter
- (when (fboundp 'make-progress-reporter)
- (make-progress-reporter
- (format "Making erlang tags completion table for %s..." buffer-file-name)
- (point-min) (point-max)))))
+(defun erlang-etags-tags-completion-table-list ()
+ (let ((progress-reporter
+ (make-progress-reporter
+ (format "Making tags completion table for %s..." buffer-file-name)
+ (point-min) (point-max)))
+ table module)
(save-excursion
(goto-char (point-min))
- ;; This monster regexp matches an etags tag line.
- ;; \1 is the string to match;
- ;; \2 is not interesting;
- ;; \3 is the guessed tag name; XXX guess should be better eg DEFUN
- ;; \4 is not interesting;
- ;; \5 is the explicitly-specified tag name.
- ;; \6 is the line to start searching at;
- ;; \7 is the char to start searching at.
(while (progn
- (while (and
- (eq (following-char) ?\f)
- (looking-at "\f\n\\([^,\n]*\\),.*\n"))
- (setq file (buffer-substring
- (match-beginning 1) (match-end 1)))
- (goto-char (match-end 0)))
+ (while (and (eq (following-char) ?\f)
+ (looking-at "\f\n\\([^,\n]*\\),.*\n"))
+ (let ((file (buffer-substring (match-beginning 1)
+ (match-end 1))))
+ (setq module (erlang-get-module-from-file-name file))
+ (when module
+ (push (concat module ":") table)
+ (push (concat module ":module_info") table))
+ (forward-line 2)))
+ ;; This regexp matches an explicit tag name or the
+ ;; place where it would start.
(re-search-forward
- "\
-^\\(\\([^\177]+[^-a-zA-Z0-9_$\177]+\\)?\\([-a-zA-Z0-9_$?:]+\\)\
-\[^-a-zA-Z0-9_$?:\177]*\\)\177\\(\\([^\n\001]+\\)\001\\)?\
-\\([0-9]+\\)?,\\([0-9]+\\)?\n"
+ "[\f\t\n\r()=,; ]?\177\\\(?:\\([^\n\001]+\\)\001\\)?"
nil t))
- (let ((tag (if (match-beginning 5)
+ (let ((tag (if (match-beginning 1)
;; There is an explicit tag name.
- (buffer-substring (match-beginning 5) (match-end 5))
- ;; No explicit tag name. Best guess.
- (buffer-substring (match-beginning 3) (match-end 3))))
- (module (and file
- (erlang-get-module-from-file-name file))))
- (intern tag table)
+ (buffer-substring (match-beginning 1) (match-end 1))
+ ;; No explicit tag name. Backtrack a little,
+ ;; and look for the implicit one.
+ (goto-char (match-beginning 0))
+ (skip-chars-backward "^\f\t\n\r()=,; ")
+ (buffer-substring (point) (match-beginning 0)))))
+ (forward-line 1)
+ (push tag table)
(when (stringp module)
- (intern (concat module ":" tag) table)
- ;; Only the first ones will be stored in the table.
- (intern (concat module ":") table)
- (intern (concat module ":module_info") table))
- (when progress-reporter
- (progress-reporter-update progress-reporter (point))))))
+ (push (concat module ":" tag) table))
+ (progress-reporter-update progress-reporter (point)))))
table))
+
+
;;; Xref backend erlang-etags
;; In GNU Emacs 25 xref was introduced. It is a framework for cross
@@ -4963,10 +4975,12 @@ about Erlang modules."
((_backend (eql erlang-etags)) identifier)
(erlang-xref-find-definitions identifier t))
- ;; PENDING - This remains to be properly implemented.
(cl-defmethod xref-backend-identifier-completion-table
((_backend (eql erlang-etags)))
- (tags-lazy-completion-table)))))
+ (let ((erlang-replace-etags-tags-completion-table t))
+ (tags-completion-table))))))
+
+
(defun erlang-xref-find-definitions (identifier &optional is-regexp)
diff --git a/lib/tools/src/fprof.erl b/lib/tools/src/fprof.erl
index 8db23dd151..1291a3e5ec 100644
--- a/lib/tools/src/fprof.erl
+++ b/lib/tools/src/fprof.erl
@@ -1636,6 +1636,11 @@ trace_handler({trace_ts, Pid, gc_major_start, _Func, TS} = Trace, Table, _, Dump
dump_stack(Dump, get(Pid), Trace),
trace_gc_start(Table, Pid, TS),
TS;
+
+trace_handler({trace_ts, Pid, gc_start, _Func, TS} = Trace, Table, _, Dump) ->
+ dump_stack(Dump, get(Pid), Trace),
+ trace_gc_start(Table, Pid, TS),
+ TS;
%%
%% gc_end
@@ -1648,6 +1653,12 @@ trace_handler({trace_ts, Pid, gc_major_end, _Func, TS} = Trace, Table, _, Dump)
dump_stack(Dump, get(Pid), Trace),
trace_gc_end(Table, Pid, TS),
TS;
+
+trace_handler({trace_ts, Pid, gc_end, _Func, TS} = Trace, Table, _, Dump) ->
+ dump_stack(Dump, get(Pid), Trace),
+ trace_gc_end(Table, Pid, TS),
+ TS;
+
%%
%% link
trace_handler({trace_ts, Pid, link, _OtherPid, TS} = Trace,
diff --git a/lib/tools/src/xref_base.erl b/lib/tools/src/xref_base.erl
index bb9815f9b0..f298a1ce81 100644
--- a/lib/tools/src/xref_base.erl
+++ b/lib/tools/src/xref_base.erl
@@ -746,7 +746,7 @@ read_a_module({Dir, BaseName}, AppName, Builtins, Verbose, Warnings, Mode) ->
message(Warnings, no_debug_info, [File]),
no;
{ok, M, Data, UnresCalls0} ->
- message(Verbose, done, [File]),
+ message(Verbose, done_file, [File]),
%% Remove duplicates. Identical unresolved calls on the
%% same line are counted as _one_ unresolved call.
UnresCalls = usort(UnresCalls0),
@@ -1842,6 +1842,8 @@ message(true, What, Arg) ->
set_up ->
io:format("Setting up...", Arg);
done ->
+ io:format("done~n", Arg);
+ done_file ->
io:format("done reading ~ts~n", Arg);
error ->
io:format("error~n", Arg);
diff --git a/lib/tools/test/xref_SUITE.erl b/lib/tools/test/xref_SUITE.erl
index ce30fb711a..01dbac6ecb 100644
--- a/lib/tools/test/xref_SUITE.erl
+++ b/lib/tools/test/xref_SUITE.erl
@@ -50,7 +50,7 @@
-export([analyze/1, basic/1, md/1, q/1, variables/1, unused_locals/1]).
--export([format_error/1, otp_7423/1, otp_7831/1, otp_10192/1]).
+-export([format_error/1, otp_7423/1, otp_7831/1, otp_10192/1, otp_13708/1]).
-import(lists, [append/2, flatten/1, keysearch/3, member/2, sort/1, usort/1]).
@@ -82,7 +82,7 @@ groups() ->
fun_mfa_r14, fun_mfa_vars, qlc]},
{analyses, [],
[analyze, basic, md, q, variables, unused_locals]},
- {misc, [], [format_error, otp_7423, otp_7831, otp_10192]}].
+ {misc, [], [format_error, otp_7423, otp_7831, otp_10192, otp_13708]}].
init_per_suite(Conf) when is_list(Conf) ->
@@ -2393,6 +2393,19 @@ otp_10192(Conf) when is_list(Conf) ->
xref:stop(s),
ok.
+%% OTP-10192. Allow filenames with character codes greater than 126.
+otp_13708(Conf) when is_list(Conf) ->
+ {ok, _} = start(s),
+ ok = xref:set_default(s, [{verbose, true}]),
+ {ok, []} = xref:q(s,"E"),
+ xref:stop(s),
+
+ CopyDir = ?copydir,
+ Dir = fname(CopyDir,"lib_test"),
+ {ok, _} = start(s),
+ ok = xref:set_library_path(s, [Dir], [{verbose, true}]),
+ xref:stop(s).
+
%%%
%%% Utilities
%%%
diff --git a/lib/tools/vsn.mk b/lib/tools/vsn.mk
index 70564f05c6..e6287b0430 100644
--- a/lib/tools/vsn.mk
+++ b/lib/tools/vsn.mk
@@ -1 +1 @@
-TOOLS_VSN = 2.8.3
+TOOLS_VSN = 2.8.5
diff --git a/lib/typer/doc/src/notes.xml b/lib/typer/doc/src/notes.xml
index d6d545d0e4..9ef5ca1c70 100644
--- a/lib/typer/doc/src/notes.xml
+++ b/lib/typer/doc/src/notes.xml
@@ -31,6 +31,21 @@
</header>
<p>This document describes the changes made to TypEr.</p>
+<section><title>TypEr 0.9.11</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>TypEr 0.9.10</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/typer/vsn.mk b/lib/typer/vsn.mk
index 507593ef56..ed12e067c1 100644
--- a/lib/typer/vsn.mk
+++ b/lib/typer/vsn.mk
@@ -1 +1 @@
-TYPER_VSN = 0.9.10
+TYPER_VSN = 0.9.11
diff --git a/lib/wx/doc/specs/.gitignore b/lib/wx/doc/specs/.gitignore
new file mode 100644
index 0000000000..322eebcb06
--- /dev/null
+++ b/lib/wx/doc/specs/.gitignore
@@ -0,0 +1 @@
+specs_*.xml
diff --git a/lib/wx/doc/src/Makefile b/lib/wx/doc/src/Makefile
index cae2f9fe4e..23890f47f0 100644
--- a/lib/wx/doc/src/Makefile
+++ b/lib/wx/doc/src/Makefile
@@ -63,10 +63,15 @@ HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
+
+TOP_SPECS_FILE = specs.xml
+
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
XML_FLAGS +=
+SPECS_FLAGS = -I../../include -I../../src
DVIPS_FLAGS +=
# ----------------------------------------------------
@@ -111,6 +116,7 @@ clean clean_docs:
rm -rf $(HTMLDIR)/*
rm -f $(MAN3DIR)/*
rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
+ rm -f $(SPECDIR)/*
rm -f errs core *~ ../html/edoc-info
rm -f $(XML_REF3_FILES) $(XML_CHAPTER_FILES) *.html
diff --git a/lib/wx/doc/src/notes.xml b/lib/wx/doc/src/notes.xml
index c7400206ab..4f0e166924 100644
--- a/lib/wx/doc/src/notes.xml
+++ b/lib/wx/doc/src/notes.xml
@@ -32,6 +32,43 @@
<p>This document describes the changes made to the wxErlang
application.</p>
+<section><title>Wx 1.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed bugs which could cause called functions to be
+ invoked twice or not at all when callbacks where invoked
+ at the same time.</p>
+ <p>
+ Own Id: OTP-13491</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Changed atom 'boolean' fields in #wxMouseState{} to
+ 'boolean()'.</p>
+ <p>
+ Moved out arguments in wxListCtrl:hitTest to result.</p>
+ <p>
+ Removed no-op functions in wxGauge that have been removed
+ from wxWidgets-3.1.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-13553</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Wx 1.6.1</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/wx/doc/src/specs.xml b/lib/wx/doc/src/specs.xml
new file mode 100644
index 0000000000..2e19baafc4
--- /dev/null
+++ b/lib/wx/doc/src/specs.xml
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<specs xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="../specs/specs_wx.xml"/>
+ <xi:include href="../specs/specs_wx_object.xml"/>
+ <xi:include href="../specs/specs_wxAcceleratorEntry.xml"/>
+ <xi:include href="../specs/specs_wxAcceleratorTable.xml"/>
+ <xi:include href="../specs/specs_wxActivateEvent.xml"/>
+ <xi:include href="../specs/specs_wxArtProvider.xml"/>
+ <xi:include href="../specs/specs_wxAuiDockArt.xml"/>
+ <xi:include href="../specs/specs_wxAuiManager.xml"/>
+ <xi:include href="../specs/specs_wxAuiManagerEvent.xml"/>
+ <xi:include href="../specs/specs_wxAuiNotebook.xml"/>
+ <xi:include href="../specs/specs_wxAuiNotebookEvent.xml"/>
+ <xi:include href="../specs/specs_wxAuiPaneInfo.xml"/>
+ <xi:include href="../specs/specs_wxAuiSimpleTabArt.xml"/>
+ <xi:include href="../specs/specs_wxAuiTabArt.xml"/>
+ <xi:include href="../specs/specs_wxBitmapButton.xml"/>
+ <xi:include href="../specs/specs_wxBitmapDataObject.xml"/>
+ <xi:include href="../specs/specs_wxBitmap.xml"/>
+ <xi:include href="../specs/specs_wxBoxSizer.xml"/>
+ <xi:include href="../specs/specs_wxBrush.xml"/>
+ <xi:include href="../specs/specs_wxBufferedDC.xml"/>
+ <xi:include href="../specs/specs_wxBufferedPaintDC.xml"/>
+ <xi:include href="../specs/specs_wxButton.xml"/>
+ <xi:include href="../specs/specs_wxCalendarCtrl.xml"/>
+ <xi:include href="../specs/specs_wxCalendarDateAttr.xml"/>
+ <xi:include href="../specs/specs_wxCalendarEvent.xml"/>
+ <xi:include href="../specs/specs_wxCaret.xml"/>
+ <xi:include href="../specs/specs_wxCheckBox.xml"/>
+ <xi:include href="../specs/specs_wxCheckListBox.xml"/>
+ <xi:include href="../specs/specs_wxChildFocusEvent.xml"/>
+ <xi:include href="../specs/specs_wxChoicebook.xml"/>
+ <xi:include href="../specs/specs_wxChoice.xml"/>
+ <xi:include href="../specs/specs_wxClientDC.xml"/>
+ <xi:include href="../specs/specs_wxClipboard.xml"/>
+ <xi:include href="../specs/specs_wxClipboardTextEvent.xml"/>
+ <xi:include href="../specs/specs_wxCloseEvent.xml"/>
+ <xi:include href="../specs/specs_wxColourData.xml"/>
+ <xi:include href="../specs/specs_wxColourDialog.xml"/>
+ <xi:include href="../specs/specs_wxColourPickerCtrl.xml"/>
+ <xi:include href="../specs/specs_wxColourPickerEvent.xml"/>
+ <xi:include href="../specs/specs_wxComboBox.xml"/>
+ <xi:include href="../specs/specs_wxCommandEvent.xml"/>
+ <xi:include href="../specs/specs_wxContextMenuEvent.xml"/>
+ <xi:include href="../specs/specs_wxControl.xml"/>
+ <xi:include href="../specs/specs_wxControlWithItems.xml"/>
+ <xi:include href="../specs/specs_wxCursor.xml"/>
+ <xi:include href="../specs/specs_wxDataObject.xml"/>
+ <xi:include href="../specs/specs_wxDateEvent.xml"/>
+ <xi:include href="../specs/specs_wxDatePickerCtrl.xml"/>
+ <xi:include href="../specs/specs_wxDC.xml"/>
+ <xi:include href="../specs/specs_wxDCOverlay.xml"/>
+ <xi:include href="../specs/specs_wxDialog.xml"/>
+ <xi:include href="../specs/specs_wxDirDialog.xml"/>
+ <xi:include href="../specs/specs_wxDirPickerCtrl.xml"/>
+ <xi:include href="../specs/specs_wxDisplayChangedEvent.xml"/>
+ <xi:include href="../specs/specs_wxEraseEvent.xml"/>
+ <xi:include href="../specs/specs_wxEvent.xml"/>
+ <xi:include href="../specs/specs_wxEvtHandler.xml"/>
+ <xi:include href="../specs/specs_wxFileDataObject.xml"/>
+ <xi:include href="../specs/specs_wxFileDialog.xml"/>
+ <xi:include href="../specs/specs_wxFileDirPickerEvent.xml"/>
+ <xi:include href="../specs/specs_wxFilePickerCtrl.xml"/>
+ <xi:include href="../specs/specs_wxFindReplaceData.xml"/>
+ <xi:include href="../specs/specs_wxFindReplaceDialog.xml"/>
+ <xi:include href="../specs/specs_wxFlexGridSizer.xml"/>
+ <xi:include href="../specs/specs_wxFocusEvent.xml"/>
+ <xi:include href="../specs/specs_wxFontData.xml"/>
+ <xi:include href="../specs/specs_wxFontDialog.xml"/>
+ <xi:include href="../specs/specs_wxFont.xml"/>
+ <xi:include href="../specs/specs_wxFontPickerCtrl.xml"/>
+ <xi:include href="../specs/specs_wxFontPickerEvent.xml"/>
+ <xi:include href="../specs/specs_wxFrame.xml"/>
+ <xi:include href="../specs/specs_wxGauge.xml"/>
+ <xi:include href="../specs/specs_wxGBSizerItem.xml"/>
+ <xi:include href="../specs/specs_wxGenericDirCtrl.xml"/>
+ <xi:include href="../specs/specs_wxGLCanvas.xml"/>
+ <xi:include href="../specs/specs_wxGraphicsBrush.xml"/>
+ <xi:include href="../specs/specs_wxGraphicsContext.xml"/>
+ <xi:include href="../specs/specs_wxGraphicsFont.xml"/>
+ <xi:include href="../specs/specs_wxGraphicsMatrix.xml"/>
+ <xi:include href="../specs/specs_wxGraphicsObject.xml"/>
+ <xi:include href="../specs/specs_wxGraphicsPath.xml"/>
+ <xi:include href="../specs/specs_wxGraphicsPen.xml"/>
+ <xi:include href="../specs/specs_wxGraphicsRenderer.xml"/>
+ <xi:include href="../specs/specs_wxGridBagSizer.xml"/>
+ <xi:include href="../specs/specs_wxGridCellAttr.xml"/>
+ <xi:include href="../specs/specs_wxGridCellBoolEditor.xml"/>
+ <xi:include href="../specs/specs_wxGridCellBoolRenderer.xml"/>
+ <xi:include href="../specs/specs_wxGridCellChoiceEditor.xml"/>
+ <xi:include href="../specs/specs_wxGridCellEditor.xml"/>
+ <xi:include href="../specs/specs_wxGridCellFloatEditor.xml"/>
+ <xi:include href="../specs/specs_wxGridCellFloatRenderer.xml"/>
+ <xi:include href="../specs/specs_wxGridCellNumberEditor.xml"/>
+ <xi:include href="../specs/specs_wxGridCellNumberRenderer.xml"/>
+ <xi:include href="../specs/specs_wxGridCellRenderer.xml"/>
+ <xi:include href="../specs/specs_wxGridCellStringRenderer.xml"/>
+ <xi:include href="../specs/specs_wxGridCellTextEditor.xml"/>
+ <xi:include href="../specs/specs_wxGrid.xml"/>
+ <xi:include href="../specs/specs_wxGridEvent.xml"/>
+ <xi:include href="../specs/specs_wxGridSizer.xml"/>
+ <xi:include href="../specs/specs_wxHelpEvent.xml"/>
+ <xi:include href="../specs/specs_wxHtmlEasyPrinting.xml"/>
+ <xi:include href="../specs/specs_wxHtmlLinkEvent.xml"/>
+ <xi:include href="../specs/specs_wxHtmlWindow.xml"/>
+ <xi:include href="../specs/specs_wxIconBundle.xml"/>
+ <xi:include href="../specs/specs_wxIcon.xml"/>
+ <xi:include href="../specs/specs_wxIconizeEvent.xml"/>
+ <xi:include href="../specs/specs_wxIdleEvent.xml"/>
+ <xi:include href="../specs/specs_wxImage.xml"/>
+ <xi:include href="../specs/specs_wxImageList.xml"/>
+ <xi:include href="../specs/specs_wxInitDialogEvent.xml"/>
+ <xi:include href="../specs/specs_wxJoystickEvent.xml"/>
+ <xi:include href="../specs/specs_wxKeyEvent.xml"/>
+ <xi:include href="../specs/specs_wxLayoutAlgorithm.xml"/>
+ <xi:include href="../specs/specs_wxListbook.xml"/>
+ <xi:include href="../specs/specs_wxListBox.xml"/>
+ <xi:include href="../specs/specs_wxListCtrl.xml"/>
+ <xi:include href="../specs/specs_wxListEvent.xml"/>
+ <xi:include href="../specs/specs_wxListItemAttr.xml"/>
+ <xi:include href="../specs/specs_wxListItem.xml"/>
+ <xi:include href="../specs/specs_wxListView.xml"/>
+ <xi:include href="../specs/specs_wxLocale.xml"/>
+ <xi:include href="../specs/specs_wxLogNull.xml"/>
+ <xi:include href="../specs/specs_wxMask.xml"/>
+ <xi:include href="../specs/specs_wxMaximizeEvent.xml"/>
+ <xi:include href="../specs/specs_wxMDIChildFrame.xml"/>
+ <xi:include href="../specs/specs_wxMDIClientWindow.xml"/>
+ <xi:include href="../specs/specs_wxMDIParentFrame.xml"/>
+ <xi:include href="../specs/specs_wxMemoryDC.xml"/>
+ <xi:include href="../specs/specs_wxMenuBar.xml"/>
+ <xi:include href="../specs/specs_wxMenu.xml"/>
+ <xi:include href="../specs/specs_wxMenuEvent.xml"/>
+ <xi:include href="../specs/specs_wxMenuItem.xml"/>
+ <xi:include href="../specs/specs_wxMessageDialog.xml"/>
+ <xi:include href="../specs/specs_wxMiniFrame.xml"/>
+ <xi:include href="../specs/specs_wxMirrorDC.xml"/>
+ <xi:include href="../specs/specs_wxMouseCaptureChangedEvent.xml"/>
+ <xi:include href="../specs/specs_wxMouseCaptureLostEvent.xml"/>
+ <xi:include href="../specs/specs_wxMouseEvent.xml"/>
+ <xi:include href="../specs/specs_wxMoveEvent.xml"/>
+ <xi:include href="../specs/specs_wxMultiChoiceDialog.xml"/>
+ <xi:include href="../specs/specs_wxNavigationKeyEvent.xml"/>
+ <xi:include href="../specs/specs_wxNotebook.xml"/>
+ <xi:include href="../specs/specs_wxNotebookEvent.xml"/>
+ <xi:include href="../specs/specs_wxNotifyEvent.xml"/>
+ <xi:include href="../specs/specs_wxOverlay.xml"/>
+ <xi:include href="../specs/specs_wxPageSetupDialogData.xml"/>
+ <xi:include href="../specs/specs_wxPageSetupDialog.xml"/>
+ <xi:include href="../specs/specs_wxPaintDC.xml"/>
+ <xi:include href="../specs/specs_wxPaintEvent.xml"/>
+ <xi:include href="../specs/specs_wxPaletteChangedEvent.xml"/>
+ <xi:include href="../specs/specs_wxPalette.xml"/>
+ <xi:include href="../specs/specs_wxPanel.xml"/>
+ <xi:include href="../specs/specs_wxPasswordEntryDialog.xml"/>
+ <xi:include href="../specs/specs_wxPen.xml"/>
+ <xi:include href="../specs/specs_wxPickerBase.xml"/>
+ <xi:include href="../specs/specs_wxPopupTransientWindow.xml"/>
+ <xi:include href="../specs/specs_wxPopupWindow.xml"/>
+ <xi:include href="../specs/specs_wxPostScriptDC.xml"/>
+ <xi:include href="../specs/specs_wxPreviewCanvas.xml"/>
+ <xi:include href="../specs/specs_wxPreviewControlBar.xml"/>
+ <xi:include href="../specs/specs_wxPreviewFrame.xml"/>
+ <xi:include href="../specs/specs_wxPrintData.xml"/>
+ <xi:include href="../specs/specs_wxPrintDialogData.xml"/>
+ <xi:include href="../specs/specs_wxPrintDialog.xml"/>
+ <xi:include href="../specs/specs_wxPrinter.xml"/>
+ <xi:include href="../specs/specs_wxPrintout.xml"/>
+ <xi:include href="../specs/specs_wxPrintPreview.xml"/>
+ <xi:include href="../specs/specs_wxProgressDialog.xml"/>
+ <xi:include href="../specs/specs_wxQueryNewPaletteEvent.xml"/>
+ <xi:include href="../specs/specs_wxRadioBox.xml"/>
+ <xi:include href="../specs/specs_wxRadioButton.xml"/>
+ <xi:include href="../specs/specs_wxRegion.xml"/>
+ <xi:include href="../specs/specs_wxSashEvent.xml"/>
+ <xi:include href="../specs/specs_wxSashLayoutWindow.xml"/>
+ <xi:include href="../specs/specs_wxSashWindow.xml"/>
+ <xi:include href="../specs/specs_wxScreenDC.xml"/>
+ <xi:include href="../specs/specs_wxScrollBar.xml"/>
+ <xi:include href="../specs/specs_wxScrolledWindow.xml"/>
+ <xi:include href="../specs/specs_wxScrollEvent.xml"/>
+ <xi:include href="../specs/specs_wxScrollWinEvent.xml"/>
+ <xi:include href="../specs/specs_wxSetCursorEvent.xml"/>
+ <xi:include href="../specs/specs_wxShowEvent.xml"/>
+ <xi:include href="../specs/specs_wxSingleChoiceDialog.xml"/>
+ <xi:include href="../specs/specs_wxSizeEvent.xml"/>
+ <xi:include href="../specs/specs_wxSizer.xml"/>
+ <xi:include href="../specs/specs_wxSizerFlags.xml"/>
+ <xi:include href="../specs/specs_wxSizerItem.xml"/>
+ <xi:include href="../specs/specs_wxSlider.xml"/>
+ <xi:include href="../specs/specs_wxSpinButton.xml"/>
+ <xi:include href="../specs/specs_wxSpinCtrl.xml"/>
+ <xi:include href="../specs/specs_wxSpinEvent.xml"/>
+ <xi:include href="../specs/specs_wxSplashScreen.xml"/>
+ <xi:include href="../specs/specs_wxSplitterEvent.xml"/>
+ <xi:include href="../specs/specs_wxSplitterWindow.xml"/>
+ <xi:include href="../specs/specs_wxStaticBitmap.xml"/>
+ <xi:include href="../specs/specs_wxStaticBox.xml"/>
+ <xi:include href="../specs/specs_wxStaticBoxSizer.xml"/>
+ <xi:include href="../specs/specs_wxStaticLine.xml"/>
+ <xi:include href="../specs/specs_wxStaticText.xml"/>
+ <xi:include href="../specs/specs_wxStatusBar.xml"/>
+ <xi:include href="../specs/specs_wxStdDialogButtonSizer.xml"/>
+ <xi:include href="../specs/specs_wxStyledTextCtrl.xml"/>
+ <xi:include href="../specs/specs_wxStyledTextEvent.xml"/>
+ <xi:include href="../specs/specs_wxSysColourChangedEvent.xml"/>
+ <xi:include href="../specs/specs_wxSystemOptions.xml"/>
+ <xi:include href="../specs/specs_wxSystemSettings.xml"/>
+ <xi:include href="../specs/specs_wxTaskBarIcon.xml"/>
+ <xi:include href="../specs/specs_wxTaskBarIconEvent.xml"/>
+ <xi:include href="../specs/specs_wxTextAttr.xml"/>
+ <xi:include href="../specs/specs_wxTextCtrl.xml"/>
+ <xi:include href="../specs/specs_wxTextDataObject.xml"/>
+ <xi:include href="../specs/specs_wxTextEntryDialog.xml"/>
+ <xi:include href="../specs/specs_wxToggleButton.xml"/>
+ <xi:include href="../specs/specs_wxToolBar.xml"/>
+ <xi:include href="../specs/specs_wxToolbook.xml"/>
+ <xi:include href="../specs/specs_wxToolTip.xml"/>
+ <xi:include href="../specs/specs_wxTopLevelWindow.xml"/>
+ <xi:include href="../specs/specs_wxTreebook.xml"/>
+ <xi:include href="../specs/specs_wxTreeCtrl.xml"/>
+ <xi:include href="../specs/specs_wxTreeEvent.xml"/>
+ <xi:include href="../specs/specs_wxUpdateUIEvent.xml"/>
+ <xi:include href="../specs/specs_wxWindowCreateEvent.xml"/>
+ <xi:include href="../specs/specs_wxWindowDC.xml"/>
+ <xi:include href="../specs/specs_wxWindowDestroyEvent.xml"/>
+ <xi:include href="../specs/specs_wxWindow.xml"/>
+ <xi:include href="../specs/specs_wxXmlResource.xml"/>
+ <xi:include href="../specs/specs_wx_misc.xml"/>
+ <xi:include href="../specs/specs_glu.xml"/>
+ <xi:include href="../specs/specs_gl.xml"/>
+</specs>
diff --git a/lib/wx/vsn.mk b/lib/wx/vsn.mk
index de723b2a2d..de4e5e1935 100644
--- a/lib/wx/vsn.mk
+++ b/lib/wx/vsn.mk
@@ -1 +1 @@
-WX_VSN = 1.6.1
+WX_VSN = 1.7
diff --git a/lib/xmerl/doc/src/notes.xml b/lib/xmerl/doc/src/notes.xml
index 4f61d4b52c..0abcb87998 100644
--- a/lib/xmerl/doc/src/notes.xml
+++ b/lib/xmerl/doc/src/notes.xml
@@ -32,6 +32,21 @@
<p>This document describes the changes made to the Xmerl application.</p>
+<section><title>Xmerl 1.3.11</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Internal changes</p>
+ <p>
+ Own Id: OTP-13551</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Xmerl 1.3.10</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/xmerl/vsn.mk b/lib/xmerl/vsn.mk
index 09d81e0533..a78a035a1f 100644
--- a/lib/xmerl/vsn.mk
+++ b/lib/xmerl/vsn.mk
@@ -1 +1 @@
-XMERL_VSN = 1.3.10
+XMERL_VSN = 1.3.11