commit: 4f000d9c228474b6e34c9ce9e84bcce781271914 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> AuthorDate: Sun Dec 20 21:32:26 2015 +0000 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> CommitDate: Sun Dec 20 21:32:26 2015 +0000 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=4f000d9c
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 <AT> gentoo.org> tests/open_static-1.sh | 2 +- tests/openat_static-1.sh | 2 +- tests/unlink_static-1.sh | 2 +- 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