summaryrefslogtreecommitdiffstats
path: root/tests/gsup
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gsup')
-rw-r--r--tests/gsup/gsup_test.c33
-rw-r--r--tests/gsup/gsup_test.err15
-rw-r--r--tests/gsup/gsup_test.ok6
3 files changed, 54 insertions, 0 deletions
diff --git a/tests/gsup/gsup_test.c b/tests/gsup/gsup_test.c
index 079a7031..f1945735 100644
--- a/tests/gsup/gsup_test.c
+++ b/tests/gsup/gsup_test.c
@@ -289,6 +289,33 @@ static void test_gsup_messages_dec_enc(void)
0x02, /* Memory Available (SMMA) */
};
+ static const uint8_t send_check_imei_req[] = {
+ 0x30, /* OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST */
+ TEST_IMSI_IE,
+
+ /* imei */
+ 0x50, 0x09,
+ 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42,
+ };
+
+ static const uint8_t send_check_imei_err[] = {
+ 0x31, /* OSMO_GSUP_MSGT_CHECK_IMEI_ERROR */
+ TEST_IMSI_IE,
+
+ /* cause */
+ 0x02, 0x01,
+ 0x60, /* GMM_CAUSE_INV_MAND_INFO */
+ };
+
+ static const uint8_t send_check_imei_res[] = {
+ 0x32, /* OSMO_GSUP_MSGT_CHECK_IMEI_RESULT */
+ TEST_IMSI_IE,
+
+ /* imei_result */
+ 0x51, 0x01,
+ 0x00, /* OSMO_GSUP_IMEI_RESULT_ACK */
+ };
+
static const struct test {
char *name;
const uint8_t *data;
@@ -338,6 +365,12 @@ static void test_gsup_messages_dec_enc(void)
send_mo_mt_forward_sm_err, sizeof(send_mo_mt_forward_sm_err)},
{"ReadyForSM (MSC -> SMSC) Indication",
send_ready_for_sm_ind, sizeof(send_ready_for_sm_ind)},
+ {"Check IMEI Request",
+ send_check_imei_req, sizeof(send_check_imei_req)},
+ {"Check IMEI Error",
+ send_check_imei_err, sizeof(send_check_imei_err)},
+ {"Check IMEI Result",
+ send_check_imei_res, sizeof(send_check_imei_res)},
};
printf("Test GSUP message decoding/encoding\n");
diff --git a/tests/gsup/gsup_test.err b/tests/gsup/gsup_test.err
index 236c38a9..73b35fc5 100644
--- a/tests/gsup/gsup_test.err
+++ b/tests/gsup/gsup_test.err
@@ -64,6 +64,15 @@
generated message: 2c 01 08 21 43 65 87 09 21 43 f5 46 01 02
original message: 2c 01 08 21 43 65 87 09 21 43 f5 46 01 02
IMSI: 123456789012345
+ generated message: 30 01 08 21 43 65 87 09 21 43 f5 50 09 42 42 42 42 42 42 42 42 42
+ original message: 30 01 08 21 43 65 87 09 21 43 f5 50 09 42 42 42 42 42 42 42 42 42
+ IMSI: 123456789012345
+ generated message: 31 01 08 21 43 65 87 09 21 43 f5 02 01 60
+ original message: 31 01 08 21 43 65 87 09 21 43 f5 02 01 60
+ IMSI: 123456789012345
+ generated message: 32 01 08 21 43 65 87 09 21 43 f5 51 01 00
+ original message: 32 01 08 21 43 65 87 09 21 43 f5 51 01 00
+ IMSI: 123456789012345
message 0: tested 11 truncations, 11 parse failures
message 1: tested 14 truncations, 13 parse failures
message 2: tested 83 truncations, 81 parse failures
@@ -86,6 +95,9 @@
message 19: tested 20 truncations, 18 parse failures
message 20: tested 26 truncations, 22 parse failures
message 21: tested 14 truncations, 13 parse failures
+ message 22: tested 22 truncations, 21 parse failures
+ message 23: tested 14 truncations, 13 parse failures
+ message 24: tested 14 truncations, 13 parse failures
DLGSUP Stopping DLGSUP logging
message 0: tested 2816 modifications, 510 parse failures
message 1: tested 3584 modifications, 770 parse failures
@@ -109,3 +121,6 @@ DLGSUP Stopping DLGSUP logging
message 19: tested 5120 modifications, 1031 parse failures
message 20: tested 6656 modifications, 1546 parse failures
message 21: tested 3584 modifications, 771 parse failures
+ message 22: tested 5632 modifications, 771 parse failures
+ message 23: tested 3584 modifications, 770 parse failures
+ message 24: tested 3584 modifications, 771 parse failures
diff --git a/tests/gsup/gsup_test.ok b/tests/gsup/gsup_test.ok
index 36e35c8b..70f723c0 100644
--- a/tests/gsup/gsup_test.ok
+++ b/tests/gsup/gsup_test.ok
@@ -43,4 +43,10 @@ Test GSUP message decoding/encoding
MO-/MT-ForwardSM Error OK
Testing ReadyForSM (MSC -> SMSC) Indication
ReadyForSM (MSC -> SMSC) Indication OK
+ Testing Check IMEI Request
+ Check IMEI Request OK
+ Testing Check IMEI Error
+ Check IMEI Error OK
+ Testing Check IMEI Result
+ Check IMEI Result OK
Done.