aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-05-25 18:23:40 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-31 16:59:06 +0200
commitfcdfb690ca68fcac64ac19ada3680832d45c8469 (patch)
tree43b9c52b0add239519b680cb2653d2232018ca2f /tests
parentdbc2731887d288d0a358ee3ff375f0be8658291e (diff)
sysmobts: Add testcase for ETSI/12.21 message
Diffstat (limited to 'tests')
-rw-r--r--tests/misc/misc_test.c15
-rw-r--r--tests/misc/misc_test.ok3
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.