ns: add test case TC_tx_blocked_foreign_nsvc
Check if a BLOCK PDU over a different/foreign connection is parsed. * 2x initialize NSVC (RESET/UNBLOCK) * TTCN 0-> NS: block (nsvci 1) * TTCN <-0 NS: block ack (nsvci 1) * TTCN 1-> NS: unit data (nsvci 1) * TTCN <-1 NS: status (blocked) Change-Id: I2b37a712bd70037b35b9deb8dab4a72d1e1d29fbchanges/60/25560/3
parent
46f199271e
commit
6d916910a3
|
@ -992,6 +992,43 @@ testcase TC_mirror_unitdata_tx_status_blocked() runs on RAW_Test_CT {
|
|||
f_clean_ns_codec();
|
||||
}
|
||||
|
||||
/* 48.016 7.2 ensure tx status (blocked) is correctly parsed over a foreign NSVC
|
||||
*
|
||||
* 2x initialize NSVC (RESET/UNBLOCK)
|
||||
* TTCN 0-> NS: block (nsvci 1)
|
||||
* TTCN <-0 NS: block ack (nsvci 1)
|
||||
* TTCN 1-> NS: unit data (nsvci 1)
|
||||
* TTCN <-1 NS: status (blocked)
|
||||
*/
|
||||
testcase TC_tx_blocked_foreign_nsvc() runs on RAW_Test_CT {
|
||||
f_init_vty();
|
||||
f_vty_config2(NSVTY, {}, "mirror-mode enable");
|
||||
f_init_ns_codec(mp_nsconfig, idx := 0);
|
||||
f_init_ns_codec(mp_nsconfig, idx := 1);
|
||||
|
||||
/* do a NS Reset procedure */
|
||||
f_outgoing_ns_reset(idx := 0);
|
||||
f_outgoing_ns_reset(idx := 1);
|
||||
|
||||
/* send alive acks */
|
||||
activate(as_rx_alive_tx_ack(idx := 0));
|
||||
activate(as_rx_alive_tx_ack(idx := 1));
|
||||
|
||||
f_outgoing_ns_unblock(idx := 0);
|
||||
f_outgoing_ns_unblock(idx := 1);
|
||||
|
||||
/* both NSVC are alive and unblocked */
|
||||
NSCP[0].send(ts_NS_BLOCK(NS_CAUSE_TRANSIT_NETWORK_FAILURE, g_nsconfig.nsvc[1].nsvci));
|
||||
f_ns_exp(tr_NS_BLOCK_ACK(g_nsconfig.nsvc[1].nsvci));
|
||||
|
||||
NSCP[1].send(ts_NS_UNITDATA(t_SduCtrlB, 42, '0011234242230101'O));
|
||||
f_ns_exp(tr_NS_STATUS(NS_CAUSE_NSVC_BLOCKED), idx := 1);
|
||||
|
||||
setverdict(pass);
|
||||
f_clean_ns_codec();
|
||||
}
|
||||
|
||||
|
||||
control {
|
||||
if (mp_dialect == NS2_DIALECT_STATIC_RESETBLOCK or mp_dialect == NS2_DIALECT_IPACCESS) {
|
||||
execute( TC_tx_reset() );
|
||||
|
@ -1003,6 +1040,7 @@ control {
|
|||
execute( TC_tx_block_unitdata_over_blocked() );
|
||||
execute( TC_rx_block_unitdata_over_blocked() );
|
||||
execute( TC_mirror_unitdata_tx_status_blocked() );
|
||||
execute( TC_tx_blocked_foreign_nsvc() );
|
||||
// execute( TC_block_other_nsvc() ); // reset, unblock, sleep(1), block over another nsvci
|
||||
/* 48.016 7.2 Unblock procedure */
|
||||
execute( TC_tx_unblock() );
|
||||
|
|
|
@ -21,6 +21,18 @@ NS_Tests.mp_nsconfig := {
|
|||
}
|
||||
},
|
||||
nsvci := 1234
|
||||
},
|
||||
{
|
||||
provider := {
|
||||
ip := {
|
||||
address_family := AF_INET,
|
||||
local_ip := "127.0.0.1",
|
||||
local_udp_port := 22001,
|
||||
remote_ip := "127.0.0.1",
|
||||
remote_udp_port := 23001
|
||||
}
|
||||
},
|
||||
nsvci := 1235
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,5 +91,9 @@ ns
|
|||
bind udp local
|
||||
listen 127.0.0.1 23000
|
||||
accept-ipaccess
|
||||
bind udp local2
|
||||
listen 127.0.0.1 23001
|
||||
accept-ipaccess
|
||||
nse 1234
|
||||
nsvc ipa local 127.0.0.1 22000 nsvci 1234
|
||||
nsvc ipa local2 127.0.0.1 22001 nsvci 1235
|
||||
|
|
Loading…
Reference in New Issue