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 submitted this change and it was merged. ( https://gerrit.osmocom.org/9687 ) Change subject: msc/USSD: introduce common GSUP/DTAP matching functions ...................................................................... msc/USSD: introduce common GSUP/DTAP matching functions In order to avoid code duplication in the upcoming test cases, let's introduce a few functions which basically do a GSUP/DTAP message matching within the alternative statement. Change-Id: I846c2d40a7c37afa8647e644673b4df905e3e116 --- M msc/MSC_Tests.ttcn 1 file changed, 42 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 4a6b822..640940d 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -2141,6 +2141,48 @@ * USSD Testing ***********************************************************************/ +private altstep as_unexp_gsup_or_bssap_msg() +runs on BSC_ConnHdlr { + [] GSUP.receive { + setverdict(fail, "Unknown/unexpected GSUP received"); + self.stop; + } + [] BSSAP.receive { + setverdict(fail, "Unknown/unexpected BSSAP message received"); + self.stop; + } +} + +private function f_expect_gsup_msg(template GSUP_PDU msg) +runs on BSC_ConnHdlr return GSUP_PDU { + var GSUP_PDU gsup_msg_complete; + + alt { + [] GSUP.receive(msg) -> value gsup_msg_complete { + setverdict(pass); + } + /* We don't expect anything else */ + [] as_unexp_gsup_or_bssap_msg(); + } + + return gsup_msg_complete; +} + +private function f_expect_mt_dtap_msg(template PDU_ML3_NW_MS msg) +runs on BSC_ConnHdlr return PDU_ML3_NW_MS { + var PDU_DTAP_MT bssap_msg_complete; + + alt { + [] BSSAP.receive(tr_PDU_DTAP_MT(msg)) -> value bssap_msg_complete { + setverdict(pass); + } + /* We don't expect anything else */ + [] as_unexp_gsup_or_bssap_msg(); + } + + return bssap_msg_complete.dtap; +} + /* LU followed by MO USSD request */ private function f_tc_lu_and_mo_ussd_single_request(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { -- To view, visit https://gerrit.osmocom.org/9687 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I846c2d40a7c37afa8647e644673b4df905e3e116 Gerrit-Change-Number: 9687 Gerrit-PatchSet: 4 Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180730/7e5c1609/attachment.htm>