pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38597?usp=email )
Change subject: hnbgw: Tear down SCCP conn from CN under normal conditions
......................................................................
hnbgw: Tear down SCCP conn from CN under normal conditions
Specs mention that under normal conditions the CN is the one expected to
tear down the SCCP underlaying connection upon recieving
Iu-ReleaseComplete.
Change-Id: I920cabcb63ca352db0ed06e4c35dade52bae5399
---
M hnbgw/ConnHdlr.ttcn
M library/SCCP_Templates.ttcn
2 files changed, 19 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/97/38597/1
diff --git a/hnbgw/ConnHdlr.ttcn b/hnbgw/ConnHdlr.ttcn
index 1b053d0..13c8d4c 100644
--- a/hnbgw/ConnHdlr.ttcn
+++ b/hnbgw/ConnHdlr.ttcn
@@ -72,6 +72,7 @@
import from L3_Common all;
import from SCCPasp_Types all;
+import from SCCP_Templates all;
/***********************************************************************
* code running inside per-UE ConnHdlr
@@ -444,19 +445,6 @@
/* expect to receive it on the Iu side */
rx := f_bssap_expect(exp_rx);
-
- /* expect disconnect on the Iu side */
- T.start;
- alt {
- [] BSSAP.receive(tr_MSC_CONN_PRIM_DISC_IND) {
- setverdict(pass);
- }
- [] T.timeout {
- setverdict(fail, "Timeout waiting for Iu disconnect");
- return rx;
- }
-
- }
return rx;
}
@@ -545,13 +533,13 @@
/* HNB <- CN: Iu-ReleaseCmd, HNB -> CN: Iu-ReleaseCompl */
function f_cn_iu_release_procedure(boolean mgcp_teardown := false, boolean pfcp_teardown := false) runs on ConnHdlr {
var RANAP_PDU tx;
- timer T := 5.0;
+ timer T;
tx := valueof(ts_RANAP_IuReleaseCommand(g_pars.rab_rel_cause));
f_iu2iuh(tx);
if (mgcp_teardown) {
- T.start;
+ T.start(5.0);
alt {
[] as_mgcp_dlcx() {}
[] T.timeout {
@@ -570,6 +558,21 @@
tx := valueof(ts_RANAP_IuReleaseComplete());
f_iuh2iu_disconnect(tx, RUA_IEs.Cause:{radioNetwork:=normal});
+
+ /* Once CN receives Iu-ReleaseComplete, it tears down the SCCP conn under Iu: */
+ BSSAP.send(ts_MSC_CONN_PRIM_DISC_REQ(sccp_par_reason_end_user_originated));
+ /* There's no signalling from lower layers regarding when RLC is
+ * received, hence only make sure the IUT is not sending an RLSD on its own
+ * after a timeout, which would mean it didn't process our RLSD */
+ T.start(2.0);
+ alt {
+ [] BSSAP.receive(tr_MSC_CONN_PRIM_DISC_IND) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Rx Unexpected RLSD to our RLSD");
+ }
+ [] T.timeout {
+ setverdict(pass);
+ }
+ }
}
/* Reply to a received CRCX with an OK (or the reply configured in cpars), using the given parameters.
diff --git a/library/SCCP_Templates.ttcn b/library/SCCP_Templates.ttcn
index 40a6156..f36dc5a 100644
--- a/library/SCCP_Templates.ttcn
+++ b/library/SCCP_Templates.ttcn
@@ -15,6 +15,7 @@
import from SCCPasp_Types all;
import from SCCP_Emulation all;
+const integer sccp_par_reason_end_user_originated := 0; /* End user originated */
const integer sccp_par_reason_end_user_failure := 2; /* End user failure */
/* construct a SCCP_PAR_Address with just SSN and no PC or GT */
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38597?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I920cabcb63ca352db0ed06e4c35dade52bae5399
Gerrit-Change-Number: 38597
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38592?usp=email )
Change subject: testenv: make podman stop more robust
......................................................................
testenv: make podman stop more robust
Terminate the watchdog process before killing the podman container. This
avoids bogus errors from a race condition where the container gets
killed first, and then the watchdog process tries to feed the watchdog
and fails:
[testenv] Stopping podman container
[testenv] + ['podman', 'kill', 'testenv-hnbgw-all-osmocom-latest-20241031-1222-f34534a5-1']
e41700779a8ca5daf18ac5daa27d59a84d8442196e352f2756a19baf0592cf89
Error: no container with name or ID testenv-hnbgw-all-osmocom-latest-20241031-1222-f34534a5-1 found: no such container
[testenv] podman container crashed!
While at it, use "check=False" with the "podman kill" command, so we
avoid additional error messages if the container was already killed at
that point (could happen through a bug). If we fail to kill it here, it
is not a problem because the watchdog will ensure it terminates shortly
after the watchdog process was stopped.
Related: OS#6607
Change-Id: I6c67273af5b6a80ae0c94e14cb92e3784807c21d
---
M _testenv/testenv/podman.py
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
osmith: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/_testenv/testenv/podman.py b/_testenv/testenv/podman.py
index f849408..538ec41 100644
--- a/_testenv/testenv/podman.py
+++ b/_testenv/testenv/podman.py
@@ -311,6 +311,7 @@
global container_name
global run_shell_on_stop
global restart_count
+ global feed_watchdog_process
if not is_running():
return
@@ -329,10 +330,13 @@
restart_msg = " (restart)" if restart else ""
logging.info(f"Stopping podman container{restart_msg}")
- testenv.cmd.run(["podman", "kill", container_name], no_podman=True)
if feed_watchdog_process:
feed_watchdog_process.terminate()
+ feed_watchdog_process.wait()
+ feed_watchdog_process = None
+
+ testenv.cmd.run(["podman", "kill", container_name], no_podman=True, check=False)
if restart:
testenv.cmd.run(["podman", "wait", container_name], no_podman=True, check=False)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38592?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6c67273af5b6a80ae0c94e14cb92e3784807c21d
Gerrit-Change-Number: 38592
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria.
osmith has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38592?usp=email )
Change subject: testenv: make podman stop more robust
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
I'm seeing this error a lot right now, probably a side effect of: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38580
Merging.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38592?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6c67273af5b6a80ae0c94e14cb92e3784807c21d
Gerrit-Change-Number: 38592
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 31 Oct 2024 15:55:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes