aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gb/gprs_ns_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gb/gprs_ns_test.c')
-rw-r--r--tests/gb/gprs_ns_test.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/gb/gprs_ns_test.c b/tests/gb/gprs_ns_test.c
index 00b8732e..a742130f 100644
--- a/tests/gb/gprs_ns_test.c
+++ b/tests/gb/gprs_ns_test.c
@@ -710,6 +710,24 @@ static void test_bss_reset_ack()
send_ns_reset_ack(nsi, nse[0], 0xf001, 0x1000);
gprs_dump_nsi(nsi);
+ /* Test crossing RESET and UNBLOCK_ACK */
+
+ printf("--- RESET (BSS -> SGSN) crossing an UNBLOCK_ACK (SGSN -> BSS) ---\n\n");
+
+ setup_ns(nsi, nse[0], 0x1001, 0x1000);
+ nsvc = gprs_nsvc_by_nsvci(nsi, 0x1001);
+ gprs_nsvc_reset(nsvc, NS_CAUSE_OM_INTERVENTION);
+ OSMO_ASSERT(nsvc->state & NSE_S_BLOCKED);
+ OSMO_ASSERT(nsvc->state & NSE_S_RESET);
+ send_ns_unblock_ack(nsi, nse[0]);
+ gprs_dump_nsi(nsi);
+ send_ns_reset_ack(nsi, nse[0], 0x1001, 0x1000);
+ expire_nsvc_timer(nsvc);
+ OSMO_ASSERT(nsvc->state & NSE_S_BLOCKED);
+ OSMO_ASSERT(nsvc->state & NSE_S_RESET);
+ send_ns_reset_ack(nsi, nse[0], 0x1001, 0x1000);
+ gprs_dump_nsi(nsi);
+
gprs_ns_destroy(nsi);
nsi = NULL;
}