summaryrefslogtreecommitdiff
path: root/tests/vlog.at
Commit message (Collapse)AuthorAgeFilesLines
* tests: Always use --no-chdir with --detach.Ben Pfaff2018-11-191-12/+12
| | | | | | | | | With --detach but not --no-chdir, core files and Address Sanitizer logs don't go into the testsuite directory but end up dropped because it tries to write them in the root directory. Acked-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Permit to build OVS with only Python3 installedTimothy Redaelli2018-07-241-7/+7
| | | | | | | | | | | | | | | | | | This commit renames HAVE_PYTHON to HAVE_PYTHON2 and PYTHON to PYTHON2 and adds HAVE_PYTHON and PYTHON with a different semantics: - If PYTHON environment variable is set, use it as PYTHON - If a python2 interpreter is available, PYTHON became the python2 interpreter - If a python3 interpreter is available, PYTHON became the python3 interpreter PYTHON is only used to run the python scripts needed by the build system NOTE: Since currently most of the utilities and bugtool doesn't support Python3, they're installed only if python2 is available. This will be fixed in later commits. Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Skip vlog tests that try to move opened file.Paul Boca2016-08-031-0/+3
| | | | | | | | | On Windows if a file is opened by an application for writing, we cannot move it until all handles to that file are closed. Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* at test vlog: Switch from stderr to logAlin Serdean2016-06-141-4/+6
| | | | | | | | | | | | | Using the --detach parameter the child does not propagate the first message to the parent. Proposed change use the log file instead of the stderr. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com> Tested-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com> Acked-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* vlog.at: Avoid using GNU sed extensionYAMAMOTO Takashi2016-03-241-2/+2
| | | | | | | | | | | | | | | BRE alternative (\|) is an GNU sed extension. [1] It isn't available in NetBSD sed. [1] http://www.gnu.org/software/sed/manual/sed.html#Regular-Expressions regexp1\|regexp2 Matches either regexp1 or regexp2. Use parentheses to use complex alternative regular expressions. The matching process tries each alternative in turn, from left to right, and the first one that succeeds is used. It is a GNU extension. Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com> Acked-by: Ben Pfaff <blp@ovn.org>
* tests: consistently use OVS_APP_EXIT_AND_WAIT() for daemon terminationLance Richardson2016-03-181-2/+4
| | | | | | | | | Tools such as gcov rely on normal termination (via exit()), ensure consistent graceful termination of daemons in tests by using the OVS_APP_EXIT_AND_WAIT() macro. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* vlog.at: Run tests for Python 2 and 3.Russell Bryant2016-02-221-97/+125
| | | | | | | Update these Python tests to run with both Python 2 and 3. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* vlog: Add vlog/close command.Ben Pfaff2016-02-101-0/+74
| | | | | | | Requested-by: P R Dinesh Requested-at: https://github.com/openvswitch/ovs/pull/94 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
* tests: Add vlog tests for C implementation to match Python tests.Ben Pfaff2016-02-031-0/+131
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
* tests: Avoid useless use of cat.Ben Pfaff2016-01-281-3/+3
| | | | | | | Commands like "cat file | a" can be rewritten more cheaply as "a < file". Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Jarno Rajahalme <jarno@ovn.org>
* tests: Replace ON_EXIT m4 macro by on_exit() shell function.Ben Pfaff2015-09-091-6/+6
| | | | | | | | A shell function doesn't need quoted and unquoted variants and it integrates naturally with other shell code. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* tests: Automatically initialize OVS_*DIR vars when tests begin.Ben Pfaff2015-09-091-24/+0
| | | | | | | | | | A lot of tests need to initialize the OVS_RUNDIR, OVS_LOGDIR, etc. variables to point to the directory in which the tests run. Until now, each of them has had to do this individually, which is redundant. This commit starts to do this automatically. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* vlog: Ability to override the default log facility.Gurucharan Shetty2015-01-281-0/+63
| | | | | | | | | | | | | | | When Open vSwitch is run in hundreds of hypervisors, it is useful to collect log messages through log collectors. To collect log messages like this, it is useful to log them in a particular RFC5424 facility in the local system. The log collectors can then be used to collect logs anytime desired. This commit provides a sysadmin the ability to specify the facility through which the log messages are logged. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* vlog: Rename the currently used term 'facility' as 'destination'.Gurucharan Shetty2015-01-081-3/+3
| | | | | | | | | | | | In OVS, we currently use the term 'facility' to mean the place where we log (syslog, console or file). In Linux's syslog() and rfc5424, the term 'facility' is used to specify what type of program is logging the message (e.g: LOG_DAEMON). This causes confusion while reading vlog's code. This commit changes the term 'facility' to 'destination'. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* Python Logging Formatting ImprovementsDave Tucker2014-04-281-37/+45
| | | | | | | | | | | | | | | | | | The Open vSwitch daemons written in C support user-configured logging patterns as described in ovs-appctl(8). This commit adds this capability to the daemons written in Python. - Add a '__log_patterns' attribute to the Vlog class - Populate this using the default patterns in ovs-appctl(8) - Add a '__start_time' attribute to the Vlog class to support '%r' - Update the '_log' method to build the log message according to the pattern - Add a 'set_pattern' method to allow the default patterns to be changed - Update 'set_levels_from_string' to support setting the pattern from a string Signed-off-by: Dave Tucker <dave@dtucker.co.uk> Signed-off-by: Ben Pfaff <blp@nicira.com>
* vlog: Report timestamps in millisecond resolution in log messages.Paul Ingram2013-09-131-1/+1
| | | | | | | To make debugging easier. Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Paul Ingram <pingram@nicira.com>
* tests: New m4 macro ON_EXIT to add a cleanup action.Ben Pfaff2012-08-201-5/+4
| | | | | | | | | | | | | | | Several of the tests start daemons and then need to make sure that the daemons get killed when the test completes, even if it completes in the middle due to an early failure. Until now, they have been using manual shell "trap" calls to do this. This works well enough for simple cases, but sometimes multiple macros start daemons in a single test, and then each "trap" has to be carefully written to kill off the daemons for the previously invoked macros. This commit introduces a new macro ON_EXIT whose use is composable: each call appends a new action to the ones already specified. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Make the location of the database separately configurable.Ben Pfaff2012-08-011-0/+4
| | | | | | | | | The default is unchanged, /etc/openvswitch/conf.db. This makes it possible to transition each Open vSwitch packaging from /etc/openvswitch/conf.db to /var/lib/openvswitch/conf.db independently. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Python daemons: Changed log date time format.Arun Sharma2012-07-021-1/+1
| | | | | | | | Changed the python daemons log date and time format to keep similar as C binaries logging format. The date time is in UTC. Signed-off-by: Arun Sharma <arun.sharma@calsoftinc.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* vlog: Take advantage of relaxed "-v" syntax through the tree.Ben Pfaff2012-05-221-3/+2
| | | | | | | | The vlog manpage implies that writing ANY explicitly is obsolete, but examples elsewhere in the documentation and code still tend to add it. This removes them. Signed-off-by: Ben Pfaff <blp@nicira.com>
* python: Implement "vlog/set", "vlog/list" unixctl commands in Python vlog.Ben Pfaff2012-05-221-0/+44
| | | | | | | | | | This doesn't implement control over log patterns, though. The change to vlog.man in this commit doesn't have any practical effect because OVS doesn't come with any Python daemons that have their own manpages. Signed-off-by: Ben Pfaff <blp@nicira.com>
* python: Implement "vlog/reopen" unixctl command in Python vlog.Ben Pfaff2012-05-221-0/+77
| | | | Signed-off-by: Ben Pfaff <blp@nicira.com>
* tests: Fix Emacs syntax highlighting in vlog.at.Ben Pfaff2012-05-221-1/+1
| | | | | | | | [^"] confuses the Emacs syntax highlighter for Autotest mode. It thinks that it terminates a quoted string and therefore everything following the next " in the file is highlighted as if it was part of a quoted string. Signed-off-by: Ben Pfaff <blp@nicira.com>
* python: Create new vlog module.Ethan Jackson2011-09-271-0/+105
Currently, each python daemon has to come up with it's own logging solution. These logging strategies are not consistent across the python code or with the C vlog module. This patch adds a new logging module which hopes to solve the problem. This new module generates log messages in a manner consistent with the C code. Furthermore, it can easily be extended to support things like rate limiters in the future. This patch does not update any python code to use the new module.