This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16496 ) Change subject: remsim: Two new bankd test cases about slotmap re-creation ...................................................................... remsim: Two new bankd test cases about slotmap re-creation If a slotmap is re-created with identical client+bankd, we expect no change and the client-bankd connection to persist. If a slotmap is overwritten with a create for a different client than the currently connected one, we expect the client connection to be closed. Change-Id: If81e1511521fe478d2367104cd1c7eba254d6450 Related: OS#4278 --- M remsim/RemsimBankd_Tests.ttcn 1 file changed, 84 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/remsim/RemsimBankd_Tests.ttcn b/remsim/RemsimBankd_Tests.ttcn index e86dc16..e9e3b31 100644 --- a/remsim/RemsimBankd_Tests.ttcn +++ b/remsim/RemsimBankd_Tests.ttcn @@ -201,6 +201,87 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); } +/* first add mapping, then connect client, then change mapping (expect disconnect) */ +testcase TC_createMapping_connectClient_changeMapping() 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); + + /* create slotmap */ + var BankSlot bs := { bankId := mp_bank_id, slotNr := 0 }; + f_rspro_srv_create_slotmap(rspro[0].rspro_client_slot, bs); + + f_sleep(1.0); + + /* connect client */ + f_init_client(0); + f_rspro_connect_client(0, tr_Status_ok_or_nocard); + /* FIXME: how to determine that bank correctly mapped us */ + + /* create another mapping for the same bank-slot */ + var ClientSlot cs := { clientId := 987, slotNr := 654 }; + f_rspro_srv_create_slotmap(cs, bs); + + /* expect client to be disconnected */ + timer T := 5.0; + T.start; + alt { + [] RSPRO[0].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_DOWN}) { + setverdict(pass); + } + [] RSPRO[0].receive { + setverdict(fail, "Unexpected RSPRO on client connection"); + } + [] T.timeout { + setverdict(fail, "Timeout waiting for client being disconnected"); + } + } + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); +} + +/* first add mapping, then connect client, then re-crete mapping (expect no disconnect) */ +testcase TC_createMapping_connectClient_recreateMapping() 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); + + /* create slotmap */ + var BankSlot bs := { bankId := mp_bank_id, slotNr := 0 }; + f_rspro_srv_create_slotmap(rspro[0].rspro_client_slot, bs); + + f_sleep(1.0); + + /* connect client */ + f_init_client(0); + f_rspro_connect_client(0, tr_Status_ok_or_nocard); + /* FIXME: how to determine that bank correctly mapped us */ + + /* re-create same mapping for the same bank-slot */ + f_rspro_srv_create_slotmap(rspro[0].rspro_client_slot, bs); + + /* expect client not to be disconnected */ + timer T := 5.0; + T.start; + alt { + [] RSPRO[0].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_DOWN}) { + setverdict(fail, "Unexpected client disconnect"); + } + [] RSPRO[0].receive { + repeat; + } + [] T.timeout { + setverdict(pass); + } + } + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, pass); +} + /* add mapping, connect matching client, disconnect + reconnect */ @@ -299,6 +380,9 @@ execute( TC_createMapping_clientReconnect() ); execute( TC_removeMapping_connected() ); + execute( TC_createMapping_connectClient_changeMapping() ); + execute( TC_createMapping_connectClient_recreateMapping() ); + execute( TC_createMapping_exchangeTPDU() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16496 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: If81e1511521fe478d2367104cd1c7eba254d6450 Gerrit-Change-Number: 16496 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191204/52aa2a48/attachment.htm>