diff options
author | Harald Welte <laforge@osmocom.org> | 2022-05-06 16:20:51 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2022-05-06 16:20:51 +0200 |
commit | c6a8acc54c2303d8771b451e85207c825139071d (patch) | |
tree | d10492fb7973b8cc3215cfa502336e68e6466f8e | |
parent | cf81e0f89233c0e2f020ebd2974830503a39b95d (diff) |
HACK: BSC_Tests.TC_paging_loadlaforge/paging_load
WIP HACK
Change-Id: I0f36222e0da62b7178cc0d8b11a82a8cd9f1a153
-rw-r--r-- | bsc/BSC_Tests.ttcn | 28 | ||||
-rw-r--r-- | remsim/RemsimBankd_Tests.ttcn | 29 |
2 files changed, 52 insertions, 5 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index b35d316c..fbec5c99 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -77,7 +77,7 @@ import from TCCConversion_Functions all; type record of integer integer_list; -const integer NUM_BTS := 3; +const integer NUM_BTS := 30; const integer NUM_BTS_CFG := 4; /* we have 4 BTS in the osmo-bsc.cfg (for inter-BSC HO tests) but use only 3 */ const integer NUM_MSC := 3; const float T3101_MAX := 12.0; @@ -936,7 +936,7 @@ runs on test_CT { clnt.vc_IPA := IPA_Emulation_CT.create(clnt.id & "-IPA") alive; clnt.ccm_pars := c_IPA_default_ccm_pars; clnt.ccm_pars.name := "Osmocom TTCN-3 BTS Simulator"; - clnt.ccm_pars.unit_id := int2str(1234+i) & "/0/0"; + clnt.ccm_pars.unit_id := int2str(1+i) & "/0/0"; if (handler_mode) { clnt.vc_RSL := RSL_Emulation_CT.create(clnt.id & "-RSL") alive; connect(clnt.vc_RSL:CCHAN_PT, self:RSL_CCHAN[i]); @@ -1003,7 +1003,7 @@ function f_wait_oml(integer bts_nr, charstring status, float secs_max) runs on t T.stop; /* the 'degraded' state exists from OML connection time, and we have to wait * until all MO's are initialized */ - T.start(1.0); + T.start(0.1); T.timeout; return; } @@ -11379,6 +11379,28 @@ testcase TC_ratectr_all_available_allocated_dyn() runs on test_CT { f_shutdown_helper(); } +/* Verify Paging Counter */ +testcase TC_paging_load() runs on test_CT { + var BSSMAP_FIELD_CellIdentificationList cid_list; + var integer i; + cid_list := valueof(ts_BSSMAP_CIL_noCell); + + f_init(guard_timeout := 600.0); + + for (i := 0; i < 10000; i := i+1) { + var hexstring imsi := f_gen_imsi(i); + BSSAP.send(ts_BSSAP_UNITDATA_req(g_bssap[0].sccp_addr_peer, g_bssap[0].sccp_addr_own, + ts_BSSMAP_Paging(imsi, cid_list, omit, omit))); + f_sleep(0.01); + } + + f_sleep(12.0); + + f_shutdown_helper(); +} + + + control { /* CTRL interface testing */ execute( TC_ctrl_msc_connection_status() ); diff --git a/remsim/RemsimBankd_Tests.ttcn b/remsim/RemsimBankd_Tests.ttcn index a2686d30..c31c939c 100644 --- a/remsim/RemsimBankd_Tests.ttcn +++ b/remsim/RemsimBankd_Tests.ttcn @@ -61,8 +61,8 @@ private function f_init(boolean start_client := false) runs on bankd_test_CT { private function f_init_client(integer i := 0) runs on rspro_client_CT { var ComponentIdentity clnt_comp_id := valueof(ts_CompId(remsimClient, "ttcn-client")); - f_rspro_init(rspro[0], mp_bankd_ip, mp_bankd_port, clnt_comp_id, 0); - rspro[0].rspro_client_slot := { clientId := 23+i, slotNr := 0 }; + f_rspro_init(rspro[i], mp_bankd_ip, mp_bankd_port, clnt_comp_id, i); + rspro[i].rspro_client_slot := { clientId := 23+i, slotNr := 0 }; } @@ -328,6 +328,30 @@ testcase TC_createMapping_clientReconnect() runs on bankd_test_CT { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } +/* add mapping, connect matching client, then connect another client with same ID */ +testcase TC_createMapping_clientConnectAgain() runs on bankd_test_CT { + /* FIXME: this would only be done in f_init_client(), but we need it before */ + rspro[0].rspro_client_slot := { clientId := 23+0, slotNr := 0 }; + + f_init(); + as_connectBankReq(bid := mp_bank_id, nslots := mp_num_slots); + f_rspro_srv_reset_state(ok); + + var BankSlot bs := { bankId := mp_bank_id, slotNr := 0 }; + f_rspro_srv_create_slotmap(rspro[0].rspro_client_slot, bs); + + f_sleep(1.0); + + f_init_client(0); + f_rspro_connect_client(0, tr_Status_ok_or_nocard); + + f_init_client(1); + /* use same identity as first client */ + rspro[1].rspro_client_slot := rspro[0].rspro_client_slot; + f_rspro_connect_client(1, tr_Status_ok_or_nocard); + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); +} /* remove mapping while client is connected */ @@ -426,6 +450,7 @@ control { execute( TC_clientConnect_createMapping() ); execute( TC_createMapping_clientConnect() ); execute( TC_createMapping_clientReconnect() ); + execute( TC_createMapping_clientConnectAgain() ); execute( TC_removeMapping_connected() ); execute( TC_createMapping_connectClient_changeMapping() ); |