summaryrefslogtreecommitdiff
path: root/tests/ovsdb-server.at
diff options
context:
space:
mode:
authorLance Richardson <lrichard@redhat.com>2016-06-10 12:17:57 -0400
committerBen Pfaff <blp@ovn.org>2016-06-23 16:05:10 -0700
commit8a16ab90b27ca28fbc5e8a42a02eb8c7133183ae (patch)
tree8a4ed8f80a80f3281465ec13aacdc2d17b634283 /tests/ovsdb-server.at
parent42814145d70c77462ce28b38841cd160f0486776 (diff)
downloadopenvswitch-8a16ab90b27ca28fbc5e8a42a02eb8c7133183ae.tar.gz
tests: Fix issue in use of OVS_APP_EXIT_AND_WAIT.
Commit f9b11f2a09b4 introduced a loop to wait for process exit in OVS_APP_EXIT_AND_WAIT after the "exit" command has been sent. Unfortunately, this does not work for cases where a unixctl socket has to be used to send the "exit" command because the process ID cannot be determined from the socket path. OVS_APP_EXIT_AND_WAIT_BY_TARGET has since been introduced to enable graceful termination of daemons via unixctl sockets. This set of changes addresses the problem described above by making OVS_APP_EXIT_AND_WAIT_BY_TARGET take the unixctl socket path and corresponding process ID as separate parameters. In order to better detect issues in this logic in the future, checks have been added to verify that the pidfile exists before using its contents. Tested on a Linux system. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests/ovsdb-server.at')
-rw-r--r--tests/ovsdb-server.at2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at
index 0ed7e87c6..9da511d18 100644
--- a/tests/ovsdb-server.at
+++ b/tests/ovsdb-server.at
@@ -1,7 +1,7 @@
AT_BANNER([OVSDB -- ovsdb-server transactions (Unix sockets)])
m4_define([OVSDB_SERVER_SHUTDOWN],
- [OVS_APP_EXIT_AND_WAIT(["`pwd`"/unixctl])])
+ [OVS_APP_EXIT_AND_WAIT_BY_TARGET([`pwd`/unixctl], [`pwd`/pid])])
# OVSDB_CHECK_EXECUTION(TITLE, SCHEMA, TRANSACTIONS, OUTPUT, [KEYWORDS])
#