test: rmdir can return EEXIST or ENOTEMPTY
POSIX allows `rmdir` to return `EEXIST` or `ENOTEMPTY` for a non-empty directory, so the test needs to allow both.
This commit is contained in:
parent
5537d6a689
commit
88ab6e78da
@ -1084,7 +1084,7 @@ TEST_IMPL(fs_posix_delete) {
|
|||||||
|
|
||||||
/* should not be possible to delete the non-empty dir */
|
/* should not be possible to delete the non-empty dir */
|
||||||
r = uv_fs_rmdir(NULL, &rmdir_req, "test_dir", NULL);
|
r = uv_fs_rmdir(NULL, &rmdir_req, "test_dir", NULL);
|
||||||
ASSERT_EQ(r, UV_ENOTEMPTY);
|
ASSERT((r == UV_ENOTEMPTY) || (r == UV_EEXIST));
|
||||||
ASSERT_EQ(r, rmdir_req.result);
|
ASSERT_EQ(r, rmdir_req.result);
|
||||||
uv_fs_req_cleanup(&rmdir_req);
|
uv_fs_req_cleanup(&rmdir_req);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user