summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-06-17 02:49:28 +0200
committerlaforge <laforge@osmocom.org>2020-06-25 20:13:11 +0000
commit22c3f79c9891ecd861a4045a6376cd0dcbb8b781 (patch)
tree1220bd729a39a49f4169ed4f977f1df3003ec9ca
parent7418059a6a2af899495a0624d353a10cecb4bccf (diff)
bsc: MSC pooling: also test rate counters
Use new f_counter_* functions to verify osmo-bsc MSC pooling counters. This nicely also verifies the intended effect of each test in detail. Depends: I2ded757958dfa62b502efbab765203bcadf899e2 (osmo-bsc) Change-Id: I2006f1def5352b4b73d0159bfcaa2da9c64bfe3f
-rw-r--r--bsc/BSC_Tests.ttcn113
1 files changed, 113 insertions, 0 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 9cb15f2..facb001 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -75,6 +75,15 @@ type record BTS_State {
IPA_Client rsl
}
+/* Default list of counters for an 'msc' entity. */
+const CounterNameVals counternames_msc_mscpool := {
+ { "mscpool:subscr:new", 0 },
+ { "mscpool:subscr:known", 0 },
+ { "mscpool:subscr:reattach", 0 },
+ { "mscpool:subscr:attach_lost", 0 },
+ { "mscpool:subscr:paged", 0 }
+};
+
type component test_CT extends CTRL_Adapter_CT {
/* Array of per-BTS state */
var BTS_State bts[NUM_BTS];
@@ -107,6 +116,7 @@ type component test_CT extends CTRL_Adapter_CT {
/* global test case guard timer (actual timeout value is set in f_init()) */
timer T_guard := 30.0;
+ var CounterNameValsList g_ctr_msc;
}
modulepar {
@@ -179,6 +189,43 @@ private function f_gen_test_hdlr_pars(integer bssap_idx := 0) return TestHdlrPar
return pars;
}
+/* Convenience functions for rate counters using g_ctr_msc. */
+
+private function f_ctrs_msc_init(integer mscs_count := NUM_MSC, CounterNameVals counternames := counternames_msc_mscpool) runs on test_CT {
+ g_ctr_msc := f_counter_name_vals_get_n(IPA_CTRL, "msc", mscs_count, counternames);
+ log("initial msc rate counters: ", g_ctr_msc);
+}
+
+private function f_ctrs_msc_add(integer msc_nr, charstring countername, integer val := 1) runs on test_CT {
+ g_ctr_msc := f_counter_name_vals_list_add(g_ctr_msc, msc_nr, countername, val);
+}
+
+/* f_ctrs_msc_init();
+ * f_do_thing(on_msc := 0);
+ * f_do_thing(on_msc := 0);
+ * f_do_other(on_msc := 1);
+ * f_ctrs_msc_add(0, "thing", 2);
+ * f_ctrs_msc_add(1, "other");
+ * f_ctrs_msc_verify();
+ */
+private function f_ctrs_msc_verify() runs on test_CT {
+ log("verifying msc rate counters: ", g_ctr_msc);
+ f_counter_name_vals_expect_n(IPA_CTRL, "msc", g_ctr_msc);
+}
+
+/* convenience: f_ctrs_msc_add() and f_ctrs_msc_verify() in one call.
+ * f_ctrs_msc_init();
+ * f_do_thing(on_msc := 0);
+ * f_do_thing(on_msc := 0);
+ * f_do_thing(on_msc := 0);
+ * f_ctrs_msc_expect(0, "thing", 3);
+ */
+private function f_ctrs_msc_expect(integer msc_nr, charstring countername, integer val := 1) runs on test_CT {
+ f_ctrs_msc_add(msc_nr, countername, val);
+ f_ctrs_msc_verify();
+}
+
+
private function f_shutdown_helper() runs on test_CT {
all component.stop;
setverdict(pass);
@@ -4621,8 +4668,13 @@ testcase TC_mscpool_L3Compl_on_1_msc() runs on test_CT {
f_sleep(1.0);
var MSC_ConnHdlr vc_conn;
var TestHdlrParams pars := f_gen_test_hdlr_pars();
+
+ f_ctrs_msc_init();
+
vc_conn := f_start_handler(refers(f_tc_mscpool_L3Compl_on_1_msc), pars);
vc_conn.done;
+
+ f_ctrs_msc_expect(0, "mscpool:subscr:new", 4);
}
/* Three Layer 3 Complete by IMSI are round-robin'ed across two connected MSCs */
@@ -4637,12 +4689,15 @@ testcase TC_mscpool_L3Complete_by_imsi_round_robin() runs on test_CT {
* would be randomly affected by which other tests ran before this. */
f_vty_transceive(BSCVTY, "mscpool roundrobin next 0");
+ f_ctrs_msc_init();
+
var MSC_ConnHdlr vc_conn1;
var TestHdlrParams pars1 := f_gen_test_hdlr_pars(bssap_idx := 0);
pars1.mscpool.rsl_idx := 0;
pars1.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_IMSI_LV('001010000000001'H)), '00F110'O));
vc_conn1 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars1);
vc_conn1.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:new");
var MSC_ConnHdlr vc_conn2;
var TestHdlrParams pars2 := f_gen_test_hdlr_pars(bssap_idx := 1);
@@ -4650,6 +4705,7 @@ testcase TC_mscpool_L3Complete_by_imsi_round_robin() runs on test_CT {
pars2.mscpool.l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, valueof(ts_MI_IMSI_LV('001010000000002'H))));
vc_conn2 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars2);
vc_conn2.done;
+ f_ctrs_msc_expect(1, "mscpool:subscr:new");
/* Test round-robin wrap to the first MSC */
var MSC_ConnHdlr vc_conn3;
@@ -4658,6 +4714,7 @@ testcase TC_mscpool_L3Complete_by_imsi_round_robin() runs on test_CT {
pars3.mscpool.l3_info := valueof(ts_PAG_RESP(valueof(ts_MI_IMSI_LV('001010000000003'H))));
vc_conn3 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars3);
vc_conn3.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:new");
}
/* Three LU by TMSI are round-robin'ed across two connected MSCs, because they contain the NULL-NRI 0
@@ -4673,12 +4730,15 @@ testcase TC_mscpool_LU_by_tmsi_null_nri_0_round_robin() runs on test_CT {
* would be randomly affected by which other tests ran before this. */
f_vty_transceive(BSCVTY, "mscpool roundrobin next 0");
+ f_ctrs_msc_init();
+
var MSC_ConnHdlr vc_conn1;
var TestHdlrParams pars1 := f_gen_test_hdlr_pars(bssap_idx := 0);
pars1.mscpool.rsl_idx := 0;
pars1.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_TMSI_NRI_LV(0)), '00F110'O));
vc_conn1 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars1);
vc_conn1.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:reattach");
var MSC_ConnHdlr vc_conn2;
var TestHdlrParams pars2 := f_gen_test_hdlr_pars(bssap_idx := 1);
@@ -4686,6 +4746,7 @@ testcase TC_mscpool_LU_by_tmsi_null_nri_0_round_robin() runs on test_CT {
pars2.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_TMSI_NRI_LV(0)), '00F110'O));
vc_conn2 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars2);
vc_conn2.done;
+ f_ctrs_msc_expect(1, "mscpool:subscr:reattach");
/* Test round-robin wrap to the first MSC */
var MSC_ConnHdlr vc_conn3;
@@ -4694,6 +4755,7 @@ testcase TC_mscpool_LU_by_tmsi_null_nri_0_round_robin() runs on test_CT {
pars3.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_TMSI_NRI_LV(0)), '00F110'O));
vc_conn3 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars3);
vc_conn3.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:reattach");
}
/* Three LU by TMSI are round-robin'ed across two connected MSCs, because they contain the NULL-NRI 1
@@ -4710,12 +4772,15 @@ testcase TC_mscpool_LU_by_tmsi_null_nri_1_round_robin() runs on test_CT {
* would be randomly affected by which other tests ran before this. */
f_vty_transceive(BSCVTY, "mscpool roundrobin next 0");
+ f_ctrs_msc_init();
+
var MSC_ConnHdlr vc_conn1;
var TestHdlrParams pars1 := f_gen_test_hdlr_pars(bssap_idx := 0);
pars1.mscpool.rsl_idx := 0;
pars1.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_TMSI_NRI_LV(1)), '00F110'O));
vc_conn1 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars1);
vc_conn1.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:reattach");
var MSC_ConnHdlr vc_conn2;
var TestHdlrParams pars2 := f_gen_test_hdlr_pars(bssap_idx := 1);
@@ -4723,6 +4788,7 @@ testcase TC_mscpool_LU_by_tmsi_null_nri_1_round_robin() runs on test_CT {
pars2.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_TMSI_NRI_LV(1)), '00F110'O));
vc_conn2 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars2);
vc_conn2.done;
+ f_ctrs_msc_expect(1, "mscpool:subscr:reattach");
/* Test round-robin wrap to the first MSC */
var MSC_ConnHdlr vc_conn3;
@@ -4731,6 +4797,7 @@ testcase TC_mscpool_LU_by_tmsi_null_nri_1_round_robin() runs on test_CT {
pars3.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_TMSI_NRI_LV(1)), '00F110'O));
vc_conn3 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars3);
vc_conn3.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:reattach");
}
/* Three Layer 3 Complete by TMSI are round-robin'ed across two connected MSCs, because they contain an NRI not
@@ -4746,6 +4813,8 @@ testcase TC_mscpool_L3Complete_by_tmsi_unassigned_nri_round_robin() runs on test
* would be randomly affected by which other tests ran before this. */
f_vty_transceive(BSCVTY, "mscpool roundrobin next 0");
+ f_ctrs_msc_init();
+
var MSC_ConnHdlr vc_conn1;
var TestHdlrParams pars1 := f_gen_test_hdlr_pars(bssap_idx := 0);
pars1.mscpool.rsl_idx := 0;
@@ -4753,6 +4822,7 @@ testcase TC_mscpool_L3Complete_by_tmsi_unassigned_nri_round_robin() runs on test
pars1.mscpool.l3_info := valueof(ts_ML3_MO_MM_IMSI_DET_Ind(valueof(ts_MI_TMSI_NRI_LV(1023))));
vc_conn1 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars1);
vc_conn1.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:new");
var MSC_ConnHdlr vc_conn2;
var TestHdlrParams pars2 := f_gen_test_hdlr_pars(bssap_idx := 1);
@@ -4761,6 +4831,7 @@ testcase TC_mscpool_L3Complete_by_tmsi_unassigned_nri_round_robin() runs on test
pars2.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_TMSI_NRI_LV(768)), '00F110'O));
vc_conn2 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars2);
vc_conn2.done;
+ f_ctrs_msc_expect(1, "mscpool:subscr:new");
/* Test round-robin wrap to the first MSC */
var MSC_ConnHdlr vc_conn3;
@@ -4770,6 +4841,7 @@ testcase TC_mscpool_L3Complete_by_tmsi_unassigned_nri_round_robin() runs on test
pars3.mscpool.l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_SS_ACT, valueof(ts_MI_TMSI_NRI_LV(819))));
vc_conn3 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars3);
vc_conn3.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:new");
}
/* Three Layer 3 Complete by TMSI are round-robin'ed across two connected MSCs, because they contain an NRI
@@ -4785,6 +4857,8 @@ testcase TC_mscpool_L3Complete_by_tmsi_valid_nri_msc_not_connected_round_robin()
* would be randomly affected by which other tests ran before this. */
f_vty_transceive(BSCVTY, "mscpool roundrobin next 0");
+ f_ctrs_msc_init();
+
var MSC_ConnHdlr vc_conn1;
var TestHdlrParams pars1 := f_gen_test_hdlr_pars(bssap_idx := 0);
pars1.mscpool.rsl_idx := 0;
@@ -4792,6 +4866,9 @@ testcase TC_mscpool_L3Complete_by_tmsi_valid_nri_msc_not_connected_round_robin()
pars1.mscpool.l3_info := valueof(ts_PAG_RESP(valueof(ts_MI_TMSI_NRI_LV(512))));
vc_conn1 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars1);
vc_conn1.done;
+ f_ctrs_msc_add(2, "mscpool:subscr:attach_lost");
+ f_ctrs_msc_add(0, "mscpool:subscr:new");
+ f_ctrs_msc_verify();
var MSC_ConnHdlr vc_conn2;
var TestHdlrParams pars2 := f_gen_test_hdlr_pars(bssap_idx := 1);
@@ -4800,6 +4877,9 @@ testcase TC_mscpool_L3Complete_by_tmsi_valid_nri_msc_not_connected_round_robin()
pars2.mscpool.l3_info := valueof(ts_ML3_MO_MM_IMSI_DET_Ind(valueof(ts_MI_TMSI_NRI_LV(767))));
vc_conn2 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars2);
vc_conn2.done;
+ f_ctrs_msc_add(2, "mscpool:subscr:attach_lost");
+ f_ctrs_msc_add(1, "mscpool:subscr:new");
+ f_ctrs_msc_verify();
/* Test round-robin wrap to the first MSC */
var MSC_ConnHdlr vc_conn3;
@@ -4809,6 +4889,9 @@ testcase TC_mscpool_L3Complete_by_tmsi_valid_nri_msc_not_connected_round_robin()
pars3.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_TMSI_NRI_LV(750)), '00F110'O));
vc_conn3 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars3);
vc_conn3.done;
+ f_ctrs_msc_add(2, "mscpool:subscr:attach_lost");
+ f_ctrs_msc_add(0, "mscpool:subscr:new");
+ f_ctrs_msc_verify();
}
/* Three Layer 3 Complete by TMSI with valid NRI for the second MSC are all directed to the second MSC (configured in
@@ -4824,6 +4907,8 @@ testcase TC_mscpool_L3Complete_by_tmsi_valid_nri_1() runs on test_CT {
* this is not using round-robin. */
f_vty_transceive(BSCVTY, "mscpool roundrobin next 0");
+ f_ctrs_msc_init();
+
var MSC_ConnHdlr vc_conn1;
var TestHdlrParams pars1 := f_gen_test_hdlr_pars(bssap_idx := 1);
pars1.mscpool.rsl_idx := 0;
@@ -4831,6 +4916,7 @@ testcase TC_mscpool_L3Complete_by_tmsi_valid_nri_1() runs on test_CT {
pars1.mscpool.l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_SMS, valueof(ts_MI_TMSI_NRI_LV(256))));
vc_conn1 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars1);
vc_conn1.done;
+ f_ctrs_msc_expect(1, "mscpool:subscr:known");
var MSC_ConnHdlr vc_conn2;
var TestHdlrParams pars2 := f_gen_test_hdlr_pars(bssap_idx := 1);
@@ -4839,6 +4925,7 @@ testcase TC_mscpool_L3Complete_by_tmsi_valid_nri_1() runs on test_CT {
pars2.mscpool.l3_info := valueof(ts_PAG_RESP(valueof(ts_MI_TMSI_NRI_LV(260))));
vc_conn2 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars2);
vc_conn2.done;
+ f_ctrs_msc_expect(1, "mscpool:subscr:known");
var MSC_ConnHdlr vc_conn3;
var TestHdlrParams pars3 := f_gen_test_hdlr_pars(bssap_idx := 1);
@@ -4847,6 +4934,7 @@ testcase TC_mscpool_L3Complete_by_tmsi_valid_nri_1() runs on test_CT {
pars3.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_TMSI_NRI_LV(511)), '00F110'O));
vc_conn3 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars3);
vc_conn3.done;
+ f_ctrs_msc_expect(1, "mscpool:subscr:known");
}
/* Layer 3 Complete by TMSI with valid NRI for the third MSC are directed to the third MSC (configured in osmo-bsc.cfg),
@@ -4862,6 +4950,8 @@ testcase TC_mscpool_L3Complete_by_tmsi_valid_nri_2() runs on test_CT {
* this is not using round-robin. */
f_vty_transceive(BSCVTY, "mscpool roundrobin next 1");
+ f_ctrs_msc_init();
+
var MSC_ConnHdlr vc_conn1;
var TestHdlrParams pars1 := f_gen_test_hdlr_pars(bssap_idx := 2);
pars1.mscpool.rsl_idx := 0;
@@ -4869,6 +4959,7 @@ testcase TC_mscpool_L3Complete_by_tmsi_valid_nri_2() runs on test_CT {
pars1.mscpool.l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_SMS, valueof(ts_MI_TMSI_NRI_LV(512))));
vc_conn1 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars1);
vc_conn1.done;
+ f_ctrs_msc_expect(2, "mscpool:subscr:known");
var MSC_ConnHdlr vc_conn2;
var TestHdlrParams pars2 := f_gen_test_hdlr_pars(bssap_idx := 2);
@@ -4877,6 +4968,7 @@ testcase TC_mscpool_L3Complete_by_tmsi_valid_nri_2() runs on test_CT {
pars2.mscpool.l3_info := valueof(ts_PAG_RESP(valueof(ts_MI_TMSI_NRI_LV(678))));
vc_conn2 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars2);
vc_conn2.done;
+ f_ctrs_msc_expect(2, "mscpool:subscr:known");
/* The above forwardings to third MSC have not affected the round robin, which still points at the second MSC */
var MSC_ConnHdlr vc_conn3;
@@ -4885,6 +4977,7 @@ testcase TC_mscpool_L3Complete_by_tmsi_valid_nri_2() runs on test_CT {
pars3.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_IMSI_LV('001010000000013'H)), '00F110'O));
vc_conn3 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars3);
vc_conn3.done;
+ f_ctrs_msc_expect(1, "mscpool:subscr:new");
}
/* LU with a TMSI but indicating a different PLMN in its previous LAI: ignore the NRI. */
@@ -4899,6 +4992,8 @@ testcase TC_mscpool_LU_by_tmsi_from_other_PLMN() runs on test_CT {
* instead, and hits msc 0. */
f_vty_transceive(BSCVTY, "mscpool roundrobin next 0");
+ f_ctrs_msc_init();
+
/* An NRI of the second MSC's range (256-511), but a PLMN that doesn't match with osmo-bsc.cfg */
var MSC_ConnHdlr vc_conn1;
var TestHdlrParams pars1 := f_gen_test_hdlr_pars(bssap_idx := 0);
@@ -4906,6 +5001,7 @@ testcase TC_mscpool_LU_by_tmsi_from_other_PLMN() runs on test_CT {
pars1.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_TMSI_NRI_LV(260)), '99F999'O));
vc_conn1 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars1);
vc_conn1.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:new");
/* An NRI of the third MSC's range (512-767) and a matching PLMN gets directed by NRI. */
var MSC_ConnHdlr vc_conn2;
@@ -4914,6 +5010,7 @@ testcase TC_mscpool_LU_by_tmsi_from_other_PLMN() runs on test_CT {
pars2.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_TMSI_NRI_LV(555)), '00F110'O));
vc_conn2 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars2);
vc_conn2.done;
+ f_ctrs_msc_expect(2, "mscpool:subscr:known");
}
/* Make sure that whichever MSC paged a subscriber will also get the Paging Response. Page by IMSI, which would be
@@ -4954,6 +5051,8 @@ testcase TC_mscpool_paging_and_response_imsi() runs on test_CT {
* second MSC to make sure we're getting the Paging logic, not a coincidental round robin match. */
f_vty_transceive(BSCVTY, "mscpool roundrobin next 1");
+ f_ctrs_msc_init();
+
var MSC_ConnHdlr vc_conn1;
var TestHdlrParams pars1 := f_gen_test_hdlr_pars(bssap_idx := 0);
pars1.mscpool.rsl_idx := 0;
@@ -4961,6 +5060,7 @@ testcase TC_mscpool_paging_and_response_imsi() runs on test_CT {
pars1.sccp_addr_msc := g_bssap[pars1.mscpool.bssap_idx].sccp_addr_own;
vc_conn1 := f_start_handler(refers(f_tc_mscpool_paging_imsi), pars1);
vc_conn1.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:paged");
}
/* Make sure that whichever MSC paged a subscriber will also get the Paging Response. Page by TMSI with an NRI value
@@ -5003,6 +5103,8 @@ testcase TC_mscpool_paging_and_response_tmsi() runs on test_CT {
* third MSC to make sure we're getting the Paging logic, not a coincidental round robin match. */
f_vty_transceive(BSCVTY, "mscpool roundrobin next 2");
+ f_ctrs_msc_init();
+
var MSC_ConnHdlr vc_conn1;
var TestHdlrParams pars1 := f_gen_test_hdlr_pars(bssap_idx := 0);
pars1.mscpool.rsl_idx := 0;
@@ -5010,6 +5112,7 @@ testcase TC_mscpool_paging_and_response_tmsi() runs on test_CT {
pars1.sccp_addr_msc := g_bssap[pars1.mscpool.bssap_idx].sccp_addr_own;
vc_conn1 := f_start_handler(refers(f_tc_mscpool_paging_tmsi), pars1);
vc_conn1.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:paged");
}
/* For round-robin, skip an MSC that has 'no allow-attach' set. */
@@ -5030,12 +5133,15 @@ testcase TC_mscpool_no_allow_attach_round_robin() runs on test_CT {
f_vty_transceive(BSCVTY, "exit");
f_vty_transceive(BSCVTY, "exit");
+ f_ctrs_msc_init();
+
var MSC_ConnHdlr vc_conn1;
var TestHdlrParams pars1 := f_gen_test_hdlr_pars(bssap_idx := 0);
pars1.mscpool.rsl_idx := 0;
pars1.mscpool.l3_info := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, valueof(ts_MI_IMSI_LV('001010000000001'H)), '00F110'O));
vc_conn1 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars1);
vc_conn1.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:new");
var MSC_ConnHdlr vc_conn2;
var TestHdlrParams pars2 := f_gen_test_hdlr_pars(bssap_idx := 2);
@@ -5043,6 +5149,7 @@ testcase TC_mscpool_no_allow_attach_round_robin() runs on test_CT {
pars2.mscpool.l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, valueof(ts_MI_IMSI_LV('001010000000002'H))));
vc_conn2 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars2);
vc_conn2.done;
+ f_ctrs_msc_expect(2, "mscpool:subscr:new");
var MSC_ConnHdlr vc_conn3;
var TestHdlrParams pars3 := f_gen_test_hdlr_pars(bssap_idx := 0);
@@ -5050,6 +5157,7 @@ testcase TC_mscpool_no_allow_attach_round_robin() runs on test_CT {
pars3.mscpool.l3_info := valueof(ts_PAG_RESP(valueof(ts_MI_IMSI_LV('001010000000003'H))));
vc_conn3 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars3);
vc_conn3.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:new");
f_vty_enter_cfg_msc(BSCVTY, 1);
f_vty_transceive(BSCVTY, "allow-attach");
@@ -5074,6 +5182,8 @@ testcase TC_mscpool_no_allow_attach_valid_nri() runs on test_CT {
f_vty_transceive(BSCVTY, "exit");
f_vty_transceive(BSCVTY, "exit");
+ f_ctrs_msc_init();
+
/* Round robin points at msc 0, but the valid NRI directs to msc 1, even though msc 1 has 'no allow-attach'. */
var MSC_ConnHdlr vc_conn1;
var TestHdlrParams pars1 := f_gen_test_hdlr_pars(bssap_idx := 1);
@@ -5082,6 +5192,7 @@ testcase TC_mscpool_no_allow_attach_valid_nri() runs on test_CT {
pars1.mscpool.l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, valueof(ts_MI_TMSI_NRI_LV(260))));
vc_conn1 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars1);
vc_conn1.done;
+ f_ctrs_msc_expect(1, "mscpool:subscr:known");
var MSC_ConnHdlr vc_conn2;
var TestHdlrParams pars2 := f_gen_test_hdlr_pars(bssap_idx := 0);
@@ -5089,6 +5200,7 @@ testcase TC_mscpool_no_allow_attach_valid_nri() runs on test_CT {
pars2.mscpool.l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, valueof(ts_MI_IMSI_LV('001010000000002'H))));
vc_conn2 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars2);
vc_conn2.done;
+ f_ctrs_msc_expect(0, "mscpool:subscr:new");
var MSC_ConnHdlr vc_conn3;
var TestHdlrParams pars3 := f_gen_test_hdlr_pars(bssap_idx := 2);
@@ -5096,6 +5208,7 @@ testcase TC_mscpool_no_allow_attach_valid_nri() runs on test_CT {
pars3.mscpool.l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, valueof(ts_MI_IMSI_LV('001010000000003'H))));
vc_conn3 := f_start_handler(refers(f_tc_mscpool_compl_l3), pars3);
vc_conn3.done;
+ f_ctrs_msc_expect(2, "mscpool:subscr:new");
f_vty_enter_cfg_msc(BSCVTY, 1);
f_vty_transceive(BSCVTY, "allow-attach");