BTS_Tests: add a test case verifying coding of two NSVCs in INFO.ind

Change-Id: Id11094774d737a545a2cce389059d7e527219573
This commit is contained in:
Vadim Yanitskiy 2021-03-23 05:58:02 +01:00 committed by fixeria
parent 204fe621ed
commit e2a50a88ac
1 changed files with 36 additions and 0 deletions

View File

@ -5761,6 +5761,41 @@ testcase TC_pcu_socket_nsvc_ipv6() runs on test_CT {
setverdict(pass);
}
/* Verify coding of two NSVCs in the INFO.ind message */
testcase TC_pcu_socket_two_nsvc() runs on test_CT {
f_init_vty_bsc();
f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 0 nsvci 1234");
f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 0 local udp port 1234");
f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 0 remote ip 127.127.127.127");
f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 0 remote udp port 1234");
f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 1 nsvci 5678");
f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 1 local udp port 5678");
f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 1 remote ip fd00::ca:ff:ee");
f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 1 remote udp port 5678");
f_init_pcu_test();
var PCUIF_info_ind info_ind := g_pcu_last_info.u.info_ind;
var PCUIF_RemoteAddr remote_addr := info_ind.remote_addr;
var template PCUIF_RemoteAddr tr_remote_addr := {
addr_type := { PCUIF_ADDR_TYPE_IPV4, PCUIF_ADDR_TYPE_IPV6 },
addr := { f_inet_addr("127.127.127.127"), f_inet6_addr("fd00::ca:ff:ee") }
};
if (not match(info_ind.nsvci, { 1234, 5678 }))
{ setverdict(fail, "NSVCI ", info_ind.nsvci, " does not match { 1234, 5678 }"); }
if (not match(remote_addr, tr_remote_addr))
{ setverdict(fail, "NSVC address ", remote_addr, " does not match ", tr_remote_addr); }
if (not match(info_ind.local_port, { 1234, 5678 }))
{ setverdict(fail, "NSVC lport ", info_ind.local_port, " does not match { 1234, 5678 }"); }
if (not match(info_ind.remote_port, { 1234, 5678 }))
{ setverdict(fail, "NSVC rport ", info_ind.remote_port, " does not match { 1234, 5678 }"); }
setverdict(pass);
}
/***********************************************************************
* Osmocom Style Dynamic Timeslot Support
***********************************************************************/
@ -7353,6 +7388,7 @@ control {
execute( TC_pcu_info_ind_fh_params() );
execute( TC_pcu_socket_nsvc_ipv4() );
execute( TC_pcu_socket_nsvc_ipv6() );
execute( TC_pcu_socket_two_nsvc() );
} else {
log("PCU socket path not available, skipping PCU tests");
}