path: root/tests/logging/logging_vty_test.vty
AgeCommit message (Collapse)AuthorFilesLines
2020-12-09logging: Introduce DLBSSGP logging constantHarald Welte1-2/+3
Historically, BSSGP uses a non-constant, user-configurable integer varieable for the logging sub-system. Let's replace this with a statically-allocated library logging constant. This is required if we want to use the subsystem number in e.g. static initialized for osmo_fsm.log_subsys. Change-Id: I506190aae9217c0956e4b5764d1a0c0772268e93
2020-09-15Gb: add a second NS implementationAlexander Couzens1-2/+3
Reimplement NS with FSM. Change-Id: I3525beef205588dfab9d3880a34115f1a2676e48
2019-08-13add vty logp command to echo on all log targetsNeels Hofmeyr1-0/+53
When reading SUT logs resulting from TTCN3 runs, it can be hard to figure out which log section corresponds to which test code. Add a 'logp' command on VIEW and ENABLE nodes that simply echos an arbitrary message on log output, useful to set markers / explanations from the TTCN3 code, which then appear in all log outputs and can make it trivial to figure out which log section is interesting. logging_vty_test# logp lglobal notice This is the log message DLGLOBAL NOTICE This is the log message From TTCN3, could be used like this, e.g. in BSC_Tests.ttcn: private function f_logp(charstring log_msg) runs on MSC_ConnHdlr { // log on TTCN3 log output log(log_msg); // log in stderr log f_vty_transceive(BSCVTY, "logp lglobal notice " & log_msg); } ... f_logp("f_probe_for_handover(" & log_label & "): Ending the test: Handover Failure stops the procedure."); Change-Id: Ife5dc8999174c74e0d133729284fe526d6eaf8d9
2019-02-14Enable remote SIM protocol log levelMax1-1/+1
It's defined in logging.h for quite some time but is not actually enabled alongside with other internal logging categories. Change-Id: I0e7a2add6293a072752900608c8ba34cc3850f31
2018-10-01vty logging: fix crash when missing 'logging enable'Neels Hofmeyr1-0/+3
We must explicitly check the return value of osmo_log_vty2tgt(), or may run into a segfault. I wasn't aware of this and introduced numerous such cases in I36f17c131cc70ce5a1aef62fd9693097de230cd4. Reproduce: on the VTY, do not issue 'logging enable', invoke 'logging level force-all LEVEL' first. Show in logging_vty_test.vty that this situation is now again amended by telling the user that logging was not enabled. Related: OS#3611 Change-Id: Id11702d1801d6654ca5e5a51b597a0d802e2e8dd
2018-09-25logging_vty: Ensure writing well-formed config filesHarald Welte1-6/+6
We want to have well-formed config files that print exactly one space per VTY/config node level, and not two. Change-Id: Ia75c7067284ea225cffe13ca71bad05a7747ae66
2018-09-16logging vty: add 'logging level set-all <level>'Neels Hofmeyr1-0/+161
Add new command to once-off set each and every category to the given log level, as discussed at length on the openbsc@ mailing list. Show that it works in logging_vty_test.vty. Change-Id: I4c3e4f786476cb813fdc0a7c64f30ee04758309d
2018-09-13logging vty: deprecate 'all', introduce 'force-all'Neels Hofmeyr1-14/+134
Add 'logging level force-all <level>' and 'no logging level force-all' as new names for 'logging level all <level>' and 'logging level all everything'. Resurrect the functionality of 'logging level all everything' -- even if it is still deprecated because the name is confusing, it is now just an alias for 'no logging level force-all'. Show in logging_vty_test.vty that we can now again lift the global logging clamp, both with the new commands as well as with the deprecated ones. Also show that 'force-all' is written back properly, if set. Change-Id: I36f17c131cc70ce5a1aef62fd9693097de230cd4
2018-09-13logging vty: deprecate the 'everything' keywordNeels Hofmeyr1-17/+13
The 'logging level all everything' has not had an effect for some time now. The plan is to bring back its old functionality, but to keep it deprecated and rather define a less confusing name. * Deprecate 'everything'. * Do not write 'everything' during 'write file' or 'show running-config', which we curiously still do until now. BTW, the reason why we need to compose a complete list of categories for the deprecated 'everything' command is explained in detail in the commit log for I3b083f27e3d751ccec258880ae7676e9af959a63 Change-Id: Ib75fedb0572570a61bb34ee729a2af86cf5f16da
2018-09-12logging vty: add VTY transcript testNeels Hofmeyr1-0/+190
I am setting out to refactor various details about logging. To show the effect, I am first adding this new test to illustrate the exact effects on the various osmo programs. Add logging_vty_test.c as a standalone program that simply defines a few logging categories and opens a telnet vty to play with. Add logging_vty_test.vty, as an osmo_verify_transcript_vty.py test script. Add --enable-external-tests to configure.ac, to enable running logging_vty_test.vty during 'make check'. Also allow running 'make vty-test' without the need to first configure with --enable-external-tests (a flexibility I've missed many times over in the other osmo source trees). Add a Makefile.am stub for external CTRL tests, basically a copy-paste from osmo-msc.git. I doubt that libosmocore will get python driven CTRL interface testing any time soon, but if so we will know to not run it concurrently. Change-Id: I948e832a33131f8eab98651d6010ceb0ccbc9a9c