test initial context setup failure and handover failure
This commit is contained in:
parent
4b32d7f448
commit
463e40d41b
|
@ -247,6 +247,13 @@ static void attach_test1(abts_case *tc, void *data)
|
||||||
ABTS_TRUE(tc, memcmp(recvbuf->payload+32, tmp+32, 20) == 0);
|
ABTS_TRUE(tc, memcmp(recvbuf->payload+32, tmp+32, 20) == 0);
|
||||||
pkbuf_free(recvbuf);
|
pkbuf_free(recvbuf);
|
||||||
|
|
||||||
|
#if TEST_INITIAL_CONTEXT_SETUP_FAILURE
|
||||||
|
/* Send Initial Context Setup Failure */
|
||||||
|
rv = tests1ap_build_initial_context_setup_failure(&sendbuf, msgindex);
|
||||||
|
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
||||||
|
rv = tests1ap_enb_send(sock, sendbuf);
|
||||||
|
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
||||||
|
#endif
|
||||||
core_sleep(time_from_msec(300));
|
core_sleep(time_from_msec(300));
|
||||||
|
|
||||||
rv = testgtpu_build_slacc_rs(&sendbuf, 0);
|
rv = testgtpu_build_slacc_rs(&sendbuf, 0);
|
||||||
|
|
|
@ -637,6 +637,14 @@ static void handover_test2(abts_case *tc, void *data)
|
||||||
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
||||||
pkbuf_free(recvbuf);
|
pkbuf_free(recvbuf);
|
||||||
|
|
||||||
|
#if TEST_HANDOVER_FAILURE
|
||||||
|
/* Send Handover Failure */
|
||||||
|
rv = tests1ap_build_handover_failure(&sendbuf, 0);
|
||||||
|
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
||||||
|
rv = tests1ap_enb_send(sock1, sendbuf);
|
||||||
|
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Send Handover Request Ack */
|
/* Send Handover Request Ack */
|
||||||
rv = tests1ap_build_handover_request_ack(&sendbuf, 1, 33554629, 8, 2, 5, 1);
|
rv = tests1ap_build_handover_request_ack(&sendbuf, 1, 33554629, 8, 2, 5, 1);
|
||||||
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
ABTS_INT_EQUAL(tc, CORE_OK, rv);
|
||||||
|
|
|
@ -835,6 +835,31 @@ status_t tests1ap_build_initial_context_setup_response(
|
||||||
return CORE_OK;
|
return CORE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status_t tests1ap_build_initial_context_setup_failure(pkbuf_t **pkbuf, int i)
|
||||||
|
{
|
||||||
|
char *payload[TESTS1AP_MAX_MESSAGE] = {
|
||||||
|
"4009 0015000003000040 0200020008400200 01000240020000",
|
||||||
|
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
};
|
||||||
|
c_uint16_t len[TESTS1AP_MAX_MESSAGE] = {
|
||||||
|
25,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
char hexbuf[MAX_SDU_LEN];
|
||||||
|
|
||||||
|
*pkbuf = pkbuf_alloc(0, MAX_SDU_LEN);
|
||||||
|
if (!(*pkbuf)) return CORE_ERROR;
|
||||||
|
|
||||||
|
(*pkbuf)->len = len[i];
|
||||||
|
memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf),
|
||||||
|
(*pkbuf)->len);
|
||||||
|
|
||||||
|
return CORE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
status_t tests1ap_build_attach_complete(pkbuf_t **pkbuf, int i)
|
status_t tests1ap_build_attach_complete(pkbuf_t **pkbuf, int i)
|
||||||
{
|
{
|
||||||
char *payload[TESTS1AP_MAX_MESSAGE] = {
|
char *payload[TESTS1AP_MAX_MESSAGE] = {
|
||||||
|
@ -1949,6 +1974,31 @@ status_t tests1ap_build_handover_required(
|
||||||
return CORE_OK;
|
return CORE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status_t tests1ap_build_handover_failure(pkbuf_t **pkbuf, int i)
|
||||||
|
{
|
||||||
|
char *payload[TESTS1AP_MAX_MESSAGE] = {
|
||||||
|
"4001 0012000002000040 05c0020000c5 000240020000",
|
||||||
|
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
};
|
||||||
|
c_uint16_t len[TESTS1AP_MAX_MESSAGE] = {
|
||||||
|
22,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
};
|
||||||
|
char hexbuf[MAX_SDU_LEN];
|
||||||
|
|
||||||
|
*pkbuf = pkbuf_alloc(0, MAX_SDU_LEN);
|
||||||
|
if (!(*pkbuf)) return CORE_ERROR;
|
||||||
|
|
||||||
|
(*pkbuf)->len = len[i];
|
||||||
|
memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf),
|
||||||
|
(*pkbuf)->len);
|
||||||
|
|
||||||
|
return CORE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
CORE_DECLARE(status_t) tests1ap_build_handover_request_ack(
|
CORE_DECLARE(status_t) tests1ap_build_handover_request_ack(
|
||||||
pkbuf_t **pkbuf, int target,
|
pkbuf_t **pkbuf, int target,
|
||||||
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id,
|
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id,
|
||||||
|
|
|
@ -36,6 +36,8 @@ CORE_DECLARE(status_t) tests1ap_build_initial_context_setup_response(
|
||||||
pkbuf_t **pkbuf,
|
pkbuf_t **pkbuf,
|
||||||
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id,
|
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id,
|
||||||
c_uint8_t ebi, c_uint32_t teid);
|
c_uint8_t ebi, c_uint32_t teid);
|
||||||
|
CORE_DECLARE(status_t) tests1ap_build_initial_context_setup_failure(
|
||||||
|
pkbuf_t **pkbuf, int i);
|
||||||
CORE_DECLARE(status_t) tests1ap_build_attach_complete(pkbuf_t **pkbuf, int i);
|
CORE_DECLARE(status_t) tests1ap_build_attach_complete(pkbuf_t **pkbuf, int i);
|
||||||
CORE_DECLARE(status_t) tests1ap_build_emm_status(pkbuf_t **pkbuf, int i);
|
CORE_DECLARE(status_t) tests1ap_build_emm_status(pkbuf_t **pkbuf, int i);
|
||||||
CORE_DECLARE(status_t) tests1ap_build_detach_request(pkbuf_t **pkbuf, int i);
|
CORE_DECLARE(status_t) tests1ap_build_detach_request(pkbuf_t **pkbuf, int i);
|
||||||
|
@ -74,6 +76,7 @@ CORE_DECLARE(status_t) tests1ap_build_path_switch_request(
|
||||||
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id,
|
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id,
|
||||||
int num_of_bearer, c_uint8_t ebi, c_uint32_t teid);
|
int num_of_bearer, c_uint8_t ebi, c_uint32_t teid);
|
||||||
CORE_DECLARE(status_t) tests1ap_build_handover_required(pkbuf_t **pkbuf, int i);
|
CORE_DECLARE(status_t) tests1ap_build_handover_required(pkbuf_t **pkbuf, int i);
|
||||||
|
CORE_DECLARE(status_t) tests1ap_build_handover_failure(pkbuf_t **pkbuf, int i);
|
||||||
CORE_DECLARE(status_t) tests1ap_build_handover_request_ack(
|
CORE_DECLARE(status_t) tests1ap_build_handover_request_ack(
|
||||||
pkbuf_t **pkbuf, int target,
|
pkbuf_t **pkbuf, int target,
|
||||||
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id,
|
c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id,
|
||||||
|
|
Loading…
Reference in New Issue