Harald Welte has submitted this change and it was merged. Change subject: hlr: Distinguish "invalid IMSI" from "unknown IMSI" cases ......................................................................
hlr: Distinguish "invalid IMSI" from "unknown IMSI" cases Change-Id: I6ded77b3029aae6bc3fe022190819b6a86189f5a --- M hlr/HLR_Tests.ttcn 1 file changed, 16 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn index eca4f4b..8b21626 100644 --- a/hlr/HLR_Tests.ttcn +++ b/hlr/HLR_Tests.ttcn @@ -353,14 +353,27 @@ testcase TC_gsup_sai_err_invalid_imsi() runs on test_CT { - var hexstring imsi := '01234'H; + /* 23.003 Section 2.2 clearly states that an IMSI with less + * than 5 digits is impossible. Even 5 digits is still questionable */ + var hexstring imsi := '0123'H; var GSUP_PDU res; f_init(); - res := f_perform_SAI(imsi, 17); + res := f_perform_SAI(imsi, 96); /* Invalid Mandatory information */ setverdict(pass); } + +testcase TC_gsup_sai_err_unknown_imsi() runs on test_CT { + var hexstring imsi := f_rnd_imsi('26242'H); + var GSUP_PDU res; + + f_init(); + + res := f_perform_SAI(imsi, 2); + setverdict(pass); +} + /* test SAI for a number of different subscriber cases (algo, 2g/3g, ...) */ testcase TC_gsup_sai() runs on test_CT { @@ -545,6 +558,7 @@ execute( TC_gsup_sai_err_invalid_imsi() ); execute( TC_gsup_sai() ); execute( TC_gsup_ul_unknown_imsi() ); + execute( TC_gsup_sai_err_unknown_imsi() ); execute( TC_gsup_ul() ); execute( TC_vty() ); execute( TC_vty_msisdn_isd() ); -- To view, visit https://gerrit.osmocom.org/7062 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ded77b3029aae6bc3fe022190819b6a86189f5a Gerrit-PatchSet: 1 Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Owner: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder