Change in osmo-ttcn3-hacks[master]: NS_Tests: add testcases for incoming SNS_ADD/DEL procedures
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24402 ) Change subject: NS_Tests: add testcases for incoming SNS_ADD/DEL procedures .. NS_Tests: add testcases for incoming SNS_ADD/DEL procedures Allow to test add and remove a bind via vty. Related: OS#5036 Change-Id: I98c04c083521ab38b58e8df9f1aee89445ab536d --- M ns/NS_Tests.sns.cfg M ns/NS_Tests.ttcn M ns/osmo-ns.sns.cfg 3 files changed, 69 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/ns/NS_Tests.sns.cfg b/ns/NS_Tests.sns.cfg index 23b616b..5ee5e1a 100644 --- a/ns/NS_Tests.sns.cfg +++ b/ns/NS_Tests.sns.cfg @@ -21,6 +21,18 @@ } }, nsvci := 1234 + }, + { + provider := { + ip := { + address_family := AF_INET, + local_ip := "127.0.0.1", + local_udp_port := 22000, + remote_ip := "127.0.0.1", + remote_udp_port := 23001 + } + }, + nsvci := 1235 } } } diff --git a/ns/NS_Tests.ttcn b/ns/NS_Tests.ttcn index f69bbe0..58b2dda 100644 --- a/ns/NS_Tests.ttcn +++ b/ns/NS_Tests.ttcn @@ -44,6 +44,20 @@ } }, nsvci := 97 + }, + { + provider := { + ip := { + address_family := AF_INET, + local_udp_port := 21000, + local_ip := "127.0.0.1", + remote_udp_port := 23001, + remote_ip := "127.0.0.1", + data_weight := 1, + signalling_weight := 1 + } + }, + nsvci := 98 } } }; @@ -58,6 +72,7 @@ f_vty_set_prompts(NSVTY); f_vty_transceive(NSVTY, "enable"); f_vty_transceive(NSVTY, "nsvc nsei " & int2str(mp_nsconfig.nsei) & " force-unconfigured"); + f_vty_config2(NSVTY, {"ns", "nse " & int2str(mp_nsconfig.nsei)}, "no ip-sns-bind local2"); } /* ensure no matching message is received within 'tout' */ @@ -527,6 +542,42 @@ f_clean_ns_codec(); } +testcase TC_sns_bss_add() 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(); + activate(as_rx_alive_tx_ack()); + f_vty_config2(NSVTY, {"ns", "nse " & int2str(g_nsconfig.nsei)}, "ip-sns-bind local2"); + f_incoming_sns_add(idx_add := 1); + as_rx_alive_tx_ack(oneshot := true, idx := 1); + setverdict(pass); + f_clean_ns_codec(); +} + +testcase TC_sns_bss_del() 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(); + activate(as_rx_alive_tx_ack()); + f_vty_config2(NSVTY, {"ns", "nse " & int2str(g_nsconfig.nsei)}, "ip-sns-bind local2"); + f_incoming_sns_add(idx_add := 1); + as_rx_alive_tx_ack(oneshot := true, idx := 1); + + /* delete the endpoint */ + f_vty_config2(NSVTY, {"ns", "nse " & int2str(g_nsconfig.nsei)}, "no ip-sns-bind local2"); + f_incoming_sns_del(idx_del := 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() ); @@ -574,6 +625,8 @@ execute( TC_sns_config_success() ); execute( TC_sns_bss_change_weight() ); execute( TC_sns_bss_change_weight_timeout() ); + execute( TC_sns_bss_add() ); + execute( TC_sns_bss_del() ); } } diff --git a/ns/osmo-ns.sns.cfg b/ns/osmo-ns.sns.cfg index 58d306e..b342305 100644 --- a/ns/osmo-ns.sns.cfg +++ b/ns/osmo-ns.sns.cfg @@ -92,6 +92,10 @@ listen 127.0.0.1 23000 ip-sns signalling-weight 2 data-weight
Change in osmo-ttcn3-hacks[master]: NS_Tests: add testcases for incoming SNS_ADD/DEL procedures
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24402 ) Change subject: NS_Tests: add testcases for incoming SNS_ADD/DEL procedures .. Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24402 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: I98c04c083521ab38b58e8df9f1aee89445ab536d Gerrit-Change-Number: 24402 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 07 Jun 2021 12:48:50 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: NS_Tests: add testcases for incoming SNS_ADD/DEL procedures
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24402 ) Change subject: NS_Tests: add testcases for incoming SNS_ADD/DEL procedures .. Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24402 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: I98c04c083521ab38b58e8df9f1aee89445ab536d Gerrit-Change-Number: 24402 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: pespin Gerrit-Comment-Date: Mon, 07 Jun 2021 09:20:42 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: NS_Tests: add testcases for incoming SNS_ADD/DEL procedures
Hello Jenkins Builder, daniel, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24402 to look at the new patch set (#4). Change subject: NS_Tests: add testcases for incoming SNS_ADD/DEL procedures .. NS_Tests: add testcases for incoming SNS_ADD/DEL procedures Allow to test add and remove a bind via vty. Related: OS#5036 Change-Id: I98c04c083521ab38b58e8df9f1aee89445ab536d --- M ns/NS_Tests.sns.cfg M ns/NS_Tests.ttcn M ns/osmo-ns.sns.cfg 3 files changed, 69 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/02/24402/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24402 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: I98c04c083521ab38b58e8df9f1aee89445ab536d Gerrit-Change-Number: 24402 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: NS_Tests: add testcases for incoming SNS_ADD/DEL procedures
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24402 ) Change subject: NS_Tests: add testcases for incoming SNS_ADD/DEL procedures .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24402 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: I98c04c083521ab38b58e8df9f1aee89445ab536d Gerrit-Change-Number: 24402 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Comment-Date: Fri, 28 May 2021 16:29:30 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: NS_Tests: add testcases for incoming SNS_ADD/DEL procedures
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24402 ) Change subject: NS_Tests: add testcases for incoming SNS_ADD/DEL procedures .. NS_Tests: add testcases for incoming SNS_ADD/DEL procedures Allow to test add and remove a bind via vty. Change-Id: I98c04c083521ab38b58e8df9f1aee89445ab536d --- M ns/NS_Tests.sns.cfg M ns/NS_Tests.ttcn M ns/osmo-ns.sns.cfg 3 files changed, 69 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/02/24402/1 diff --git a/ns/NS_Tests.sns.cfg b/ns/NS_Tests.sns.cfg index 23b616b..5ee5e1a 100644 --- a/ns/NS_Tests.sns.cfg +++ b/ns/NS_Tests.sns.cfg @@ -21,6 +21,18 @@ } }, nsvci := 1234 + }, + { + provider := { + ip := { + address_family := AF_INET, + local_ip := "127.0.0.1", + local_udp_port := 22000, + remote_ip := "127.0.0.1", + remote_udp_port := 23001 + } + }, + nsvci := 1235 } } } diff --git a/ns/NS_Tests.ttcn b/ns/NS_Tests.ttcn index f69bbe0..58b2dda 100644 --- a/ns/NS_Tests.ttcn +++ b/ns/NS_Tests.ttcn @@ -44,6 +44,20 @@ } }, nsvci := 97 + }, + { + provider := { + ip := { + address_family := AF_INET, + local_udp_port := 21000, + local_ip := "127.0.0.1", + remote_udp_port := 23001, + remote_ip := "127.0.0.1", + data_weight := 1, + signalling_weight := 1 + } + }, + nsvci := 98 } } }; @@ -58,6 +72,7 @@ f_vty_set_prompts(NSVTY); f_vty_transceive(NSVTY, "enable"); f_vty_transceive(NSVTY, "nsvc nsei " & int2str(mp_nsconfig.nsei) & " force-unconfigured"); + f_vty_config2(NSVTY, {"ns", "nse " & int2str(mp_nsconfig.nsei)}, "no ip-sns-bind local2"); } /* ensure no matching message is received within 'tout' */ @@ -527,6 +542,42 @@ f_clean_ns_codec(); } +testcase TC_sns_bss_add() 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(); + activate(as_rx_alive_tx_ack()); + f_vty_config2(NSVTY, {"ns", "nse " & int2str(g_nsconfig.nsei)}, "ip-sns-bind local2"); + f_incoming_sns_add(idx_add := 1); + as_rx_alive_tx_ack(oneshot := true, idx := 1); + setverdict(pass); + f_clean_ns_codec(); +} + +testcase TC_sns_bss_del() 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(); + activate(as_rx_alive_tx_ack()); + f_vty_config2(NSVTY, {"ns", "nse " & int2str(g_nsconfig.nsei)}, "ip-sns-bind local2"); + f_incoming_sns_add(idx_add := 1); + as_rx_alive_tx_ack(oneshot := true, idx := 1); + + /* delete the endpoint */ + f_vty_config2(NSVTY, {"ns", "nse " & int2str(g_nsconfig.nsei)}, "no ip-sns-bind local2"); + f_incoming_sns_del(idx_del := 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() ); @@ -574,6 +625,8 @@ execute( TC_sns_config_success() ); execute( TC_sns_bss_change_weight() ); execute( TC_sns_bss_change_weight_timeout() ); + execute( TC_sns_bss_add() ); + execute( TC_sns_bss_del() ); } } diff --git a/ns/osmo-ns.sns.cfg b/ns/osmo-ns.sns.cfg index 58d306e..b342305 100644 --- a/ns/osmo-ns.sns.cfg +++ b/ns/osmo-ns.sns.cfg @@ -92,6 +92,10 @@ listen 127.0.0.1 23000 ip-sns signalling-weight 2 data-weight 2 accept-ipaccess + bind udp local2 + listen