dexter has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38964?usp=email )

Change subject: PCUIF: fix usage of bts number in PCUIF_TXT_IND
......................................................................

PCUIF: fix usage of bts number in PCUIF_TXT_IND

When we receive the PCU_VERSION using tr_PCUIF_TXT_IND we must ignore the
included BTS number because the PCU_VERSION is not addressed to a specific
BTS. When we send a PCU_VERSION using ts_PCUIF_TXT_IND, we should always
use the bts number 0 to be consistent (the BSC/BTS will ignore this number
anyway).

Let's fix the usage of tr_PCUIF_TXT_IND and put comments, to make clear why
the above applies.

Change-Id: I93de261fc77806b2f817e0d30cb1b0d377ed0dbb
related: OS#6507
---
M bts/BTS_Tests.ttcn
M bts/BTS_Tests_OML.ttcn
M pcu/PCUIF_Components.ttcn
M pcu/PCU_Tests_NS.ttcn
4 files changed, 10 insertions(+), 4 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 1ba8d53..8c05bb3 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -5446,6 +5446,8 @@
        f_init();
        map(self:PCU, system:PCU);
        f_init_pcu(PCU, testcasename(), g_pcu_conn_id, g_pcu_last_info);
+       /* For TXT indications of type PCU_VERSION, the receiving process is 
expected to ignore the BTS number (0) we
+        * use when sending the PCU_VERSION. */
        PCU.send(t_SD_PCUIF(g_pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, 
testcasename())));
 }

diff --git a/bts/BTS_Tests_OML.ttcn b/bts/BTS_Tests_OML.ttcn
index 980643a..e1b75e6 100644
--- a/bts/BTS_Tests_OML.ttcn
+++ b/bts/BTS_Tests_OML.ttcn
@@ -150,6 +150,8 @@
                Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout 
waiting for PCU INFO_IND");
                }
        }
+       /* For TXT indications of type PCU_VERSION, the receiving process is 
expected to ignore the BTS number (0) we
+        * use when sending the PCU_VERSION. */
        pt.send(t_SD_PCUIF(pcu_conn_id, ts_PCUIF_TXT_IND(0, PCU_VERSION, 
testcasename())));
 }

diff --git a/pcu/PCUIF_Components.ttcn b/pcu/PCUIF_Components.ttcn
index 6e956ba..75e7a35 100644
--- a/pcu/PCUIF_Components.ttcn
+++ b/pcu/PCUIF_Components.ttcn
@@ -503,8 +503,9 @@
        PCUIF.receive(tr_RAW_PCU_EV(PCU_EV_CONNECT));

        alt {
-       /* Wait for TXT.ind (PCU_VERSION) and respond with INFO.ind (SI13) */
-       [] PCUIF.receive(tr_PCUIF_TXT_IND(bts_nr, PCU_VERSION, ?)) -> value 
pcu_msg {
+       /* Wait for TXT.ind (PCU_VERSION) and respond with INFO.ind (SI13). We 
may ignore the bts_nr field because for
+        * TXT indications of type PCU_VERSION this field has no meaning. */
+       [] PCUIF.receive(tr_PCUIF_TXT_IND(?, PCU_VERSION, ?)) -> value pcu_msg {
                log("Rx TXT.ind from the PCU, version is ", 
pcu_msg.u.txt_ind.text);

                /* Send System Information 13 to the PCU */
diff --git a/pcu/PCU_Tests_NS.ttcn b/pcu/PCU_Tests_NS.ttcn
index eea8d3f..7155d58 100644
--- a/pcu/PCU_Tests_NS.ttcn
+++ b/pcu/PCU_Tests_NS.ttcn
@@ -55,8 +55,9 @@
        g_pcu_conn_id := f_pcuif_listen(PCU, mp_pcu_sock_path);
        PCU.receive(UD_connected:?);

-       /* Wait for PCU_VERSION and return INFO_IND */
-       PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_TXT_IND(0, PCU_VERSION, 
?)));
+       /* Wait for PCU_VERSION and return INFO_IND. We may ignore the bts_nr 
field because for TXT indications of type
+        * PCU_VERSION this field has no meaning. */
+       PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_TXT_IND(?, PCU_VERSION, 
?)));
        /* FIXME: make sure to use parameters from mp_gb_cfg.bvc[0].cell_id in 
the PCU INFO IND */
        var template PCUIF_Message info_ind_msg := ts_PCUIF_INFO_IND(0, 
info_ind);
        PCU.send(t_SD_PCUIF(g_pcu_conn_id, info_ind_msg));

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38964?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: I93de261fc77806b2f817e0d30cb1b0d377ed0dbb
Gerrit-Change-Number: 38964
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to