On Fri, May 30, 2014 at 12:06:22PM -0700, Gurucharan Shetty wrote:
> Some of the tests in test-lockfile.c uses fork to test a
> child's ability to acquire lock. We do not fork in Windows.
> We also do not support symlinks on Windows.  So, comment out
> those tests.
> 
> The error messages output is different in Windows and Linux. So
> adjust the tests accordingly.
> 
> Signed-off-by: Gurucharan Shetty <gshe...@nicira.com>

...

> +# CHECK_LOCKFILE([test-name], [number-children], [linux-error-message]
> +#                [skip-test-windows], [windows-error-message])
>  m4_define([CHECK_LOCKFILE],
>    [AT_SETUP([m4_translit([$1], [_], [ ])])

Here, I think that it would be better to expand AT_SKIP_IF only if $4
is yes, like:
        m4_if([$4], [yes], [AT_SKIP_IF([test "$IS_WIN32" = "yes"])
> +   AT_SKIP_IF([test "$4" = "yes" && test "$IS_WIN32" = "yes"])
>     AT_KEYWORDS([lockfile])
>     AT_CHECK([ovstest test-lockfile $1], [0], [$1: success (m4_if(
>       [$2], [1], [$2 child], [$2 children]))

The EDEADLK return value is a good explanation of why the lock
failed.  Do you think that it would work to transform EEXIST into
EDEADLK in the lockfile code under Windows?
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to