summaryrefslogtreecommitdiffstats
path: root/openbsc/tests
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2017-01-31 15:34:26 +0100
committerHarald Welte <laforge@gnumonks.org>2017-02-07 00:41:31 +0000
commit4f8da6dfd56a936151fd9d7c647152333c6def1a (patch)
treea31398e73e5a1490343e5a36dcc6decf1463e81c /openbsc/tests
parent48324fed117d3b2d585b80c08449db67384b5a26 (diff)
gprs/sgsn: rename gprs->mm_state -> gmm_state
GMM is the right term. MM state is already occupied. Change-Id: I9cfdcf921e4ebd14a5e7ce7489ec4ce5d1f5515f
Diffstat (limited to 'openbsc/tests')
-rw-r--r--openbsc/tests/sgsn/sgsn_test.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c
index e1fd2e713..bcda9a007 100644
--- a/openbsc/tests/sgsn/sgsn_test.c
+++ b/openbsc/tests/sgsn/sgsn_test.c
@@ -191,7 +191,7 @@ static struct sgsn_mm_ctx *alloc_mm_ctx(uint32_t tlli, struct gprs_ra_id *raid)
lle = gprs_lle_get_or_create(tlli, 3);
ctx = sgsn_mm_ctx_alloc(tlli, raid);
- ctx->mm_state = GMM_REGISTERED_NORMAL;
+ ctx->gmm_state = GMM_REGISTERED_NORMAL;
ctx->gb.llme = lle->llme;
ictx = sgsn_mm_ctx_by_tlli(tlli, raid);
@@ -979,7 +979,7 @@ static void test_gmm_attach(int retry)
ctx = sgsn_mm_ctx_by_tlli(foreign_tlli, &raid);
OSMO_ASSERT(ctx != NULL);
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
/* we expect an identity request (IMEI) */
OSMO_ASSERT(sgsn_tx_counter == 1);
@@ -999,7 +999,7 @@ static void test_gmm_attach(int retry)
* authorization */
OSMO_ASSERT(ctx == sgsn_mm_ctx_by_tlli(foreign_tlli, &raid));
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
retry_attach_req:
@@ -1039,7 +1039,7 @@ retry_attach_req:
send_0408_message(ctx->gb.llme, local_tlli, &raid,
attach_compl, ARRAY_SIZE(attach_compl));
- OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+ OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
/* we don't expect a response */
OSMO_ASSERT(sgsn_tx_counter == 0);
@@ -1567,7 +1567,7 @@ static void test_gmm_cancel(void)
ctx = sgsn_mm_ctx_by_tlli(foreign_tlli, &raid);
OSMO_ASSERT(ctx != NULL);
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
/* we expect an identity request (IMEI) */
OSMO_ASSERT(sgsn_tx_counter == 1);
@@ -1587,7 +1587,7 @@ static void test_gmm_cancel(void)
* authorization */
OSMO_ASSERT(ctx == sgsn_mm_ctx_by_tlli(foreign_tlli, &raid));
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
/* we expect an attach accept/reject */
OSMO_ASSERT(sgsn_tx_counter == 1);
@@ -1601,7 +1601,7 @@ static void test_gmm_cancel(void)
send_0408_message(ctx->gb.llme, foreign_tlli, &raid,
attach_compl, ARRAY_SIZE(attach_compl));
- OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+ OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
/* we don't expect a response */
OSMO_ASSERT(sgsn_tx_counter == 0);
@@ -1715,7 +1715,7 @@ static void test_gmm_ptmsi_allocation(void)
ctx = sgsn_mm_ctx_by_tlli(foreign_tlli, &raid);
OSMO_ASSERT(ctx != NULL);
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
OSMO_ASSERT(ctx->p_tmsi != GSM_RESERVED_TMSI);
ptmsi1 = ctx->p_tmsi;
@@ -1732,7 +1732,7 @@ static void test_gmm_ptmsi_allocation(void)
* authorization */
OSMO_ASSERT(ctx == sgsn_mm_ctx_by_tlli(foreign_tlli, &raid));
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
/* we expect an attach accept */
@@ -1747,7 +1747,7 @@ static void test_gmm_ptmsi_allocation(void)
/* the allocated P-TMSI should be the same */
ctx = sgsn_mm_ctx_by_tlli(foreign_tlli, &raid);
OSMO_ASSERT(ctx != NULL);
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
OSMO_ASSERT(ctx->p_tmsi_old == old_ptmsi);
OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
@@ -1764,7 +1764,7 @@ static void test_gmm_ptmsi_allocation(void)
/* we don't expect a response */
OSMO_ASSERT(sgsn_tx_counter == 0);
- OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+ OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
OSMO_ASSERT(ctx->p_tmsi_old == 0);
OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
@@ -1777,7 +1777,7 @@ static void test_gmm_ptmsi_allocation(void)
/* we expect an RA update accept */
OSMO_ASSERT(sgsn_tx_counter == 1);
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
OSMO_ASSERT(ctx->p_tmsi_old == ptmsi1);
OSMO_ASSERT(ctx->p_tmsi != GSM_RESERVED_TMSI);
OSMO_ASSERT(ctx->p_tmsi != ptmsi1);
@@ -1792,7 +1792,7 @@ static void test_gmm_ptmsi_allocation(void)
received_ptmsi = get_new_ptmsi(&last_dl_parse_ctx);
OSMO_ASSERT(received_ptmsi == ptmsi2);
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
OSMO_ASSERT(ctx->p_tmsi_old == ptmsi1);
OSMO_ASSERT(ctx->p_tmsi == ptmsi2);
@@ -1804,7 +1804,7 @@ static void test_gmm_ptmsi_allocation(void)
/* we don't expect a response */
OSMO_ASSERT(sgsn_tx_counter == 0);
- OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+ OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
OSMO_ASSERT(ctx->p_tmsi_old == 0);
OSMO_ASSERT(ctx->p_tmsi == ptmsi2);
@@ -1940,7 +1940,7 @@ static void test_gmm_routing_areas(void)
ctx = sgsn_mm_ctx_by_tlli(ms_tlli, &raid1);
OSMO_ASSERT(ctx != NULL);
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
OSMO_ASSERT(ctx->p_tmsi != GSM_RESERVED_TMSI);
/* we expect an identity request (IMEI) */
@@ -1956,7 +1956,7 @@ static void test_gmm_routing_areas(void)
* authorization */
OSMO_ASSERT(ctx == sgsn_mm_ctx_by_tlli(ms_tlli, &raid1));
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
/* we expect an attach accept */
OSMO_ASSERT(sgsn_tx_counter == 1);
@@ -1975,7 +1975,7 @@ static void test_gmm_routing_areas(void)
/* we don't expect a response */
OSMO_ASSERT(sgsn_tx_counter == 0);
- OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+ OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
OSMO_ASSERT(ctx->p_tmsi_old == 0);
OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
@@ -1990,7 +1990,7 @@ static void test_gmm_routing_areas(void)
OSMO_ASSERT(last_dl_parse_ctx.g48_hdr->msg_type == GSM48_MT_GMM_RA_UPD_ACK);
// OSMO_ASSERT(last_dl_parse_ctx.tlli == ms_tlli);
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
OSMO_ASSERT(ctx->p_tmsi_old == ptmsi1);
OSMO_ASSERT(ctx->p_tmsi != GSM_RESERVED_TMSI);
OSMO_ASSERT(ctx->p_tmsi != ptmsi1);
@@ -2007,7 +2007,7 @@ static void test_gmm_routing_areas(void)
/* we don't expect a response */
OSMO_ASSERT(sgsn_tx_counter == 0);
- OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+ OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
OSMO_ASSERT(ctx->p_tmsi_old == 0);
OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
OSMO_ASSERT(ctx->gb.tlli == ms_tlli);
@@ -2052,7 +2052,7 @@ static void test_gmm_routing_areas(void)
ctx = sgsn_mm_ctx_by_tlli(ms_tlli, &raid2);
OSMO_ASSERT(ctx != NULL);
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
OSMO_ASSERT(ctx->p_tmsi != GSM_RESERVED_TMSI);
/* we expect an attach accept */
@@ -2075,7 +2075,7 @@ static void test_gmm_routing_areas(void)
/* we don't expect a response */
OSMO_ASSERT(sgsn_tx_counter == 0);
- OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+ OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
OSMO_ASSERT(ctx->p_tmsi_old == 0);
OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
@@ -2089,7 +2089,7 @@ static void test_gmm_routing_areas(void)
OSMO_ASSERT(sgsn_tx_counter == 1);
OSMO_ASSERT(last_dl_parse_ctx.g48_hdr->msg_type == GSM48_MT_GMM_RA_UPD_ACK);
- OSMO_ASSERT(ctx->mm_state == GMM_COMMON_PROC_INIT);
+ OSMO_ASSERT(ctx->gmm_state == GMM_COMMON_PROC_INIT);
OSMO_ASSERT(ctx->p_tmsi_old == ptmsi1);
OSMO_ASSERT(ctx->p_tmsi != GSM_RESERVED_TMSI);
OSMO_ASSERT(ctx->p_tmsi != ptmsi1);
@@ -2106,7 +2106,7 @@ static void test_gmm_routing_areas(void)
/* we don't expect a response */
OSMO_ASSERT(sgsn_tx_counter == 0);
- OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL);
+ OSMO_ASSERT(ctx->gmm_state == GMM_REGISTERED_NORMAL);
OSMO_ASSERT(ctx->p_tmsi_old == 0);
OSMO_ASSERT(ctx->p_tmsi == ptmsi1);
OSMO_ASSERT(ctx->gb.tlli == ms_tlli);