diff options
Diffstat (limited to 'third_party/rust/lucet-wasi-wasmsbx/tests/guests/notdir.c')
-rw-r--r-- | third_party/rust/lucet-wasi-wasmsbx/tests/guests/notdir.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/third_party/rust/lucet-wasi-wasmsbx/tests/guests/notdir.c b/third_party/rust/lucet-wasi-wasmsbx/tests/guests/notdir.c new file mode 100644 index 0000000000..fcd47a69db --- /dev/null +++ b/third_party/rust/lucet-wasi-wasmsbx/tests/guests/notdir.c @@ -0,0 +1,12 @@ +#include <assert.h> +#include <errno.h> +#include <dirent.h> + +int main() +{ + DIR *dir = opendir("/sandbox/notadir"); + assert(dir == NULL); + assert(errno == ENOTDIR); + + return 0; +} |