aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test
AgeCommit message (Collapse)Author
2015-03-22Merge branch 'anders/diameter/17/time/OTP-12439' into maintAnders Svensson
* anders/diameter/17/time/OTP-12439: Adapt app suite to changes in time api
2015-03-20Merge branch 'anders/diameter/pool/OTP-12428' into maintAnders Svensson
* anders/diameter/pool/OTP-12428: Add pool_size test to config suite
2015-03-20Add pool_size test to config suiteAnders Svensson
Overlooked in commit 4b691d8d.
2015-03-19Adapt app suite to changes in time apiAnders Svensson
erlang:time_resolution/0 has been removed, erlang:convert_time_resolution/3 has been renamed convert_time_unit, and {os,erlang}:system_time/0,1 have been added. Modify the list of ignored undefined function calls accordingly.
2015-03-05Merge branch 'anders/diameter/grouped_decode/OTP-12475' into maintAnders Svensson
* anders/diameter/grouped_decode/OTP-12475: Allow encode of decoded diameter_avp list Add testcases for diameter_avp decode Fix handling of length errors on Grouped AVPs Don't discard component diameter_avp list on Grouped AVP decode error Fix process dictionary manipulation during message decode
2015-03-05Merge branch 'anders/diameter/17/time/OTP-12439' into maintAnders Svensson
* anders/diameter/17/time/OTP-12439: Ignore undefined calls to OTP 18 time api in app suite
2015-03-05Merge branch 'anders/diameter/time/OTP-12439' into maintAnders Svensson
* anders/diameter/time/OTP-12439: Use new time api in test suites Use new time api in implementation
2015-03-05Merge branch 'anders/diameter/pool/OTP-12428' into maintAnders Svensson
* anders/diameter/pool/OTP-12428: Fix SCTP match blunder in suites Be backwards compatible with diameter_sctp listener state Add gen_tcp testcase that fails sporadically Simplify transport suite Remove (ancient) dead code Don't orphan slave nodes in example suite Refresh example code Improve language consistency in diameter(1) Add pool suite to test transport_opt() pool_size Adapt tcp/sctp transport modules for pool_size > 1 Add transport_opt() pool_size
2015-03-04Add testcases for diameter_avp decodeAnders Svensson
2015-03-01Ignore undefined calls to OTP 18 time api in app suiteAnders Svensson
So that the xref testcase is independent of the release it's run on. The code uses the new time api if available, so as to be forward compatible.
2015-02-25Fix error matching in traffic suiteAnders Svensson
Clause matching error for specific test cases was harmless since the subsequent clause also matched. Errors detected by the server result in Failed-AVP being sent, which should not lead to a decode error in the client.
2015-02-25Don't discard outgoing answers with Result-Code/E-bit errorsAnders Svensson
Outgoing answers missing a Result-Code AVP or setting an E-bit inappropriately were discarded, but there's no particular reason for doing so if the answer can be encoded, and the sender has no way of knowing that their answer has been discarded. It's also inappropriate that the message be discarded in the relay case. Answers are now sent, and an error counter incremented.
2015-02-24Fix SCTP match blunder in suitesAnders Svensson
More than an incoming message can contain ancillary data, which the gen_sctp and transport suites did not expect. On FreeBSD 10, an sctp_assoc_change event appears always to contain ancillary data.
2015-02-20Use new time api in test suitesAnders Svensson
Where it's less important to do so, but it has to be done at some point since erlang:now/0 is deprecated. As in the parent commit, continue to use the old api if the new one is unavailable.
2015-02-20Add gen_tcp testcase that fails sporadicallyAnders Svensson
On OS X at least. The testcase opens a listening socket, spawns 8 processes that call gen_tcp:accept/1, waits a couple of seconds, and then spawns 8 processes that call gen_tcp:connect/3. Some of these occasionally return {error, econnreset}.
2015-02-20Simplify transport suiteAnders Svensson
Using the fact that transport processes can now be started concurrently. The suite serialized starts itself when pretending to be diameter starting a transport process.
2015-02-20Don't orphan slave nodes in example suiteAnders Svensson
Stops were aborted at the first failure.
2015-02-20Add pool suite to test transport_opt() pool_sizeAnders Svensson
With testcases that uses restrict_connections and pool_size config to establish multiple connections between two Diameter nodes, checking for the expected number of transport processes using diameter:service_info/2.
2014-11-03Check {connect,watchdog}_timer distinction in event testcasesAnders Svensson
The connect timer is currently ignored by a connecting transport, so the check causes one testcase to fail.
2014-11-03Rename reconnect_timer to connect_timer in examples and suitesAnders Svensson
The timer was renamed in commit abea7186.
2014-05-29Merge branch 'anders/diameter/dictionaries/OTP-11958' into maintAnders Svensson
* anders/diameter/dictionaries/OTP-11958: Fix broken check for undefined AVPs in @codec and @custom_types Add @codecs and @custom_types tests to compiler suite
2014-05-29Add @codecs and @custom_types tests to compiler suiteAnders Svensson
Dictionary compilation fails to detect undefined AVPs in these sections.
2014-05-27Merge branch 'anders/diameter/Failed-AVP/OTP-11936' into maintAnders Svensson
* anders/diameter/Failed-AVP/OTP-11936: Do best-effort decode of Failed-AVP Add a testcase that expects a decoded value in Failed-AVP
2014-05-27Merge branch 'anders/diameter/5014/OTP-11946' into maintAnders Svensson
* anders/diameter/5014/OTP-11946: Fix handling of AVP length errors (5014) in unknown AVPs Add testcases that send unknown AVPs with a bad AVP Length
2014-05-26Add a testcase that expects a decoded value in Failed-AVPAnders Svensson
This isn't currently the case, but soon will be.
2014-05-26Add testcases that send unknown AVPs with a bad AVP LengthAnders Svensson
In particular, a length that points past the end of the message. This goes undetected there is some other problem with the AVP (eg. M-bit), which is a problem we're about to fix.
2014-05-26Merge branch 'anders/diameter/sctp/OTP-11901' into maintAnders Svensson
* anders/diameter/sctp/OTP-11901: Fix diameter_sctp function_clause Anchor path regexps in examples suite Run examples suite over both TCP and SCTP
2014-05-25Merge branch 'anders/diameter/request_leak/OTP-11893' into maintAnders Svensson
* anders/diameter/request_leak/OTP-11893: Fix leaking request table Add check that request table is empty to failover suite Comment fix
2014-05-25Anchor path regexps in examples suiteAnders Svensson
They match emacs backup files and more without the anchor, although this doesn't stop the matches from finding files the suite isn't (yet) intended to test: files under development, not yet commited, etc.
2014-05-25Run examples suite over both TCP and SCTPAnders Svensson
This was supposed to already be the case (in what passes for my memory), and detects that commit ed6395a6 is horrifically broken: diameter is unable to send CEA over SCTP.
2014-05-18Add check that request table is empty to failover suiteAnders Svensson
The way in which this suite causes transport connections to be broken - by stopping the service - makes it prone to orphaning entries in the request table, which is a bug we're about to fix.
2014-05-18Comment fixAnders Svensson
2014-04-01Merge branch 'anders/diameter/17.0_release/OTP-11825'Anders Svensson
* anders/diameter/17.0_release/OTP-11825: Simplify xref tests in app suite Add app suite test for app file runtime_dependencies Generate runtime_dependencies in app file Remove syntax_tools and runtime_tools from app file
2014-03-31Simplify xref tests in app suiteAnders Svensson
By examining which modules *use* runtime and compiler modules instead of which modules compiler modules call. Note that the semantics are changed somewhat: we will now fail if diameter modules are called from an application which diameter.app lists as a start dependency, which wasn't the case previously.
2014-03-31Add app suite test for app file runtime_dependenciesAnders Svensson
In particular, that modules listed in the 'modules' tuple only call modules in other applications listed in the 'runtime_dependencies' tuple.
2014-03-31Merge branch 'anders/diameter/unicode/OTP-11686'Anders Svensson
* anders/diameter/unicode/OTP-11686: Use fun encoding to erl_parse:abstract/2 Adapt dictionary compilation to new default encoding
2014-03-21Adapt dictionary compilation to new default encodingAnders Svensson
The problem is that the change in default encoding to utf8 in 17.0, in commit 00e42967, changes the behaviour of erl_parse:abstract/1, which is used by the dictionary compiler to turn terms into abstract code. In particular, it transforms the orddict representation of a parsed dictionary to contruct the return value of a dictionary module's dict/0 function. This orddict contains various lists, one of which is a list of tuples of the form {Name, Code, [VendorId], [Avp]} where Name is an ASCII string and VendorId is a non-negative integer. Using erl_parse:abstract/2 instead allows a string encoding to be specified but regardless of what encoding is used, the result of transforming our tuple might not be what we really want, which is for Name to always be represented as a string form and [VendorId] to always be represented as a cons form: the [VendorId] will always end up as a string form if the integers are small enough. The only way around this is to transform the tuple bit by bit, but modifying the code to do this is quite a lot of work, for not much gain: it would be nice to produce more readable output but nothing stops working without it. This commit restores the pre-17.0 conversion by explicilty specifying latin1 as the string encoding to erl_parse:abstract/2. The utf8 encoding broke the compilation of some dictionares since unicode strings aren't expected when writing the generated code to file. Note that the latin1 encoding does reasonably well in practice, although it mangles the Ericsson Vendor Id list [193] into a "LATIN CAPITAL LETTER A WITH ACUTE". The utf8 encoding does worse, mangling the 3GPP Vendor Id 10415 into "DESERET CAPITAL LETTER CHEE". An ascii encoding would do better than latin1 but doesn't yet exist. (Encoding isn't really what the option is. It's a string predicate: if the predicate is true then represent as a string form, otherwise a cons form.)
2014-03-17Remove "coding: utf-8" from test filesSiri Hansen
UTF-8 is now the default encoding and should no longer be specified. These have probably been merged from maint earlier and the coding statement was missed. lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_erl_scan.erl lib/diameter/test/diameter_codec_test.erl lib/ssh/test/ssh_unicode_SUITE.erl
2014-01-27Merge branch 'anders/diameter/undefined_group/OTP-11561'Anders Svensson
* anders/diameter/undefined_group/OTP-11561: Ensure that Grouped AVP's are fully defined in dictionaries Don't format diameter_make:codec/2 errors Compiler suite fix
2014-01-16Ensure that Grouped AVP's are fully defined in dictionariesAnders Svensson
The case in which an AVP was defined as having type Grouped in @avp_types without a corresponding specification in @grouped was missing.
2014-01-16Don't format diameter_make:codec/2 errorsAnders Svensson
Instead, add diameter_make:format_error/1 to allow the caller to format if desired, which is what applications like compiler and yecc do. Use this to check that the expected error is the one actually generated in the compiler suite.
2014-01-16Compiler suite fixAnders Svensson
An error when expecting success wasn't regarded as failure when compiling dictionaries.
2013-12-02Merge branch 'maint'Anders Svensson
2013-12-02Merge branch 'anders/diameter/R16B03_release/OTP-11499' into maintAnders Svensson
* anders/diameter/R16B03_release/OTP-11499: vsn -> 1.5 Update appup for OTP-11168 Update appup for OTP-11361 Add makefile to build example dictionaries Add recent Diameter-related RFCs Generate diameterc.1, not diameter_compile.1 Fix documentation typos Fix appup blunder
2013-12-01Return compilable forms instead of beamAnders Svensson
That is, preprocessed forms that can be passed to compile:forms/1,2.
2013-12-01Fix diameter_make:flatten/1Anders Svensson
To set @avp_vendor_id, @codecs and @custom_types as required for imported avps.
2013-12-01Simplify and extend diameter_make interfaceAnders Svensson
In particular, make codec/2 flexible as to what's generated, the formats (erl, hrl, parse, forms and beam) being passed in the options list and defaulting to [erl, hrl]. The 'parse' format is the internal format to which dictionaries are parsed, which can be manipulated by flatten/1 before being passed back to codec/2 or format/1. Remove the (undocumented) dict/1,2 since codec/2 now subsumes it with the 'parse' option.
2013-11-30Add makefile to build example dictionariesAnders Svensson
2013-11-28Adapt compiler suite to diameter_makeAnders Svensson
It was originally written before this interface existed.
2013-11-28Remove dead code from codec suiteAnders Svensson