On Tue, Sep 27, 2005 at 07:55:14AM -0400, Jeff Trawick wrote:
> On 9/24/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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?
Ah, I wondered whether that might happen. No, not really - such
platforms probably cannot trigger the bug; I'll adjust the test to skip
if the rmdir fails.
Regards,
joe