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

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


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


Change subject: stp: fix TC_rkm_unreg_registered
......................................................................

stp: fix TC_rkm_unreg_registered

Create the routing key dynamically, before trying to unregister it. The
previous version tried to unregister a statically configured routing
key, as in TC_rkm_unreg_never_registered, but expected success instead
of the proper ERR_NOT_REG.

So after fixing osmo-stp to make TC_rkm_unreg_never_registered pass,
this test failed.

Related: OS#4239
Change-Id: I7d2f9eb298778a8e60c7e73f314bc73528e85406
---
M stp/STP_Tests_M3UA.ttcn
1 file changed, 14 insertions(+), 2 deletions(-)



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

diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn
index dfa82a2..0bc398d 100644
--- a/stp/STP_Tests_M3UA.ttcn
+++ b/stp/STP_Tests_M3UA.ttcn
@@ -615,11 +615,23 @@
 	f_clear_m3ua();
 }
 
-/* try to de-register a routing key that was registered -> OK*/
+/* try to de-register a routing key that was registered -> OK */
 testcase TC_rkm_unreg_registered() runs on RAW_M3UA_CT {
+	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();
-	f_M3UA_send(0, ts_M3UA_DEREG_REQ(ts_M3UA_routing_ctx(int2oct(mp_m3ua_configs[0].routing_ctx,4))));
+
+	/* first register the routing key */
+	f_M3UA_rkm_register(id:='30000099'O, dpc:=dpc, rctx:=rctx);
+
+	/* then try to de-register */
+	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_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/+/25027
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: I7d2f9eb298778a8e60c7e73f314bc73528e85406
Gerrit-Change-Number: 25027
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/e0fd39d8/attachment.htm>


More information about the gerrit-log mailing list