From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sandbox:master commit in: tests/
Date: Tue, 6 Mar 2012 19:00:49 +0000 (UTC) [thread overview]
Message-ID: <1331060433.e2744dbc889d63fad8a2c819db4785b45d3c8c62.vapier@gentoo> (raw)
commit: e2744dbc889d63fad8a2c819db4785b45d3c8c62
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 5 05:22:23 2012 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Mar 6 19:00:33 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commit;h=e2744dbc
tests: add static unlink tests
Make sure that when we trace static apps, their bad syscalls don't
get a chance to actually complete.
URL: http://bugs.gentoo.org/406543
Reported-by: Marijn Schouten <hkbst <AT> gentoo.org>
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
tests/Makefile.am | 1 +
tests/unlink_static-0.c | 1 +
tests/unlink_static-1.sh | 10 ++++++++++
tests/unlink_static.at | 1 +
4 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2646228..71c2872 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -62,6 +62,7 @@ check_PROGRAMS = \
truncate-0 \
truncate64-0 \
unlink-0 \
+ unlink_static-0 \
unlinkat-0 \
utime-0 \
utimensat-0 \
diff --git a/tests/unlink_static-0.c b/tests/unlink_static-0.c
new file mode 100644
index 0000000..efb4c91
--- /dev/null
+++ b/tests/unlink_static-0.c
@@ -0,0 +1 @@
+#include "unlink-0.c"
diff --git a/tests/unlink_static-1.sh b/tests/unlink_static-1.sh
new file mode 100755
index 0000000..62cb6b7
--- /dev/null
+++ b/tests/unlink_static-1.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# make sure we catch openat with relative path
+[ "${at_xfail}" = "yes" ] && exit 77 # see trace-0
+
+export SANDBOX_LOG=$PWD/sb.log
+touch f
+test -e f || exit 1
+adddeny "${PWD}"
+unlink_static-0 -1,EPERM f
+test -e sb.log -a -e f
diff --git a/tests/unlink_static.at b/tests/unlink_static.at
new file mode 100644
index 0000000..081d7d2
--- /dev/null
+++ b/tests/unlink_static.at
@@ -0,0 +1 @@
+SB_CHECK(1)
next reply other threads:[~2012-03-06 19:01 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 19:00 Mike Frysinger [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-14 18:43 [gentoo-commits] proj/sandbox:master commit in: tests/ Mike Gilbert
2025-01-14 4:38 Mike Gilbert
2025-01-08 4:09 [gentoo-commits] proj/sandbox:stable-2.x " Mike Gilbert
2025-01-14 4:38 ` [gentoo-commits] proj/sandbox:master " Mike Gilbert
2025-01-08 3:29 [gentoo-commits] proj/sandbox:stable-2.x " Mike Gilbert
2025-01-14 4:38 ` [gentoo-commits] proj/sandbox:master " Mike Gilbert
2025-01-08 3:04 [gentoo-commits] proj/sandbox:stable-2.x " Mike Gilbert
2025-01-14 4:38 ` [gentoo-commits] proj/sandbox:master " Mike Gilbert
2024-11-11 22:47 Sam James
2023-07-01 23:52 Mike Gilbert
2023-06-22 13:54 Mike Gilbert
2023-06-22 13:54 Mike Gilbert
2021-11-03 19:13 Mike Frysinger
2021-10-24 0:54 Mike Frysinger
2021-10-23 22:19 Mike Frysinger
2021-10-22 7:21 Michał Górny
2021-10-22 4:54 Mike Frysinger
2021-10-22 4:15 Mike Frysinger
2021-10-21 2:48 Mike Frysinger
2021-10-18 5:21 Mike Frysinger
2020-05-31 10:52 Michał Górny
2019-06-27 21:41 Sergei Trofimovich
2018-02-19 5:50 Michał Górny
2016-03-29 12:24 Mike Frysinger
2016-03-29 12:24 Mike Frysinger
2015-12-20 21:33 Mike Frysinger
2015-09-28 20:17 Mike Frysinger
2015-09-27 6:13 Mike Frysinger
2015-09-11 7:53 Mike Frysinger
2015-09-11 7:53 Mike Frysinger
2012-12-24 23:58 Mike Frysinger
2012-11-26 10:10 Mike Frysinger
2012-06-24 6:14 Mike Frysinger
2012-06-23 21:27 Mike Frysinger
2012-03-05 7:01 Mike Frysinger
2012-03-05 7:01 Mike Frysinger
2011-07-08 19:53 Mike Frysinger
2011-07-04 23:06 Mike Frysinger
2011-07-04 23:06 Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1331060433.e2744dbc889d63fad8a2c819db4785b45d3c8c62.vapier@gentoo \
--to=vapier@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox