summaryrefslogtreecommitdiffstats
path: root/stp
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-05-13 21:23:29 +0200
committerHarald Welte <laforge@osmocom.org>2021-05-13 21:30:04 +0200
commit261aea72a6bfa949696447da23243a9d0ab93be7 (patch)
tree426f68883d96c867897b215b2956e2c33b476e0c /stp
parent5ef25533cfde388c1d8fbf13784df211aae70f72 (diff)
stp: Add tests for snm_inactive quirk
Diffstat (limited to 'stp')
-rw-r--r--stp/STP_Tests_M3UA.ttcn48
1 files changed, 48 insertions, 0 deletions
diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn
index 78819b49..dfa82a22 100644
--- a/stp/STP_Tests_M3UA.ttcn
+++ b/stp/STP_Tests_M3UA.ttcn
@@ -931,6 +931,52 @@ testcase TC_clnt_quirk_daud_in_asp() runs on RAW_M3UA_CT {
f_clear_m3ua();
}
+/* Expect a normal ASP to reject any [S]SNM messages in ASP-INACTIVE state */
+testcase TC_clnt_no_snm_inactive() runs on RAW_M3UA_CT {
+ f_init_m3ua();
+ f_quirk("no_notify");
+ f_quirk("daud_in_asp");
+ f_no_quirk("snm_inactive");
+ f_init_m3ua_srv();
+
+ /* bring ASP only UP (into INACTIVE state), but not ACTIVE! */
+ f_M3UA_CLNT_asp_up(M3UA_SRV(0));
+ f_M3UA_exp(M3UA_SRV(0), tr_M3UA_ASPAC(*, *));
+
+ var template (value) M3UA_Point_Codes aff_pcs := { ts_M3UA_PC(mp_m3ua_configs[M3UA_SRV(0)].point_code) };
+ f_M3UA_send(M3UA_SRV(0), ts_M3UA_DAUD(aff_pcs));
+ f_M3UA_exp(M3UA_SRV(0), tr_M3UA_ERR('00000006'O, omit));
+ setverdict(pass);
+
+ f_no_quirk("no_notify");
+ f_no_quirk("daud_in_asp");
+ f_clear_m3ua();
+}
+
+/* quirk 'snm_inactive': Process [S]SNM in ASP-INACTIVE state */
+testcase TC_clnt_quirk_snm_inactive() runs on RAW_M3UA_CT {
+ f_init_m3ua();
+ f_quirk("no_notify");
+ f_quirk("daud_in_asp");
+ f_quirk("snm_inactive");
+ f_init_m3ua_srv();
+
+ /* bring ASP only UP (into INACTIVE state), but not ACTIVE! */
+ f_M3UA_CLNT_asp_up(M3UA_SRV(0));
+ f_M3UA_exp(M3UA_SRV(0), tr_M3UA_ASPAC(*, *));
+
+ var template (value) M3UA_Point_Codes aff_pcs := { ts_M3UA_PC(mp_m3ua_configs[M3UA_SRV(0)].point_code) };
+ f_M3UA_send(M3UA_SRV(0), ts_M3UA_DAUD(aff_pcs));
+ f_M3UA_exp(M3UA_SRV(0), tr_M3UA_DAVA(aff_pcs));
+ setverdict(pass);
+
+ f_no_quirk("no_notify");
+ f_no_quirk("daud_in_asp");
+ f_no_quirk("snm_inactive");
+ f_clear_m3ua();
+}
+
+
control {
/* M3UA Tests */
execute( TC_connect_asp_up() );
@@ -968,6 +1014,8 @@ control {
execute( TC_clnt_quirk_no_notify_asp_act() );
execute( TC_clnt_no_daud_in_asp() );
execute( TC_clnt_quirk_daud_in_asp() );
+ execute( TC_clnt_no_snm_inactive() );
+ execute( TC_clnt_quirk_snm_inactive() );
}
/* M3UA SSNM tests */