bsc: add TC_ctrl_trx_rf_locked

Related: OS#5542
Depends: Ie46fd730797b64fb185d705c3507e36f5f23ef4b (osmo-bsc)
Change-Id: I2bb5096732f75a7341c7e83951e63c5a2038b469
This commit is contained in:
Neels Hofmeyr 2021-09-07 14:44:36 +02:00 committed by neels
parent a41ae30a1e
commit 5d7d13f5eb
1 changed files with 69 additions and 0 deletions

View File

@ -10088,6 +10088,73 @@ testcase TC_imm_ass_pre_ts_ack_dyn_ts() runs on test_CT {
f_shutdown_helper();
}
/* GET and SET the bts.N.trx.M.rf_locked CTRL variable */
testcase TC_ctrl_trx_rf_locked() runs on test_CT {
var MSC_ConnHdlr vc_conn;
f_init(nr_bts := 2, handler_mode := true, nr_msc := 1);
f_sleep(1.0);
/* BTS 0, 1, 2 are OML unlocked, only BTS 0, 1 are actually connected to RSL. */
f_ctrl_get_exp(IPA_CTRL, "rf_states",
"0,0,operational,unlocked,on,rsl-up;" &
"1,0,operational,unlocked,on,rsl-up;" &
"2,0,operational,unlocked,on,rsl-down;" &
"3,0,inoperational,locked,on,rsl-down;");
f_logp(BSCVTY, "TC_ctrl_trx_rf_locked: lock BTS 1 TRX 0");
f_ctrl_set(IPA_CTRL, "bts.1.trx.0.rf_locked", "1");
/* give it a moment to settle the FSM status */
f_sleep(1.0);
/* Now BTS 1 TRX 0 should reflect "locked". Note the RF policy stays "on", because this is still handled
* globally in osmo-bsc. Probably after sending "rf_locked 1" for a TRX, that TRX should reflect an RF policy
* of "off"? But that's for a future patch if at all. */
f_ctrl_get_exp(IPA_CTRL, "rf_states",
"0,0,operational,unlocked,on,rsl-up;" &
"1,0,operational,locked,on,rsl-up;" &
"2,0,operational,unlocked,on,rsl-down;" &
"3,0,inoperational,locked,on,rsl-down;");
f_logp(BSCVTY, "TC_ctrl_trx_rf_locked: lock the already locked TRX, nothing should change");
f_ctrl_set(IPA_CTRL, "bts.1.trx.0.rf_locked", "1");
f_sleep(1.0);
f_ctrl_get_exp(IPA_CTRL, "rf_states",
"0,0,operational,unlocked,on,rsl-up;" &
"1,0,operational,locked,on,rsl-up;" &
"2,0,operational,unlocked,on,rsl-down;" &
"3,0,inoperational,locked,on,rsl-down;");
f_logp(BSCVTY, "TC_ctrl_trx_rf_locked: unlock BTS 1 TRX 0");
f_ctrl_set(IPA_CTRL, "bts.1.trx.0.rf_locked", "0");
f_sleep(1.0);
f_ctrl_get_exp(IPA_CTRL, "rf_states",
"0,0,operational,unlocked,on,rsl-up;" &
"1,0,operational,unlocked,on,rsl-up;" &
"2,0,operational,unlocked,on,rsl-down;" &
"3,0,inoperational,locked,on,rsl-down;");
f_logp(BSCVTY, "TC_ctrl_trx_rf_locked: unlock an already unlocked TRX, nothing should change");
f_ctrl_set(IPA_CTRL, "bts.0.trx.0.rf_locked", "0");
f_sleep(1.0);
f_ctrl_get_exp(IPA_CTRL, "rf_states",
"0,0,operational,unlocked,on,rsl-up;" &
"1,0,operational,unlocked,on,rsl-up;" &
"2,0,operational,unlocked,on,rsl-down;" &
"3,0,inoperational,locked,on,rsl-down;");
f_logp(BSCVTY, "TC_ctrl_trx_rf_locked: unlock an inoperational TRX");
f_ctrl_set(IPA_CTRL, "bts.3.trx.0.rf_locked", "0");
f_sleep(1.0);
f_ctrl_get_exp(IPA_CTRL, "rf_states",
"0,0,operational,unlocked,on,rsl-up;" &
"1,0,operational,unlocked,on,rsl-up;" &
"2,0,operational,unlocked,on,rsl-down;" &
"3,0,inoperational,locked,on,rsl-down;");
f_shutdown_helper();
}
control {
/* CTRL interface testing */
execute( TC_ctrl_msc_connection_status() );
@ -10389,6 +10456,8 @@ control {
execute( TC_imm_ass_pre_ts_ack() );
execute( TC_imm_ass_pre_chan_ack_dyn_ts() );
execute( TC_imm_ass_pre_ts_ack_dyn_ts() );
execute( TC_ctrl_trx_rf_locked() );
}
}