summaryrefslogtreecommitdiffstats
path: root/bsc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-06-07 19:43:45 +0200
committerlaforge <laforge@gnumonks.org>2019-06-13 09:38:24 +0000
commit5a2d743e5d36bc5f2205465603026c2e6a78ab88 (patch)
treeb6e10e65963a8bae7e9eafceb03d038349021343 /bsc
parent4d0e5e521b48b9fe67762c0df56147a4586a16a8 (diff)
bsc: Introduce test TC_ctrl_location
Diffstat (limited to 'bsc')
-rw-r--r--bsc/BSC_Tests.ttcn32
-rw-r--r--bsc/expected-results.xml3
-rwxr-xr-xbsc/regen_makefile.sh2
3 files changed, 35 insertions, 2 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index c3275e1..00995bf 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -80,6 +80,8 @@ type component test_CT extends CTRL_Adapter_CT {
/* array of per-BTS RSL test ports */
port IPA_RSL_PT IPA_RSL[NUM_BTS];
port IPA_CODEC_PT IPA; /* Required for compilation of TC_rsl_unknown_unit_id() */
+ /* CTRL muxed over IPA in SCCPlite conn BSC<->MSC (or BSC-NAT) */
+ port IPA_CTRL_PT SCCPLITE_IPA_CTRL;
var MGCP_Emulation_CT vc_MGCP;
port TELNETasp_PT BSCVTY;
@@ -350,6 +352,7 @@ function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false, boolea
var RanOps ranops := MSC_RanOps;
ranops.use_osmux := g_osmux_enabled;
f_ran_adapter_init(g_bssap, mp_bssap_cfg, "VirtMSC", ranops);
+ connect(self:SCCPLITE_IPA_CTRL, g_bssap.vc_RAN:CTRL_CLIENT);
f_ran_adapter_start(g_bssap);
} else {
f_ran_adapter_init(g_bssap, mp_bssap_cfg, "VirtMSC", omit);
@@ -1204,6 +1207,32 @@ testcase TC_ctrl() runs on test_CT {
setverdict(pass);
}
+/* Verify that Upon receival of SET "location", BSC forwards a TRAP
+ "location-state" over the SCCPlite IPA conn */
+testcase TC_ctrl_location() runs on test_CT {
+ var MSC_ConnHdlr vc_conn;
+ var integer bts_nr := 0;
+
+ f_init(1, true);
+ f_sleep(1.0);
+
+ f_ctrl_set_bts(IPA_CTRL, bts_nr, "location", "1234567,fix3d,0.340000,0.560000,0.780000");
+ f_ctrl_exp_trap(SCCPLITE_IPA_CTRL, "bts." & int2str(bts_nr) & ".location-state",
+ "1234567,fix3d,0.340000,0.560000,0.780000,operational,unlocked,on,001,01");
+
+ f_ctrl_set(SCCPLITE_IPA_CTRL, "rf_locked", "1");
+ f_sleep(2.0);
+
+ f_ctrl_set_bts(IPA_CTRL, bts_nr, "location", "1234888,fix3d,0.350000,0.570000,0.790000");
+ f_ctrl_exp_trap(SCCPLITE_IPA_CTRL, "bts." & int2str(bts_nr) & ".location-state",
+ "1234888,fix3d,0.350000,0.570000,0.790000,operational,locked,off,001,01");
+
+ /* should match the one from config */
+ f_ctrl_set(SCCPLITE_IPA_CTRL, "rf_locked", "0");
+
+ setverdict(pass);
+}
+
function f_bssap_tx_ud(template PDU_BSSAP bssap) runs on test_CT {
BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap.sccp_addr_peer, g_bssap.sccp_addr_own, bssap));
}
@@ -3987,6 +4016,9 @@ control {
execute( TC_ctrl_msc_connection_status() );
execute( TC_ctrl_msc0_connection_status() );
execute( TC_ctrl() );
+ if (mp_bssap_cfg.transport == BSSAP_TRANSPORT_SCCPlite_SERVER) {
+ execute( TC_ctrl_location() );
+ }
/* RSL DCHAN Channel ACtivation / Deactivation */
execute( TC_chan_act_noreply() );
diff --git a/bsc/expected-results.xml b/bsc/expected-results.xml
index ff3cce0..d2c474c 100644
--- a/bsc/expected-results.xml
+++ b/bsc/expected-results.xml
@@ -1,8 +1,9 @@
<?xml version="1.0"?>
-<testsuite name='BSC_Tests' tests='106' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'>
+<testsuite name='BSC_Tests' tests='107' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'>
<testcase classname='BSC_Tests' name='TC_ctrl_msc_connection_status' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_ctrl_msc0_connection_status' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_ctrl' time='MASKED'/>
+ <testcase classname='BSC_Tests' name='TC_ctrl_location' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_chan_act_noreply' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_chan_act_counter' time='MASKED'/>
<testcase classname='BSC_Tests' name='TC_chan_act_ack_noest' time='MASKED'/>
diff --git a/bsc/regen_makefile.sh b/bsc/regen_makefile.sh
index 06fa812..389aaed 100755
--- a/bsc/regen_makefile.sh
+++ b/bsc/regen_makefile.sh
@@ -4,6 +4,6 @@ MAIN=BSC_Tests.ttcn
FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc TELNETasp_PT.cc *.c"
-export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL -DIPA_EMULATION_MGCP -DIPA_EMULATION_SCCP -DRAN_EMULATION_BSSAP -DRAN_EMULATION_MGCP -DUSE_MTP3_DISTRIBUTOR"
+export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL -DIPA_EMULATION_MGCP -DIPA_EMULATION_CTRL -DIPA_EMULATION_SCCP -DRAN_EMULATION_BSSAP -DRAN_EMULATION_MGCP -DRAN_EMULATION_CTRL -DUSE_MTP3_DISTRIBUTOR"
../regen-makefile.sh $MAIN $FILES