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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/14209 Change subject: bts: Verify PCU socket can disconnect + re-connect ...................................................................... bts: Verify PCU socket can disconnect + re-connect Change-Id: Ic69c3f34405012d42319bd9752f875071aae2243 Related: OS#4023 --- M bts/BTS_Tests.ttcn M library/PCUIF_CodecPort.ttcn 2 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/09/14209/1 diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index 2885628..6786d68 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -3921,6 +3921,26 @@ Misc_Helpers.f_shutdown(__BFILE__, __LINE__); } +/* Ensure that PCUIF socket can disconnect + reconnect */ +testcase TC_pcu_socket_reconnect() runs on test_CT { + /* this (among other things) establishes the first connection to the PCUIF socket */ + f_init(); + + f_sleep(1.0); + + f_pcuif_close(PCU, g_pcu_conn_id); + g_pcu_conn_id := -1; + + f_sleep(1.0); + + /* re-connect */ + PCU.clear; + f_init_pcu(PCU, testcasename(), g_pcu_conn_id, g_pcu_last_info); + setverdict(pass); + + Misc_Helpers.f_shutdown(__BFILE__, __LINE__); +} + /*********************************************************************** * Osmocom Style Dynamic Timeslot Support @@ -5230,6 +5250,7 @@ execute( TC_pcu_oml_alert() ); execute( TC_pcu_rr_suspend() ); execute( TC_pcu_socket_connect_multi() ); + execute( TC_pcu_socket_reconnect() ); } else { log("PCU socket path not available, skipping PCU tests"); } diff --git a/library/PCUIF_CodecPort.ttcn b/library/PCUIF_CodecPort.ttcn index 91f9bf9..3d6ceac 100644 --- a/library/PCUIF_CodecPort.ttcn +++ b/library/PCUIF_CodecPort.ttcn @@ -94,6 +94,11 @@ return -23; } +function f_pcuif_close(PCUIF_CODEC_PT pt, integer id) +{ + pt.send(UD_close:{id := id}); +} + function f_pcuif_listen(PCUIF_CODEC_PT pt, charstring sock) return integer { var UD_listen_result res; var UD_connected udc; -- To view, visit https://gerrit.osmocom.org/14209 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic69c3f34405012d42319bd9752f875071aae2243 Gerrit-Change-Number: 14209 Gerrit-PatchSet: 1 Gerrit-Owner: Harald Welte <laforge at gnumonks.org> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190527/1b54fd35/attachment.htm>