Christian Schaffner wrote:
>
> On 10.09.2006, at 05:55, Peter Samuelson wrote:
>
>>
>> Thanks for the quick reply!
>>
>> [Lieven Govaerts]
>
> <snip>
>
>>>> FAIL: switch_tests.py 17: refresh the WC file system read-only
>>>> attribute
>>> ---
>>> EXCEPTION: Failure: 'svn-test-work/working_copies/switch_tests-17/A/mu'
>>> expected to be read-only after having had its svn:needs-lock property
>>> set
>>> ---
>>> The test uses 'os.access(mu_path, os.W_OK)' to see if it can write
>>> that file, which it shouldn't be able to. This code is unchanged
>>> since svn 1.3. I've only seen this fail when running the tests as
>>> root.
>>
>> Thanks, this's the hint I needed. For historical and arcane technical
>> reasons, our build process runs the testsuite as root on exactly those
>> three architectures.
>>
>> I wonder why it never failed in 1.3 and before. Perhaps this is a new
>> test? In any case, I'll see if it is possible to rearrange our test
>> invocation to run during the non-root phase of the build. I don't see
>> any current reason not to do this, so I think it is merely historical.
>
> I am the package maintainer of svn for Fink on Mac OS X. I just had
> exactly the same error on Mac OS X 10.3 with svn 1.4.0. It definitely
> did not happen with svn 1.3. Building as 'nobody' solved that issue.
>
> It would be intereting to see what was changed for that test between 1.3
> and 1.4, or, what has changed in the test setup.
I see the same thing with MacPorts which builds svn as root.
If you try to run in Python as root the
os.access(mu_path, os.W_OK)
method on some path that has no write privileges, then it'll still return true.
I think a better test would be to test is os.access returns false, but if it
doesn't, check if the mode on the file did change, or run the os.access as a
non-root user.
$ touch abc
$ chmod 222 abc
$ python -c 'import os; print os.access("abc", os.W_OK)'
True
$ chmod 000 abc
$ python -c 'import os; print os.access("abc", os.W_OK)'
False
$ sudo python -c 'import os; print os.access("abc", os.W_OK)'
True
Regards,
Blair
--
Blair Zajac, Ph.D.
<blair@orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 11 22:26:58 2006