diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-05-20 16:04:11 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-05-21 16:36:50 +0200 |
commit | df4d0f0b8c8001ea74376fbcc473277bf2df091d (patch) | |
tree | a4872dc6fc62ab182ecc30703ed9cb4239fdcbbf | |
parent | 88e5dffd19ca06bcaf97c4dc30700f40f5dfe652 (diff) |
bts: Test for removal of CBCH DEFAULT message
Add a new testcase TC_sms_cb_cmd_sdcch4_default_then_null() which first
installes a DEFAULT message, verifies that, then removes the default
message and verifies only NULL CBCH blocks are sent anymore.
Change-Id: I9608d42a164a6210f100d10cb3ccfb7735975011
Related: OS#4011
-rw-r--r-- | bts/BTS_Tests_SMSCB.ttcn | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/bts/BTS_Tests_SMSCB.ttcn b/bts/BTS_Tests_SMSCB.ttcn index 34e17bec..c9918773 100644 --- a/bts/BTS_Tests_SMSCB.ttcn +++ b/bts/BTS_Tests_SMSCB.ttcn @@ -120,6 +120,13 @@ private function f_cbch_fn_verify(uint32_t fn, CBCH_Block cb) } } +private function f_rsl_smscb_default_null() runs on test_CT +{ + var RSL_IE_CbCommandType cmd_type := + valueof(ts_RSL_IE_CbCmdType(RSL_CB_CMD_DEFAULT, 1, true)); + RSL_CCHAN.send(ts_RSL_UD(ts_RSL_SMSCB_CMD(cmd_type, ''O))); +} + private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT { var integer i; @@ -446,6 +453,50 @@ testcase TC_sms_cb_cmd_sdcch8_default_only() runs on test_CT { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } +/* first set a DEFAULT message, then disable it again */ +testcase TC_sms_cb_cmd_sdcch4_default_then_null() runs on test_CT { + var CbchTestPars pars := { + use_sdcch4 := true, + msgs := msgs_1m_3b_default + }; + var L1ctlDlMessage dl; + timer T := 5.0; + + f_TC_smscb_default_only(pars); + + /* disable DEFAULT message; switch back to NULL */ + f_rsl_smscb_default_null(); + + /* ensure whatever initial non-NULL messages have all been drained */ + f_sleep(5.0); + L1CTL.clear; + + T.start; + alt { + [] L1CTL.receive(tr_L1CTL_DATA_IND(t_RslChanNr_CBCH(0))) -> value dl { + log("CBCH: ", dl); + var CBCH_Block cb := dec_CBCH_Block(dl.payload.data_ind.payload); + /* detect the proper CBCH messages; check frame number */ + f_cbch_fn_verify(dl.dl_info.frame_nr, cb); + if (not match(cb, tr_CBCH_Block)) { + setverdict(fail, "Illegal CBCH Block received: ", cb); + } else { + if (not match(cb, tr_CBCH_Block(15, ?, ?))) { + setverdict(fail, "Unexpected non-NULL CBCH block received"); + } + repeat; + } + } + [] L1CTL.receive { repeat; } + [] T.timeout { + setverdict(pass); + } + } + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); +} + + /* SMSCB TODO: * multiple SMS BC CMD at the same time: Ensure all of them are sent exactly once @@ -461,6 +512,7 @@ control { execute( TC_sms_cb_cmd_sdcch4_multi() ); execute( TC_sms_cb_cmd_sdcch4_schedule() ); execute( TC_sms_cb_cmd_sdcch4_default_only() ); + execute( TC_sms_cb_cmd_sdcch4_default_then_null() ); if (false) { /* FIXME: SDCCH/8 support broken, needs trxcon + L1CTL work */ execute( TC_sms_cb_cmd_sdcch8_1block() ); execute( TC_sms_cb_cmd_sdcch8_2block() ); |