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

Re: svn commit: r1745192 - /subversion/trunk/subversion/tests/libsvn_subr/io-test.c

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Thu, 23 Jun 2016 16:31:38 +0300

On 25 May 2016 at 20:23, Branko ─îibej <brane_at_apache.org> wrote:
> On 23.05.2016 15:12, ivan_at_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
Received on 2016-06-23 15:32:03 CEST

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