From 4365481254e5f602e3dbe258928d18522c2c4745 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 25 Sep 2020 01:35:35 +0200 Subject: [PATCH] bsc: undup f_verify_active_layer3() Change-Id: Ia4433618787b58f8789c9e97cdfbb8b320a09395 --- bsc/BSC_Tests.ttcn | 51 +++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 3a817f4de..967235756 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -4464,6 +4464,25 @@ testcase TC_ho_out_of_this_bsc() runs on test_CT { f_shutdown_helper(); } +private function f_verify_active_layer3() runs on MSC_ConnHdlr +{ + /* The old lchan and conn should still be active. See that arbitrary L3 + * is still going through. */ + var octetstring l3 := '0123456789'O; + RSL.send(ts_RSL_DATA_IND(g_chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); + var template PDU_BSSAP exp_data := { + discriminator := '1'B, + spare := '0000000'B, + dlci := '00'O, + lengthIndicator := 5, + pdu := { + dtap := l3 + } + }; + BSSAP.receive(exp_data); + setverdict(pass); +} + /* BSC asks for inter-BSC HO, but the MSC decides that it won't happen and * simply never sends a BSSMAP Handover Command. */ private function f_tc_ho_out_fail_no_msc_response(charstring id) runs on MSC_ConnHdlr { @@ -4484,21 +4503,7 @@ private function f_tc_ho_out_fail_no_msc_response(charstring id) runs on MSC_Con * Let's give it a bit extra. */ f_sleep(15.0); - /* The old lchan and conn should still be active. See that arbitrary L3 - * is still going through. */ - var octetstring l3 := '0123456789'O; - RSL.send(ts_RSL_DATA_IND(g_chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); - var template PDU_BSSAP exp_data := { - discriminator := '1'B, - spare := '0000000'B, - dlci := '00'O, - lengthIndicator := 5, - pdu := { - dtap := l3 - } - }; - BSSAP.receive(exp_data); - setverdict(pass); + f_verify_active_layer3(); f_sleep(1.0); } testcase TC_ho_out_fail_no_msc_response() runs on test_CT { @@ -4576,21 +4581,7 @@ private function f_tc_ho_out_fail_rr_ho_failure(charstring id) runs on MSC_ConnH f_sleep(1.0); - /* The old lchan and conn should still be active. See that arbitrary L3 - * is still going through. */ - var octetstring l3 := '0123456789'O; - RSL.send(ts_RSL_DATA_IND(g_chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3)); - var template PDU_BSSAP exp_data := { - discriminator := '1'B, - spare := '0000000'B, - dlci := '00'O, - lengthIndicator := 5, - pdu := { - dtap := l3 - } - }; - BSSAP.receive(exp_data); - setverdict(pass); + f_verify_active_layer3(); f_sleep(1.0); setverdict(pass);