blob: 1dc42499ffa63c6037a66af8d48ccef96c830d09 [file] [log] [blame]
Harald Weltec8a0b932012-08-24 21:27:26 +02001Test `CSD 9600/V.110/transparent' passed
2Test `Speech, all codecs' passed
Holger Hans Peter Freythercd252e32013-07-03 09:56:53 +02003Simple TMSI encoding test....passed
Maxd55d7d42018-02-15 11:27:18 +01004Simple IMSI encoding test....passed: [10] 17 08 99 10 07 00 00 00 64 02
Neels Hofmeyr49686282018-12-05 21:32:21 +01005
6Testing Mobile Identity conversions
7- IMSI 123456789012345
8 -> MI-TLV-hex='17081932547698103254'
9 -> MI-str="123456789012345" rc=16
10- IMSI 12345678901234
11 -> MI-TLV-hex='170811325476981032f4'
12 -> MI-str="12345678901234" rc=15
13- IMSI 423423
14 -> MI-TLV-hex='1704413224f3'
15 -> MI-str="423423" rc=7
16- unknown 0x9 423423
17 -> MI-TLV-hex='1704493224f3'
18 -> MI-str="423423F" rc=8
19 ERROR: expected MI-str="423423"
20 ERROR: expected rc=7
21- IMSI 4234235
22 -> MI-TLV-hex='170449322453'
23 -> MI-str="4234235" rc=8
24- IMSI 4234235
25 -> MI-TLV-hex='170449322453'
26 -> MI-str="423" rc=3
27 ERROR: resulting string is not explicitly nul terminated
28- IMEI 123456789012345
29 -> MI-TLV-hex='17081a32547698103254'
30 -> MI-str="123456789012345" rc=16
31- IMEI 98765432109876
32 -> MI-TLV-hex='170892785634129078f6'
33 -> MI-str="98765432109876" rc=15
34- IMEI 987654321098765
35 -> MI-TLV-hex='17089a78563412907856'
36 -> MI-str="987654321098765" rc=16
37- IMEI-SV 987654321098765432
38 -> MI-TLV-hex='170a937856341290785634f2'
39 -> MI-str="987654321098765432" rc=19
40- IMEI-SV 987654321098765432
41 -> MI-TLV-hex='170a937856341290785634f2'
42 -> MI-str="987654321098765" rc=15
43 ERROR: resulting string is not explicitly nul terminated
44- TMSI 305419896
45 -> MI-TLV-hex='1705f412345678'
46 -> MI-str="305419896" rc=9
47- TMSI 12648430
48 -> MI-TLV-hex='1705f400c0ffee'
49 -> MI-str="12648430" rc=8
50- TMSI 0
51 -> MI-TLV-hex='1705f400000000'
52 -> MI-str="0" rc=1
53- TMSI 305419896
54 -> MI-TLV-hex='1705f412345678'
55 -> MI-str="3054" rc=9
56- NONE 123
57 -> MI-TLV-hex='17021832'
58 -> MI-str="" rc=1
59- NONE 1234
60 -> MI-TLV-hex='17031032f4'
61 -> MI-str="" rc=1
62- unknown 0x8 1234
63 -> MI-TLV-hex='17031832f4'
64 -> MI-str="" rc=1
65
66Decoding zero length Mobile Identities
67- MI type: IMSI
68 - writing to zero-length string:
69 rc=1
70 ERROR: Wrote to invalid memory!
71 - writing to 1-byte-length string:
72 rc=1
73 ERROR: Wrote unexpected string "1!!!!"
74 - decode zero-length mi:
75 rc=2
76 ERROR: expected empty string, got output string: "1"
77- MI type: TMSI
78 - writing to zero-length string:
79 rc=1
80 ERROR: Wrote to invalid memory!
81 - writing to 1-byte-length string:
82 rc=1
83 returned empty string
84 - decode zero-length mi:
85 rc=1
86 returned empty string
87- MI type: NONE
88 - writing to zero-length string:
89 rc=1
90 ERROR: Wrote to invalid memory!
91 - writing to 1-byte-length string:
92 rc=1
93 returned empty string
94 - decode zero-length mi:
95 rc=1
96 returned empty string
97- MI type: IMSI | GSM_MI_ODD
98 - writing to zero-length string:
99 rc=1
100 ERROR: Wrote to invalid memory!
101 - writing to 1-byte-length string:
102 rc=1
103 ERROR: Wrote unexpected string "1!!!!"
104 - decode zero-length mi:
105 rc=2
106 ERROR: expected empty string, got output string: "1"
107- MI type: TMSI | GSM_MI_ODD
108 - writing to zero-length string:
109 rc=1
110 ERROR: Wrote to invalid memory!
111 - writing to 1-byte-length string:
112 rc=1
113 returned empty string
114 - decode zero-length mi:
115 rc=1
116 returned empty string
117- MI type: NONE | GSM_MI_ODD
118 - writing to zero-length string:
119 rc=1
120 ERROR: Wrote to invalid memory!
121 - writing to 1-byte-length string:
122 rc=1
123 returned empty string
124 - decode zero-length mi:
125 rc=1
126 returned empty string
127
Maxf1ad60e2018-01-05 14:19:33 +0100128Constructed RA:
Neels Hofmeyrc38b32d2018-02-20 15:13:18 +0100129077-121-666-5
130MCC+MNC in BCD: 70 17 21
Neels Hofmeyrdbb25132018-02-20 15:12:23 +0100131077-121-666-5 (3-digit MNC)
Max99377c22017-08-30 19:17:50 +0200132RA test...passed
Maxf1ad60e2018-01-05 14:19:33 +0100133Constructed RA:
Neels Hofmeyrc38b32d2018-02-20 15:13:18 +0100134084-98-11-89
135MCC+MNC in BCD: 80 f4 89
136084-98-11-89
Max99377c22017-08-30 19:17:50 +0200137RA test...passed
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100138Constructed RA:
139000-00-0-0
140MCC+MNC in BCD: 00 f0 00
141000-00-0-0
142RA test...passed
143Constructed RA:
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100144000-000-0-0 (3-digit MNC)
145MCC+MNC in BCD: 00 00 00
146000-000-0-0 (3-digit MNC)
147RA test...passed
148Constructed RA:
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100149999-999-65535-255
150MCC+MNC in BCD: 99 99 99
Neels Hofmeyrdbb25132018-02-20 15:12:23 +0100151999-999-65535-255 (3-digit MNC)
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100152RA test...passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100153Constructed RA:
154001-02-23-42
155MCC+MNC in BCD: 00 f1 20
156001-02-23-42
157RA test...passed
158Constructed RA:
159001-002-23-42 (3-digit MNC)
160MCC+MNC in BCD: 00 21 00
161001-002-23-42 (3-digit MNC)
162RA test...passed
163Constructed RA:
164012-34-56-78
165MCC+MNC in BCD: 10 f2 43
166012-34-56-78
167RA test...passed
168Constructed RA:
169012-034-23-42 (3-digit MNC)
170MCC+MNC in BCD: 10 42 30
171012-034-23-42 (3-digit MNC)
172RA test...passed
173Constructed RA:
174123-456-23-42
175MCC+MNC in BCD: 21 63 54
176123-456-23-42 (3-digit MNC)
177RA test...passed
178Constructed RA:
179123-456-23-42 (3-digit MNC)
180MCC+MNC in BCD: 21 63 54
181123-456-23-42 (3-digit MNC)
182RA test...passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100183- gsm48_generate_lai() from 077-121-666-0
184 Encoded 70 17 21 02 9a
185 gsm48_decode_lai() gives 077-121-666-0
186 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100187- gsm48_generate_lai2() from 077-121-666
188 Encoded 70 17 21 02 9a
189 gsm48_decode_lai2() gives 077-121-666 (3-digit MNC)
190 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100191- gsm48_generate_lai() from 084-98-11-0
192 Encoded 80 f4 89 00 0b
193 gsm48_decode_lai() gives 084-98-11-0
194 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100195- gsm48_generate_lai2() from 084-98-11
196 Encoded 80 f4 89 00 0b
197 gsm48_decode_lai2() gives 084-98-11
198 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100199- gsm48_generate_lai() from 000-00-0-0
200 Encoded 00 f0 00 00 00
201 gsm48_decode_lai() gives 000-00-0-0
202 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100203- gsm48_generate_lai2() from 000-00-0
204 Encoded 00 f0 00 00 00
205 gsm48_decode_lai2() gives 000-00-0
206 passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100207- gsm48_generate_lai() from 000-000-0-0 (3-digit MNC)
208 Encoded 00 f0 00 00 00
209 gsm48_decode_lai() gives 000-00-0-0
210 passed
211- gsm48_generate_lai2() from 000-000-0 (3-digit MNC)
212 Encoded 00 00 00 00 00
213 gsm48_decode_lai2() gives 000-000-0 (3-digit MNC)
214 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100215- gsm48_generate_lai() from 999-999-65535-0
216 Encoded 99 99 99 ff ff
217 gsm48_decode_lai() gives 999-999-65535-0
218 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100219- gsm48_generate_lai2() from 999-999-65535
220 Encoded 99 99 99 ff ff
221 gsm48_decode_lai2() gives 999-999-65535 (3-digit MNC)
222 passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100223- gsm48_generate_lai() from 001-02-23-0
224 Encoded 00 f1 20 00 17
225 gsm48_decode_lai() gives 001-02-23-0
226 passed
227- gsm48_generate_lai2() from 001-02-23
228 Encoded 00 f1 20 00 17
229 gsm48_decode_lai2() gives 001-02-23
230 passed
231- gsm48_generate_lai() from 001-002-23-0 (3-digit MNC)
232 Encoded 00 f1 20 00 17
233 gsm48_decode_lai() gives 001-02-23-0
234 passed
235- gsm48_generate_lai2() from 001-002-23 (3-digit MNC)
236 Encoded 00 21 00 00 17
237 gsm48_decode_lai2() gives 001-002-23 (3-digit MNC)
238 passed
239- gsm48_generate_lai() from 012-34-56-0
240 Encoded 10 f2 43 00 38
241 gsm48_decode_lai() gives 012-34-56-0
242 passed
243- gsm48_generate_lai2() from 012-34-56
244 Encoded 10 f2 43 00 38
245 gsm48_decode_lai2() gives 012-34-56
246 passed
247- gsm48_generate_lai() from 012-034-23-0 (3-digit MNC)
248 Encoded 10 f2 43 00 17
249 gsm48_decode_lai() gives 012-34-23-0
250 passed
251- gsm48_generate_lai2() from 012-034-23 (3-digit MNC)
252 Encoded 10 42 30 00 17
253 gsm48_decode_lai2() gives 012-034-23 (3-digit MNC)
254 passed
255- gsm48_generate_lai() from 123-456-23-0
256 Encoded 21 63 54 00 17
257 gsm48_decode_lai() gives 123-456-23-0
258 passed
259- gsm48_generate_lai2() from 123-456-23
260 Encoded 21 63 54 00 17
261 gsm48_decode_lai2() gives 123-456-23 (3-digit MNC)
262 passed
263- gsm48_generate_lai() from 123-456-23-0 (3-digit MNC)
264 Encoded 21 63 54 00 17
265 gsm48_decode_lai() gives 123-456-23-0
266 passed
267- gsm48_generate_lai2() from 123-456-23 (3-digit MNC)
268 Encoded 21 63 54 00 17
269 gsm48_decode_lai2() gives 123-456-23 (3-digit MNC)
270 passed