Review at  https://gerrit.osmocom.org/7225

bsc: TC_chan_rel_rll_rel_ind: expect full MSC Clear Request

This test sends a REL IND from the MS and immediately expects an lchan release.
Instead, osmo-bsc patch I0f8c9c4e6b6850b15c70250fd3f88bdf75f9accf decides to
signal full BSSMAP Clear Request to the MSC first, so expect that first.

Note that this test currently fails, and said osmo-bsc.git patch will make this
test pass.

Change-Id: I737be141b69a250eb6eb38007f8042981c1a31cf
---
M bsc/BSC_Tests.ttcn
1 file changed, 16 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/25/7225/1

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index a466d36..3b5c860 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -618,6 +618,7 @@
 /* Test behavior of channel release after unilateral RLL REL IND (DISC from 
MS) */
 testcase TC_chan_rel_rll_rel_ind() runs on test_CT {
        var RSL_Message rx_rsl;
+       var BSSAP_N_DATA_ind rx_di;
        var DchanTuple dt;
 
        f_init(1);
@@ -627,13 +628,26 @@
        /* simulate RLL REL IND */
        f_ipa_tx(0, ts_RSL_REL_IND(dt.rsl_chan_nr, 
valueof(ts_RslLinkID_DCCH(0))));
 
+       /* expect Clear Request on MSC side */
+       BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, 
tr_BSSMAP_ClearRequest)) -> value rx_di;
+
+       /* Instruct BSC to clear channel */
+       var BssmapCause cause := 
bit2int(rx_di.userData.pdu.bssmap.clearRequest.cause.causeValue);
+       BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, 
ts_BSSMAP_ClearCommand(cause)));
+
        /* expect BSC to disable the channel */
        rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL), 
T3101_MAX);
        /* respond with CHAN REL ACK */
        f_ipa_tx(0, ts_RSL_RF_CHAN_REL_ACK(dt.rsl_chan_nr));
 
-       /* expect DISC_IND on MSC side */
-       BSSAP.receive(tr_BSSAP_DISC_ind(dt.sccp_conn_id, ?, ?));
+       /* expect Clear Complete from BSC */
+       BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, 
tr_BSSMAP_ClearComplete));
+
+       /* release the SCCP connection */
+       BSSAP.send(ts_BSSAP_DISC_req(dt.sccp_conn_id, 0));
+
+       /* wait for SCCP emulation to do its job */
+       f_sleep(1.0);
 
        setverdict(pass);
 }

-- 
To view, visit https://gerrit.osmocom.org/7225
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I737be141b69a250eb6eb38007f8042981c1a31cf
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>

Reply via email to