[ovs-dev] [PATCH] windows, tests: Modify service test

Alin Gabriel Serdean aserdean at ovn.org
Wed Jul 24 14:42:24 UTC 2019

The database is now called "_Server" so look for that instead of "Open_vSwitch".

Modify the test so it always stops and deletes the service.

Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>
 tests/daemon.at | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/tests/daemon.at b/tests/daemon.at
index bdc8910f9..ff1953633 100644
--- a/tests/daemon.at
+++ b/tests/daemon.at
@@ -212,17 +212,13 @@ abs_path="$(cd $(dirname `which ovsdb-server`); pwd -W; cd $OLDPWD)"
 AT_CHECK([sc create ovsdb-server binpath="$abs_path/ovsdb-server --no-db --log-file=`pwd`/ovsdb-server.log --pidfile=`pwd`/ovsdb-server.pid --unixctl=`pwd`/ovsdb-server.ctl --remote=punix:`pwd`/socket --service"],
 [0], [[[SC]] CreateService SUCCESS
-AT_CHECK([sc start ovsdb-server], [0], [ignore], [ignore], [sc delete ovsdb-server])
-OVS_WAIT_UNTIL([test -s ovsdb-server.pid])
+on_exit 'sc delete ovsdb-server'
+on_exit 'sc stop ovsdb-server'
+AT_CHECK([sc start ovsdb-server], [0], [ignore])
 OVS_WAIT_UNTIL([sc query ovsdb-server | grep STATE | grep RUNNING > /dev/null 2>&1])
-AT_CHECK([kill -0 `cat ovsdb-server.pid`], [0], [ignore])
 AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-dbs], [0],
 AT_CHECK([sc stop ovsdb-server], [0], [ignore])
 OVS_WAIT_UNTIL([test ! -s ovsdb-server.pid])
-AT_CHECK([sc query ovsdb-server | grep STATE | grep STOPPED], [0], [ignore])
-AT_CHECK([sc delete ovsdb-server], [0], [[[SC]] DeleteService SUCCESS

More information about the dev mailing list