1 |
commit: 4f000d9c228474b6e34c9ce9e84bcce781271914 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 20 21:32:26 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 20 21:32:26 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=4f000d9c |
7 |
|
8 |
tests: check errno with more static tests |
9 |
|
10 |
This verifies the error code setting with ptrace logic -- if the ptrace |
11 |
code is broken, the errno will often be ENOSYS instead of EPERM. |
12 |
|
13 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
14 |
|
15 |
tests/open_static-1.sh | 2 +- |
16 |
tests/openat_static-1.sh | 2 +- |
17 |
tests/unlink_static-1.sh | 2 +- |
18 |
3 files changed, 3 insertions(+), 3 deletions(-) |
19 |
|
20 |
diff --git a/tests/open_static-1.sh b/tests/open_static-1.sh |
21 |
index faf91d0..e815b57 100755 |
22 |
--- a/tests/open_static-1.sh |
23 |
+++ b/tests/open_static-1.sh |
24 |
@@ -8,5 +8,5 @@ open_static-0 3 ok O_RDONLY 0666 || exit 1 |
25 |
|
26 |
mkdir deny || exit 1 |
27 |
adddeny $PWD/deny |
28 |
-open_static-0 -1 deny/not-ok "O_WRONLY|O_CREAT" 0666 |
29 |
+open_static-0 -1,EPERM deny/not-ok "O_WRONLY|O_CREAT" 0666 || exit 1 |
30 |
test -e sandbox.log |
31 |
|
32 |
diff --git a/tests/openat_static-1.sh b/tests/openat_static-1.sh |
33 |
index 929fc51..a4d1b90 100755 |
34 |
--- a/tests/openat_static-1.sh |
35 |
+++ b/tests/openat_static-1.sh |
36 |
@@ -8,5 +8,5 @@ openat_static-0 3 AT_FDCWD ok O_RDONLY 0666 || exit 1 |
37 |
|
38 |
mkdir deny || exit 1 |
39 |
adddeny $PWD/deny |
40 |
-openat_static-0 -1 AT_FDCWD deny/not-ok "O_WRONLY|O_CREAT" 0666 |
41 |
+openat_static-0 -1,EPERM AT_FDCWD deny/not-ok "O_WRONLY|O_CREAT" 0666 || exit 1 |
42 |
test -e sandbox.log |
43 |
|
44 |
diff --git a/tests/unlink_static-1.sh b/tests/unlink_static-1.sh |
45 |
index 9585862..2281a98 100755 |
46 |
--- a/tests/unlink_static-1.sh |
47 |
+++ b/tests/unlink_static-1.sh |
48 |
@@ -5,5 +5,5 @@ |
49 |
touch f |
50 |
test -e f || exit 1 |
51 |
adddeny "${PWD}" |
52 |
-unlink_static-0 -1,EPERM f |
53 |
+unlink_static-0 -1,EPERM f || exit 1 |
54 |
test -e sandbox.log -a -e f |