On Windows the file which is used for the named pipe connection (`punix:file`)
is not deleted when the process is closed.

Try to delete the `controller` file and fail if we can't (on Windows you can't
delete a file if there still an opened handle to it).

Also add a check to see if the `ovs-testcontroller` was successfully started.

Signed-off-by: Alin Gabriel Serdean <[email protected]>
---
 tests/bridge.at | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/bridge.at b/tests/bridge.at
index ee398bdb1..b94afc194 100644
--- a/tests/bridge.at
+++ b/tests/bridge.at
@@ -84,7 +84,7 @@ AT_SETUP([bridge - add port after stopping controller])
 OVS_VSWITCHD_START
 
 dnl Start ovs-testcontroller
-ovs-testcontroller --detach punix:controller --pidfile=ovs-testcontroller.pid
+AT_CHECK([ovs-testcontroller --detach punix:controller --pidfile], [0], 
[ignore])
 OVS_WAIT_UNTIL([test -e controller])
 
 AT_CHECK([ovs-vsctl set-controller br0 unix:controller])
@@ -93,6 +93,9 @@ AT_CHECK([ovs-appctl -t ovs-vswitchd version], [0], [ignore])
 
 # Now kill the ovs-testcontroller
 kill `cat ovs-testcontroller.pid`
+if test "$IS_WIN32" = "yes"; then
+    AT_CHECK([rm controller], [0], [ignore])
+fi
 OVS_WAIT_UNTIL([! test -e controller])
 AT_CHECK([ovs-vsctl --no-wait add-port br0 p2 -- set Interface p2 
type=internal], [0], [ignore])
 AT_CHECK([ovs-appctl -t ovs-vswitchd version], [0], [ignore])
-- 
2.16.1.windows.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to