apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: svn commit: r592215 - in /apr/apr/trunk: include/apr_file_io.h test/testdir.c
Date Tue, 06 Nov 2007 09:27:04 GMT
On Tue, Nov 06, 2007 at 12:50:44AM -0000, William Rowe wrote:
> Author: wrowe
> Date: Mon Nov  5 16:50:41 2007
> New Revision: 592215
> 
> URL: http://svn.apache.org/viewvc?rev=592215&view=rev
> Log:
> It is entirely pointless to have nonportable behaviors as examples
> to end users of the library.  Good point, however, for an @tip.

That was a test case for a bug in the implementation of 
apr_dir_make_recursive (see r291339).  You have certainly *made* it 
entirely pointless.

Please revert this and explain what problem you were seeing with the 
test case.  And please use commit log messages which describe the change 
you are making, rather than some abstract commentary.

> 
> Modified:
>     apr/apr/trunk/include/apr_file_io.h
>     apr/apr/trunk/test/testdir.c
> 
> Modified: apr/apr/trunk/include/apr_file_io.h
> URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_file_io.h?rev=592215&r1=592214&r2=592215&view=diff
> ==============================================================================
> --- apr/apr/trunk/include/apr_file_io.h (original)
> +++ apr/apr/trunk/include/apr_file_io.h Mon Nov  5 16:50:41 2007
> @@ -834,6 +834,8 @@
>   * Remove directory from the file system.
>   * @param path the path for the directory to be removed. (use / on all systems)
>   * @param pool the pool to use.
> + * @tip removing a directory which is in-use (e.g., the current working
> + * directory, or during apr_dir_read, or with an open file) is not portable.
>   */                        
>  APR_DECLARE(apr_status_t) apr_dir_remove(const char *path, apr_pool_t *pool);
>  
> 
> Modified: apr/apr/trunk/test/testdir.c
> URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testdir.c?rev=592215&r1=592214&r2=592215&view=diff
> ==============================================================================
> --- apr/apr/trunk/test/testdir.c (original)
> +++ apr/apr/trunk/test/testdir.c Mon Nov  5 16:50:41 2007
> @@ -234,20 +234,9 @@
>  
>      APR_ASSERT_SUCCESS(tc, "change to temp dir", apr_filepath_set(path, p));
>  
> -    rv = apr_dir_remove(path, p);
> -    /* Some platforms cannot remove a directory which is in use. */
> -    if (rv == APR_SUCCESS) {
> -        ABTS_ASSERT(tc, "fail to create dir",
> -                    apr_dir_make_recursive("foobar", APR_OS_DEFAULT, 
> -                                           p) != APR_SUCCESS);
> -    }
> -
>      APR_ASSERT_SUCCESS(tc, "restore cwd", apr_filepath_set(cwd, p));
>  
> -    if (rv) {
> -        apr_dir_remove(path, p);
> -        ABTS_NOT_IMPL(tc, "cannot remove in-use directory");
> -    }
> +    APR_ASSERT_SUCCESS(tc, "remove cwd", rv = apr_dir_remove(path, p));
>  }
>  
>  
> 

joe

Mime
View raw message