diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-05-25 18:23:40 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-05-25 18:44:29 +0200 |
commit | 6fd71a306aa66f233a0521538ff2002ac03a76b0 (patch) | |
tree | 92d295f63f3d118c0c3e634a342a2bcd1aa88708 | |
parent | 7b19975870b8d6ee25d3a93e9dd35c843963979f (diff) |
sysmobts: Add testcase for ETSI/12.21 message
-rw-r--r-- | tests/misc/misc_test.c | 15 | ||||
-rw-r--r-- | tests/misc/misc_test.ok | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/misc/misc_test.c b/tests/misc/misc_test.c index e590394f..89fdbe65 100644 --- a/tests/misc/misc_test.c +++ b/tests/misc/misc_test.c @@ -43,6 +43,11 @@ static const uint8_t osmo_rsl_power[] = { 0xff, 0xfe, 0x04 }; +static const uint8_t etsi_oml_opstart[] = { + 0x00, 0x09, 0xff, 0x80, 0x80, 0x00, 0x05, 0x74, + 0x00, 0xff, 0xff, 0xff +}; + static void test_msg_utils_ipa(void) { struct msgb *msg; @@ -100,6 +105,7 @@ static void test_msg_utils_oml(void) printf("Testing OML structure\n"); /* test with IPA message */ + printf(" Testing IPA messages.\n"); test_oml_data(ipa_rsl_connect + hh_size, sizeof(ipa_rsl_connect) - hh_size, OML_MSG_TYPE_IPA); @@ -109,11 +115,20 @@ static void test_msg_utils_oml(void) test_oml_data(ipa_rsl_connect + hh_size, size, -1); /* test with Osmo message */ + printf(" Testing Osmo messages.\n"); test_oml_data(osmo_rsl_power + hh_size, sizeof(osmo_rsl_power) - hh_size, OML_MSG_TYPE_OSMO); for (size = sizeof(osmo_rsl_power) - hh_size - 1; size >=0; --size) test_oml_data(osmo_rsl_power + hh_size, size, -1); + + /* test with plain ETSI message */ + printf(" Testing ETSI messages.\n"); + test_oml_data(etsi_oml_opstart + hh_size, + sizeof(etsi_oml_opstart) - hh_size, + OML_MSG_TYPE_ETSI); + for (size = sizeof(etsi_oml_opstart) - hh_size - 1; size >=0; --size) + test_oml_data(etsi_oml_opstart + hh_size, size, -1); } static void test_sacch_get(void) diff --git a/tests/misc/misc_test.ok b/tests/misc/misc_test.ok index 58aa3ea1..a52ce5dd 100644 --- a/tests/misc/misc_test.ok +++ b/tests/misc/misc_test.ok @@ -1,3 +1,6 @@ Testing lchan_sacch_get Testing IPA structure Testing OML structure + Testing IPA messages. + Testing Osmo messages. + Testing ETSI messages. |