[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: named_atomic tests failures on Windows

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Sun, 14 Sep 2014 12:40:46 +0200

On Thu, Sep 11, 2014 at 6:28 PM, Stefan Fuhrmann <
stefan.fuhrmann_at_wandisco.com> wrote:

> On Wed, Sep 10, 2014 at 5:35 PM, Ivan Zhakov <ivan_at_visualsvn.com> wrote:
>> I've accidentally ran Subversion test suite under elevated local
>> administrator account on Windows and got failures in named-atomics
>> tests:
>> [[[
>> ..\..\..\subversion\tests\libsvn_subr\named_atomic-test.c:520:
>> (apr_err=SVN_ERR_TEST_FAILED)
>> svn_tests: E200006: assertion 'value == 42' failed at
>> ..\..\..\subversion\tests\libsvn_subr\named_atomic-test.c:520
>> FAIL: named_atomic-test.exe 1: basic r/w access to a single atomic
>> ..\..\..\subversion\tests\libsvn_subr\named_atomic-test.c:581:
>> (apr_err=SVN_ERR_TEST_FAILED)
>> svn_tests: E200006: assertion 'value == 42 * HUGE_VALUE' failed at
>> ..\..\..\subversion\tests\libsvn_subr\named_atomic-test.c:581
>> FAIL: named_atomic-test.exe 2: atomics must be 64 bits
>> ..\..\..\subversion\tests\libsvn_subr\named_atomic-test.c:643:
>> (apr_err=SVN_ERR_TEST_FAILED)
>> svn_tests: E200006: assertion 'value1 == 46 * HUGE_VALUE' failed at
>> ..\..\..\subversion\tests\libsvn_subr\named_atomic-test.c:643
>> FAIL: named_atomic-test.exe 3: basic r/w access to multiple atomics
>> ]]]
>> The investigation revealed the following:
>> 1. The named_atomics tests are skipped unless executed under elevated
>> local administrator on Windows.
> What worries me more is that our Windows build bots don't report
> those tests as "SKIP" - although the common init_test_shm() function
> in named_atomics-test.c will return SVN_ERR_TEST_SKIPPED.
> Are they reported as skipped in your setup when you run the test
> without local admin rights?

So, I did some digging to figure out what happens there.

VS2010 does not set _WIN32_WINNT for x86, in which case
apr.h sets it to 0x501 (plain XP). That makes named_atomics.c
not use the Interlocked* functions and flags the whole functionality
as "not efficient". The fallback code works as expected and the
buildbots see a success.

To run into the above problem, you must either build 64 bit
binaries or explicitly require XP SP2 as your minimum target
platform. Since revprop caching can only be enabled if the
named_atomics are reported as "efficient", many 1.8.x 32 bit
Windows builds will not use the broken code.

-- Stefan^2.
Received on 2014-09-14 12:41:16 CEST

This is an archived mail posted to the Subversion Dev mailing list.