These allow passing N vty configurations on the bts / msc node without
requiring subsequent 'exit'.
As an example, use f_vty_cfg_msc() in BSC_Tests.ttcn AMR config.
Change-Id: I9f3e485f692acb3d2a7620e9b454b372651be78e
f_vty_config2() makes it convenient to enter a specific vty node without
needing to send 'exit'/'end' explicitly. However, to pass multiple
commands on the same node, the VTY would enter and exit the node for
each call of f_vty_config2(). The new f_vty_config3() also allows
multiple commands to be run on that same node without intermediate
exiting.
Change-Id: If969ac645aa82e5a36245d974de2a251633de111
Add a log label argument to f_vty_wait_for_prompt(), and feed the sent
command from f_vty_transceive*(), so that the failure verdict already
lists the vty command that caused the failure.
A common error is to issue insufficient 'exit' commands, so that I often
think the newly added VTY command failed, even though it is a subsequent
command causing the failure. I want to shorten the "time-to-aha" there.
Change-Id: Icfd739db150d86e9256a224f12dc979dcd77879f
During patch grooming of the previous fixup, one patch line went missing, which
breaks the ttcn3-bsc-test-latest completely. Add that change now.
Change-Id: I75295d638072df9f5213a7e74e4a960c009c2865
In f_vty_wait_for_prompt(), this:
testcase.stop(fail, "VTY: Unknown Command")
outputs:
failVTY: Unknown Command
The first stop() argument 'fail' is not actually a test verdict, but gets
rolled into a log output string, becoming "failVTY".
Fix that by simply using the normal pattern of setverdict() followed by
mtc.stop().
Change-Id: Id09986444de02c10b4fba582d454d54568b6e8a2
For the VTY "Unknown Command" code path, we must actually call 'repeat', to
avoid racey VTY behavior from cruft stuck in the VTY pipe.
The missing 'repeat' caused massive random fallout in the 'latest' builds,
which often hits the 'Unknown Command' code path; fixed by this patch.
Change-Id: Ibd5adb359b3fb302e2c70700d911878aef605ff3
When a new test uses a VTY configuration that may not yet be available in the
'latest' build, it can be useful to ignore the "Unknown VTY Command" error.
To be used by f_init() for multiple MSCs, setting a default 'allow-attach' flag
per MSC implicitly -- such vty config is not yet supported in the latest build.
Change-Id: I284c42e10c0cb282c8410db87959b471867edef6
Old versions of osmo-pcu print "Osmo-PCU" as VTY prompt. This commit
allows supporting this kind of prompt.
Change-Id: Ia5acbbe5828901726f7f15c4a99d596e94914c4b
Some of our files didn't have a copyright notice at all, let's add
it. Also, update the notices in other files and ensure a SPDX
identifier is present in all but the most trivial files.
Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd
The handling of the AMR rate configuration bits S15-S0 is currently only
superficially checked. Lets add more some more elaborated testcases to
check through varios different situations. Also make sure that the
resulting mr configuration IE is verified
Change-Id: Ica323deb9836deea72982e093c9cb31deb5a216b
Related: SYS#4470
Add two helper functions which retry a VTY command until the
result matches a regular expression or a configurable timeout
expires.
Use these functions in BSC test's f_ts_dyn_mode_get, which has
seen sporadic failures due to a race condition during channel
reconfiguration, in order to hopefully close this race.
Change-Id: I308ddb06e440c165fe1e73fe2c1fb78be2e1d510
Related: OS#3690
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
The existing Osmocom_VTY_Functions code was centered around a global
module parameter specifying the prompt prefix. This prevented a
single test to use multiple VTY connections to different Osmocom
programs.
This patch generalize the code by widening the prompt matching
in f_vty_wait_for_prompt() and by allowing the caller to specify
the prompt prefix to override the modulepar.
Change-Id: I574b56c42fe95540af44a2c43d0fb469938c0e65
Pass the CTRL_DETECT_CONNECTION_ESTABLISHMENT_RESULT parameter to
the TELNET port by default. This allows tests to make progress
into an error handling path if they are started while the osmo-*
program they want to connect on VTY is not running.
Observed with osmo-ggsn tests, where if the one test runs
into a VTY connection failure the subsequent test would get
stuck forever in a map() call on the VTY TELNET port.
Teach the function f_vty_wait_for_prompt() about connection
reports by the TELNET module. We may now receive an integer which
represents the socket file descriptor for the telnet connection.
This case was not handled by the previous change made in
commit cb111b21ab. As a result,
BSC tests started failing with "VTY Timeout for prompt" because
the alt-statement in f_vty_wait_for_prompt() would not progress
past the integer sitting on the VTY port's receive queue.
Change-Id: I56925f93af6c55e93f3f417099db135744da6a40
Related: OS#3149
This will prevent subsequent failures from overwriting the verdict so we
can easily see the root cause of the test failure.
Using testcase.stop instead for errors internal to our test
infrastructure to mark them as test errors instead of failed.
Change-Id: Idc6819aaf0b01e70c38fad828dd44dcec6bdd778
We want to use this code also for OsmoMSC testing, so let's make the
prefix configurable as module parameter.
Change-Id: Iec846227e88b3dc0d3be9474b8b926719161c9ee