summaryrefslogtreecommitdiffstats
path: root/third_party/rust/lucet-wasi-wasmsbx/tests/guests/symlink_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/lucet-wasi-wasmsbx/tests/guests/symlink_loop.c')
-rw-r--r--third_party/rust/lucet-wasi-wasmsbx/tests/guests/symlink_loop.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/third_party/rust/lucet-wasi-wasmsbx/tests/guests/symlink_loop.c b/third_party/rust/lucet-wasi-wasmsbx/tests/guests/symlink_loop.c
new file mode 100644
index 0000000000..7256121c3b
--- /dev/null
+++ b/third_party/rust/lucet-wasi-wasmsbx/tests/guests/symlink_loop.c
@@ -0,0 +1,10 @@
+#include <assert.h>
+#include <errno.h>
+#include <stdio.h>
+
+int main()
+{
+ FILE *file = fopen("/sandbox/subdir1/loop1", "r");
+ assert(file == NULL);
+ assert(errno == ELOOP);
+}