diff options
Diffstat (limited to 'tests/msc_vlr/msc_vlr_test_gsm_authen.c')
-rw-r--r-- | tests/msc_vlr/msc_vlr_test_gsm_authen.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c index 22e549b2f..44e405232 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c @@ -83,7 +83,9 @@ void test_gsm_authen() VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); + expect_bssap_clear(); gsup_rx("06010809710000004026f0", 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"); @@ -111,8 +113,10 @@ void test_gsm_authen() btw("a USSD request is serviced"); dtap_expect_tx_ussd("Your extension is 46071\r"); + expect_bssap_clear(); ms_sends_msg("0b3b1c15a11302010002013b300b04010f0406aa510c061b017f0100"); OSMO_ASSERT(dtap_tx_confirmed); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); btw("all requests serviced, conn has been released"); EXPECT_CONN_COUNT(0); @@ -191,14 +195,18 @@ void test_gsm_authen() btw("MS also sends RP-ACK, MSC in turn sends CP-ACK for that"); dtap_expect_tx("0904"); + expect_bssap_clear(); ms_sends_msg("890106020041020000"); VERBOSE_ASSERT(dtap_tx_confirmed, == true, "%d"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); btw("SMS is done, conn is gone"); EXPECT_CONN_COUNT(0); BTW("subscriber detaches"); + expect_bssap_clear(); ms_sends_msg("050130089910070000006402"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); EXPECT_CONN_COUNT(0); clear_vlr(); @@ -283,7 +291,9 @@ void test_gsm_authen_tmsi() vlr_subscr_put(vsub); btw("MS sends TMSI Realloc Complete"); + expect_bssap_clear(); ms_sends_msg("055b"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); btw("LU was successful, and the conn has already been closed"); EXPECT_CONN_COUNT(0); @@ -318,8 +328,10 @@ void test_gsm_authen_tmsi() btw("a USSD request is serviced"); dtap_expect_tx_ussd("Your extension is 46071\r"); + expect_bssap_clear(); ms_sends_msg("0b3b1c15a11302010002013b300b04010f0406aa510c061b017f0100"); OSMO_ASSERT(dtap_tx_confirmed); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); btw("all requests serviced, conn has been released"); EXPECT_CONN_COUNT(0); @@ -398,8 +410,10 @@ void test_gsm_authen_tmsi() btw("MS also sends RP-ACK, MSC in turn sends CP-ACK for that"); dtap_expect_tx("0904"); + expect_bssap_clear(); ms_sends_msg("890106020041020000"); VERBOSE_ASSERT(dtap_tx_confirmed, == true, "%d"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); btw("SMS is done, conn is gone"); EXPECT_CONN_COUNT(0); @@ -408,7 +422,9 @@ void test_gsm_authen_tmsi() * deallocated and we no longer know the TMSI. This case is covered by * test_lu_unknown_tmsi(), so here I'd like to still have the TMSI. BTW("subscriber detaches, using TMSI"); + expect_bssap_clear(); ms_sends_msg("050130" "05f4" "03020100"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); EXPECT_CONN_COUNT(0); */ @@ -449,7 +465,9 @@ void test_gsm_authen_tmsi() vlr_subscr_put(vsub); btw("MS sends TMSI Realloc Complete"); + expect_bssap_clear(); ms_sends_msg("055b"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); btw("LU was successful, and the conn has already been closed"); EXPECT_CONN_COUNT(0); @@ -463,7 +481,9 @@ void test_gsm_authen_tmsi() vlr_subscr_put(vsub); BTW("subscriber detaches, using new TMSI"); + expect_bssap_clear(); ms_sends_msg("050130" "05f4" "07060504"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); EXPECT_CONN_COUNT(0); clear_vlr(); @@ -542,7 +562,9 @@ void test_gsm_authen_imei() thwart_rx_non_initial_requests(); btw("MS replies with an Identity Response"); + expect_bssap_clear(); ms_sends_msg("0559084a32244332244332"); + 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"); @@ -555,7 +577,9 @@ void test_gsm_authen_imei() vlr_subscr_put(vsub); BTW("subscriber detaches"); + expect_bssap_clear(); ms_sends_msg("050130089910070000006402"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); EXPECT_CONN_COUNT(0); clear_vlr(); @@ -654,7 +678,9 @@ void test_gsm_authen_tmsi_imei() vlr_subscr_put(vsub); btw("MS sends TMSI Realloc Complete"); + expect_bssap_clear(); ms_sends_msg("055b"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); btw("LU was successful, and the conn has already been closed"); EXPECT_CONN_COUNT(0); @@ -667,7 +693,9 @@ void test_gsm_authen_tmsi_imei() vlr_subscr_put(vsub); BTW("subscriber detaches, using TMSI"); + expect_bssap_clear(); ms_sends_msg("050130" "05f4" "03020100"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); EXPECT_CONN_COUNT(0); clear_vlr(); @@ -749,7 +777,9 @@ void test_gsm_milenage_authen() VERBOSE_ASSERT(lu_result_sent, == RES_NONE, "%d"); btw("HLR also sends GSUP _UPDATE_LOCATION_RESULT"); + expect_bssap_clear(); gsup_rx("06010809710000000156f0", 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"); @@ -780,8 +810,10 @@ void test_gsm_milenage_authen() btw("a USSD request is serviced"); dtap_expect_tx_ussd("Your extension is 42342\r"); + expect_bssap_clear(); ms_sends_msg("0b3b1c15a11302010002013b300b04010f0406aa510c061b017f0100"); OSMO_ASSERT(dtap_tx_confirmed); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); btw("all requests serviced, conn has been released"); EXPECT_CONN_COUNT(0); @@ -863,15 +895,19 @@ void test_gsm_milenage_authen() btw("MS also sends RP-ACK, MSC in turn sends CP-ACK for that"); dtap_expect_tx("0904"); + expect_bssap_clear(); ms_sends_msg("890106020041020000"); VERBOSE_ASSERT(dtap_tx_confirmed, == true, "%d"); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); btw("SMS is done, conn is gone"); EXPECT_CONN_COUNT(0); BTW("subscriber detaches"); + expect_bssap_clear(); ms_sends_msg("050130" "089910070000106005" /* IMSI */); + VERBOSE_ASSERT(bssap_clear_sent, == true, "%d"); EXPECT_CONN_COUNT(0); clear_vlr(); |