Many OVSDB tests are not checking the server log for warnings or
errors. Some are not even using the log file. It's mostly OK as we're
usually checking the user-visible behavior. But it would also be nice
to detect some internal warnings if there are some.
Moving the OVSDB_SERVER_SHUTDOWN macro to the common place, adding
the call to check_logs into it and making OVSDB tests use this macro.
Signed-off-by: Ilya Maximets
---
tests/ovsdb-client.at | 12 +++---
tests/ovsdb-idl.at | 10 -
tests/ovsdb-lock.at| 10 ++---
tests/ovsdb-macros.at | 12 ++
tests/ovsdb-monitor.at | 88
tests/ovsdb-server.at | 91 +-
tests/ovsdb-tool.at| 44 ++--
tests/vtep-ctl.at | 2 +-
8 files changed, 152 insertions(+), 117 deletions(-)
diff --git a/tests/ovsdb-client.at b/tests/ovsdb-client.at
index 2d14f1ac2..68fb962bd 100644
--- a/tests/ovsdb-client.at
+++ b/tests/ovsdb-client.at
@@ -5,7 +5,7 @@ AT_KEYWORDS([ovsdb client positive])
ordinal_schema > schema
on_exit 'kill `cat *.pid`'
AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket
db], [0], [ignore], [ignore])
+AT_CHECK([ovsdb-server --detach --no-chdir --log-file --pidfile
--remote=punix:socket db], [0], [ignore], [ignore])
AT_CHECK([ovsdb-client get-schema-version unix:socket ordinals], [0], [5.1.3
])
AT_CHECK([ovsdb-client get-schema-cksum unix:socket ordinals], [0], [12345678 9
@@ -19,7 +19,7 @@ on_exit 'kill `cat *.pid`'
ordinal_schema > schema
touch .db.~lock~
AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket
db], [0], [ignore], [ignore])
+AT_CHECK([ovsdb-server --detach --no-chdir --log-file --pidfile
--remote=punix:socket db], [0], [ignore], [ignore])
AT_CHECK([ovsdb-client needs-conversion unix:socket schema], [0], [no
])
OVSDB_SERVER_SHUTDOWN
@@ -31,7 +31,7 @@ ordinal_schema > schema
touch .db.~lock~
on_exit 'kill `cat *.pid`'
AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket
db], [0], [ignore], [ignore])
+AT_CHECK([ovsdb-server --detach --no-chdir --log-file --pidfile
--remote=punix:socket db], [0], [ignore], [ignore])
sed 's/5\.1\.3/5.1.4/' < schema > schema2
AT_CHECK([diff schema schema2], [1], [ignore])
AT_CHECK([ovsdb-client needs-conversion unix:socket schema2], [0], [yes
@@ -134,7 +134,7 @@ _uuid name number
])
dnl Stop the database server, then re-start it based on the backup.
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
+OVSDB_SERVER_SHUTDOWN
AT_CHECK([ovsdb-server -vfile -vvlog:off --detach --no-chdir --pidfile
--log-file --remote=punix:db.sock backup], [0])
dnl Dump a new copy of the data.
@@ -195,7 +195,7 @@ ordinals table
_uuid,name,number
])
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
+OVSDB_SERVER_SHUTDOWN
AT_CLEANUP
@@ -254,7 +254,7 @@ _uuid,name,number
])
dnl Stopping the server.
-OVS_APP_EXIT_AND_WAIT([ovsdb-server])
+OVSDB_SERVER_SHUTDOWN
dnl ovsdb-client should exit by itself after disconnection form the server.
OVS_WAIT_WHILE([test -e ovsdb-client.pid])
diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at
index 978a6677b..df5a9d2fd 100644
--- a/tests/ovsdb-idl.at
+++ b/tests/ovsdb-idl.at
@@ -278,7 +278,10 @@ m4_define([OVSDB_CHECK_IDL_SSL_PY],
[0], [stdout], [ignore])
AT_CHECK([sort stdout | uuidfilt]m4_if([$6],,, [[| $6]]),
[0], [$4])
- OVSDB_SERVER_SHUTDOWN
+ OVSDB_SERVER_SHUTDOWN(["
+ /unexpected SSL connection close/d
+ /Protocol error/d
+ "])
AT_CLEANUP])
m4_define([OVSDB_CHECK_IDL],
@@ -2309,7 +2312,10 @@ m4_define([CHECK_STREAM_OPEN_BLOCK],
AT_CHECK([$2 PROTOCOL:$4:$TCP_PORT $SSL_KEY_ARGS], [0], [ignore])
AT_CHECK([$2 PROTOCOL:$4:$WRONG_PORT $SSL_KEY_ARGS], [1], [ignore],
[ignore])
- OVSDB_SERVER_SHUTDOWN
+ OVSDB_SERVER_SHUTDOWN(["
+ /unexpected SSL connection close/d
+ /Protocol error/d
+ "])
AT_CHECK([$2 PROTOCOL:$4:$TCP_PORT $SSL_KEY_ARGS], [1], [ignore], [ignore])
AT_CLEANUP])
diff --git a/tests/ovsdb-lock.at b/tests/ovsdb-lock.at
index a3acd2f27..6bc247302 100644
--- a/tests/ovsdb-lock.at
+++ b/tests/ovsdb-lock.at
@@ -12,8 +12,8 @@ m4_define([OVSDB_CHECK_LOCK_SETUP],
AT_KEYWORDS([ovsdb lock $2])
ordinal_schema > schema
AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
-AT_CAPTURE_FILE([ovsdb-server-log])
-AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket
--log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1], [0], [], [])])
+AT_CAPTURE_FILE([ovsdb-server.log])
+AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket
--log-file db], [0], [ignore], [ignore])])
#
# Two sessions create two locks. Both sessions should be able