summaryrefslogtreecommitdiff
path: root/tests/ovsdb-tool.at
Commit message (Collapse)AuthorAgeFilesLines
* ovsdb-tool: Add new "db-name" and "schema-name" commands.Ben Pfaff2017-12-191-18/+10
| | | | Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Convert uuidfilt utility from Perl to Python.Ben Pfaff2017-11-261-9/+9
| | | | | | | | Perl is unfashionable and Python is more widely available and understood, so this commit converts one of the OVS uses of Perl into Python. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Aaron Conole <aconole@redhat.com>
* table: Avoid trailing white space in tables.Ben Pfaff2017-10-061-36/+36
| | | | | | | | | | | | | Commands that use the table library, such as ovs-vsctl and "ovsdb-client dump", print trailing white space in tabular output, to fill out the entire width of their tabular columns. This is annoying whenever we use these commands in the test infrastructure, since we have to specially mark the trailing white space in Autotest with a "@&t@" marker at the end of the line. This commit gets rid of the trailing white space and the annoying "@&t@" markers. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
* tests: Test offline compacting on Windows.Alin Serdean2016-11-011-12/+28
| | | | | | | | | | | | | This patch adds the offline compacting (ovsdb-tool compact) to be run on Windows. Windows does not implement --run so this drops its use. Other tests do check that --run works on Linux so this shouldn't be an issue. Also on Windows we do not check for symlinks, so skip the tests for it. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* tests: Get rid of overly specific --pidfile and --unixctl options.Ben Pfaff2016-10-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | At an early point in OVS development, OVS was built with fixed default directories for pidfiles and sockets. This meant that it was necessary to use lots of --pidfile and --unixctl options in the testsuite, to point the daemons to where they should put these files (since the testsuite cannot and generally should not touch the real system /var/run). Later on, the environment variables OVS_RUNDIR, OVS_LOGDIR, etc. were introduced to override these defaults, and even later the testsuite was changed to always set these variables correctly in every test. Thus, these days it isn't usually necessary to specify a filename on --pidfile or to specify --unixctl at all. However, many of the tests are built by cut-and-paste, so they tended to keep appearing anyhow. This commit drops most of them, making the testsuite easier to read and understand. This commit also sweeps away some other historical detritus. In particular, in early days of the testsuite there was no way to automatically kill daemons when a test failed (or otherwise ended). This meant that some tests were littered with calls to "kill `cat pidfile`" on almost every line (or m4 macros that expanded to the same thing) so that if a test failed partway through the testsuite would not hang waiting for a daemon to die that was never going to die without manual intervention. However, a long time ago we introduced the "on_exit" mechanism that obsoletes this. This commit eliminates a lot of the old litter of kill invocations, which also makes those tests easier to read. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* tests: Automatically initialize OVS_*DIR vars when tests begin.Ben Pfaff2015-09-091-4/+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>
* ovsdb-tool: Workaround inability to replace existing file on Windows.Gurucharan Shetty2014-06-261-8/+16
| | | | | | | | | | | | rename() on an existing destination file fails on Windows. This commit worksaround that problem. There are two tests that test it. But both of them use the ovsdb-server's --run option for the test and it does not exist in Windows. So change the test to workaround the lack of that feature. Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* unit-test: Link 29 test programs into ovstestAndy Zhou2014-04-031-1/+1
| | | | | | | | | | | | | | Improve link speed by linking 29 test programs into ovstest. On my machine, running the following command against a fully built tree: $ touch lib/random.c; time make Improve the overall build time from 7 seconds to 3.5 seconds. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* invoke perl as ${PERL}YAMAMOTO Takashi2013-04-221-9/+9
| | | | | | | as suggested by Ben Pfaff. Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> Signed-off-by: Ben Pfaff <blp@nicira.com>
* stream-unix: Use rundir as root for relative paths.Pavithra Ramesh2013-02-111-0/+4
| | | | | | | | | | | | | | Until now, "unix:" and "punix:" paths that are not absolute have been considered relative to the current working directory. It is more useful to consider them relative to the rundir, so this commit makes that change to the C and Python implementations of the stream code. This commit also relaxes the whitelist check in the bridge code so that any name that does not contain a "/" is considered OK. Signed-off-by: Pavithra Ramesh <paramesh@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovsdb: Do not replace symlinks by regular files during compaction.Ben Pfaff2012-08-011-1/+16
| | | | Signed-off-by: Ben Pfaff <blp@nicira.com>
* tests: Handle different output formats for 'wc -l'.Ed Maste2012-07-301-6/+3
| | | | | | | | FreeBSD's wc outputs leading whitespace before the count, so use test(1) for numeric equality instead of AC_CHECK string match. Signed-off-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
* Use `pwd` in place of $PWD, treewide.Ben Pfaff2012-03-131-6/+6
| | | | | | | | | | | | | | | | | The Autoconf manual says: Posix 1003.1-2001 requires that `cd' and `pwd' must update the `PWD' environment variable to point to the logical name of the current directory, but traditional shells do not support this. This can cause confusion if one shell instance maintains `PWD' but a subsidiary and different shell does not know about `PWD' and executes `cd'; in this case `PWD' points to the wrong directory. Use ``pwd`' rather than `$PWD'. so this commit replaces all uses of $PWD by `pwd`. Reported-by: Justin Pettit <jpettit@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* tests: Convert *_SCHEMA macros to shell functions.Ben Pfaff2012-03-071-22/+11
| | | | | | | This reduces tests/testsuite by about 70 kB, by collapsing a number of macro expansions into just one copy in a shell function. Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovsdb: Implement table uniqueness constraints ("indexes").Ben Pfaff2011-06-061-1/+1
|
* ovsdb-tool: New command "needs-conversion".Ben Pfaff2011-02-151-0/+22
|
* ovsdb-tool: Add commands for printing the database checksum.Ben Pfaff2011-02-151-1/+19
|
* Implement database schema versioning.Ben Pfaff2010-12-271-1/+19
| | | | | As the database schema evolves, it might be useful to have an identifier for the particular version in use. This commit adds that feature.
* Avoid using "grep -q" outside of GNU/Linux specific utilities.Ben Pfaff2010-12-081-1/+1
| | | | | According to the Autoconf manual, "grep -q" is not portable, so instead redirect stdout to /dev/null.
* tests: Update expected test result to match "ovsdb-client dump" changes.Ben Pfaff2010-10-211-12/+18
| | | | | | | Commit 06036898849 "ovsdb-client: Make "dump" print table names in default output format too" changed the output format of "ovsdb-client dump" without updating the tests that depended on that output format. This commit updates the expected test results to match.
* tests: Fix bug in "ovsdb-tool compact" test.Ben Pfaff2010-05-071-19/+19
| | | | | | | | | This test examines the OVSDB database log and checks that it contains what it should for specified transactions. However, the database log ordering differs between big-endian and little-endian architectures because it is written out in hash order. We don't want to incur the expense of always sorting the log as we write it out, so instead this commit fixes the problem by sorting the log as it reads it, using the "test-json" program.
* ovsdb: Implement ovsdb-tool commands "compact" and "convert".Ben Pfaff2010-02-151-0/+266
Partial fix for bug #2391.