summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-09-06 01:20:18 +0200
committerlynxis lazus <lynxis@fe80.eu>2021-09-07 12:42:48 +0000
commit357c572ad283cd9539844c53d15da704f9f339a4 (patch)
treea9a50b7d2a0c749654c8c8ccf0b02ea35e2a1e0b
parent24788049b8c9a789403c3b1eb40119980f09a504 (diff)
ns: add test case for UNITDATA transmission
-rw-r--r--ns/NS_Tests.ttcn29
1 files changed, 28 insertions, 1 deletions
diff --git a/ns/NS_Tests.ttcn b/ns/NS_Tests.ttcn
index 58aeacd3..c3247fcb 100644
--- a/ns/NS_Tests.ttcn
+++ b/ns/NS_Tests.ttcn
@@ -77,6 +77,7 @@ private function f_init_vty() runs on RAW_Test_CT {
map(self:NSVTY, system:NSVTY);
f_vty_set_prompts(NSVTY);
f_vty_transceive(NSVTY, "enable");
+ f_vty_config2(NSVTY, {}, "mirror-mode disable");
f_vty_transceive(NSVTY, "nsvc nsei " & int2str(mp_nsconfig.nsei) & " force-unconfigured");
if (mp_dialect == NS2_DIALECT_SNS) {
f_vty_config2(NSVTY, {"ns", "nse " & int2str(mp_nsconfig.nsei)}, "ip-sns-bind local");
@@ -218,7 +219,7 @@ testcase TC_rx_block_unitdata_over_blocked() runs on RAW_Test_CT {
* TTCN -> NS: unblock
* TTCN <- NS: unblock ack
*/
-testcase TC_tx_unblock() runs on RAW_Test_CT {
+function f_tx_unblock() runs on RAW_Test_CT {
f_init_vty();
f_init_ns_codec(mp_nsconfig, guard_secs := 30.0);
@@ -229,6 +230,10 @@ testcase TC_tx_unblock() runs on RAW_Test_CT {
f_outgoing_ns_unblock();
setverdict(pass);
+}
+
+testcase TC_tx_unblock() runs on RAW_Test_CT {
+ f_tx_unblock();
f_sleep(1.0);
f_clean_ns_codec();
}
@@ -922,6 +927,27 @@ testcase TC_sns_sgsn_add_change_del() runs on RAW_Test_CT {
f_clean_ns_codec();
}
+/* 48.016 7.2 transmit a UNITDATA over an ALIVE connection
+ *
+ * TTCN -> NS: reset
+ * TTCN <- NS: reset ack
+ * TTCN -> NS: unblock
+ * TTCN <- NS: unblock ack
+ * TTCN -> NS: unitdata
+ * TTCN <- NS: unitdata (mirror)
+ */
+testcase TC_tx_unitdata() 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));
+ f_ns_exp(tr_NS_UNITDATA(t_SduCtrlB, 42, '0011234242230101'O));
+ 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() );
@@ -965,6 +991,7 @@ control {
}
execute( TC_no_reset_alive_ack() );
+ execute( TC_tx_unitdata() );
}
if (mp_dialect == NS2_DIALECT_SNS) {