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/11489 )
Change subject: library/VTY: fix CONFIG prompt matching in f_vty_wait_for_prompt()
......................................................................
library/VTY: fix CONFIG prompt matching in f_vty_wait_for_prompt()
Matching the CONFIG prompt using implicit '\w+(*)' pattern is
a bad idea, because it can actually match almost anything:
- 'OsmoBlaBla(config)# ',
- 'OsmoBlaBla(config) ',
- 'OsmoBlaBla> ',
- 'Mahlzeit'!
One problem is that the parentheses are interpreted as a matching
operator (which is used to group an expression), so they should
have been escaped by '\'. Another problem is that this pattern
is not complete, because '\# ' is missing. Let's fix this!
Change-Id: I8a0e3fcfb0c4e5854b7b1e39296052e679c63c73
Related: OS#3675
---
M library/Osmocom_VTY_Functions.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
Harald Welte: Looks good to me, approved
diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn
index b822645..86f58f1 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -53,7 +53,7 @@
alt {
[] pt.receive(pattern "\w+" & VTY_VIEW_SUFFIX) { };
[] pt.receive(pattern "\w+\# ") { };
- [] pt.receive(pattern "\w+" & VTY_CFG_SUFFIX) { };
+ [] pt.receive(pattern "\w+\(*\)\# ") { };
[] pt.receive(t_vty_unknown) {
testcase.stop(fail, "VTY: Unknown Command");
};
--
To view, visit https://gerrit.osmocom.org/11489
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: I8a0e3fcfb0c4e5854b7b1e39296052e679c63c73
Gerrit-Change-Number: 11489
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181028/bb160094/attachment.htm>