From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S4zdD-0007Ce-Ur for garchives@archives.gentoo.org; Tue, 06 Mar 2012 19:01:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1DFD2E0DD4; Tue, 6 Mar 2012 19:00:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E7262E0E10 for ; Tue, 6 Mar 2012 19:00:50 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 569E11B4016 for ; Tue, 6 Mar 2012 19:00:50 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 177C3E542C for ; Tue, 6 Mar 2012 19:00:49 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1331060433.e2744dbc889d63fad8a2c819db4785b45d3c8c62.vapier@gentoo> Subject: [gentoo-commits] proj/sandbox:master commit in: tests/ X-VCS-Repository: proj/sandbox X-VCS-Files: tests/Makefile.am tests/unlink_static-0.c tests/unlink_static-1.sh tests/unlink_static.at X-VCS-Directories: tests/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: e2744dbc889d63fad8a2c819db4785b45d3c8c62 X-VCS-Branch: master Date: Tue, 6 Mar 2012 19:00:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 6751b584-0cea-46cc-b84c-41283da1416e X-Archives-Hash: e3fce1867f56908eb6e0b8ac656e0390 commit: e2744dbc889d63fad8a2c819db4785b45d3c8c62 Author: Mike Frysinger gentoo org> AuthorDate: Mon Mar 5 05:22:23 2012 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Tue Mar 6 19:00:33 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/sandbox.git;a= =3Dcommit;h=3De2744dbc 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 gentoo.org> Signed-off-by: Mike Frysinger 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 =3D \ 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}" =3D "yes" ] && exit 77 # see trace-0 + +export SANDBOX_LOG=3D$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)