subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Zhakov <i...@visualsvn.com>
Subject Re: svn commit: r1745192 - /subversion/trunk/subversion/tests/libsvn_subr/io-test.c
Date Thu, 23 Jun 2016 13:31:38 GMT
On 25 May 2016 at 20:23, Branko ─îibej <brane@apache.org> wrote:
> On 23.05.2016 15:12, ivan@apache.org wrote:
>> Author: ivan
>> Date: Mon May 23 13:12:50 2016
>> New Revision: 1745192
>>
>> URL: http://svn.apache.org/viewvc?rev=1745192&view=rev
>> Log:
>> Follow-up to r1745173: Fix test expectation.
>>
>> * subversion/tests/libsvn_subr/io-test.c
>>   (test_open_uniquely_named): Expect APR_STATUS_IS_ENOENT() instead of
>>    APR_STATUS_IS_ENOTDIR() on attempt to open uniquely named file in
>>    directory that doesn't exist.
>
> ISTR this may actually be platform-dependent; you'd get ENOENT on
> Windows but ENOTDIR on Linux or the other way around. I think we have
> some code in libsvn_subr/io.c that takes care of this.
>
Are you sure that other platforms may raise ENOTDIR in this specific
case (opening a file when the parent directory doesn't exist)?

As far I remember the reverse case (attempting to open a file where
some path component is not directory) is platform dependent. E.g.
attempting to open /iota/foo may return ENOENT or ENOTDIR on different
platforms.

I wanted to make test case as explicit as possible, since it's not
production code. We may relax this check later if needed.

-- 
Ivan Zhakov

Mime
View raw message