apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: svn commit: r291341 - in /apr/apr/branches/0.9.x: CHANGES file_io/unix/dir.c test/testdir.c
Date Tue, 27 Sep 2005 11:55:14 GMT
On 9/24/05, jorton@apache.org <jorton@apache.org> wrote:

> * test/testdir.c (test_rmkdir_nocwd): Add test case.

==============================================================================
> --- apr/apr/branches/0.9.x/test/testdir.c (original)
> +++ apr/apr/branches/0.9.x/test/testdir.c Sat Sep 24 15:27:18 2005
> @@ -219,6 +219,29 @@
>
>  }
>
> +static void test_rmkdir_nocwd(CuTest *tc)
> +{
> +    char *cwd, *path;
> +
> +    apr_assert_success(tc, "make temp dir",
> +                       apr_dir_make("dir3", APR_OS_DEFAULT, p));
> +
> +    apr_assert_success(tc, "obtain cwd", apr_filepath_get(&cwd, 0, p));
> +
> +    apr_assert_success(tc, "determine path to temp dir",
> +                       apr_filepath_merge(&path, cwd, "dir3", 0, p));
> +
> +    apr_assert_success(tc, "change to temp dir", apr_filepath_set(path, p));
> +
> +    apr_assert_success(tc, "remove temp dir", apr_dir_remove(path, p));

This chdir && rmdir operation fails with EBUSY on AIX and HP-UX.  (I
see it work on Linux; haven't tested other boxes.)  Is there another
way to accomplish the test?

Mime
View raw message