Change in osmo-ttcn3-hacks[master]: stp: fix TC_rkm_unreg_active

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Fri Jul 23 10:07:43 UTC 2021


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25028 )


Change subject: stp: fix TC_rkm_unreg_active
......................................................................

stp: fix TC_rkm_unreg_active

Create the routing key dynamically, before trying to unregister it, so
osmo-stp doesn't answer with ERR_NOT_REG instead of the expected
ERR_ASP_ACTIVE. While at it, add missing clean up logic.

Related: OS#4239
Change-Id: I31fcba85d23a8767eb0ceb513ff5b440558a475b
---
M stp/STP_Tests_M3UA.ttcn
1 file changed, 16 insertions(+), 4 deletions(-)



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

diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn
index 0bc398d..13703d0 100644
--- a/stp/STP_Tests_M3UA.ttcn
+++ b/stp/STP_Tests_M3UA.ttcn
@@ -637,9 +637,11 @@
 
 /* try to de-register a routing key for an active ASP -> ERROR */
 testcase TC_rkm_unreg_active() runs on RAW_M3UA_CT {
-	var OCT3 dpc := int2oct(mp_m3ua_configs[0].point_code, 3); // must match config
-	var OCT4 rctx := int2oct(mp_m3ua_configs[0].routing_ctx, 4);  // must match config
+	var OCT3 dpc := int2oct(123, 3);
+	var OCT4 rctx := int2oct(1234, 4);
 
+	f_init_common();
+	f_vty_config2(VTY, {"cs7 instance 0"}, "xua rkm routing-key-allocation dynamic-permitted");
 	f_init_m3ua();
 
 	/* first register the routing key */
@@ -647,12 +649,22 @@
 
 	/* then activate the ASP */
 	f_M3UA_asp_up_act(0);
+	f_M3UA_exp(0, tr_M3UA_DAVA({*}, rctx));
+	f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_ACTIVE, *));
+	f_M3UA_exp(0, tr_M3UA_DAVA({*}, *));
 
-	/* then try to de-regsiter */
+	/* then try to de-register -> ERR_ASP_ACTIVE */
 	f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(rctx)));
 	f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_ERR_ASP_ACTIVE)}));
-	/* FIXME: we now may have changed the state on the STP side! */
 
+	/* deactivate ASP and properly de-register to clean up */
+	f_M3UA_asp_inact(0);
+	f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(rctx)));
+	f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_PENDING, *));
+	f_M3UA_exp(0, tr_M3UA_NOTIFY(c_M3UA_ST_T_STATE_CHG, c_M3UA_ST_I_AS_PENDING, *));
+	f_M3UA_exp(0, tr_M3UA_DEREG_RSP({tr_M3UA_dereg_res(?,c_m3UA_DEREGSTS_SUCCESS)}));
+
+	f_vty_config2(VTY, {"cs7 instance 0"}, "xua rkm routing-key-allocation static-only");
 	f_clear_m3ua();
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/25028
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: I31fcba85d23a8767eb0ceb513ff5b440558a475b
Gerrit-Change-Number: 25028
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210723/d86aaf48/attachment.htm>


More information about the gerrit-log mailing list