From 2760585cca854b1ca5ac7e74b015e31c157a66c5 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 15 Jun 2018 23:57:30 +0700 Subject: msc_vlr_tests: don't abuse USSD-request to conclude connections Previously the '*#100#' USSD-request was abused in order to conclude the current subscriber connection. This makes the unit tests depend on each other, for example, if one break something in the GSM 09.11 implementation, a half of tests would fail. Moreover, the further changes in the GSM 09.11 implementation will make the results less predictable (i.e. session ID, etc.). So let's introduce a separate unit test with simple request- response logic, while more complex tests will be in TTCN. Change-Id: I40b4caac3113263f5a06c861dff5e10d43c319b5 --- tests/msc_vlr/msc_vlr_test_gsm_authen.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'tests/msc_vlr/msc_vlr_test_gsm_authen.c') diff --git a/tests/msc_vlr/msc_vlr_test_gsm_authen.c b/tests/msc_vlr/msc_vlr_test_gsm_authen.c index a863d9018..6555fbdb8 100644 --- a/tests/msc_vlr/msc_vlr_test_gsm_authen.c +++ b/tests/msc_vlr/msc_vlr_test_gsm_authen.c @@ -114,12 +114,9 @@ static void test_gsm_authen() ms_sends_msg("0554" "20bde240" /* 2nd vector's sres, s.a. */); VERBOSE_ASSERT(cm_service_result_sent, == RES_ACCEPT, "%d"); - 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"); + /* Release connection */ + expect_bssap_clear(RAN_GERAN_A); + conn_conclude_cm_service_req(g_conn, RAN_GERAN_A); btw("all requests serviced, conn has been released"); bss_sends_clear_complete(); @@ -335,12 +332,9 @@ static void test_gsm_authen_tmsi() ms_sends_msg("0554" "20bde240" /* 2nd vector's sres, s.a. */); VERBOSE_ASSERT(cm_service_result_sent, == RES_ACCEPT, "%d"); - 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"); + /* Release connection */ + expect_bssap_clear(RAN_GERAN_A); + conn_conclude_cm_service_req(g_conn, RAN_GERAN_A); btw("all requests serviced, conn has been released"); bss_sends_clear_complete(); @@ -833,12 +827,9 @@ static void test_gsm_milenage_authen() ms_sends_msg("0554" "85aa3130"); /* 2nd vector's sres, s.a. */ VERBOSE_ASSERT(cm_service_result_sent, == RES_ACCEPT, "%d"); - 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"); + /* Release connection */ + expect_bssap_clear(RAN_GERAN_A); + conn_conclude_cm_service_req(g_conn, RAN_GERAN_A); btw("all requests serviced, conn has been released"); bss_sends_clear_complete(); -- cgit v1.2.3