From dbaf3bd3fed4d433cb7851f9eaea8b3e8db5e59e Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 1 Mar 2018 15:52:53 +0100 Subject: OS#2983 Change-Id: Ibf1ab50536e971543d846e3bb4c5c3762390ccc8 --- tests/msc_vlr/msc_vlr_test_rest.c | 36 +++++++++++ tests/msc_vlr/msc_vlr_test_rest.err | 124 ++++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) diff --git a/tests/msc_vlr/msc_vlr_test_rest.c b/tests/msc_vlr/msc_vlr_test_rest.c index cb5e24f42..8d3fc6000 100644 --- a/tests/msc_vlr/msc_vlr_test_rest.c +++ b/tests/msc_vlr/msc_vlr_test_rest.c @@ -191,10 +191,46 @@ void test_lu_unknown_tmsi(uint8_t nr, const char *imsi) comment_end(nr, imsi); } +void test_bb_lu(uint8_t nr, const char *imsi) +{ + comment_start(nr, imsi); + + btw("Location Update request causes a GSUP LU request to HLR"); + lu_result_sent = RES_NONE; + gsup_expect_tx("04010809710000000000f1"); + ms_sends_msg("05087009f107000033089910070000000010"); + OSMO_ASSERT(gsup_tx_confirmed); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT"); + gsup_rx("10010809710000000000f108030288f8", + "12010809710000000000f1"); + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("having received subscriber data does not mean acceptance"); + EXPECT_ACCEPTED(false); + + thwart_rx_non_initial_requests(); + + VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); + + btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); + expect_bssap_clear(); + gsup_rx("06010809710000000000f1", NULL); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); + + btw("LU was successful, and the conn has already been closed"); + VERBOSE_ASSERT(lu_result_sent, == RES_ACCEPT, "%d"); + EXPECT_CONN_COUNT(0); + clear_vlr(); + comment_end(nr, imsi); +} + msc_vlr_test_func_t msc_vlr_tests[] = { test_early_stage, test_cm_service_without_lu, test_two_lu, test_lu_unknown_tmsi, + test_bb_lu, NULL }; diff --git a/tests/msc_vlr/msc_vlr_test_rest.err b/tests/msc_vlr/msc_vlr_test_rest.err index fbfb3d7ef..7327f8229 100644 --- a/tests/msc_vlr/msc_vlr_test_rest.err +++ b/tests/msc_vlr/msc_vlr_test_rest.err @@ -491,6 +491,130 @@ DREF freeing VLR subscr MSISDN:46071 full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 7 +===== [5] test_bb_lu(901700000004620)... +- Location Update request causes a GSUP LU request to HLR + MSC <--RAN_GERAN_A-- MS: GSM48_MT_MM_LOC_UPD_REQUEST + new conn +DREF unknown: MSC conn use + compl_l3 == 1 (0x1) +DRLL Dispatching 04.08 message GSM48_MT_MM_LOC_UPD_REQUEST (0x5:0x8) +DREF unknown: MSC conn use + fsm == 2 (0x5) +DMM Subscr_Conn(901700000000001){SUBSCR_CONN_S_INIT}: Allocated +DMM Subscr_Conn(901700000000001){SUBSCR_CONN_S_INIT}: Received Event SUBSCR_CONN_E_START +DMM Subscr_Conn(901700000000001){SUBSCR_CONN_S_INIT}: state_chg to SUBSCR_CONN_S_NEW +DMM LOCATION UPDATING REQUEST: MI(IMSI)=901700000000001 type=NORMAL +DMM LU/new-LAC: 0/23 +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_IDLE}: Allocated +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_IDLE}: is child of Subscr_Conn(901700000000001) +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_IDLE}: rev=GSM net=GERAN (no Auth) +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_IDLE}: Received Event VLR_ULA_E_UPDATE_LA +DREF VLR subscr unknown usage increases to: 1 +DVLR set IMSI on subscriber; IMSI=901700000000001 id=901700000000001 +DVLR New subscr, IMSI: 901700000000001 +DREF VLR subscr IMSI:901700000000001 usage increases to: 2 +DREF VLR subscr IMSI:901700000000001 usage decreases to: 1 +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_IDLE}: vlr_loc_upd_node1() +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_IDLE}: vlr_loc_upd_post_auth() +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_IDLE}: vlr_loc_upd_post_ciph() +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_IDLE}: vlr_loc_upd_node_4() +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_IDLE}: state_chg to VLR_ULA_S_WAIT_HLR_UPD +DVLR upd_hlr_vlr_fsm(901700000000001){UPD_HLR_VLR_S_INIT}: Allocated +DVLR upd_hlr_vlr_fsm(901700000000001){UPD_HLR_VLR_S_INIT}: is child of vlr_lu_fsm(901700000000001) +DVLR upd_hlr_vlr_fsm(901700000000001){UPD_HLR_VLR_S_INIT}: Received Event UPD_HLR_VLR_E_START +DVLR GSUP tx: 04010809710000000000f1 +GSUP --> HLR: OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST: 04010809710000000000f1 +DVLR upd_hlr_vlr_fsm(901700000000001){UPD_HLR_VLR_S_INIT}: state_chg to UPD_HLR_VLR_S_WAIT_FOR_DATA +DMM IMSI:901700000000001: bump: conn still being established (SUBSCR_CONN_S_NEW) +DREF IMSI:901700000000001: MSC conn use - compl_l3 == 1 (0x4) + lu_result_sent == 0 +- HLR sends _INSERT_DATA_REQUEST, VLR responds with _INSERT_DATA_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: 10010809710000000000f108030288f8 +DVLR GSUP rx 16: 10010809710000000000f108030288f8 +DREF VLR subscr IMSI:901700000000001 usage increases to: 2 +DVLR IMSI:901700000000001 has MSISDN:888 +DVLR SUBSCR(MSISDN:888) VLR: update for IMSI=901700000000001 (MSISDN=888, used=2) +DVLR GSUP tx: 12010809710000000000f1 +GSUP --> HLR: OSMO_GSUP_MSGT_INSERT_DATA_RESULT: 12010809710000000000f1 +DREF VLR subscr MSISDN:888 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_INSERT_DATA_REQUEST: vlr_gsupc_read_cb() returns 0 + lu_result_sent == 0 +- having received subscriber data does not mean acceptance +msc_subscr_conn_is_accepted() == false + requests shall be thwarted +DRLL Dispatching 04.08 message GSM48_MT_CC_SETUP (0x3:0x5) +DRLL subscr MSISDN:888: Message not permitted for initial conn: GSM48_MT_CC_SETUP +DRLL Dispatching 04.08 message unknown 0x33 (0x5:0x33) +DRLL subscr MSISDN:888: Message not permitted for initial conn: unknown 0x33 +DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19) +DRLL subscr MSISDN:888: Message not permitted for initial conn: GSM48_MT_RR_SYSINFO_1 +DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1) +DRLL subscr MSISDN:888: Message not permitted for initial conn: SMS:0x01 + lu_result_sent == 0 +- HLR also sends GSUP _UPDATE_LOCATION_RESULT +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: 06010809710000000000f1 +DVLR GSUP rx 11: 06010809710000000000f1 +DREF VLR subscr MSISDN:888 usage increases to: 2 +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_HLR_LU_RES +DVLR upd_hlr_vlr_fsm(901700000000001){UPD_HLR_VLR_S_WAIT_FOR_DATA}: Received Event UPD_HLR_VLR_E_UPD_LOC_ACK +DVLR upd_hlr_vlr_fsm(901700000000001){UPD_HLR_VLR_S_WAIT_FOR_DATA}: state_chg to UPD_HLR_VLR_S_DONE +DVLR upd_hlr_vlr_fsm(901700000000001){UPD_HLR_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR upd_hlr_vlr_fsm(901700000000001){UPD_HLR_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000000001) +DVLR upd_hlr_vlr_fsm(901700000000001){UPD_HLR_VLR_S_DONE}: Freeing instance +DVLR upd_hlr_vlr_fsm(901700000000001){UPD_HLR_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_WAIT_HLR_UPD}: Received Event VLR_ULA_E_UPD_HLR_COMPL +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_WAIT_HLR_UPD}: state_chg to VLR_ULA_S_WAIT_LU_COMPL +DVLR lu_compl_vlr_fsm(901700000000001){LU_COMPL_VLR_S_INIT}: Allocated +DVLR lu_compl_vlr_fsm(901700000000001){LU_COMPL_VLR_S_INIT}: is child of vlr_lu_fsm(901700000000001) +DVLR lu_compl_vlr_fsm(901700000000001){LU_COMPL_VLR_S_INIT}: Received Event LU_COMPL_VLR_E_START +DVLR lu_compl_vlr_fsm(901700000000001){LU_COMPL_VLR_S_INIT}: state_chg to LU_COMPL_VLR_S_WAIT_SUB_PRES +DVLR sub_pres_vlr_fsm(901700000000001){SUB_PRES_VLR_S_INIT}: Allocated +DVLR sub_pres_vlr_fsm(901700000000001){SUB_PRES_VLR_S_INIT}: is child of lu_compl_vlr_fsm(901700000000001) +DVLR sub_pres_vlr_fsm(901700000000001){SUB_PRES_VLR_S_INIT}: Received Event SUB_PRES_VLR_E_START +DVLR sub_pres_vlr_fsm(901700000000001){SUB_PRES_VLR_S_INIT}: state_chg to SUB_PRES_VLR_S_DONE +DVLR sub_pres_vlr_fsm(901700000000001){SUB_PRES_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR sub_pres_vlr_fsm(901700000000001){SUB_PRES_VLR_S_DONE}: Removing from parent lu_compl_vlr_fsm(901700000000001) +DVLR sub_pres_vlr_fsm(901700000000001){SUB_PRES_VLR_S_DONE}: Freeing instance +DVLR sub_pres_vlr_fsm(901700000000001){SUB_PRES_VLR_S_DONE}: Deallocated +DVLR lu_compl_vlr_fsm(901700000000001){LU_COMPL_VLR_S_WAIT_SUB_PRES}: Received Event LU_COMPL_VLR_E_SUB_PRES_COMPL +- sending LU Accept for MSISDN:888 +DREF VLR subscr MSISDN:888 usage increases to: 3 +DVLR lu_compl_vlr_fsm(901700000000001){LU_COMPL_VLR_S_WAIT_SUB_PRES}: state_chg to LU_COMPL_VLR_S_DONE +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_WAIT_LU_COMPL}: Received Event VLR_ULA_E_LU_COMPL_SUCCESS +DVLR lu_compl_vlr_fsm(901700000000001){LU_COMPL_VLR_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR lu_compl_vlr_fsm(901700000000001){LU_COMPL_VLR_S_DONE}: Removing from parent vlr_lu_fsm(901700000000001) +DVLR lu_compl_vlr_fsm(901700000000001){LU_COMPL_VLR_S_DONE}: Freeing instance +DVLR lu_compl_vlr_fsm(901700000000001){LU_COMPL_VLR_S_DONE}: Deallocated +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_WAIT_LU_COMPL}: state_chg to VLR_ULA_S_DONE +DMM Subscr_Conn(901700000000001){SUBSCR_CONN_S_NEW}: Received Event SUBSCR_CONN_E_ACCEPTED +DMM Subscr_Conn(901700000000001){SUBSCR_CONN_S_NEW}: SUBSCR_CONN_FROM_LU +DMM Subscr_Conn(901700000000001){SUBSCR_CONN_S_NEW}: state_chg to SUBSCR_CONN_S_ACCEPTED +DMM Subscr_Conn(901700000000001){SUBSCR_CONN_S_ACCEPTED}: Received Event SUBSCR_CONN_E_BUMP +DMM Subscr_Conn(901700000000001){SUBSCR_CONN_S_ACCEPTED}: bump: releasing conn +DMM Subscr_Conn(901700000000001){SUBSCR_CONN_S_ACCEPTED}: state_chg to SUBSCR_CONN_S_RELEASED +DMM Subscr_Conn(901700000000001){SUBSCR_CONN_S_RELEASED}: Terminating (cause = OSMO_FSM_TERM_REGULAR) +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_DONE}: Terminating (cause = OSMO_FSM_TERM_PARENT) +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_DONE}: Removing from parent Subscr_Conn(901700000000001) +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_DONE}: fsm_lu_cleanup called with cause OSMO_FSM_TERM_PARENT +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_DONE}: Freeing instance +DVLR vlr_lu_fsm(901700000000001){VLR_ULA_S_DONE}: Deallocated +DMM msc_subscr_conn_close(vsub=MSISDN:888, cause=2): no conn fsm, releasing directly without release event. +- BSSAP Clear --RAN_GERAN_A--> MS +DREF MSISDN:888: MSC conn use - fsm == 0 (0x0) +DRLL subscr MSISDN:888: Freeing subscriber connection +DREF VLR subscr MSISDN:888 usage decreases to: 2 +DMM Subscr_Conn(901700000000001){SUBSCR_CONN_S_RELEASED}: Freeing instance +DMM Subscr_Conn(901700000000001){SUBSCR_CONN_S_RELEASED}: Deallocated +DREF VLR subscr MSISDN:888 usage decreases to: 1 +<-- GSUP rx OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT: vlr_gsupc_read_cb() returns 0 + bssap_clear_sent == 1 +- LU was successful, and the conn has already been closed + lu_result_sent == 1 + llist_count(&net->subscr_conns) == 0 +DREF freeing VLR subscr MSISDN:888 +===== [5] test_bb_lu(901700000004620): SUCCESS + +full talloc report on 'msgb' (total 0 bytes in 1 blocks) +talloc_total_blocks(tall_bsc_ctx) == 7 + full talloc report on 'msgb' (total 0 bytes in 1 blocks) talloc_total_blocks(tall_bsc_ctx) == 7 -- cgit v1.2.3