Change in libosmocore[master]: gsm0408_test: Fix IMEI-SV related tests to use no more than 16 digits

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Jan 20 13:04:22 UTC 2019


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/12642


Change subject: gsm0408_test: Fix IMEI-SV related tests to use no more than 16 digits
......................................................................

gsm0408_test: Fix IMEI-SV related tests to use no more than 16 digits

The IMEI-SV is speified as a 16 digit number: 14 digits of IMEI plus
two digits of software version.  Let's not try to feed 18 digit long
numbers into our functions, as the resulting behavior is unspecified.

Change-Id: I6fb85a0516dc387902ad9de4fe8c1ba82d68cae6
---
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 16 insertions(+), 16 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/42/12642/1

diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 6902e8e..2d60b84 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -422,17 +422,17 @@
 	},
 	{
 		.mi_type = GSM_MI_TYPE_IMEISV,
-		.mi_str = "987654321098765432",
-		.mi_name = "IMEI-SV-987654321098765432",
-		.expect_mi_tlv_hex = "170a937856341290785634f2",
+		.mi_str = "9876543210987654",
+		.mi_name = "IMEI-SV-9876543210987654",
+		.expect_mi_tlv_hex = "17099378563412907856f4",
 	},
 	{
 		.mi_type = GSM_MI_TYPE_IMEISV,
-		.mi_str = "987654321098765432",
-		.mi_name = "IMEI-SV-987654321098765432",
-		.expect_mi_tlv_hex = "170a937856341290785634f2",
-		.str_size = 16,
-		.expect_str = "987654321098765",
+		.mi_str = "9876543210987654",
+		.mi_name = "IMEI-SV-9876543210987654",
+		.expect_mi_tlv_hex = "17099378563412907856f4",
+		.str_size = 17,
+		.expect_str = "9876543210987654",
 	},
 	{
 		/* gsm48 treats TMSI as decimal string */
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 8f6630b..0bd101d 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -40,14 +40,14 @@
   -> MI-TLV-hex='17089a78563412907856'
   -> MI-str="987654321098765" rc=16
   -> MI-name="IMEI-987654321098765"
-- IMEI-SV 987654321098765432
-  -> MI-TLV-hex='170a937856341290785634f2'
-  -> MI-str="987654321098765432" rc=19
-  -> MI-name="IMEI-SV-987654321098765432"
-- IMEI-SV 987654321098765432
-  -> MI-TLV-hex='170a937856341290785634f2'
-  -> MI-str="987654321098765" rc=16
-  -> MI-name="IMEI-SV-987654321098765432"
+- IMEI-SV 9876543210987654
+  -> MI-TLV-hex='17099378563412907856f4'
+  -> MI-str="9876543210987654" rc=17
+  -> MI-name="IMEI-SV-9876543210987654"
+- IMEI-SV 9876543210987654
+  -> MI-TLV-hex='17099378563412907856f4'
+  -> MI-str="9876543210987654" rc=17
+  -> MI-name="IMEI-SV-9876543210987654"
 - TMSI 305419896
   -> MI-TLV-hex='1705f412345678'
   -> MI-str="305419896" rc=9

-- 
To view, visit https://gerrit.osmocom.org/12642
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6fb85a0516dc387902ad9de4fe8c1ba82d68cae6
Gerrit-Change-Number: 12642
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190120/d11d8bea/attachment.htm>


More information about the gerrit-log mailing list