Skip to content

Commit

Permalink
Update test case to accept ENOENT for missing preopens
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed May 28, 2023
1 parent 0cecbd8 commit b98e775
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/run-make/read-root-dir/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

int main(int argc, char *argv[]) {
int root = open("/", O_RDONLY, O_DIRECTORY);
assert(errno == ENOTCAPABLE);
// wasi-libc returns ENOENT since wasi-sdk 19, but returns ENOTCAPABLE before that
// https://github.com/WebAssembly/wasi-libc/pull/370
assert(errno == ENOENT || errno == ENOTCAPABLE);
assert(root == -1);
return 0;
}

0 comments on commit b98e775

Please sign in to comment.