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. 2. The named_atomics are never properly worked on Windows. A little bit more detailed explanation: Originally "named atomics" framework was using shared memory for syncronization. Creating shared memory on Windows requires administrative permissions, so svn_named_atomic__is_supported() had check if application has necessary permissions to create shared memory. In r1404112 [1] "named atomics" framework was rewritten to use apr_mmap instead of apr_shm_*, but code in svn_named_atomic__is_supported() was not updated to reflect this change. The bug itself introduced in r1327458 [2] where call to InterlockedAdd64() was replaced with call to InterlockedExchangeAdd64(). But functions have different return values: InterlockedAdd64() returns result of operation, while InterlockedExchangeAdd64() returns original value. I see two ways how resolve these test failures: 1. Fix the code somehow. 2. Remove it since "named atomics" framework is only used for currently disabled revprop caching. Personally I don't see reason to spend resources fixing unused code, especially that even code on 'revprop-caching-ng' branch removes it also. Any other opinions? [1] https://svn.apache.org/r1404112 [2] https://svn.apache.org/r1327458 -- Ivan Zhakov