Change in osmo-ttcn3-hacks[master]: ns2: add test case to call force unconfigured after SNS Size received

lynxis lazus gerrit-no-reply at lists.osmocom.org
Thu Aug 12 02:11:26 UTC 2021


lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25135 )

Change subject: ns2: add test case to call force unconfigured after SNS Size received
......................................................................

ns2: add test case to call force unconfigured after SNS Size received

The old ns dummy crashed when calling force unconfigured while sending
SNS SIZE.

Change-Id: I16d89391c0d665485cf453c260531023de6096fb
---
M ns/NS_Tests.ttcn
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/ns/NS_Tests.ttcn b/ns/NS_Tests.ttcn
index 9fbd5ab..a0b9216 100644
--- a/ns/NS_Tests.ttcn
+++ b/ns/NS_Tests.ttcn
@@ -626,6 +626,21 @@
 	f_clean_ns_codec();
 }
 
+/* Ensure the ns2 code doesn't crash when calling force unconfigured while sending SNS SIZE */
+testcase TC_sns_rx_size_force_unconf() 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_ns_exp(tr_SNS_SIZE(mp_nsconfig.nsei, rst_flag := true, max_nsvcs := ?,
+				num_v4 := ?, num_v6 := omit));
+	f_vty_transceive(NSVTY, "nsvc nsei " & int2str(mp_nsconfig.nsei) & " force-unconfigured");
+	f_ns_exp(tr_SNS_SIZE(mp_nsconfig.nsei, rst_flag := true, max_nsvcs := ?,
+				num_v4 := ?, num_v6 := omit));
+	setverdict(pass);
+	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
@@ -712,6 +727,7 @@
 		execute( TC_sns_bss_del() );
 		execute( TC_sns_bss_add_change_del() );
 		execute( TC_sns_bss_all_signalling_nsvcs_failed() );
+		execute( TC_sns_rx_size_force_unconf() );
 	}
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25135
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: I16d89391c0d665485cf453c260531023de6096fb
Gerrit-Change-Number: 25135
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210812/4d2cc034/attachment.htm>


More information about the gerrit-log mailing list