fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42107?usp=email )
Change subject: msc: TC_ho_inter_bsc: wait for the target BSC to become ready
......................................................................
msc: TC_ho_inter_bsc: wait for the target BSC to become ready
A race condition may occur between the two testcase components
emulating BSCs: the source BSC initiates handover to the terget
BSC before the later completes connection establishment with the
MSC. In this case, the MSC fails to find the target peer and
rejects our HandoverRequired with HandoverRequiredReject.
Target RAN peer from neighbor config is not connected: Cell ID CGI:023-42-5-6
resolves to target address 0.24.2
Cannot find target peer for cell ID CGI:023-42-5-6
Attempted Handover to 1 cells without success
Let's avoid this by waiting for the target BSC to become available
before initiating the handover procedure. Use the COORD port
("intercom") to signal readiness of the target BSC.
Change-Id: I00b8a8b89ec7bb15590d30aadf40055981375a5d
Related: OS#6951
---
M msc/MSC_Tests.ttcn
1 file changed, 17 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks
refs/changes/07/42107/1
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 17fac68..e9acddc 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -6023,6 +6023,12 @@
f_perform_lu();
f_mo_call_establish(cpars);
+ /* The target BSC needs to be ready for incoming handover.
+ * This is indicated by f_tc_ho_inter_bsc1() via the "intercom". */
+ log("Waiting for the target BSC to become ready...");
+ COORD.receive("READY");
+ log("The target BSC is ready, it's time for the handover!");
+
/* Remember the last n_sd (sequence number),
* we will need it when the other BSS hands over back to us. */
var N_Sd_Array last_n_sd := f_bssmap_last_n_sd();
@@ -6131,6 +6137,11 @@
f_init_handler(pars);
f_create_bssmap_exp_n_connect(194);
+ /* At this point, the target BSC is ready for incoming handover.
+ * Indicate this to f_tc_ho_inter_bsc0() via the "intercom". */
+ log("The target BSC becomes ready for handover");
+ COORD.send("READY");
+
var template BSSMAP_IE_EncryptionInformation encryptionInformation;
var template BSSMAP_IE_ChosenEncryptionAlgorithm
chosenEncryptionAlgorithm;
var template BSSMAP_IE_KC128 kC128;
@@ -6236,8 +6247,12 @@
}
f_vty_config(MSCVTY, "network", "encryption a5 " & int2str(a5_n));
- vc_conn0 := f_start_handler_with_pars(refers(f_tc_ho_inter_bsc0),
pars0);
- vc_conn1 := f_start_handler_with_pars(refers(f_tc_ho_inter_bsc1),
pars1);
+ vc_conn0 := f_start_handler_create(pars0);
+ vc_conn1 := f_start_handler_create(pars1);
+ connect(vc_conn0:COORD, vc_conn1:COORD);
+
+ f_start_handler_run(vc_conn0, refers(f_tc_ho_inter_bsc0), pars0);
+ f_start_handler_run(vc_conn1, refers(f_tc_ho_inter_bsc1), pars1);
vc_conn0.done;
vc_conn1.done;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42107?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: I00b8a8b89ec7bb15590d30aadf40055981375a5d
Gerrit-Change-Number: 42107
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>