Commit Graph

6 Commits

Author SHA1 Message Date
Daniel Willmann 5169d6e167 library: Ensure setverdict(fail is followed by mtc.stop
This will prevent subsequent failures from overwriting the verdict so we
can easily see the root cause of the test failure.

Using testcase.stop instead for errors internal to our test
infrastructure to mark them as test errors instead of failed.

Change-Id: Idc6819aaf0b01e70c38fad828dd44dcec6bdd778
2018-07-24 09:50:02 +02:00
Harald Welte 2e32e4321b BSSAP/IPA integration: Wait for SCCPLite to be established
Before this patch, we had some problems related to synchronization
between the IPA transport, SCCP emulation and BSSAP layer in SCCPlite
configurations.

This code ensures that f_bssap_init() will block until the IPA
connection (client or server) is established, and then start the SCCP
and BSSAP emulation components in the right order.

This in turn ensures that the initial BSSMAP RESET that we're sending
from the TTCN-3 side is only sent once the IPA connection is fully
established, and the CCM Identity handshake has happened before.

Change-Id: I483ddd45c1cf631a5a9d8f862b6ca728b38bdc14
Related: OS#2544
2018-05-24 20:02:55 +02:00
Harald Welte 9220f6336e Print more self-explanatory error message on bind/connect failures
When sockets cannot be bound or connected, the existing TTCN-3 code prints
the following rather cryptic error messages:

"IPA-CTRL-IPA(47)@f70ff1fd5cfd: Dynamic test case error: Using the value of an optional field containing omit. (Transport endpoint is not connected)"

The "Transport endpoint is not connected" sort-of gives it away, but
let's make it more explicit by introducing explicit checks for the
res.connId and manual setverdict(fail) statements with proper error
message.

Change-Id: Id22a1b5189d81c4fca03d5e7aff60ffdd1ad56bf
2018-05-23 20:27:02 +02:00
Harald Welte 2d86affc8c IPA: Fix wrong CCM ID_ACK logic; disable CCM on CTRL interface
Our TTCN3 implementation of the IPA multiplex with CCM handshaking
has been based on some wrong assumptions about the protocol logic.

To make the code stricter, we
* send an ID_ACK immediately after connecting TCP in a client
* separate client and server CCM responder logic
* always respond with ID_ACK to ID_RESP (we accept any identity)

Also, as the Osmocom CTRL interface uses an IPA multiplex but no CCM,
we introduce a boolean variable (and function argument) to clearly
enable/disable CCM support in a given IPA_Emulation component.  The
CTRL_Adapter has been modified to use this flag to disable CCM.

This also removes the need of cherry-picking
	"HACK: Work around IPA CCM bug in OsmoBSC"
	Change-Id: I304535d28a165f76a0a140dc0a15dd81a9db28c8
from the laforge/bsc-workaround branch.

Change-Id: I6d9eaf0d69457caacc03b9049a8bc57976480617
2018-04-17 19:52:30 +00:00
Harald Welte 3bc387f41a IPA_Emulation: Don't log IPAC_MSGT_ID_RESP as "Unknown/unsupported"
Change-Id: I6ea3855a1f3d1cba6ac173b0f9cf9052d5d028fc
2018-02-21 12:20:30 +01:00
Harald Welte df277258f1 IPA_Emulation: Make dependencies to RSL/MGCP/SCCP/GSUP conditional
Let's use the preprocessor to avoid IPA_Emulation pulling *all*
dependencies into each and any of our projects.  The code readability
suffers a bit from the many #ifdefs, but compilation speed increases
if we don't have to pull in all those (recursive) dependencies.

After all, a BTS test case will never need SCCP, GSUP or MGCP.

Change-Id: Ic0231adbd2171214de133d26b3fbf36130ee8aa0
2018-02-20 16:17:17 +01:00