I guess I'm again hitting the same ttcn3 wall that has caused me trouble
countless times before... I'm trying to run the already existing
TC_ho_into_this_bsc(), but before it starts I want to occupy all lchans.
This is the working TC_ho_into_this_bsc():
testcase TC_ho_into_this_bsc() runs on test_CT {
var MSC_ConnHdlr vc_conn;
var TestHdlrParams pars := f_gen_test_hdlr_pars();
f_init(1, true);
f_sleep(1.0);
pars.handover.sccp_addr_msc := g_bssap.sccp_addr_own;
pars.handover.sccp_addr_bsc := g_bssap.sccp_addr_peer;
vc_conn := f_start_handler(refers(f_tc_ho_into_this_bsc), pars);
vc_conn.done;
}
I just want to insert a bit of TC_chan_exhaustion() like so:
testcase TC_ho_in_fail_no_chan() runs on test_CT {
var integer i;
var MSC_ConnHdlr vc_conn;
var TestHdlrParams pars := f_gen_test_hdlr_pars();
f_init(1, true);
f_sleep(1.0);
/* occupy all lchans */
for (i := 0; i < NUM_TCHF_PER_BTS + NUM_TCHH_PER_BTS + NUM_SDCCH_PER_BTS; i :=
i+1) {
var RslChannelNr chan_nr := f_chreq_act_ack('23'O, i);
}
pars.handover.sccp_addr_msc := g_bssap.sccp_addr_own;
pars.handover.sccp_addr_bsc := g_bssap.sccp_addr_peer;
vc_conn := f_start_handler(refers(f_tc_ho_in_fail_no_chan), pars);
vc_conn.done;
}
But no matter which way I turn it, ttcn3 does not agree.
* I either get:
21:36:03.008137 mtc BSC_Tests.ttcn:1553 Dynamic test case error: Using the value of an
unbound component reference.
21:36:03.008163 mtc BSC_Tests.ttcn:1553 setverdict(error): none -> error
This is during
f_connect_handler(): connect(vc_conn:BSSMAPEM, g_bssap.vc_BSSMAP:PROC);
with the log revealing [1] below
* Or I get:
21:31:45.678006 mtc BSC_Tests.ttcn:366 Dynamic test case error: Port IPA_RSL[0] has
neither connections nor mappings. Message cannot be sent
on it.
21:31:45.678094 mtc BSC_Tests.ttcn:366 setverdict(error): none -> error
This stuff really gets me steaming with ttcn... anyhow...
I'm fairly certain it has to do with the 'true' arg of f_init() starting the
RSL emulation, so I need to re-invent TC_chan_exhaustion() on the MSC_ConnHdlr?
Sort of like the hack I have in f_tc_ho_into_this_bsc()?
"
/* Hack: the proper way would be to wait for the BSSMAP Handover Request ACK and
extract the
* actual assigned chan_nr from its L3 (RR Handover Command) message. But osmo-bsc
starts acting
* on the lchan even before we get a chance to evaluate the BSSMAP Handover
Request ACK. So we
* need to assume that osmo-bsc will activate TS 1 and already set up this
lchan's RSL emulation
* before we get started. */
var RslChannelNr new_chan_nr := valueof(t_RslChanNr0(1, RSL_CHAN_NR_Bm_ACCH));
f_rslem_register(0, new_chan_nr);
g_chan_nr := new_chan_nr;
f_sleep(1.0);
"
I wish it were easier...?
~N
[1]
21:36:03.008009 mtc BSC_Tests.ttcn:1552 XXXXX {
vc_M3UA := VirtMSC-M3UA(4),
vc_IPA := <unbound>,
vc_WAIT := <unbound>,
vc_SCCP := VirtMSC-SCCP(3),
sccp_pars := {
sio := {
ni := '10'B,
prio := '00'B,
si := '0011'B
},
opc := 185,
dpc := 187,
sls := 0,
sccp_serviceType := "mtp3_itu",
ssn := 254
},
sccp_addr_own := {
addressIndicator := {
pointCodeIndic := '1'B,
ssnIndicator := '1'B,
globalTitleIndic := '0000'B,
routingIndicator := '1'B
},
signPointCode := '00000010111001'B,
subsystemNumber := 254,
globalTitle := omit
},
sccp_addr_peer := {
addressIndicator := {
pointCodeIndic := '1'B,
ssnIndicator := '1'B,
globalTitleIndic := '0000'B,
routingIndicator := '1'B
},
signPointCode := '00000010111011'B,
subsystemNumber := 254,
globalTitle := omit
},
vc_BSSMAP := <unbound>
}
--
- Neels Hofmeyr <nhofmeyr(a)sysmocom.de>
http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschäftsführer / Managing Directors: Harald Welte