This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
lynxis lazus gerrit-no-reply at lists.osmocom.orgHello laforge, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20673 to review the following change. Change subject: FR/FRNET: add Frame Relay emulation ...................................................................... FR/FRNET: add Frame Relay emulation Add frame relay testcase for BSS and SGSN side. The test cases require hdlc interfaces (based on dadhi with super channels and no lmi). Change-Id: I95d64dc26a8d2ff02d6cf2bfcd22a97e5481f957 --- M deps/Makefile A fr-net/FRNET_Tests.cfg A fr-net/FRNET_Tests.default A fr-net/FRNET_Tests.ttcn A fr-net/gen_links.sh A fr-net/regen_makefile.sh A fr/FR_Tests.cfg A fr/FR_Tests.default A fr/FR_Tests.ttcn A fr/gen_links.sh A fr/regen_makefile.sh 11 files changed, 356 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/73/20673/1 diff --git a/deps/Makefile b/deps/Makefile index 77e469d..a67c4f8 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -70,6 +70,7 @@ OSMOGIT_REPOS= titan.ProtocolModules.MAP \ titan.ProtocolModules.BSSMAP \ titan.TestPorts.USB \ + titan.TestPorts.AF_PACKET \ osmo-uecups ALL_REPOS=$(ECLIPSEGITHUB_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS) @@ -111,6 +112,7 @@ titan.ProtocolModules.SUA_commit= R.5.A-5-gcf1137a titan.ProtocolModules.TCP_commit= R.3.A-5-g39e5f45 titan.ProtocolModules.UDP_commit= R.4.A-5-geea8aa3 +titan.TestPorts.AF_PACKET_commit= master titan.TestPorts.Common_Components.Socket-API_commit= R.6.A-6-gf4380d0 titan.TestPorts.Common_Components.Abstract_Socket_commit= R.9.B-4-gbd41994 titan.TestPorts.HTTPmsg_commit= R.9.B-4-g9a0dfde diff --git a/fr-net/FRNET_Tests.cfg b/fr-net/FRNET_Tests.cfg new file mode 100644 index 0000000..dedd828 --- /dev/null +++ b/fr-net/FRNET_Tests.cfg @@ -0,0 +1,16 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" +# testsuite specific configuration, not expected to change +"./FRNET_Tests.default" + +[LOGGING] + +[MODULE_PARAMETERS] + +[TESTPORT_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] +FRNET_Tests.control diff --git a/fr-net/FRNET_Tests.default b/fr-net/FRNET_Tests.default new file mode 100644 index 0000000..e2fe60d --- /dev/null +++ b/fr-net/FRNET_Tests.default @@ -0,0 +1,15 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" + +[LOGGING] +#*.FileMask := LOG_ALL +ConsoleMask := ERROR | WARNING | TESTCASE | TIMEROP_START | DEBUG_ENCDEC | USER + +[MODULE_PARAMETERS] + +[TESTPORT_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] diff --git a/fr-net/FRNET_Tests.ttcn b/fr-net/FRNET_Tests.ttcn new file mode 100644 index 0000000..c2994f6 --- /dev/null +++ b/fr-net/FRNET_Tests.ttcn @@ -0,0 +1,80 @@ +module FRNET_Tests { + +import from General_Types all; +import from Osmocom_Types all; +import from Osmocom_Gb_Types all; + +import from NS_Emulation all; +import from BSSGP_Emulation all; + +modulepar { + NSConfigurations mp_nsconfig := { + { + provider := { + fr := { + netdev := "hdlc2", + dlci := 123 + } + }, + nsvci := 123, + nsei := 123, + role_sgsn := true, + handle_sns := false + } + }; +} + +type record GbInstance { + NS_CT vc_NS, + BSSGP_CT vc_BSSGP, + BssgpConfig cfg +}; + +const integer NUM_GB := 1; +type record length(NUM_GB) of GbInstance GbInstances; +type record length(NUM_GB) of NSConfiguration NSConfigurations; +type record length(NUM_GB) of BssgpCellId BssgpCellIds; + + +type component test_CT { + var GbInstances g_gb; +}; + +private function f_init_gb(inout GbInstance gb, charstring id, integer offset) runs on test_CT { + var charstring id_idx := id & int2str(offset); + gb.vc_NS := NS_CT.create(id_idx & "-NSemu"); + gb.vc_BSSGP := BSSGP_CT.create(id_idx & "-BSSGPemu"); + connect(gb.vc_BSSGP:BSCP, gb.vc_NS:NS_SP); + gb.vc_NS.start(NSStart(mp_nsconfig[offset], id_idx)); + gb.vc_BSSGP.start(BssgpStart(gb.cfg, testcasename())); +} + +testcase TC_foo() runs on test_CT { + g_gb[0].cfg := { + nsei := 123, + sgsn_role := true, + bvc := { + { + bvci := 1123, + cell_id := { + ra_id := { + lai := { + mcc_mnc := '262F42'H, + lac := 11123 + }, + rac := 1 + }, + cell_id := 31123 + }, + depth := BSSGP_DECODE_DEPTH_LLC + } + } + }; + f_init_gb(g_gb[0], "gb", 0); + while (true) { + f_sleep(100.0); + } +} + + +} diff --git a/fr-net/gen_links.sh b/fr-net/gen_links.sh new file mode 100755 index 0000000..4ab3ed0 --- /dev/null +++ b/fr-net/gen_links.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +BASEDIR=../deps + +. ../gen_links.sh.inc + +#DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src +#FILES="UD_PT.cc UD_PT.hh UD_PortType.ttcn UD_Types.ttcn" +#gen_links $DIR $FILES + +DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src +FILES="Socket_API_Definitions.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.IPL4asp/src +FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.NS_v7.3.0/src +FILES="NS_Types.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.BSSGP_v13.0.0/src +FILES="BSSGP_EncDec.cc BSSGP_Types.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.LLC_v7.1.0/src +FILES="LLC_EncDec.cc LLC_Types.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.SNDCP_v7.0.0/src +FILES="SNDCP_Types.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.TELNETasp/src +FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.AF_PACKET/src +FILES="AF_PACKET_PT.cc AF_PACKET_PT.hh AF_PACKET_PortType.ttcn AF_PACKET_PortTypes.ttcn " +FILES+="FrameRelay_Types.ttcn FrameRelay_CodecPort.ttcn FrameRelay_Emulation.ttcn Q931_Types.ttcn Q933_Types.ttcn " +gen_links $DIR $FILES + +DIR=../library +FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn Osmocom_Types.ttcn " +FILES+="NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc " +FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn " +FILES+="LLC_Templates.ttcn " +gen_links $DIR $FILES + +ignore_pp_results diff --git a/fr-net/regen_makefile.sh b/fr-net/regen_makefile.sh new file mode 100755 index 0000000..0a05f6c --- /dev/null +++ b/fr-net/regen_makefile.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +FILES="*.ttcn *.ttcnpp BSSGP_EncDec.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc " +FILES+="AF_PACKET_PT.cc " +FILES+="Native_FunctionDefs.cc " +FILES+="NS_CodecPort_CtrlFunctDef.cc LLC_EncDec.cc LLC_Types.cc TELNETasp_PT.cc " + +export CPPFLAGS_TTCN3="-DNS_EMULATION_FR" + +../regen-makefile.sh FRNET_Tests.ttcn $FILES diff --git a/fr/FR_Tests.cfg b/fr/FR_Tests.cfg new file mode 100644 index 0000000..9a97c3a --- /dev/null +++ b/fr/FR_Tests.cfg @@ -0,0 +1,16 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" +# testsuite specific configuration, not expected to change +"./FR_Tests.default" + +[LOGGING] + +[MODULE_PARAMETERS] + +[TESTPORT_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] +FR_Tests.control diff --git a/fr/FR_Tests.default b/fr/FR_Tests.default new file mode 100644 index 0000000..e2fe60d --- /dev/null +++ b/fr/FR_Tests.default @@ -0,0 +1,15 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" + +[LOGGING] +#*.FileMask := LOG_ALL +ConsoleMask := ERROR | WARNING | TESTCASE | TIMEROP_START | DEBUG_ENCDEC | USER + +[MODULE_PARAMETERS] + +[TESTPORT_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] diff --git a/fr/FR_Tests.ttcn b/fr/FR_Tests.ttcn new file mode 100644 index 0000000..a7b8a97 --- /dev/null +++ b/fr/FR_Tests.ttcn @@ -0,0 +1,83 @@ +module FR_Tests { + +import from General_Types all; +import from Osmocom_Types all; +import from Osmocom_Gb_Types all; + +import from NS_Emulation all; +import from BSSGP_Emulation all; + +modulepar { + NSConfigurations mp_nsconfig := { + { + provider := { + fr := { + netdev := "hdlc1", + dlci := 123 + } + }, + nsvci := 123, + nsei := 123, + role_sgsn := false, + handle_sns := false + } + }; +} + +type record GbInstance { + NS_CT vc_NS, + BSSGP_CT vc_BSSGP, + BssgpConfig cfg +}; + +const integer NUM_GB := 1; +type record length(NUM_GB) of GbInstance GbInstances; +type record length(NUM_GB) of NSConfiguration NSConfigurations; +type record length(NUM_GB) of BssgpCellId BssgpCellIds; + + +type component test_CT { + var GbInstances g_gb; +}; + +private function f_init_gb(inout GbInstance gb, charstring id, integer offset) runs on test_CT { + var charstring id_idx := id & int2str(offset); + gb.vc_NS := NS_CT.create(id_idx & "-NSemu"); + gb.vc_BSSGP := BSSGP_CT.create(id_idx & "-BSSGPemu"); + connect(gb.vc_BSSGP:BSCP, gb.vc_NS:NS_SP); + gb.vc_NS.start(NSStart(mp_nsconfig[offset], id_idx)); + gb.vc_BSSGP.start(BssgpStart(gb.cfg, testcasename())); +} + +testcase TC_foo() runs on test_CT { + g_gb[0].cfg := { + nsei := 123, + sgsn_role := false, + bvc := { + { + bvci := 1123, + cell_id := { + ra_id := { + lai := { + mcc_mnc := '262F42'H, + lac := 11123 + }, + rac := 1 + }, + cell_id := 31123 + }, + depth := BSSGP_DECODE_DEPTH_LLC + } + } + }; + f_init_gb(g_gb[0], "gb", 0); + while (true) { + f_sleep(100.0); + } +} + +control { + execute( TC_foo() ); +} + +} diff --git a/fr/gen_links.sh b/fr/gen_links.sh new file mode 100755 index 0000000..4ab3ed0 --- /dev/null +++ b/fr/gen_links.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +BASEDIR=../deps + +. ../gen_links.sh.inc + +#DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src +#FILES="UD_PT.cc UD_PT.hh UD_PortType.ttcn UD_Types.ttcn" +#gen_links $DIR $FILES + +DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src +FILES="Socket_API_Definitions.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.IPL4asp/src +FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.NS_v7.3.0/src +FILES="NS_Types.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.BSSGP_v13.0.0/src +FILES="BSSGP_EncDec.cc BSSGP_Types.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.LLC_v7.1.0/src +FILES="LLC_EncDec.cc LLC_Types.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.SNDCP_v7.0.0/src +FILES="SNDCP_Types.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.TELNETasp/src +FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.AF_PACKET/src +FILES="AF_PACKET_PT.cc AF_PACKET_PT.hh AF_PACKET_PortType.ttcn AF_PACKET_PortTypes.ttcn " +FILES+="FrameRelay_Types.ttcn FrameRelay_CodecPort.ttcn FrameRelay_Emulation.ttcn Q931_Types.ttcn Q933_Types.ttcn " +gen_links $DIR $FILES + +DIR=../library +FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn Osmocom_Types.ttcn " +FILES+="NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc " +FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn " +FILES+="LLC_Templates.ttcn " +gen_links $DIR $FILES + +ignore_pp_results diff --git a/fr/regen_makefile.sh b/fr/regen_makefile.sh new file mode 100755 index 0000000..c38fed4 --- /dev/null +++ b/fr/regen_makefile.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +FILES="*.ttcn *.ttcnpp IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc Native_FunctionDefs.cc " +FILES+="BSSGP_EncDec.cc NS_CodecPort_CtrlFunctDef.cc LLC_EncDec.cc TELNETasp_PT.cc " +FILES+="AF_PACKET_PT.cc AF_PACKET_PT.hh " + +export CPPFLAGS_TTCN3="-DNS_EMULATION_FR" + +../regen-makefile.sh FR_Tests.ttcn $FILES -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20673 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I95d64dc26a8d2ff02d6cf2bfcd22a97e5481f957 Gerrit-Change-Number: 20673 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis at fe80.eu> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201016/0453edd9/attachment.htm>