You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2016/05/23 13:12:50 UTC
svn commit: r1745192 -
/subversion/trunk/subversion/tests/libsvn_subr/io-test.c
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.
Modified:
subversion/trunk/subversion/tests/libsvn_subr/io-test.c
Modified: subversion/trunk/subversion/tests/libsvn_subr/io-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/io-test.c?rev=1745192&r1=1745191&r2=1745192&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/io-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/io-test.c Mon May 23 13:12:50 2016
@@ -708,7 +708,7 @@ test_open_uniquely_named(apr_pool_t *poo
err = svn_io_open_uniquely_named(NULL, &path,
svn_dirent_join(tmp_dir, "non-existing", pool),
NULL, NULL, svn_io_file_del_none, pool, pool);
- if (err && APR_STATUS_IS_ENOTDIR(err->apr_err))
+ if (err && APR_STATUS_IS_ENOENT(err->apr_err))
{
svn_error_clear(err);
}
Re: svn commit: r1745192 - /subversion/trunk/subversion/tests/libsvn_subr/io-test.c
Posted by Ivan Zhakov <iv...@visualsvn.com>.
On 25 May 2016 at 20:23, Branko Čibej <br...@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
Re: svn commit: r1745192 -
/subversion/trunk/subversion/tests/libsvn_subr/io-test.c
Posted by Branko Čibej <br...@apache.org>.
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.
-- Brane