aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-12-20 16:32:26 -0500
committerMike Frysinger <vapier@gentoo.org>2015-12-20 16:32:26 -0500
commit4f000d9c228474b6e34c9ce9e84bcce781271914 (patch)
tree277ebaa1e092f20ebf43616c322cd37cebef4f1b
parentlibsbutil: gnulib: hand disable same_name usage (diff)
downloadsandbox-4f000d9c228474b6e34c9ce9e84bcce781271914.tar.gz
sandbox-4f000d9c228474b6e34c9ce9e84bcce781271914.tar.bz2
sandbox-4f000d9c228474b6e34c9ce9e84bcce781271914.zip
tests: check errno with more static tests
This verifies the error code setting with ptrace logic -- if the ptrace code is broken, the errno will often be ENOSYS instead of EPERM. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-xtests/open_static-1.sh2
-rwxr-xr-xtests/openat_static-1.sh2
-rwxr-xr-xtests/unlink_static-1.sh2
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/open_static-1.sh b/tests/open_static-1.sh
index faf91d0..e815b57 100755
--- a/tests/open_static-1.sh
+++ b/tests/open_static-1.sh
@@ -8,5 +8,5 @@ open_static-0 3 ok O_RDONLY 0666 || exit 1
mkdir deny || exit 1
adddeny $PWD/deny
-open_static-0 -1 deny/not-ok "O_WRONLY|O_CREAT" 0666
+open_static-0 -1,EPERM deny/not-ok "O_WRONLY|O_CREAT" 0666 || exit 1
test -e sandbox.log
diff --git a/tests/openat_static-1.sh b/tests/openat_static-1.sh
index 929fc51..a4d1b90 100755
--- a/tests/openat_static-1.sh
+++ b/tests/openat_static-1.sh
@@ -8,5 +8,5 @@ openat_static-0 3 AT_FDCWD ok O_RDONLY 0666 || exit 1
mkdir deny || exit 1
adddeny $PWD/deny
-openat_static-0 -1 AT_FDCWD deny/not-ok "O_WRONLY|O_CREAT" 0666
+openat_static-0 -1,EPERM AT_FDCWD deny/not-ok "O_WRONLY|O_CREAT" 0666 || exit 1
test -e sandbox.log
diff --git a/tests/unlink_static-1.sh b/tests/unlink_static-1.sh
index 9585862..2281a98 100755
--- a/tests/unlink_static-1.sh
+++ b/tests/unlink_static-1.sh
@@ -5,5 +5,5 @@
touch f
test -e f || exit 1
adddeny "${PWD}"
-unlink_static-0 -1,EPERM f
+unlink_static-0 -1,EPERM f || exit 1
test -e sandbox.log -a -e f