Perhaps what we need are some 'meta tests' that define exactly what we are testing for. Perhaps then Brane's earlier complaints about the ENOTDIR/ENOMATCH and other strange irregularities will disappear.
Can you come up with a good definition that all EEXIST cases should consider ENOTEMPTY, or conversely? If not, we really should define a third 'case'. I don't have a good specific solution, so I'll listen to other comments for a while :-/ Bill At 08:10 AM 11/15/2002, Joe Orton wrote: >On some platforms rmdir(2) fails with EEXIST rather than ENOTEMPTY when >trying to delete a non-empty directory; in fact POSIX specifies that >both EEXIST and ENOTEMPTY are allowed for this case. > >The test_removeall_fail() test uses APR_STATUS_IS_ENOTEMPTY() for this >case. Is it okay to extend APR_STATUS_IS_ENOTEMPTY to return true for >EEXIST for this case (as below), or should the test be changed? > >--- include/apr_errno.h 10 Nov 2002 08:35:16 -0000 1.101 >+++ include/apr_errno.h 15 Nov 2002 14:02:55 -0000 >@@ -1202,7 +1202,8 @@ > /** cross device link */ > #define APR_STATUS_IS_EXDEV(s) ((s) == APR_EXDEV) > /** Directory Not Empty */ >-#define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY) >+#define APR_STATUS_IS_ENOTEMPTY(s) ((s) == APR_ENOTEMPTY \ >+ (s) == APR_EEXIST) > > #endif /* !def OS2 || WIN32 */ >
