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/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgHello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/4343
to look at the new patch set (#2).
test_subscriber.ctrl: test against octal/hex interpretation of id
Add a large enough subscriber id and add a test that ensures a leading zero is
not interpreted as octal, and that a leading 0x is invalid and not interpreted
as hexadecimal.
Change-Id: Ib468b7cb595cf52331ebb41e6de0e8f57f69e173
---
M tests/test_subscriber.ctrl
M tests/test_subscriber.sql
2 files changed, 20 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/43/4343/2
diff --git a/tests/test_subscriber.ctrl b/tests/test_subscriber.ctrl
index a88b3a5..e09a795 100644
--- a/tests/test_subscriber.ctrl
+++ b/tests/test_subscriber.ctrl
@@ -596,3 +596,19 @@
periodic_lu_timer 0
periodic_rau_tau_timer 0
lmsi 00000000
+
+GET 100 subscriber.by-id-00123.info
+GET_REPLY 100 subscriber.by-id-00123.info
+id 123
+imsi 123123
+msisdn 123
+nam_cs 1
+nam_ps 1
+ms_purged_cs 0
+ms_purged_ps 0
+periodic_lu_timer 0
+periodic_rau_tau_timer 0
+lmsi 00000000
+
+GET 101 subscriber.by-id-0x0123.info
+ERROR 101 Invalid value part of 'by-xxx-value' selector.
diff --git a/tests/test_subscriber.sql b/tests/test_subscriber.sql
index decd7d2..2f0efd7 100644
--- a/tests/test_subscriber.sql
+++ b/tests/test_subscriber.sql
@@ -11,3 +11,7 @@
INSERT INTO subscriber (id, imsi, msisdn) VALUES (3, '901990000000003', '103');
INSERT INTO auc_2g (subscriber_id, algo_id_2g, ki) VALUES (3, 1, '000102030405060708090a0b0c0d0e0f');
INSERT INTO auc_3g (subscriber_id, algo_id_3g, k, opc, sqn) VALUES (3, 5, '000102030405060708090a0b0c0d0e0f', '101112131415161718191a1b1c1d1e1f', 0);
+
+-- A subscriber id > 7 and > 15 to check against octal and hex notations
+INSERT INTO subscriber (id, imsi, msisdn) VALUES (123, '123123', '123');
+INSERT INTO auc_2g (subscriber_id, algo_id_2g, ki) VALUES (123, 3, 'BeefedCafeFaceAcedAddedDecadeFee');
--
To view, visit https://gerrit.osmocom.org/4343
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib468b7cb595cf52331ebb41e6de0e8f57f69e173
Gerrit-PatchSet: 2
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder