pespin has uploaded this change for review.

View Change

hnbgw: Introduce test TC_hnb_reregister_reuse_sctp_assoc

Change-Id: I7386bd4e786daf2688a68ab174a9d4f0b093a741
---
M hnbgw/HNBGW_Tests.ttcn
M library/hnbap/HNBAP_Templates.ttcn
2 files changed, 35 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/25/29325/1
diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index b440292..b5b0d4f 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -684,6 +684,17 @@
f_shutdown_helper();
}

+/* Drop HNBAP conn (HNBAP DEREG) and reconnect it (HNBAP REG) using same SCTP association.
+ * Related: OS#5676, SYS#6113 */
+testcase TC_hnb_reregister_reuse_sctp_assoc() runs on test_CT {
+ f_init();
+ f_hnbap_register(0);
+ HNBAP[0].send(ts_HNBAP_HNBDe_Register(ts_HnbapCause(unspecified)));
+ f_hnbap_register(0);
+ f_verify_talloc_count(HNBGWVTY, {"struct hnb_context"}, expect_count := 1);
+ f_shutdown_helper();
+}
+
/***********************************************************************
* RUA / RANAP Testing
***********************************************************************/
@@ -1355,6 +1366,9 @@
execute(TC_ranap_cs_mo_disconnect());
execute(TC_ranap_ps_mo_disconnect());
execute(TC_ps_rab_assignment());
+
+ /* Run at the end since it makes osmo-hnbgw <= 1.3.0 crash: OS#5676 */
+ execute(TC_hnb_reregister_reuse_sctp_assoc);
}

}
diff --git a/library/hnbap/HNBAP_Templates.ttcn b/library/hnbap/HNBAP_Templates.ttcn
index 89edf76..2576d17 100644
--- a/library/hnbap/HNBAP_Templates.ttcn
+++ b/library/hnbap/HNBAP_Templates.ttcn
@@ -232,4 +232,25 @@
}
}

+/* 9.1.9 HNB DE-REGISTER */
+template (value) HNBAP_PDU
+ts_HNBAP_HNBDe_Register(template (value) Cause cause) := {
+ initiatingMessage := {
+ procedureCode := id_HNBDe_Register,
+ criticality := reject,
+ value_ := {
+ HNBDe_Register := {
+ protocolIEs := {
+ {
+ id := HNBAP_Constants.id_Cause,
+ criticality := ignore,
+ value_ := { Cause := cause }
+ }
+ },
+ protocolExtensions := omit /* TODO: BackoffTimer */
+ }
+ }
+ }
+}
+
}

To view, visit change 29325. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7386bd4e786daf2688a68ab174a9d4f0b093a741
Gerrit-Change-Number: 29325
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-MessageType: newchange