From 9061ebd70fbfaaf27bf2400a6c00b79769b7e1a4 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 7 Sep 2021 01:00:23 +0200 Subject: ns2: add tc TC_mirror_unitdata_tx_status_blocked Change-Id: I9be2037b9228d2400bd293841ae6b957cb25c501 --- ns/NS_Tests.ttcn | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/ns/NS_Tests.ttcn b/ns/NS_Tests.ttcn index 3d7b31a0..b57d6869 100644 --- a/ns/NS_Tests.ttcn +++ b/ns/NS_Tests.ttcn @@ -964,6 +964,34 @@ testcase TC_tx_unitdata() runs on RAW_Test_CT { f_clean_ns_codec(); } +/* 48.016 7.2 ensure tx status (blocked) is correctly parsed + * + * TTCN -> NS: reset + * TTCN <- NS: reset ack + * TTCN -> NS: unblock + * TTCN <- NS: unblock ack + * TTCN -> NS: unitdata + * TTCN <- NS: unitdata (mirror) + * TTCN -> NS: status (blocked) + * TTCN -> NS: unitdata + * TTCN <- NS: status (blocked) + */ +testcase TC_mirror_unitdata_tx_status_blocked() runs on RAW_Test_CT { + f_tx_unblock(); + + f_vty_config2(NSVTY, {}, "mirror-mode enable"); + NSCP[0].send(ts_NS_UNITDATA(t_SduCtrlB, 42, '0011234242230101'O)); + var PDU_NS pdu := f_ns_exp(tr_NS_UNITDATA(t_SduCtrlB, 42, '0011234242230101'O)); + + NSCP[0].send(ts_NS_STATUS(NS_CAUSE_NSVC_BLOCKED, pdu)); + NSCP[0].send(ts_NS_UNITDATA(t_SduCtrlB, 42, '0011234242230101'O)); + f_ns_exp(tr_NS_STATUS(NS_CAUSE_NSVC_BLOCKED)); + + f_vty_config2(NSVTY, {}, "mirror-mode disable"); + f_sleep(1.0); + f_clean_ns_codec(); +} + control { if (mp_dialect == NS2_DIALECT_STATIC_RESETBLOCK or mp_dialect == NS2_DIALECT_IPACCESS) { execute( TC_tx_reset() ); @@ -974,6 +1002,7 @@ control { execute( TC_tx_block_by_vty_reset() ); execute( TC_tx_block_unitdata_over_blocked() ); execute( TC_rx_block_unitdata_over_blocked() ); + execute( TC_mirror_unitdata_tx_status_blocked() ); // execute( TC_block_other_nsvc() ); // reset, unblock, sleep(1), block over another nsvci /* 48.016 7.2 Unblock procedure */ execute( TC_tx_unblock() ); -- cgit v1.2.3