start implementing the TC_paging() PCU test
Implement a basic paging test for the PCU, which is passing for paging via TMSI (but only if osmo-pcu is started after the test is started). Previously, this test code amounted to a debugging loop which never terminated. Change-Id: Id0384e0742ab91983615e4f1c883bb044c1c8b18 Related: OS#2404
This commit is contained in:
parent
9925390dd7
commit
4c32b952dd
|
@ -303,6 +303,22 @@ template PDU_ML3_NW_MS tr_PAGING_REQ1(template MobileIdentityLV mi1 := ?,
|
|||
}
|
||||
}
|
||||
|
||||
/* Template for receiving a Paging Request Type1 message with a given TMSI in the first mobile identity. */
|
||||
template MobileL3_CommonIE_Types.MobileIdentityLV tr_PAGING_REQ1_MI1_TMSI(octetstring tmsi) := {
|
||||
lengthIndicator := 5,
|
||||
mobileIdentityV := {
|
||||
typeOfIdentity := '100'B,
|
||||
oddEvenInd_identity := {
|
||||
tmsi_ptmsi := {
|
||||
oddevenIndicator := '0'B,
|
||||
fillerDigit := '1111'B,
|
||||
octets := tmsi
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
template PDU_ML3_NW_MS tr_PAGING_REQ2(template TMSIP_TMSI_V mi1 := ?,
|
||||
template TMSIP_TMSI_V mi2 := ?,
|
||||
template MobileIdentityTLV mi3 := *) := {
|
||||
|
|
|
@ -17,6 +17,9 @@ module PCU_Tests {
|
|||
import from GPRS_Context all;
|
||||
import from GPRS_TBF all;
|
||||
import from L1CTL_PortType all;
|
||||
import from MobileL3_Types all;
|
||||
import from MobileL3_CommonIE_Types all;
|
||||
import from L3_Templates all;
|
||||
|
||||
modulepar {
|
||||
BssgpConfig mp_gb_cfg := {
|
||||
|
@ -207,27 +210,58 @@ module PCU_Tests {
|
|||
log("BSSGP successfully initialized");
|
||||
}
|
||||
|
||||
function f_wait_paging_req_type1(hexstring expected_tmsi) runs on dummy_CT {
|
||||
var LAPDm_ph_data ph_data;
|
||||
timer T := 5.0;
|
||||
|
||||
T.start;
|
||||
alt {
|
||||
[] L1.receive(LAPDm_ph_data:{sacch:=?,sapi:=0,lapdm:={bbis:=?}}) -> value ph_data {
|
||||
var octetstring payload := substr(ph_data.lapdm.bbis.payload, 1, lengthof(ph_data.lapdm.bbis.payload) - 1);
|
||||
var PDU_ML3_NW_MS pdu;
|
||||
|
||||
if (dec_PDU_ML3_NW_MS_backtrack(payload, pdu) != 0) {
|
||||
repeat;
|
||||
}
|
||||
|
||||
if (not ischosen(pdu.msgs.rrm)) {
|
||||
repeat;
|
||||
}
|
||||
|
||||
if (match(pdu, tr_PAGING_REQ1(tr_PAGING_REQ1_MI1_TMSI(hex2oct(expected_tmsi))))) {
|
||||
setverdict(pass);
|
||||
} else {
|
||||
repeat;
|
||||
}
|
||||
}
|
||||
[] L1.receive { repeat; }
|
||||
[] T.timeout { setverdict(fail); }
|
||||
}
|
||||
}
|
||||
|
||||
/* Send PS-PAGING via BSSGP to PCU, expect it to show up on L1/Um */
|
||||
testcase TC_paging() runs on dummy_CT {
|
||||
var GsmTmsi tmsi := hex2int('01234567'H);
|
||||
var hexstring tmsi_hex := '01234567'H;
|
||||
var GsmTmsi tmsi := hex2int(tmsi_hex);
|
||||
|
||||
g_mmctx.imsi := '262420123456789'H;
|
||||
g_mmctx.tlli := f_random_tlli();
|
||||
f_init();
|
||||
|
||||
/* Send paging on signalling BVCI 0 since osmo-pcu does not support paging on PTP yet. */
|
||||
BSSGP_SIG[0].send(ts_BSSGP_PS_PAGING_IMSI(0, g_mmctx.imsi));
|
||||
BSSGP_SIG[0].send(ts_BSSGP_PS_PAGING_PTMSI(0, g_mmctx.imsi, tmsi));
|
||||
var BCCH_tune_req tune_req := { { false, 871 }, true };
|
||||
L1.send(tune_req);
|
||||
/* FIXME: wait for confirm */
|
||||
|
||||
while (true) {
|
||||
var BssgpDecoded bd;
|
||||
alt {
|
||||
[] BSSGP[0].receive(tr_BD_L3_MT(?)) -> value bd {
|
||||
log("BSSGP Rx: ", bd);
|
||||
}
|
||||
[] BSSGP[0].receive(t_BssgpStsInd(?, ?, BVC_S_UNBLOCKED)) { repeat; }
|
||||
[] BSSGP[0].receive { repeat; }
|
||||
}
|
||||
}
|
||||
/* Send paging on signalling BVCI 0 since osmo-pcu does not support paging on PTP yet. */
|
||||
/*
|
||||
TODO: Paging by IMSI does not work yet because osmo-pcu does not copy IMSI into paging requests.
|
||||
BSSGP_SIG[0].send(ts_BSSGP_PS_PAGING_IMSI(0, g_mmctx.imsi));
|
||||
f_wait_paging_req_type1(hex2oct(g_mmctx.imsi));
|
||||
*/
|
||||
|
||||
/* Page by TMSI */
|
||||
BSSGP_SIG[0].send(ts_BSSGP_PS_PAGING_PTMSI(0, g_mmctx.imsi, tmsi));
|
||||
f_wait_paging_req_type1(tmsi_hex);
|
||||
}
|
||||
|
||||
/* Establish an UL TBF: Tune to ARFCN, send RACH, receive AGCH, enable TBF Rx */
|
||||
|
@ -633,5 +667,6 @@ value dl {
|
|||
execute(TC_selftest_ns());
|
||||
execute(TC_ul_tbf_single_llc_sizes());
|
||||
execute(TC_ul_tbf());
|
||||
execute(TC_paging());
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<testsuite name='PCU_Tests' tests='3' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'>
|
||||
<testsuite name='PCU_Tests' tests='4' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'>
|
||||
<testcase classname='PCU_Tests' name='TC_ul_tbf_single_llc_sizes' time='MASKED'/>
|
||||
<testcase classname='PCU_Tests' name='TC_ul_tbf' time='MASKED'/>
|
||||
<testcase classname='PCU_Tests' name='TC_selftest_ns' time='MASKED'/>
|
||||
<testcase classname='PCU_Tests' name='TC_paging' time='MASKED'/>
|
||||
</testsuite>
|
||||
|
|
Loading…
Reference in New Issue