testsuite.at: pids can have zero after first character.
authorGurucharan Shetty <gshetty@nicira.com>
Tue, 27 May 2014 18:54:07 +0000 (11:54 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Tue, 10 Jun 2014 14:47:45 +0000 (07:47 -0700)
Fix the bug which did not kill the processes with pids that had
a zero in them. Also, some tests do a AT_CHECK([kill `cat pid`]) which
on windows prints something on the stdout causing the tests to fail.
So supress it.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
tests/testsuite.at

index d7e5a7d..012733c 100644 (file)
@@ -58,7 +58,7 @@ if test "$IS_WIN32" = "yes"; then
                 for i in $*; do
                     # tasklist will always have return code 0.
                     # If pid does exist, there will be a line with the pid.
-                    if tasklist //fi "PID eq $i" | grep $i; then
+                    if tasklist //fi "PID eq $i" | grep $i >/dev/null; then
                         :
                     else
                         return 1
@@ -69,12 +69,12 @@ if test "$IS_WIN32" = "yes"; then
             -[1-9]*)
                 shift
                 for i in $*; do
-                    taskkill //F //PID $i
+                    taskkill //F //PID $i >/dev/null
                 done
                 ;;
-            [1-9][1-9]*)
+            [1-9][0-9]*)
                 for i in $*; do
-                    taskkill //F //PID $i
+                    taskkill //F //PID $i >/dev/null
                 done
                 ;;
         esac