mirror of
				https://github.com/nextepc/nextepc-oss.git
				synced 2025-10-30 19:43:29 +00:00 
			
		
		
		
	Upgrade test program for VoLTE (#358)
This commit is contained in:
		| @@ -2327,7 +2327,9 @@ int tests1ap_build_modify_bearer_accept( | ||||
|         "4035000005000000 0480000001000800 020001001a000a09 2726b727fe0a7205" | ||||
|         "ca006440080064f0 430020a000004340 060064f043020a", | ||||
|  | ||||
|         "", | ||||
|         "000d" | ||||
|         "4035000005000000 0480000001000800 020001001a000a09 271070e13b0d7203" | ||||
|         "ca006440080064f0 430020a000004340 060064f043020a", | ||||
|         "", | ||||
|         "", | ||||
|  | ||||
| @@ -2344,7 +2346,7 @@ int tests1ap_build_modify_bearer_accept( | ||||
|         57, | ||||
|         57, | ||||
|  | ||||
|         0, | ||||
|         57, | ||||
|         0, | ||||
|         0, | ||||
|  | ||||
| @@ -2725,6 +2727,38 @@ int tests1ap_build_bearer_resource_modification_request( | ||||
|     return OGS_OK; | ||||
| } | ||||
|  | ||||
| int tests1ap_build_bearer_resource_modification_request2( | ||||
|         ogs_pkbuf_t **pkbuf, int i) | ||||
| { | ||||
|     const char *payload[TESTS1AP_MAX_MESSAGE] = { | ||||
|         "000d403c00000500 0000020001000800 020001001a001312 279d165c7b0c0203" | ||||
|         "d60705a400010203 5824006440080000 f110000019c00043 40060000f1100001", | ||||
|         "", | ||||
|         "", | ||||
|  | ||||
|         "", | ||||
|         "", | ||||
|         "", | ||||
|  | ||||
|     }; | ||||
|     uint16_t len[TESTS1AP_MAX_MESSAGE] = { | ||||
|         64, | ||||
|         0, | ||||
|         0, | ||||
|  | ||||
|         0, | ||||
|         0, | ||||
|         0, | ||||
|     }; | ||||
|     char hexbuf[OGS_MAX_SDU_LEN]; | ||||
|  | ||||
|     *pkbuf = ogs_pkbuf_alloc(NULL, OGS_MAX_SDU_LEN); | ||||
|     ogs_pkbuf_put_data(*pkbuf, | ||||
|         OGS_HEX(payload[i], strlen(payload[i]), hexbuf), len[i]); | ||||
|  | ||||
|     return OGS_OK; | ||||
| } | ||||
|  | ||||
| int tests1ap_build_path_switch_request( | ||||
|         ogs_pkbuf_t **pkbuf, int target, | ||||
|         uint32_t mme_ue_s1ap_id, uint32_t enb_ue_s1ap_id, | ||||
|   | ||||
| @@ -116,6 +116,8 @@ int tests1ap_build_bearer_resource_modification_request( | ||||
|         uint8_t pti, uint32_t mac, uint8_t seq, uint8_t ebi, | ||||
|         uint8_t tft_code, uint8_t qci, | ||||
|         uint8_t ul_mbr, uint8_t dl_mbr, uint8_t ul_gbr, uint8_t dl_gbr); | ||||
| int tests1ap_build_bearer_resource_modification_request2( | ||||
|         ogs_pkbuf_t **pkbuf, int i); | ||||
| int tests1ap_build_path_switch_request( | ||||
|         ogs_pkbuf_t **pkbuf, int target,  | ||||
|         uint32_t mme_ue_s1ap_id, uint32_t enb_ue_s1ap_id, | ||||
|   | ||||
| @@ -351,6 +351,31 @@ static void volte_test1(abts_case *tc, void *data) | ||||
|     rv = testenb_s1ap_send(s1ap, sendbuf); | ||||
|     ABTS_INT_EQUAL(tc, OGS_OK, rv); | ||||
|  | ||||
|     /* Send Bearer resource modification request */ | ||||
|     rv = tests1ap_build_bearer_resource_modification_request2( | ||||
|             &sendbuf, msgindex); | ||||
|     ABTS_INT_EQUAL(tc, OGS_OK, rv); | ||||
|     rv = testenb_s1ap_send(s1ap, sendbuf); | ||||
|     ABTS_INT_EQUAL(tc, OGS_OK, rv); | ||||
|  | ||||
|     /* Receive E-RAB Modify Request + | ||||
|      * Modify EPS bearer context request */ | ||||
|     recvbuf = testenb_s1ap_read(s1ap); | ||||
|     ABTS_PTR_NOTNULL(tc, recvbuf); | ||||
|     ogs_pkbuf_free(recvbuf); | ||||
|  | ||||
|     /* Send E-RAB Modify Response */ | ||||
|     rv = tests1ap_build_e_rab_modify_response(&sendbuf, msgindex+1); | ||||
|     ABTS_INT_EQUAL(tc, OGS_OK, rv); | ||||
|     rv = testenb_s1ap_send(s1ap, sendbuf); | ||||
|     ABTS_INT_EQUAL(tc, OGS_OK, rv); | ||||
|  | ||||
|     /* Send Modify EPS bearer context accept */ | ||||
|     rv = tests1ap_build_modify_bearer_accept(&sendbuf, msgindex+3); | ||||
|     ABTS_INT_EQUAL(tc, OGS_OK, rv); | ||||
|     rv = testenb_s1ap_send(s1ap, sendbuf); | ||||
|     ABTS_INT_EQUAL(tc, OGS_OK, rv); | ||||
|  | ||||
|     /* Send Session-Termination-Request */ | ||||
|     ogs_msleep(50); | ||||
|     pcscf_rx_send_str(rx_sid); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user