pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28949 )
Change subject: cbc: Introduce test TC_cell_failure_restart_active_{cbc,mme}
......................................................................
cbc: Introduce test TC_cell_failure_restart_active_{cbc,mme}
These tests are currently failing since osmo-cbc doesn't support
reloading cells yet.
Related: OS#5641
Change-Id: I7b1c5275eff56888268601b481e8f8c1dd1bb1b0
---
M cbc/CBC_Tests.ttcn
1 file changed, 122 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/49/28949/1
diff --git a/cbc/CBC_Tests.ttcn b/cbc/CBC_Tests.ttcn
index c1b368e..af8ca27 100644
--- a/cbc/CBC_Tests.ttcn
+++ b/cbc/CBC_Tests.ttcn
@@ -788,6 +788,125 @@
f_shutdown_helper();
}
+/* Test cell actively broadcasting a message in BSC going unavailable for
+ broadcasting and going available again. The CBC should reload the announced
+ cell with the active messages. See 3GPP TS 48.049 7.8 */
+private function f_bsc_TC_cell_failure_restart_active_bsc() runs on BSC_ConnHdlr {
+ var template (value) CBSP_FailureListItems fail_list := {
+ CBSP_FailureListItem_CGI(g_pars.cell_list_success.cIl_CGI[0], CBSP_CAUSE_CB_NOT_OPERATIONAL)
+ };
+ var template (value) BSSMAP_FIELD_CellIdentificationList cell_list := ts_BSSMAP_CIL_CGI({
+ g_pars.cell_list_success.cIl_CGI[0]
+ });
+
+ /* Guide cell into active broadcast msg state: */
+ f_cbsp_handle_write(g_pars.exp_cbs_msg, 0, g_pars.cell_list_success);
+
+ /* BSC reports the cell is down */
+ f_cbsp_send(ts_CBSP_FAILURE(fail_list, CBSP_BC_MSGT_CBS));
+ f_cbsp_send(ts_CBSP_FAILURE(fail_list, CBSP_BC_MSGT_EMERG));
+ f_sleep(1.0);
+
+ /* BSC reports the cell is up again */
+ f_cbsp_send(ts_CBSP_RESTART(cell_list, CBSP_BC_MSGT_CBS, CBSP_RI_DATA_LOST));
+ f_cbsp_send(ts_CBSP_RESTART(cell_list, CBSP_BC_MSGT_EMERG, CBSP_RI_DATA_LOST));
+
+/* TODO: OS#5641
+ * The BSC informs the CBC by sending the RESTART message (see figure 7.8.2.1)
+ * containing the Cell List IE identifying the cell(s) being in CBS message
+ * operational state or in emergency message operational state and the Recovery
+ * Indication IE, indicating whether the broadcast information data is lost or
+ * not in the BSC.
+ * The RESTART message is sent once per broadcast message type
+ * as indicated by the Broadcast Message Type IE.
+ */
+ f_bsc_create_and_delete();
+}
+testcase TC_cell_failure_restart_active_bsc() runs on test_CT {
+ f_init(num_bsc := 1);
+ var template (value) BSSMAP_FIELD_CellIdentificationList cell_list_success;
+ var template (value) CBS_Message msg := t_CBSmsg(43, 16752);
+
+ cell_list_success := ts_BSSMAP_CIL_CGI({
+ ts_BSSMAP_CI_CGI('901'H, '70'H, 23, 42)
+ });
+ g_pars_BSC[0].start_fn := refers(f_bsc_TC_cell_failure_restart_active_bsc);
+ g_pars_BSC[0].exp_cbs_msg := valueof(msg);
+ g_pars_BSC[0].cell_list_success := valueof(cell_list_success);
+ f_start();
+
+ var EcbeCbcMessage ecbe := f_cbs2ecbe(valueof(msg), "TTCN-3");
+ f_ecbe_tx_post_cbs(ecbe);
+ f_ecbe_rx_resp(201);
+
+ f_shutdown_helper();
+}
+
+/* Test cell actively broadcasting a message in MME going unavailable for
+ broadcasting and going available again. The CBC should reload the announced
+ cell with the active messages. See 3GPP TS 29.168 4.3.3E.2 */
+private function f_mme_TC_cell_failure_restart_active_mme() runs on MME_ConnHdlr {
+ var template (value) Global_ENB_ID enb_id := ts_Global_ENB_ID_MACRO(f_enc_mcc_mnc('901'H, '70'H), 90);
+ var template (value) Failed_Cell_List fail_list := {
+ g_pars.bcast_cell_id_list[0].eCGI
+ }
+ var template (value) Restarted_Cell_List cell_list := {
+ g_pars.bcast_cell_id_list[0].eCGI
+ };
+ /* Guide cell into active broadcast msg state: */
+ f_sbcap_handle_write_replace_warn_req(g_pars.exp_cbs_msg, 0);
+ if (ispresent(g_pars.write_replace_warning_ind_cause) and
+ ispresent(g_pars.bcast_cell_id_list)) {
+ f_sbcap_tx_write_replace_warn_ind(0, g_pars.exp_cbs_msg,
+ g_pars.write_replace_warning_ind_cause,
+ g_pars.bcast_cell_id_list)
+ }
+
+ /* MME reports the cell is down */
+ f_SBC_AP_send(ts_SBCAP_PWS_FAILURE(fail_list, enb_id));
+
+ f_sleep(1.0);
+
+ /* MME reports the cell is up again */
+ f_SBC_AP_send(ts_SBCAP_PWS_RESTART(cell_list, enb_id));
+
+/* TODO: OS#5641
+ * The CBC shall reload the warning message data (with the same Message
+ * Identifier and Serial Number) to the (H)eNB by initiating Write Replace
+ * Warning procedure(s) as specified in clause 4.3.3.2 with the following
+ * additions:
+ * - the CBC should set the Warning Area List IE in the Write-Replace
+ * Warning Request message to the identities of the cell(s) received in the
+ * Restarted-Cell-List which are relevant to the warning message data being
+ * reloaded;
+ * - the CBC shall copy the Global eNB ID into the Write-Replace
+ * Warning Request message; and
+ * - the CBC may update the Number of Broadcast Requested, if necessary.
+ */
+ f_mme_create_and_delete();
+}
+testcase TC_cell_failure_restart_active_mme() runs on test_CT {
+ var template (value) CellId_Broadcast_List bcast_cell_id_li;
+ var template (value) CBS_Message msg := t_CBSmsg(48, 16752);
+
+ f_init(num_bsc := 0, num_mme := 1);
+
+ bcast_cell_id_li := {
+ ts_SBCAP_CellId_Broadcast_List_Item(ts_SBCAP_ECGI(f_enc_mcc_mnc('901'H, '70'H), 1234))
+ };
+ g_pars_MME[0].start_fn := refers(f_mme_TC_cell_failure_restart_active_mme);
+ g_pars_MME[0].exp_cbs_msg := valueof(msg);
+ g_pars_MME[0].write_replace_warning_ind_cause := SBC_AP_Cause_message_accepted;
+ g_pars_MME[0].bcast_cell_id_list := valueof(bcast_cell_id_li);
+ f_start();
+
+ var EcbeCbcMessage ecbe := f_cbs2ecbe(valueof(msg), "TTCN-3");
+ f_ecbe_tx_post_cbs(ecbe);
+ f_ecbe_rx_resp(201);
+
+ f_shutdown_helper();
+}
+
control {
execute( TC_rx_keepalive() );
execute( TC_rx_keepalive_timeout() );
@@ -811,6 +930,9 @@
execute( TC_cell_failure_restart_idle_bsc() );
execute( TC_cell_failure_restart_idle_mme() );
+
+ execute( TC_cell_failure_restart_active_bsc() );
+ execute( TC_cell_failure_restart_active_mme() );
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28949
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: I7b1c5275eff56888268601b481e8f8c1dd1bb1b0
Gerrit-Change-Number: 28949
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: msuraev.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28846 )
Change subject: Make esme struct shared
......................................................................
Patch Set 15:
(1 comment)
File src/libmsc/smpp_smsc.c:
https://gerrit.osmocom.org/c/osmo-msc/+/28846/comment/03cac104_84808772
PS7, Line 895: esme->esme->own_seq_nr = rand();
> ESME stands for External Short Message Entities so it's tied to the SMPP connection. […]
If there's only a user of the struct emse struct then I'm not sure I'm following the need to move it into an own library.
If you are moving it to a libray for whatever reason, I'd expect to move/enclose as much implementation in there, not do it only half way.
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28846
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I8f7ac2c00d16660925dd0b03aa1a0973edf9eb70
Gerrit-Change-Number: 28846
Gerrit-PatchSet: 15
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 05 Aug 2022 16:06:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: msuraev.
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28848 )
Change subject: SMPP: move read/write callbacks to libsmpputil
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28848
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I875eb5249004d3a960aee46c5099592d18fcaa76
Gerrit-Change-Number: 28848
Gerrit-PatchSet: 22
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 05 Aug 2022 15:52:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: pespin.
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28846 )
Change subject: Make esme struct shared
......................................................................
Patch Set 15:
(1 comment)
File src/libmsc/smpp_smsc.c:
https://gerrit.osmocom.org/c/osmo-msc/+/28846/comment/16bcf348_a9655ed0
PS7, Line 895: esme->esme->own_seq_nr = rand();
> Move to a different "struct esme" API? esme_init()
ESME stands for External Short Message Entities so it's tied to the SMPP connection. I can move it to esme_init() but I don't see any benefits since the only caller would be this callback anyway.
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28846
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I8f7ac2c00d16660925dd0b03aa1a0973edf9eb70
Gerrit-Change-Number: 28846
Gerrit-PatchSet: 15
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 05 Aug 2022 15:50:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-msc/+/28846
to look at the new patch set (#15).
Change subject: Make esme struct shared
......................................................................
Make esme struct shared
This helps to merge similar code from smpp_mirror and smpp_* in follow-up patches.
Related: OS#5568
Change-Id: I8f7ac2c00d16660925dd0b03aa1a0973edf9eb70
---
M include/osmocom/smpp/smpp.h
M include/osmocom/smpp/smpp_smsc.h
M src/libsmpputil/smpp_msc.c
M src/libsmpputil/smpp_smsc.c
M src/libsmpputil/smpp_vty.c
M src/utils/smpp_mirror.c
6 files changed, 86 insertions(+), 91 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/46/28846/15
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28846
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I8f7ac2c00d16660925dd0b03aa1a0973edf9eb70
Gerrit-Change-Number: 28846
Gerrit-PatchSet: 15
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28846 )
Change subject: Make esme struct shared
......................................................................
Patch Set 14:
(5 comments)
This change is ready for review.
File src/libmsc/smpp_smsc.c:
https://gerrit.osmocom.org/c/osmo-msc/+/28846/comment/4b37e93c_e70e7273
PS7, Line 163: struct esme *esme = acl->esme->esme;
> Not sure what doyouwin with this change here. In fact, it looks more confusing.
See the follow-up comment.
https://gerrit.osmocom.org/c/osmo-msc/+/28846/comment/b5393444_d82d7513
PS7, Line 242: osmo_wqueue_clear(&esme->esme->wqueue);
> Sound like you want to move this block to some API to free the "struct esme" and put it by the side […]
Yes, the common part is in "struct_esme" while the MSC-specific parts are in "struct osmo_esme" which now includes the link (*esme) to it.
https://gerrit.osmocom.org/c/osmo-msc/+/28846/comment/91e052d1_e49d17ab
PS7, Line 330: static int pack_and_send(struct esme *esme, uint32_t type, void *ptr)
> IIUC this calls can go now to some other file containing "struct esme" APIs.
They will in a follow-up patch. I've decided to split renaming into separate patch to make it easier to review.
https://gerrit.osmocom.org/c/osmo-msc/+/28846/comment/ea2debab_e0f654c2
PS7, Line 384: static int smpp_handle_gen_nack(struct osmo_esme *esme, struct msgb *msg)
> this can be probably changed to "struct esme"
Done
https://gerrit.osmocom.org/c/osmo-msc/+/28846/comment/dda4375e_653ef377
PS7, Line 864: osmo_fd_unregister(&esme->esme->wqueue.bfd);
> THis can be moved to a "struct esme" API in a different file?
It'll be removed in follow-up patch as part of migration to libosmo-netif
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28846
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I8f7ac2c00d16660925dd0b03aa1a0973edf9eb70
Gerrit-Change-Number: 28846
Gerrit-PatchSet: 14
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 05 Aug 2022 15:44:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment