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
This commit is contained in:
parent
423d8f48f8
commit
023b61b2cb
|
@ -70,6 +70,7 @@ OSMOGITHUB_REPOS= titan.TestPorts.SCTPasp \
|
|||
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.SNDCP_v7.0.0_commit= R.2.A-5-gd0f0ce6
|
|||
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
|
||||
|
|
|
@ -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
|
|
@ -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]
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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]
|
|
@ -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() );
|
||||
}
|
||||
|
||||
}
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue