osmith has uploaded this change for review.
hlr: pyhss: make TC_gsup_ul_subscriber_data pass
Extend the PDP Info IE templates with wildcards, as PyHSS adds
additional IEs in PDP info, currently PDP Address and an empty Quality
of Service IE.
The PDP Address IE is marked as "conditional" with the note "The
conditional IE are mandantory unless mentioned otherwise":
https://gitea.osmocom.org/cellular-infrastructure/osmo-gsm-manuals/src/commit/d24f7186f6dff58940ee57b97f9d278cc07f245e/common/chapters/gsup.adoc#L1231-L1237
The reason why I had previously disabled the test with PyHSS was wrong
(confused send auth info with insert subscriber data).
With this patch and the following changes in PyHSS, the test passes:
* https://github.com/nickvsnetworking/pyhss/pull/277
* https://github.com/nickvsnetworking/pyhss/pull/278
Change-Id: I5441d7eeb4b36e9ed499e36ae839b87ce9888d52
---
M hlr/HLR_Tests.ttcn
1 file changed, 14 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/74/41474/1
diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index 6cfc08f..5048005 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -1164,11 +1164,15 @@
template GSUP_IEs tr_pdp_info_internet := {
tr_GSUP_IE_PDP_CONTEXT_ID('01'O),
- tr_GSUP_IE_APN(str2apn("internet"))
+ *, /* PDP Address (sent by PyHSS, omitted by OsmoHLR) */
+ tr_GSUP_IE_APN(str2apn("internet")),
+ *
}
template GSUP_IEs tr_pdp_info_wildcard := {
tr_GSUP_IE_PDP_CONTEXT_ID('02'O),
- tr_GSUP_IE_APN(str2apn("*"))
+ *, /* PDP Address (sent by PyHSS, omitted by OsmoHLR) */
+ tr_GSUP_IE_APN(str2apn("*")),
+ *
}
/* Search for PDP info 'internet', '*' */
@@ -1212,9 +1216,13 @@
var HlrSubscriberList sl;
f_init(false);
- f_vty_config2(VTY, {"hlr", "ps"} , "no pdp-profiles default");
- f_vty_config2(VTY, {"hlr", "ps", "pdp-profiles default", "profile 1"}, "apn internet");
- f_vty_config2(VTY, {"hlr", "ps", "pdp-profiles default", "profile 2"}, "apn *");
+ if (m_hlr_impl == HLR_IMPL_OSMOCOM) {
+ f_vty_config2(VTY, {"hlr", "ps"} , "no pdp-profiles default");
+ f_vty_config2(VTY, {"hlr", "ps", "pdp-profiles default", "profile 1"}, "apn internet");
+ f_vty_config2(VTY, {"hlr", "ps", "pdp-profiles default", "profile 2"}, "apn *");
+ } else {
+ /* PyHSS: already set via setup_db.sh */
+ }
sl := f_gen_subs();
f_start_handler_per_sub(refers(f_TC_gsup_ul_subscriber_data), sl);
@@ -2206,6 +2214,7 @@
execute( TC_gsup_ul_unknown_imsi() );
execute( TC_gsup_sai_err_unknown_imsi() );
execute( TC_gsup_ul() );
+ execute( TC_gsup_ul_subscriber_data() );
execute( TC_gsup_purge_cs() );
execute( TC_gsup_purge_ps() );
execute( TC_gsup_purge_unknown() );
@@ -2240,11 +2249,6 @@
* run it with osmo_dia2gsup. */
execute( TC_gsup_sai_eps() );
- /* OsmoHLR + osmo_dia2gsup: check for PDP Info IE in Send
- * Authentication Info Request (see SYS#6391 and
- * https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/35899) */
- execute( TC_gsup_ul_subscriber_data() );
-
/* OsmoHLR's VTY interface */
execute( TC_vty() );
execute( TC_vty_msisdn_isd() );
To view, visit change 41474. To unsubscribe, or for help writing mail filters, visit settings.