fix macro by denying trailing slashes. also other stuff

This commit is contained in:
Pat Hickey
2021-01-28 12:23:48 -08:00
parent 20e9169cc7
commit 1196e216e9
22 changed files with 77 additions and 72 deletions

View File

@@ -16,7 +16,7 @@ unsafe fn test_nofollow_errors(dir_fd: wasi::Fd) {
.expect_err("opening a directory symlink as a directory should fail")
.raw_error(),
wasi::ERRNO_LOOP,
wasi::ERRNO_NOTDIR,
wasi::ERRNO_NOTDIR
);
// Try to open it with just O_NOFOLLOW.
@@ -25,7 +25,7 @@ unsafe fn test_nofollow_errors(dir_fd: wasi::Fd) {
.expect_err("opening a symlink with O_NOFOLLOW should fail")
.raw_error(),
wasi::ERRNO_LOOP,
wasi::ERRNO_ACCES,
wasi::ERRNO_ACCES
);
// Try to open it as a directory without O_NOFOLLOW.
@@ -70,7 +70,7 @@ unsafe fn test_nofollow_errors(dir_fd: wasi::Fd) {
wasi::path_open(dir_fd, 0, "symlink", 0, 0, 0, 0)
.expect_err("opening a symlink with NOFOLLOW should fail")
.raw_error(),
wasi::ERRNO_LOOP,
wasi::ERRNO_LOOP
);
// Try to open it as a directory without O_NOFOLLOW.
@@ -86,7 +86,7 @@ unsafe fn test_nofollow_errors(dir_fd: wasi::Fd) {
)
.expect_err("opening a symlink to a file as a directory")
.raw_error(),
wasi::ERRNO_NOTDIR,
wasi::ERRNO_NOTDIR
);
// Clean up.