pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41129?usp=email )


Change subject: Move RAN_Configurations module parameter definition to 
*_Tests.default
......................................................................

Move RAN_Configurations module parameter definition to *_Tests.default

This way we can easily tweak values, which usually involve other
programs' config like osmo-stp, without needing to recompile ttcn-3.
Furthermore, we avoid ending up in the situation where the .ttcn file
contains invalid data which is alwayred overridden in .default, like it
happened in MSC_Tests.ttcn.

Change-Id: Id7e77a2ecf68520a853dc35fe0013a0611e744a1
---
M bsc/BSC_Tests.default
M bsc/BSC_Tests.ttcn
M hnbgw/HNBGW_Tests.default
M hnbgw/HNBGW_Tests.ttcn
M msc/MSC_Tests.ttcn
M sgsn/SGSN_Tests.default
M sgsn/SGSN_Tests.ttcn
7 files changed, 149 insertions(+), 165 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/29/41129/1

diff --git a/bsc/BSC_Tests.default b/bsc/BSC_Tests.default
index 65cc7c2..51dbdc2 100644
--- a/bsc/BSC_Tests.default
+++ b/bsc/BSC_Tests.default
@@ -38,5 +38,43 @@

 [MODULE_PARAMETERS]
 Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoBSC";
+BSC_Tests.mp_bssap_cfg := {
+       {
+               transport := BSSAP_TRANSPORT_AoIP,
+               transport_is_server := false,
+               sccp_service_type := "mtp3_itu",
+               sctp_addr := { 23905, "127.0.0.1", 2905, "127.0.0.1" },
+               own_pc := 185,  /* 0.23.1 first MSC emulation */
+               own_ssn := 254,
+               peer_pc := 187, /* 0.23.3 osmo-bsc */
+               peer_ssn := 254,
+               sio := '83'O,
+               rctx := 1
+       },
+       {
+               transport := BSSAP_TRANSPORT_AoIP,
+               transport_is_server := false,
+               sccp_service_type := "mtp3_itu",
+               sctp_addr := { 23906, "127.0.0.1", 2905, "127.0.0.1" },
+               own_pc := 2,    /* 0.0.2 second MSC emulation */
+               own_ssn := 254,
+               peer_pc := 187, /* 0.23.3 osmo-bsc */
+               peer_ssn := 254,
+               sio := '83'O,
+               rctx := 2
+       },
+       {
+               transport := BSSAP_TRANSPORT_AoIP,
+               transport_is_server := false,
+               sccp_service_type := "mtp3_itu",
+               sctp_addr := { 23907, "127.0.0.1", 2905, "127.0.0.1" },
+               own_pc := 3,    /* 0.0.3 third MSC emulation */
+               own_ssn := 254,
+               peer_pc := 187, /* 0.23.3 osmo-bsc */
+               peer_ssn := 254,
+               sio := '83'O,
+               rctx := 3
+       }
+};

 [EXECUTE]
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 86f9d48..e6260b3 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -687,41 +687,7 @@
        /* IP address at which the test binds */
        charstring mp_test_ip := "127.0.0.1";

-       RAN_Configurations mp_bssap_cfg := {
-               {
-                       transport := BSSAP_TRANSPORT_AoIP,
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { 23905, "127.0.0.1", 2905, "127.0.0.1" },
-                       own_pc := 185,  /* 0.23.1 first MSC emulation */
-                       own_ssn := 254,
-                       peer_pc := 187, /* 0.23.3 osmo-bsc */
-                       peer_ssn := 254,
-                       sio := '83'O,
-                       rctx := 1
-               },
-               {
-                       transport := BSSAP_TRANSPORT_AoIP,
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { 23906, "127.0.0.1", 2905, "127.0.0.1" },
-                       own_pc := 2,    /* 0.0.2 second MSC emulation */
-                       own_ssn := 254,
-                       peer_pc := 187, /* 0.23.3 osmo-bsc */
-                       peer_ssn := 254,
-                       sio := '83'O,
-                       rctx := 2
-               },
-               {
-                       transport := BSSAP_TRANSPORT_AoIP,
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { 23907, "127.0.0.1", 2905, "127.0.0.1" },
-                       own_pc := 3,    /* 0.0.3 third MSC emulation */
-                       own_ssn := 254,
-                       peer_pc := 187, /* 0.23.3 osmo-bsc */
-                       peer_ssn := 254,
-                       sio := '83'O,
-                       rctx := 3
-               }
-       };
+       RAN_Configurations mp_bssap_cfg := { /* Set in BSC_Tests.default */ };

        /* Must match per BTS config in osmo-bsc.cfg */
        phys_chan_configs phys_chan_config := {
@@ -1100,7 +1066,7 @@
                mgw_udp_port := 2427 + mgw_nr,
                /* Enable it for SCCPlite, since we have 2 MGCP sockets towards 
MGW (UDP one +
                   the one with MGCP over IPA forwarded from MSC one) */
-               multi_conn_mode := (mp_bssap_cfg[0].transport == 
BSSAP_TRANSPORT_SCCPlite_SERVER)
+               multi_conn_mode := (mp_bssap_cfg[0].transport == 
BSSAP_TRANSPORT_SCCPlite)
        };

        vc_MGCP[mgw_nr] := MGCP_Emulation_CT.create(id) alive;
@@ -12709,7 +12675,7 @@
                execute( TC_stat_msc_sctp_disconnected() );
        }
        execute( TC_ctrl() );
-       if (mp_bssap_cfg[0].transport == BSSAP_TRANSPORT_SCCPlite_SERVER) {
+       if (mp_bssap_cfg[0].transport == BSSAP_TRANSPORT_SCCPlite) {
                execute( TC_ctrl_location() );
        }

diff --git a/hnbgw/HNBGW_Tests.default b/hnbgw/HNBGW_Tests.default
index 174b012..0278796 100644
--- a/hnbgw/HNBGW_Tests.default
+++ b/hnbgw/HNBGW_Tests.default
@@ -33,5 +33,97 @@

 [MODULE_PARAMETERS]
 Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoHNBGW";
+#MSCs (NUM_MSC entries):
+HNBGW_Tests.mp_cn_cfg := {
+       {
+               transport := RANAP_TRANSPORT_IuCS,
+               sccp_service_type := "mtp3_itu",
+               sctp_addr := { 23905, "127.0.0.1", 2905, "127.0.0.1" },
+               own_pc := 185,  /* 0.23.1 first MSC emulation */
+               own_ssn := 142,
+               peer_pc := 189, /* 0.23.5 osmo-hnbgw */
+               peer_ssn := 142,
+               sio := '83'O,
+               rctx := 1
+       },
+       {
+               transport := RANAP_TRANSPORT_IuCS,
+               sccp_service_type := "mtp3_itu",
+               sctp_addr := { 23907, "127.0.0.1", 2905, "127.0.0.1" },
+               own_pc := 2,    /* 0.0.2 second MSC emulation */
+               own_ssn := 142,
+               peer_pc := 189, /* 0.23.5 osmo-hnbgw */
+               peer_ssn := 142,
+               sio := '83'O,
+               rctx := 3
+       },
+       {
+               transport := RANAP_TRANSPORT_IuCS,
+               sccp_service_type := "mtp3_itu",
+               sctp_addr := { 23909, "127.0.0.1", 2905, "127.0.0.1" },
+               own_pc := 3,    /* 0.0.3 third MSC emulation */
+               own_ssn := 142,
+               peer_pc := 189, /* 0.23.5 osmo-hnbgw */
+               peer_ssn := 142,
+               sio := '83'O,
+               rctx := 5
+       },
+       {
+               transport := RANAP_TRANSPORT_IuCS,
+               sccp_service_type := "mtp3_itu",
+               sctp_addr := { 23911, "127.0.0.1", 2905, "127.0.0.1" },
+               own_pc := 4,    /* 0.0.4 fourth MSC emulation */
+               own_ssn := 142,
+               peer_pc := 189, /* 0.23.5 osmo-hnbgw */
+               peer_ssn := 142,
+               sio := '83'O,
+               rctx := 7
+       },
+       /* SGSNs (NUM_SGSN entries) */
+       {
+               transport := RANAP_TRANSPORT_IuCS,
+               sccp_service_type := "mtp3_itu",
+               sctp_addr := { /* local */ 23906, "127.0.0.1", /* remote */ 
2905, "127.0.0.1" },
+               own_pc := 188,  /* 0.23.4 first SGSN emulation */
+               own_ssn := 142,
+               peer_pc := 189, /* 2237, 1.23.5 osmo-hnbgw */
+               peer_ssn := 142,
+               sio := '83'O,
+               rctx := 2
+       },
+       {
+               transport := RANAP_TRANSPORT_IuCS,
+               sccp_service_type := "mtp3_itu",
+               sctp_addr := { /* local */ 23908, "127.0.0.1", /* remote */ 
2905, "127.0.0.1" },
+               own_pc := 10,   /* 0.1.2 second SGSN emulation */
+               own_ssn := 142,
+               peer_pc := 189, /* 2237, 1.23.5 osmo-hnbgw */
+               peer_ssn := 142,
+               sio := '83'O,
+               rctx := 4
+       },
+       {
+               transport := RANAP_TRANSPORT_IuCS,
+               sccp_service_type := "mtp3_itu",
+               sctp_addr := { /* local */ 23910, "127.0.0.1", /* remote */ 
2905, "127.0.0.1" },
+               own_pc := 11,   /* 0.1.3 third SGSN emulation */
+               own_ssn := 142,
+               peer_pc := 189, /* 2237, 1.23.5 osmo-hnbgw */
+               peer_ssn := 142,
+               sio := '83'O,
+               rctx := 6
+       },
+       {
+               transport := RANAP_TRANSPORT_IuCS,
+               sccp_service_type := "mtp3_itu",
+               sctp_addr := { /* local */ 23912, "127.0.0.1", /* remote */ 
2905, "127.0.0.1" },
+               own_pc := 12,   /* 0.1.4 fourth SGSN emulation */
+               own_ssn := 142,
+               peer_pc := 189, /* 2237, 1.23.5 osmo-hnbgw */
+               peer_ssn := 142,
+               sio := '83'O,
+               rctx := 8
+       }
+};

 [EXECUTE]
diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index 2a343fc..2ef7b4d 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -117,99 +117,7 @@
        charstring mp_mgw_ip := "127.0.0.1";
        integer mp_mgw_port := 2427;

-       RAN_Configurations mp_cn_cfg := {
-               /* MSCs (NUM_MSC entries) */
-               {
-                       transport := RANAP_TRANSPORT_IuCS,
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { 23905, "127.0.0.1", 2905, "127.0.0.1" },
-                       own_pc := 185,  /* 0.23.1 first MSC emulation */
-                       own_ssn := 142,
-                       peer_pc := 189, /* 0.23.5 osmo-hnbgw */
-                       peer_ssn := 142,
-                       sio := '83'O,
-                       rctx := 1
-               },
-               {
-                       transport := RANAP_TRANSPORT_IuCS,
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { 23907, "127.0.0.1", 2905, "127.0.0.1" },
-                       own_pc := 2,    /* 0.0.2 second MSC emulation */
-                       own_ssn := 142,
-                       peer_pc := 189, /* 0.23.5 osmo-hnbgw */
-                       peer_ssn := 142,
-                       sio := '83'O,
-                       rctx := 3
-               },
-               {
-                       transport := RANAP_TRANSPORT_IuCS,
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { 23909, "127.0.0.1", 2905, "127.0.0.1" },
-                       own_pc := 3,    /* 0.0.3 third MSC emulation */
-                       own_ssn := 142,
-                       peer_pc := 189, /* 0.23.5 osmo-hnbgw */
-                       peer_ssn := 142,
-                       sio := '83'O,
-                       rctx := 5
-               },
-               {
-                       transport := RANAP_TRANSPORT_IuCS,
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { 23911, "127.0.0.1", 2905, "127.0.0.1" },
-                       own_pc := 4,    /* 0.0.4 fourth MSC emulation */
-                       own_ssn := 142,
-                       peer_pc := 189, /* 0.23.5 osmo-hnbgw */
-                       peer_ssn := 142,
-                       sio := '83'O,
-                       rctx := 7
-               },
-
-               /* SGSNs (NUM_SGSN entries) */
-               {
-                       transport := RANAP_TRANSPORT_IuCS,
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { /* local */ 23906, "127.0.0.1", /* 
remote */ 2905, "127.0.0.1" },
-                       own_pc := 188,  /* 0.23.4 first SGSN emulation */
-                       own_ssn := 142,
-                       peer_pc := 189, /* 2237, 1.23.5 osmo-hnbgw */
-                       peer_ssn := 142,
-                       sio := '83'O,
-                       rctx := 2
-               },
-               {
-                       transport := RANAP_TRANSPORT_IuCS,
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { /* local */ 23908, "127.0.0.1", /* 
remote */ 2905, "127.0.0.1" },
-                       own_pc := 10,   /* 0.1.2 second SGSN emulation */
-                       own_ssn := 142,
-                       peer_pc := 189, /* 2237, 1.23.5 osmo-hnbgw */
-                       peer_ssn := 142,
-                       sio := '83'O,
-                       rctx := 4
-               },
-               {
-                       transport := RANAP_TRANSPORT_IuCS,
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { /* local */ 23910, "127.0.0.1", /* 
remote */ 2905, "127.0.0.1" },
-                       own_pc := 11,   /* 0.1.3 third SGSN emulation */
-                       own_ssn := 142,
-                       peer_pc := 189, /* 2237, 1.23.5 osmo-hnbgw */
-                       peer_ssn := 142,
-                       sio := '83'O,
-                       rctx := 6
-               },
-               {
-                       transport := RANAP_TRANSPORT_IuCS,
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { /* local */ 23912, "127.0.0.1", /* 
remote */ 2905, "127.0.0.1" },
-                       own_pc := 12,   /* 0.1.4 fourth SGSN emulation */
-                       own_ssn := 142,
-                       peer_pc := 189, /* 2237, 1.23.5 osmo-hnbgw */
-                       peer_ssn := 142,
-                       sio := '83'O,
-                       rctx := 8
-               }
-       };
+       RAN_Configurations mp_cn_cfg := { /* Set in HNBGW_Tests.default */ };

        boolean mp_enable_pfcp_tests := false;
        /* IP address at which we listen for PFCP to emulate a UPF in ttcn3 */
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index ceddc11..12c6561 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -166,28 +166,7 @@
        charstring mp_vlr_name := "vlr.example.net";
        integer mp_bssap_reset_retries := 1;

-       RAN_Configurations mp_bssap_cfg := {
-               {
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { 23905, "127.0.0.1", 2905, "127.0.0.1" },
-                       own_pc := 185,
-                       own_ssn := 254,
-                       peer_pc := 187,
-                       peer_ssn := 254,
-                       sio := '83'O,
-                       rctx := 0
-               },
-               {
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { 23906, "127.0.0.1", 2905, "127.0.0.1" },
-                       own_pc := 186,
-                       own_ssn := 254,
-                       peer_pc := 187,
-                       peer_ssn := 254,
-                       sio := '83'O,
-                       rctx := 1
-               }
-       };
+       RAN_Configurations mp_bssap_cfg := { /* Set in MSC_Tests.default */ };
 }

 /* altstep for the global guard timer (only used when BSSAP_DIRECT
diff --git a/sgsn/SGSN_Tests.default b/sgsn/SGSN_Tests.default
index 5a7b8c6..459429b 100644
--- a/sgsn/SGSN_Tests.default
+++ b/sgsn/SGSN_Tests.default
@@ -39,6 +39,19 @@

 [MODULE_PARAMETERS]
 Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoSGSN";
+SGSN_Tests.mp_ranap_cfg := {
+       {
+               transport := RANAP_TRANSPORT_IuCS,
+               sccp_service_type := "mtp3_itu",
+               sctp_addr := { 23908, "127.0.0.1", 2905, "127.0.0.1" },
+               own_pc := 195,
+               own_ssn := 142,
+               peer_pc := 188, /* 0.23.4 */
+               peer_ssn := 142,
+               sio := '83'O,
+               rctx := 2
+       }
+};

 [MAIN_CONTROLLER]

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 9c13c20..ab818d0 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -149,19 +149,7 @@
                }
        };

-       RAN_Configurations mp_ranap_cfg := {
-               {
-                       transport := RANAP_TRANSPORT_IuCS,
-                       sccp_service_type := "mtp3_itu",
-                       sctp_addr := { 23908, "127.0.0.1", 2905, "127.0.0.1" },
-                       own_pc := 195,
-                       own_ssn := 142,
-                       peer_pc := 188, /* 0.23.4 */
-                       peer_ssn := 142,
-                       sio := '83'O,
-                       rctx := 2
-               }
-       }
+       RAN_Configurations mp_ranap_cfg := { /* Set in SGSN_Tests.default */ };
 };

 const integer NUM_BVC_PER_NSE := 1;

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41129?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: Id7e77a2ecf68520a853dc35fe0013a0611e744a1
Gerrit-Change-Number: 41129
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to