Harald Welte | c8a0b93 | 2012-08-24 21:27:26 +0200 | [diff] [blame] | 1 | Test `CSD 9600/V.110/transparent' passed |
| 2 | Test `Speech, all codecs' passed |
Holger Hans Peter Freyther | cd252e3 | 2013-07-03 09:56:53 +0200 | [diff] [blame] | 3 | Simple TMSI encoding test....passed |
Max | d55d7d4 | 2018-02-15 11:27:18 +0100 | [diff] [blame] | 4 | Simple IMSI encoding test....passed: [10] 17 08 99 10 07 00 00 00 64 02 |
Neels Hofmeyr | 4968628 | 2018-12-05 21:32:21 +0100 | [diff] [blame^] | 5 | |
| 6 | Testing 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 | |
| 66 | Decoding 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 | |
Max | f1ad60e | 2018-01-05 14:19:33 +0100 | [diff] [blame] | 128 | Constructed RA: |
Neels Hofmeyr | c38b32d | 2018-02-20 15:13:18 +0100 | [diff] [blame] | 129 | 077-121-666-5 |
| 130 | MCC+MNC in BCD: 70 17 21 |
Neels Hofmeyr | dbb2513 | 2018-02-20 15:12:23 +0100 | [diff] [blame] | 131 | 077-121-666-5 (3-digit MNC) |
Max | 99377c2 | 2017-08-30 19:17:50 +0200 | [diff] [blame] | 132 | RA test...passed |
Max | f1ad60e | 2018-01-05 14:19:33 +0100 | [diff] [blame] | 133 | Constructed RA: |
Neels Hofmeyr | c38b32d | 2018-02-20 15:13:18 +0100 | [diff] [blame] | 134 | 084-98-11-89 |
| 135 | MCC+MNC in BCD: 80 f4 89 |
| 136 | 084-98-11-89 |
Max | 99377c2 | 2017-08-30 19:17:50 +0200 | [diff] [blame] | 137 | RA test...passed |
Neels Hofmeyr | b9fd7eb | 2018-02-20 15:14:03 +0100 | [diff] [blame] | 138 | Constructed RA: |
| 139 | 000-00-0-0 |
| 140 | MCC+MNC in BCD: 00 f0 00 |
| 141 | 000-00-0-0 |
| 142 | RA test...passed |
| 143 | Constructed RA: |
Neels Hofmeyr | 6c7b3e2 | 2018-02-20 22:20:42 +0100 | [diff] [blame] | 144 | 000-000-0-0 (3-digit MNC) |
| 145 | MCC+MNC in BCD: 00 00 00 |
| 146 | 000-000-0-0 (3-digit MNC) |
| 147 | RA test...passed |
| 148 | Constructed RA: |
Neels Hofmeyr | b9fd7eb | 2018-02-20 15:14:03 +0100 | [diff] [blame] | 149 | 999-999-65535-255 |
| 150 | MCC+MNC in BCD: 99 99 99 |
Neels Hofmeyr | dbb2513 | 2018-02-20 15:12:23 +0100 | [diff] [blame] | 151 | 999-999-65535-255 (3-digit MNC) |
Neels Hofmeyr | b9fd7eb | 2018-02-20 15:14:03 +0100 | [diff] [blame] | 152 | RA test...passed |
Neels Hofmeyr | 6c7b3e2 | 2018-02-20 22:20:42 +0100 | [diff] [blame] | 153 | Constructed RA: |
| 154 | 001-02-23-42 |
| 155 | MCC+MNC in BCD: 00 f1 20 |
| 156 | 001-02-23-42 |
| 157 | RA test...passed |
| 158 | Constructed RA: |
| 159 | 001-002-23-42 (3-digit MNC) |
| 160 | MCC+MNC in BCD: 00 21 00 |
| 161 | 001-002-23-42 (3-digit MNC) |
| 162 | RA test...passed |
| 163 | Constructed RA: |
| 164 | 012-34-56-78 |
| 165 | MCC+MNC in BCD: 10 f2 43 |
| 166 | 012-34-56-78 |
| 167 | RA test...passed |
| 168 | Constructed RA: |
| 169 | 012-034-23-42 (3-digit MNC) |
| 170 | MCC+MNC in BCD: 10 42 30 |
| 171 | 012-034-23-42 (3-digit MNC) |
| 172 | RA test...passed |
| 173 | Constructed RA: |
| 174 | 123-456-23-42 |
| 175 | MCC+MNC in BCD: 21 63 54 |
| 176 | 123-456-23-42 (3-digit MNC) |
| 177 | RA test...passed |
| 178 | Constructed RA: |
| 179 | 123-456-23-42 (3-digit MNC) |
| 180 | MCC+MNC in BCD: 21 63 54 |
| 181 | 123-456-23-42 (3-digit MNC) |
| 182 | RA test...passed |
Neels Hofmeyr | d5a577b | 2018-02-20 21:48:07 +0100 | [diff] [blame] | 183 | - 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 Hofmeyr | 4566f4e | 2018-02-20 22:19:56 +0100 | [diff] [blame] | 187 | - 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 Hofmeyr | d5a577b | 2018-02-20 21:48:07 +0100 | [diff] [blame] | 191 | - 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 Hofmeyr | 4566f4e | 2018-02-20 22:19:56 +0100 | [diff] [blame] | 195 | - 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 Hofmeyr | d5a577b | 2018-02-20 21:48:07 +0100 | [diff] [blame] | 199 | - 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 Hofmeyr | 4566f4e | 2018-02-20 22:19:56 +0100 | [diff] [blame] | 203 | - 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 Hofmeyr | 6c7b3e2 | 2018-02-20 22:20:42 +0100 | [diff] [blame] | 207 | - 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 Hofmeyr | d5a577b | 2018-02-20 21:48:07 +0100 | [diff] [blame] | 215 | - 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 Hofmeyr | 4566f4e | 2018-02-20 22:19:56 +0100 | [diff] [blame] | 219 | - 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 Hofmeyr | 6c7b3e2 | 2018-02-20 22:20:42 +0100 | [diff] [blame] | 223 | - 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 |