Change in osmo-ttcn3-hacks[master]: ns: test if SNS fails when all signalling NSVCs failes

2021-06-15 Thread lynxis lazus
lynxis lazus has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24651 )

Change subject: ns: test if SNS fails when all signalling NSVCs failes
..

ns: test if SNS fails when all signalling NSVCs failes

As 3GPP TS 48.016 § 7.4b.1.1 specifies this behaviour.
1. do success SNS configuration
2. change sig weight of the seconds inactive bind
3. add second bind to SNS
4. stop reacting to NS_ALIVE on first NSVC (only NSVC with sig weight)
5. expect SNS SIZE

Related: OS#5039
Change-Id: Id06e34e7235d94a06152a0015487a507d6492a97
---
M ns/NS_Tests.ttcn
1 file changed, 36 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/ns/NS_Tests.ttcn b/ns/NS_Tests.ttcn
index 8bbb43c..9fbd5ab 100644
--- a/ns/NS_Tests.ttcn
+++ b/ns/NS_Tests.ttcn
@@ -626,6 +626,41 @@
f_clean_ns_codec();
 }

+/* Test if SNS fails when all signalling NSVCs failes
+ * 3GPP TS 48.016 § 7.4b.1.1
+ * 1. do success SNS configuration
+ * 2. change sig weight of the seconds inactive bind
+ * 3. add second bind to SNS
+ * 4. stop reacting to NS_ALIVE on first NSVC (only NSVC with sig weight)
+ * 5. expect SNS SIZE
+ */
+testcase TC_sns_bss_all_signalling_nsvcs_failed() runs on RAW_Test_CT {
+   g_handle_rx_alive := true;
+   f_init_vty();
+   f_init_ns_codec(mp_nsconfig);
+   f_init_ns_codec(mp_nsconfig, 1);
+   f_incoming_sns_size();
+   f_incoming_sns_config();
+   f_outgoing_sns_config();
+   var default d := activate(as_rx_alive_tx_ack());
+
+   f_vty_config2(NSVTY, {"ns", "bind udp local2"}, "ip-sns 
signalling-weight 0 data-weight 99");
+   f_vty_config2(NSVTY, {"ns", "nse " & int2str(g_nsconfig.nsei)}, 
"ip-sns-bind local2");
+   f_incoming_sns_add(idx_add := 1, w_sig := 0, w_user := 99);
+   as_rx_alive_tx_ack(oneshot := true, idx := 1);
+   activate(as_rx_alive_tx_ack(idx := 1));
+   /* 2x NSVCs up, stop first NSVC */
+   deactivate(d);
+   /* libosmocore will rotate the SNS binds on failure */
+   NSCP[0].receive(t_NS_ALIVE);
+   NSCP[0].receive(t_NS_ALIVE);
+   NSCP[0].receive(t_NS_ALIVE);
+   f_incoming_sns_size(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() );
@@ -676,6 +711,7 @@
execute( TC_sns_bss_add() );
execute( TC_sns_bss_del() );
execute( TC_sns_bss_add_change_del() );
+   execute( TC_sns_bss_all_signalling_nsvcs_failed() );
}
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24651
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id06e34e7235d94a06152a0015487a507d6492a97
Gerrit-Change-Number: 24651
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-ttcn3-hacks[master]: ns: test if SNS fails when all signalling NSVCs failes

2021-06-14 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24651 )

Change subject: ns: test if SNS fails when all signalling NSVCs failes
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24651
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id06e34e7235d94a06152a0015487a507d6492a97
Gerrit-Change-Number: 24651
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 14 Jun 2021 08:38:45 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: ns: test if SNS fails when all signalling NSVCs failes

2021-06-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24651 )

Change subject: ns: test if SNS fails when all signalling NSVCs failes
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24651
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id06e34e7235d94a06152a0015487a507d6492a97
Gerrit-Change-Number: 24651
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sun, 13 Jun 2021 18:09:05 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: ns: test if SNS fails when all signalling NSVCs failes

2021-06-12 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24651 )


Change subject: ns: test if SNS fails when all signalling NSVCs failes
..

ns: test if SNS fails when all signalling NSVCs failes

As 3GPP TS 48.016 § 7.4b.1.1 specifies this behaviour.
1. do success SNS configuration
2. change sig weight of the seconds inactive bind
3. add second bind to SNS
4. stop reacting to NS_ALIVE on first NSVC (only NSVC with sig weight)
5. expect SNS SIZE

Related: OS#5039
Change-Id: Id06e34e7235d94a06152a0015487a507d6492a97
---
M ns/NS_Tests.ttcn
1 file changed, 36 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/51/24651/1

diff --git a/ns/NS_Tests.ttcn b/ns/NS_Tests.ttcn
index 8bbb43c..9fbd5ab 100644
--- a/ns/NS_Tests.ttcn
+++ b/ns/NS_Tests.ttcn
@@ -626,6 +626,41 @@
f_clean_ns_codec();
 }

+/* Test if SNS fails when all signalling NSVCs failes
+ * 3GPP TS 48.016 § 7.4b.1.1
+ * 1. do success SNS configuration
+ * 2. change sig weight of the seconds inactive bind
+ * 3. add second bind to SNS
+ * 4. stop reacting to NS_ALIVE on first NSVC (only NSVC with sig weight)
+ * 5. expect SNS SIZE
+ */
+testcase TC_sns_bss_all_signalling_nsvcs_failed() runs on RAW_Test_CT {
+   g_handle_rx_alive := true;
+   f_init_vty();
+   f_init_ns_codec(mp_nsconfig);
+   f_init_ns_codec(mp_nsconfig, 1);
+   f_incoming_sns_size();
+   f_incoming_sns_config();
+   f_outgoing_sns_config();
+   var default d := activate(as_rx_alive_tx_ack());
+
+   f_vty_config2(NSVTY, {"ns", "bind udp local2"}, "ip-sns 
signalling-weight 0 data-weight 99");
+   f_vty_config2(NSVTY, {"ns", "nse " & int2str(g_nsconfig.nsei)}, 
"ip-sns-bind local2");
+   f_incoming_sns_add(idx_add := 1, w_sig := 0, w_user := 99);
+   as_rx_alive_tx_ack(oneshot := true, idx := 1);
+   activate(as_rx_alive_tx_ack(idx := 1));
+   /* 2x NSVCs up, stop first NSVC */
+   deactivate(d);
+   /* libosmocore will rotate the SNS binds on failure */
+   NSCP[0].receive(t_NS_ALIVE);
+   NSCP[0].receive(t_NS_ALIVE);
+   NSCP[0].receive(t_NS_ALIVE);
+   f_incoming_sns_size(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() );
@@ -676,6 +711,7 @@
execute( TC_sns_bss_add() );
execute( TC_sns_bss_del() );
execute( TC_sns_bss_add_change_del() );
+   execute( TC_sns_bss_all_signalling_nsvcs_failed() );
}
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24651
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id06e34e7235d94a06152a0015487a507d6492a97
Gerrit-Change-Number: 24651
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange