lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39011?usp=email )
Change subject: PCU_Tests_SNS: sns_del: check if removed NS-VC still transmits ......................................................................
PCU_Tests_SNS: sns_del: check if removed NS-VC still transmits
After removing a NS-VC via SNS-DEL, the NS-VC shouldn't receive any further NS PDUs.
Related: OS#6611 Change-Id: Ied4367a519cf75291ff8766c9efebb0f8a12b11f --- M pcu/PCU_Tests_SNS.ttcn 1 file changed, 26 insertions(+), 4 deletions(-)
Approvals: lynxis lazus: Looks good to me, approved daniel: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/pcu/PCU_Tests_SNS.ttcn b/pcu/PCU_Tests_SNS.ttcn index 07f147c..3e7f81c 100644 --- a/pcu/PCU_Tests_SNS.ttcn +++ b/pcu/PCU_Tests_SNS.ttcn @@ -328,13 +328,35 @@ }
/* Test deleting IP endpoints at runtime */ +function f_TC_sns_del(integer idx := 0, integer idx_del := 1, float tout := 20.0) runs on RAW_Test_CT { + g_handle_rx_alive := true; + f_outgoing_sns_del(idx_del := idx_del, w_sig := 0, w_user := 1, idx := idx); + g_handle_rx_alive := false; + + /* A small grace period to prevent race conditions */ + timer Tgrace := 1.0; + Tgrace.start; + alt { + [] NSCP[idx_del].receive(t_NS_ALIVE) {} + [] Tgrace.timeout {} + } + + /* Fail on any NS PDUs */ + timer T := tout; + T.start; + alt { + [] ax_rx_fail_on_any_ns(idx_del) {} + [] T.timeout { + setverdict(pass); + } + } +} + testcase TC_sns_del() runs on RAW_Test_CT { f_sns_bringup_1c1u();
- g_handle_rx_alive := true; - f_outgoing_sns_del(idx_del := 1, w_sig := 0, w_user := 1, idx := 0); - /* FIXME: ensure we don't receive anything on just-deleted NS-VC anymore */ - setverdict(pass); + f_TC_sns_del(); + f_clean_ns_codec(); }