It has been seen recently that the unit tests hang sometimes
while run on Windows. This happens when the OVS daemons don't
get killed after the test finishes. In my reproduction case,
when we use the taskkill command to forcefully kill the
process, the following happens:

$ taskkill //f //PID 1728
ERROR: The process with PID 1728 could not be terminated.
Reason: There is no running instance of the task.

I don't know why the above happens. There are others
that seem to come across the same problem, but no one
knows the reason.

But after the above happens, if you use tskill to kill
the same process, it works. tskill apparantly is more
primitive than taskkill, so with this commit, we
first try with taskkill and then try again with tskill.

Reported-by: Ben Pfaff <b...@nicira.com>
Signed-off-by: Gurucharan Shetty <gshe...@nicira.com>
---
 tests/ovs-macros.at |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at
index 14edba3..fdefbb5 100644
--- a/tests/ovs-macros.at
+++ b/tests/ovs-macros.at
@@ -56,11 +56,17 @@ if test "$IS_WIN32" = "yes"; then
                 shift
                 for i in $*; do
                     taskkill //F //PID $i >/dev/null
+                    if tasklist //fi "PID eq $i" | grep $i >/dev/null; then
+                        tskill $i
+                    fi
                 done
                 ;;
             [1-9][0-9]*)
                 for i in $*; do
                     taskkill //F //PID $i >/dev/null
+                    if tasklist //fi "PID eq $i" | grep $i >/dev/null; then
+                        tskill $i
+                    fi
                 done
                 ;;
         esac
-- 
1.7.9.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to