aboutsummaryrefslogtreecommitdiffstats
path: root/bsc
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-02-27 17:17:00 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-28 09:45:23 +0000
commit282ca4b49a94a61ccb15cfab7b872d4146671cd0 (patch)
treee823da039a518ea3f9a2af6301147ce805d284f7 /bsc
parent685d598171483fc823b98fb4fd6cc64d3c019274 (diff)
BSC_Tests: try to avoid race condition
When the test component ends and the underlaying components are shut down. Messages from the system under test may still be picked up and forwared. When a message is handed from one component to one that is already shut down, the testcase is flagged as errornous setverdict(error). An idea to fix thisis to stop all test ports using all port.stop. However, this does not solve the problem entirely. We still observing errors. - add f_shutdown_helper() and call it from the end of each testcase - perform an all port.stop; in f_shutdown_helper() to freeze all communications between the ports of the different components. Change-Id: Id3bc840c0428d08dfbeedacc408b3dd1cd0fa7ec
Diffstat (limited to 'bsc')
-rw-r--r--bsc/BSC_Tests.ttcn28
1 files changed, 27 insertions, 1 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index d94faad5..8d397f71 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -107,6 +107,11 @@ modulepar {
};
}
+private function f_shutdown_helper() runs on test_CT {
+ all port.stop;
+ setverdict(pass);
+}
+
private function f_legacy_bssap_reset() runs on test_CT {
var BSSAP_N_UNITDATA_ind ud_ind;
timer T := 5.0;
@@ -1011,6 +1016,7 @@ testcase TC_paging_imsi_nochan() runs on test_CT {
var BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := valueof(ts_BSSMAP_CIL_noCell);
f_pageing_helper('001010100000001'H, cid_list, c_BtsId_all, omit, omit);
+ f_shutdown_helper();
}
/* PAGING by IMSI + TMSI */
@@ -1018,6 +1024,7 @@ testcase TC_paging_tmsi_nochan() runs on test_CT {
var BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := valueof(ts_BSSMAP_CIL_noCell);
f_pageing_helper('001010100000001'H, cid_list, c_BtsId_all, omit, 'A1B2C301'O);
+ f_shutdown_helper();
}
/* Paging with different "channel needed' values */
@@ -1025,21 +1032,25 @@ testcase TC_paging_tmsi_any() runs on test_CT {
var BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := valueof(ts_BSSMAP_CIL_noCell);
f_pageing_helper('001010100000002'H, cid_list, c_BtsId_all, RSL_CHANNEED_ANY, 'A1B2C302'O);
+ f_shutdown_helper();
}
testcase TC_paging_tmsi_sdcch() runs on test_CT {
var BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := valueof(ts_BSSMAP_CIL_noCell);
f_pageing_helper('001010100000003'H, cid_list, c_BtsId_all, RSL_CHANNEED_SDCCH, 'A1B2C303'O);
+ f_shutdown_helper();
}
testcase TC_paging_tmsi_tch_f() runs on test_CT {
var BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := valueof(ts_BSSMAP_CIL_noCell);
f_pageing_helper('001010000000004'H, cid_list, c_BtsId_all, RSL_CHANNEED_TCH_F, 'A1B2C304'O);
+ f_shutdown_helper();
}
testcase TC_paging_tmsi_tch_hf() runs on test_CT {
var BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := valueof(ts_BSSMAP_CIL_noCell);
f_pageing_helper('001010000000005'H, cid_list, c_BtsId_all, RSL_CHANNEED_TCH_ForH, 'A1B2C305'O);
+ f_shutdown_helper();
}
/* Paging by CGI */
@@ -1047,6 +1058,7 @@ testcase TC_paging_imsi_nochan_cgi() runs on test_CT {
var template BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := { cIl_CGI := { ts_BSSMAP_CI_CGI(cid.mcc, cid.mnc, cid.lac, cid.ci) } };
f_pageing_helper('001010000000006'H, cid_list, { 0 });
+ f_shutdown_helper();
}
/* Paging by LAC+CI */
@@ -1054,6 +1066,7 @@ testcase TC_paging_imsi_nochan_lac_ci() runs on test_CT {
var template BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := { cIl_LAC_CI := { ts_BSSMAP_CI_LAC_CI(cid.lac, cid.ci) } };
f_pageing_helper('001010000000007'H, cid_list, { 0 });
+ f_shutdown_helper();
}
/* Paging by CI */
@@ -1061,6 +1074,7 @@ testcase TC_paging_imsi_nochan_ci() runs on test_CT {
var template BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := { cIl_CI := { ts_BSSMAP_CI_CI(cid.ci) } };
f_pageing_helper('001010000000008'H, cid_list, { 0 });
+ f_shutdown_helper();
}
/* Paging by LAI */
@@ -1068,6 +1082,7 @@ testcase TC_paging_imsi_nochan_lai() runs on test_CT {
var template BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := { cIl_LAI := { ts_BSSMAP_CI_LAI(cid.mcc, cid.mnc, cid.lac) } };
f_pageing_helper('001010000000009'H, cid_list, c_BtsId_LAC1);
+ f_shutdown_helper();
}
/* Paging by LAC */
@@ -1075,6 +1090,7 @@ testcase TC_paging_imsi_nochan_lac() runs on test_CT {
var template BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := { cIl_LAC := { ts_BSSMAP_CI_LAC(cid.lac) } };
f_pageing_helper('001010000000010'H, cid_list, c_BtsId_LAC1);
+ f_shutdown_helper();
}
/* Paging by "all in BSS" */
@@ -1082,6 +1098,7 @@ testcase TC_paging_imsi_nochan_all() runs on test_CT {
var template BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := { cIl_allInBSS := ''O };
f_pageing_helper('001010000000011'H, cid_list, c_BtsId_all);
+ f_shutdown_helper();
}
/* Paging by PLMN+LAC+RNC */
@@ -1089,6 +1106,7 @@ testcase TC_paging_imsi_nochan_plmn_lac_rnc() runs on test_CT {
var template BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := { cIl_PLMN_LAC_RNC := { ts_BSSMAP_CI_PLMN_LAC_RNC(cid.mcc, cid.mnc, cid.lac, 12) } };
f_pageing_helper('001010000000012'H, cid_list, c_BtsId_all);
+ f_shutdown_helper();
}
/* Paging by RNC */
@@ -1096,6 +1114,7 @@ testcase TC_paging_imsi_nochan_rnc() runs on test_CT {
var template BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := { cIl_RNC := { int2oct(13, 2) } };
f_pageing_helper('001010000000013'H, cid_list, c_BtsId_all);
+ f_shutdown_helper();
}
/* Paging by LAC+RNC */
@@ -1103,6 +1122,7 @@ testcase TC_paging_imsi_nochan_lac_rnc() runs on test_CT {
var template BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := { cIl_LAC_RNC := { ts_BSSMAP_CI_LAC_RNC(cid.lac, 14) } };
f_pageing_helper('001010000000014'H, cid_list, c_BtsId_all);
+ f_shutdown_helper();
}
/* Paging on multiple cells (multiple entries in list): Verify all of them page */
@@ -1110,6 +1130,7 @@ testcase TC_paging_imsi_nochan_lacs() runs on test_CT {
var template BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := { cIl_LAC := { ts_BSSMAP_CI_LAC(1), ts_BSSMAP_CI_LAC(2) } };
f_pageing_helper('001010000000015'H, cid_list, c_BtsId_all);
+ f_shutdown_helper();
}
/* Paging on empty list: Verify none of them page */
@@ -1117,6 +1138,7 @@ testcase TC_paging_imsi_nochan_lacs_empty() runs on test_CT {
var template BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := { cIl_LAC := { } };
f_pageing_helper('001010000000016'H, cid_list, c_BtsId_none);
+ f_shutdown_helper();
}
/* Verify paging retransmission interval + count */
@@ -1145,6 +1167,8 @@ testcase TC_paging_imsi_load() runs on test_CT {
setverdict(pass);
}
}
+
+ f_shutdown_helper();
}
/* Verify Paging Counter */
@@ -1181,8 +1205,8 @@ testcase TC_paging_counter() runs on test_CT {
f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", i, "paging:expired",
paging_expired_bts[i]+1);
}
- setverdict(pass);
+ f_shutdown_helper();
}
@@ -1224,6 +1248,8 @@ testcase TC_paging_imsi_a_reset() runs on test_CT {
setverdict(pass);
}
}
+
+ f_shutdown_helper();
}
/* Test RSL link drop causes counter increment */