e2ap_test: update reference setup request msg

master
Piotr Gawlowicz 2 years ago committed by Justin Tallon
parent 0860b2d074
commit 9735e5650f

@ -27,69 +27,15 @@ class dummy_metrics_interface : public srsenb::e2_interface_metrics
void test_reference_e2ap_setup_request() void test_reference_e2ap_setup_request()
{ {
uint8_t e2ap_msg_foreign[] = { uint8_t e2ap_msg_foreign[] = {
0x00, 0x01, 0x00, 0x82, 0x40, 0x00, 0x00, 0x04, 0x00, 0x31, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x01, 0x00, 0x80, 0xa3, 0x00, 0x00, 0x04, 0x00, 0x31, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x09, 0x00,
0x37, 0x34, 0x37, 0x38, 0xb5, 0xc6, 0x77, 0x88, 0x00, 0x0a, 0x00, 0x81, 0xff, 0x00, 0x00, 0x08, 0x00, 0x81, 0xf9, 0x05, 0xf5, 0x10, 0x30, 0x00, 0x00, 0x00, 0x10, 0x00, 0x0a, 0x00, 0x53, 0x00, 0x00, 0x08, 0x00, 0x4e, 0x00, 0x00,
0x00, 0x00, 0x00, 0x81, 0xe9, 0x20, 0xc0, 0x4f, 0x52, 0x41, 0x4e, 0x2d, 0x45, 0x32, 0x53, 0x4d, 0x2d, 0x4b, 0x50, 0x93, 0x38, 0x00, 0x30, 0x4f, 0x52, 0x41, 0x4e, 0x2d, 0x45, 0x32, 0x53, 0x4d, 0x2d, 0x4b, 0x50, 0x4d, 0x00, 0x00,
0x4d, 0x00, 0x00, 0x05, 0x4f, 0x49, 0x44, 0x31, 0x32, 0x33, 0x05, 0x00, 0x4b, 0x50, 0x4d, 0x20, 0x6d, 0x6f, 0x6e, 0x18, 0x31, 0x2e, 0x33, 0x2e, 0x36, 0x2e, 0x31, 0x2e, 0x34, 0x2e, 0x31, 0x2e, 0x35, 0x33, 0x31, 0x34, 0x38, 0x2e,
0x69, 0x74, 0x6f, 0x72, 0x08, 0xdc, 0x2b, 0xda, 0xe3, 0xae, 0xd1, 0x4d, 0x00, 0x60, 0x00, 0x01, 0x01, 0x07, 0x00, 0x31, 0x2e, 0x32, 0x2e, 0x32, 0x2e, 0x32, 0x05, 0x00, 0x4b, 0x50, 0x4d, 0x20, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f,
0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x01, 0x05, 0x14, 0x01, 0x72, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x4f, 0x52, 0x41, 0x4e, 0x2d, 0x45, 0x32, 0x53, 0x4d, 0x2d, 0x4b, 0x50, 0x4d,
0x01, 0x1d, 0x00, 0x4f, 0x2d, 0x44, 0x55, 0x20, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x32, 0x00, 0x32, 0x00, 0x00, 0x00, 0x33, 0x00, 0x2c, 0x00, 0x01, 0x80, 0x44, 0x55, 0x4d, 0x4d, 0x59, 0x20,
0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4f, 0x41, 0x49, 0x2d, 0x41, 0x4d, 0x46, 0x00, 0x0c, 0x46, 0x41, 0x4b, 0x45, 0x20, 0x52, 0x45, 0x51, 0x55, 0x45,
0x35, 0x47, 0x43, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x53, 0x54, 0x0d, 0x46, 0x41, 0x4b, 0x45, 0x20, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45};
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x02, 0x1d, 0x00, 0x4f, 0x2d, 0x44, 0x55, 0x20,
0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x45, 0x50, 0x43, 0x20, 0x63, 0x6f, 0x6e, 0x6e,
0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x01, 0x01, 0x01,
0x01, 0x00, 0x01, 0x03, 0x1e, 0x80, 0x4f, 0x2d, 0x43, 0x55, 0x2d, 0x43, 0x50, 0x20, 0x4d, 0x65, 0x61, 0x73, 0x75,
0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x20, 0x66, 0x6f,
0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x35, 0x47, 0x43, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64,
0x20, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x04, 0x1e,
0x80, 0x4f, 0x2d, 0x43, 0x55, 0x2d, 0x43, 0x50, 0x20, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e,
0x74, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65,
0x20, 0x45, 0x50, 0x43, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x65, 0x70, 0x6c,
0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x05, 0x1e, 0x80, 0x4f, 0x2d, 0x43, 0x55,
0x2d, 0x55, 0x50, 0x20, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x43, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x35, 0x47, 0x43, 0x20,
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x06, 0x1e, 0x80, 0x4f, 0x2d, 0x43, 0x55, 0x2d, 0x55, 0x50, 0x20, 0x4d,
0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x45, 0x50, 0x43, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x01, 0x01, 0x01, 0x01,
0x00, 0x02, 0x00, 0x00, 0x05, 0x4f, 0x49, 0x44, 0x31, 0x32, 0x33, 0x00, 0x32, 0x00, 0x22, 0x00, 0x00, 0x00, 0x33,
0x00, 0x1c, 0x00, 0x00, 0xe0, 0x6e, 0x67, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x00, 0x07, 0x72, 0x65, 0x71, 0x70,
0x61, 0x72, 0x74, 0x07, 0x72, 0x65, 0x73, 0x70, 0x61, 0x72, 0x74};
uint8_t e2ap_msg_self[] = {
0x00, 0x01, 0x00, 0x82, 0x3c, 0x00, 0x00, 0x04, 0x00, 0x31, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x09, 0x00,
0x37, 0x34, 0x37, 0x38, 0xb5, 0xc6, 0x77, 0x88, 0x00, 0x0a, 0x00, 0x81, 0xfa, 0x00, 0x00, 0x08, 0x00, 0x81, 0xf4,
0x00, 0x00, 0x00, 0x81, 0xe9, 0x20, 0xc0, 0x4f, 0x52, 0x41, 0x4e, 0x2d, 0x45, 0x32, 0x53, 0x4d, 0x2d, 0x4b, 0x50,
0x4d, 0x00, 0x00, 0x05, 0x4f, 0x49, 0x44, 0x31, 0x32, 0x33, 0x05, 0x00, 0x4b, 0x50, 0x4d, 0x20, 0x6d, 0x6f, 0x6e,
0x69, 0x74, 0x6f, 0x72, 0x08, 0x60, 0x28, 0x38, 0x61, 0xaa, 0xe3, 0x3f, 0x00, 0x60, 0x00, 0x01, 0x01, 0x07, 0x00,
0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x01, 0x05, 0x14, 0x01,
0x01, 0x1d, 0x00, 0x4f, 0x2d, 0x44, 0x55, 0x20, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74,
0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20,
0x35, 0x47, 0x43, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x65, 0x70, 0x6c, 0x6f,
0x79, 0x6d, 0x65, 0x6e, 0x74, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x02, 0x1d, 0x00, 0x4f, 0x2d, 0x44, 0x55, 0x20,
0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x45, 0x50, 0x43, 0x20, 0x63, 0x6f, 0x6e, 0x6e,
0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x01, 0x01, 0x01,
0x01, 0x00, 0x01, 0x03, 0x1e, 0x80, 0x4f, 0x2d, 0x43, 0x55, 0x2d, 0x43, 0x50, 0x20, 0x4d, 0x65, 0x61, 0x73, 0x75,
0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x20, 0x66, 0x6f,
0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x35, 0x47, 0x43, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64,
0x20, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x04, 0x1e,
0x80, 0x4f, 0x2d, 0x43, 0x55, 0x2d, 0x43, 0x50, 0x20, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e,
0x74, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65,
0x20, 0x45, 0x50, 0x43, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x65, 0x70, 0x6c,
0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x05, 0x1e, 0x80, 0x4f, 0x2d, 0x43, 0x55,
0x2d, 0x55, 0x50, 0x20, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x43, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x35, 0x47, 0x43, 0x20,
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e,
0x74, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x06, 0x1e, 0x80, 0x4f, 0x2d, 0x43, 0x55, 0x2d, 0x55, 0x50, 0x20, 0x4d,
0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x45, 0x50, 0x43, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
0x63, 0x74, 0x65, 0x64, 0x20, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x01, 0x01, 0x01, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x23, 0x00, 0x00, 0x00, 0x33, 0x00, 0x1d, 0x00, 0x00, 0x03,
0x80, 0x6e, 0x67, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x00, 0x07, 0x72, 0x65, 0x71, 0x70, 0x61, 0x72, 0x74, 0x07,
0x72, 0x65, 0x73, 0x70, 0x61, 0x72, 0x74};
asn1::cbit_ref bref(&e2ap_msg_foreign[0], sizeof(e2ap_msg_foreign)); asn1::cbit_ref bref(&e2ap_msg_foreign[0], sizeof(e2ap_msg_foreign));
e2_ap_pdu_c pdu; e2_ap_pdu_c pdu;
@ -190,7 +136,7 @@ void test_native_e2ap_reset_request()
return; return;
} }
asn1::cbit_ref bref2(buf->msg, buf->get_tailroom()); asn1::cbit_ref bref2(buf->msg, buf->get_tailroom());
asn1::SRSASN_CODE unpack_ret = pdu2.unpack(bref2); asn1::SRSASN_CODE unpack_ret = pdu2.unpack(bref2);
TESTASSERT_EQ(asn1::SRSASN_SUCCESS, unpack_ret); TESTASSERT_EQ(asn1::SRSASN_SUCCESS, unpack_ret);
printf("Unpacked native E2AP PDU RESET %d\n", (int)unpack_ret); printf("Unpacked native E2AP PDU RESET %d\n", (int)unpack_ret);

Loading…
Cancel
Save