diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2018-07-11 14:35:38 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2018-07-11 14:35:38 +0000 |
commit | 6ce0ecbb4eebfeb6dd3bf32a315b737f916a033a (patch) | |
tree | 87851aded31851d99c124ca6327c7622be52dbf5 /regress/sys | |
parent | f0a668fc2c1df04e129e5b0227b3e18b6963ede2 (diff) |
Regress update to match changes for chrome
Diffstat (limited to 'regress/sys')
-rw-r--r-- | regress/sys/kern/unveil/syscalls.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/regress/sys/kern/unveil/syscalls.c b/regress/sys/kern/unveil/syscalls.c index 23798deda52..984d48fb0bb 100644 --- a/regress/sys/kern/unveil/syscalls.c +++ b/regress/sys/kern/unveil/syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syscalls.c,v 1.3 2018/07/07 23:16:24 beck Exp $ */ +/* $OpenBSD: syscalls.c,v 1.4 2018/07/11 14:35:37 beck Exp $ */ /* * Copyright (c) 2017-2018 Bob Beck <beck@openbsd.org> @@ -473,11 +473,20 @@ test_access(int do_uv) do_unveil(); } + UV_SHOULD_SUCCEED((access(uv_file1, R_OK) == -1), "access"); + UV_SHOULD_ENOENT((access(uv_file2, R_OK) == -1), "access"); + UV_SHOULD_SUCCEED((access(uv_dir1, R_OK) == -1), "access"); + UV_SHOULD_ENOENT((access(uv_dir2, R_OK) == -1), "access"); + UV_SHOULD_ENOENT((access("/", R_OK) == -1), "access"); + UV_SHOULD_ENOENT((access("/home", F_OK) == -1), "access"); + UV_SHOULD_SUCCEED((pledge("stdio fattr rpath", NULL) == -1), "pledge"); UV_SHOULD_SUCCEED((access(uv_file1, R_OK) == -1), "access"); UV_SHOULD_ENOENT((access(uv_file2, R_OK) == -1), "access"); UV_SHOULD_SUCCEED((access(uv_dir1, R_OK) == -1), "access"); UV_SHOULD_ENOENT((access(uv_dir2, R_OK) == -1), "access"); + UV_SHOULD_ENOENT((access("/", R_OK) == -1), "access"); + UV_SHOULD_ENOENT((access("/home", F_OK) == -1), "access"); return 0; } @@ -506,11 +515,13 @@ test_stat(int do_uv) } struct stat sb; +// UV_SHOULD_SUCCEED((stat("/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", &sb) == -1), "stat"); UV_SHOULD_SUCCEED((pledge("stdio fattr rpath", NULL) == -1), "pledge"); UV_SHOULD_SUCCEED((stat(uv_file1, &sb) == -1), "stat"); - UV_SHOULD_ENOENT((stat(uv_file2, &sb) == -1), "stat"); + UV_SHOULD_SUCCEED((stat(uv_file2, &sb) == -1), "stat"); UV_SHOULD_SUCCEED((stat(uv_dir1, &sb) == -1), "stat"); - UV_SHOULD_ENOENT((stat(uv_dir2, &sb) == -1), "stat"); + UV_SHOULD_SUCCEED((stat(uv_dir2, &sb) == -1), "stat"); + UV_SHOULD_SUCCEED((stat("/", &sb) == -1), "stat"); return 0; } @@ -524,11 +535,18 @@ test_statfs(int do_uv) } struct statfs sb; + + UV_SHOULD_SUCCEED((statfs("/home", &sb) == -1), "statfs"); + UV_SHOULD_SUCCEED((statfs("/", &sb) == -1), "statfs"); + UV_SHOULD_SUCCEED((statfs(uv_file1, &sb) == -1), "statfs"); + UV_SHOULD_SUCCEED((statfs(uv_file2, &sb) == -1), "statfs"); + UV_SHOULD_SUCCEED((statfs(uv_dir1, &sb) == -1), "statfs"); + UV_SHOULD_SUCCEED((statfs(uv_dir2, &sb) == -1), "statfs"); UV_SHOULD_SUCCEED((pledge("stdio fattr rpath", NULL) == -1), "pledge"); UV_SHOULD_SUCCEED((statfs(uv_file1, &sb) == -1), "statfs"); - UV_SHOULD_ENOENT((statfs(uv_file2, &sb) == -1), "statfs"); + UV_SHOULD_SUCCEED((statfs(uv_file2, &sb) == -1), "statfs"); UV_SHOULD_SUCCEED((statfs(uv_dir1, &sb) == -1), "statfs"); - UV_SHOULD_ENOENT((statfs(uv_dir2, &sb) == -1), "statfs"); + UV_SHOULD_SUCCEED((statfs(uv_dir2, &sb) == -1), "statfs"); return 0; } @@ -562,7 +580,7 @@ test_symlink(int do_uv) UV_SHOULD_SUCCEED((symlink(uv_file2, filename) == -1), "symlink"); UV_SHOULD_SUCCEED((lstat(filename, &sb) == -1), "lstat"); UV_SHOULD_SUCCEED((readlink(filename, buf, sizeof(buf)) == -1), "readlink"); - UV_SHOULD_ENOENT((lstat(uv_file2, &sb) == -1), "lstat"); + UV_SHOULD_SUCCEED((lstat(uv_file2, &sb) == -1), "lstat"); UV_SHOULD_ENOENT((symlink(uv_file1, filename2) == -1), "symlink"); UV_SHOULD_ENOENT((readlink(filename2, buf, sizeof(buf)) == -1), "readlink"); unlink(filename); |