summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2021-09-07 14:44:36 +0200
committerneels <nhofmeyr@sysmocom.de>2021-09-14 08:31:04 +0000
commit5d7d13f5eb289254e685e9600ecf711b950d7fb3 (patch)
tree54d3597cec1e067b89c64afab6902a095b9acfb7
parenta41ae30a1ee8320b5e7b30809552a29efaa785b6 (diff)
bsc: add TC_ctrl_trx_rf_locked
-rw-r--r--bsc/BSC_Tests.ttcn69
1 files changed, 69 insertions, 0 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 965a4484..7cffac99 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -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() );
}
}