aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-05-29 23:00:07 +0200
committerneels <nhofmeyr@sysmocom.de>2020-06-03 23:53:32 +0000
commit7cd900dd2bc2d21bb42a86e30e6723cc6d704012 (patch)
tree861f9f8cfe92f52b1d73090230a3d2905ffd0c03 /tests
parentc1a73302c275244c93a5185f5c1d2547d91d9b16 (diff)
gsm0408_test.c: drop test_mi_functionality()
Testing these functions is actually done in libosmocore. Also, with new osmo_mobile_identity API, the functions being tested are marked deprecated. So drop the test. BTW, the test contained an IMSI of 16 digits, which is too long, yet was expected to succeed. GSM23003_IMSI_MAX_DIGITS == 15. I first considered fixing the test data, but the test is in the wrong place here anyway. Change-Id: I902d31ecd72d71892fad7945f695a9f1fb403bf2
Diffstat (limited to 'tests')
-rw-r--r--tests/gsm0408/gsm0408_test.c30
-rw-r--r--tests/gsm0408/gsm0408_test.ok3
2 files changed, 0 insertions, 33 deletions
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index f850274a7..5ff9491e9 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -269,34 +269,6 @@ static inline void test_si2q_long(struct gsm_network *net)
bts_del(bts);
}
-static void test_mi_functionality(void)
-{
- const char *imsi_odd = "987654321098763";
- const char *imsi_even = "9876543210987654";
- const uint32_t tmsi = 0xfabeacd0;
- uint8_t mi[128];
- unsigned int mi_len;
- char mi_parsed[GSM48_MI_SIZE];
-
- printf("Testing parsing and generating TMSI/IMSI\n");
-
- /* tmsi code */
- mi_len = gsm48_generate_mid_from_tmsi(mi, tmsi);
- gsm48_mi_to_string(mi_parsed, sizeof(mi_parsed), mi + 2, mi_len - 2);
- COMPARE((uint32_t)strtoul(mi_parsed, NULL, 10), ==, tmsi);
-
- /* imsi code */
- mi_len = gsm48_generate_mid_from_imsi(mi, imsi_odd);
- gsm48_mi_to_string(mi_parsed, sizeof(mi_parsed), mi + 2, mi_len -2);
- printf("hex: %s\n", osmo_hexdump(mi, mi_len));
- COMPARE_STR(mi_parsed, imsi_odd);
-
- mi_len = gsm48_generate_mid_from_imsi(mi, imsi_even);
- gsm48_mi_to_string(mi_parsed, sizeof(mi_parsed), mi + 2, mi_len -2);
- printf("hex: %s\n", osmo_hexdump(mi, mi_len));
- COMPARE_STR(mi_parsed, imsi_even);
-}
-
struct {
int range;
int arfcns_num;
@@ -924,8 +896,6 @@ int main(int argc, char **argv)
return EXIT_FAILURE;
}
- test_mi_functionality();
-
test_si_range_helpers();
test_arfcn_filter();
test_print_encoding();
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index e3290b5eb..bad8aef20 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -1,6 +1,3 @@
-Testing parsing and generating TMSI/IMSI
-hex: 17 08 99 78 56 34 12 90 78 36
-hex: 17 09 91 78 56 34 12 90 78 56 f4
Element is: 2 => freqs[i] = 121
Element is: 2 => freqs[i] = 1
Element is: 0 => freqs[i] = 68