diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-02-27 16:51:43 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-03-02 17:06:46 +0100 |
commit | 2f839234b2f547aa27c08fb930b2a988451da7cd (patch) | |
tree | 486e1b926a395ea4a71c01eab0f50785dceac463 /openbsc/tests/msc_vlr/msc_vlr_tests.h | |
parent | 99bddc16848934ce809aaf7fe81376e4616cdc42 (diff) |
conn timeout: implement conn_fsm COMMUNICATING state
When in the ACCEPTED state, if the MS never sent any message, the conn would
stay open indefinitely. Introduce a new state COMMUNICATING, so that the
ACCEPTED state can timeout.
COMMUNICATING starts as soon as the MS first replies with a message for CC, SMS
or USSD negotiation. The CC/SMS/USSD code is then expected to handle timeouts
and BUMP the conn_fsm as appropriate.
Add new test in msc_vlr_test_ms_timeout.c to verify that a CM Service Request
and Paging Response without replies from the MS time out.
Explicitly test for the COMMUNICATING state in msc_vlr_test_no_authen.c, but in
the other tests just rely on the test output validation to ensure that the new
state is entered in the right places.
Change-Id: If7c9acab9ed393874f21231a0f78464c384b3d2f
Diffstat (limited to 'openbsc/tests/msc_vlr/msc_vlr_tests.h')
-rw-r--r-- | openbsc/tests/msc_vlr/msc_vlr_tests.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/tests/msc_vlr/msc_vlr_tests.h b/openbsc/tests/msc_vlr/msc_vlr_tests.h index 82ff51ada..95f210ec2 100644 --- a/openbsc/tests/msc_vlr/msc_vlr_tests.h +++ b/openbsc/tests/msc_vlr/msc_vlr_tests.h @@ -116,6 +116,13 @@ void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks); OSMO_ASSERT(accepted == expect_accepted); \ } while (false) +#define EXPECT_CONN_STATE(expect_state) do { \ + OSMO_ASSERT(conn_exists(g_conn)); \ + log("g_conn->conn_fsm->state == %s", \ + osmo_fsm_inst_state_name(g_conn->conn_fsm)); \ + OSMO_ASSERT(g_conn->conn_fsm->state == expect_state); \ + } while (false) + #define VERBOSE_ASSERT(val, expect_op, fmt) \ do { \ log(#val " == " fmt, (val)); \ |