From a48e67d33ef6edd58b2cd6111884dbb4fdef7491 Mon Sep 17 00:00:00 2001 From: "Sam James (sam_c)" Date: Wed, 29 Apr 2020 10:00:59 +0000 Subject: sys-apps/coreutils: Disable tests incompatible w/ sandbox Bug: https://bugs.gentoo.org/413621 Bug: https://bugs.gentoo.org/675802 Thanks-to: Kent Fredric Signed-off-by: Sam James (sam_c) Closes: https://github.com/gentoo/gentoo/pull/15562 Signed-off-by: Thomas Deutschmann --- sys-apps/coreutils/coreutils-8.31-r1.ebuild | 1 + sys-apps/coreutils/coreutils-8.32-r1.ebuild | 1 + .../files/coreutils-8.31-sandbox-env-test.patch | 64 ++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 sys-apps/coreutils/files/coreutils-8.31-sandbox-env-test.patch (limited to 'sys-apps') diff --git a/sys-apps/coreutils/coreutils-8.31-r1.ebuild b/sys-apps/coreutils/coreutils-8.31-r1.ebuild index 48911f369827..007052ac9cf3 100644 --- a/sys-apps/coreutils/coreutils-8.31-r1.ebuild +++ b/sys-apps/coreutils/coreutils-8.31-r1.ebuild @@ -60,6 +60,7 @@ pkg_setup() { src_prepare() { if ! use vanilla ; then eapply "${WORKDIR}"/patch/*.patch + eapply "${FILESDIR}"/${PN}-8.31-sandbox-env-test.patch fi eapply_user diff --git a/sys-apps/coreutils/coreutils-8.32-r1.ebuild b/sys-apps/coreutils/coreutils-8.32-r1.ebuild index d63be698dccf..3eac2b76aae2 100644 --- a/sys-apps/coreutils/coreutils-8.32-r1.ebuild +++ b/sys-apps/coreutils/coreutils-8.32-r1.ebuild @@ -71,6 +71,7 @@ src_prepare() { if ! use vanilla ; then PATCHES+=( "${WORKDIR}"/patch ) + PATCHES+=( "${FILESDIR}"/${PN}-8.31-sandbox-env-test.patch ) fi default diff --git a/sys-apps/coreutils/files/coreutils-8.31-sandbox-env-test.patch b/sys-apps/coreutils/files/coreutils-8.31-sandbox-env-test.patch new file mode 100644 index 000000000000..40b1554d948a --- /dev/null +++ b/sys-apps/coreutils/files/coreutils-8.31-sandbox-env-test.patch @@ -0,0 +1,64 @@ +Skip tests known to fail when running under Gentoo sandbox. + +--- a/tests/du/long-from-unreadable.sh ++++ b/tests/du/long-from-unreadable.sh +@@ -29,6 +29,9 @@ + # unnecessarily to using FTS_NOCHDIR mode in this corner case. + + . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++# Avoid #413621 until #548250 is resolved ++test -n "$SANDBOX_ACTIVE" && skip_ "Gentoo: Test known bad under sandbox (#413621)" ++ + print_ver_ du + + require_perl_ +--- a/tests/ls/removed-directory.sh ++++ b/tests/ls/removed-directory.sh +@@ -19,6 +19,9 @@ + # along with this program. If not, see . + + . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++# Avoid #413621 until #548250 is resolved ++test -n "$SANDBOX_ACTIVE" && skip_ "Gentoo: Test known bad under sandbox (#413621)" ++ + print_ver_ ls + + case $host_triplet in +--- a/tests/ls/stat-free-symlinks.sh ++++ b/tests/ls/stat-free-symlinks.sh +@@ -17,6 +17,9 @@ + # along with this program. If not, see . + + . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++# Avoid #413621 until #548250 is resolved ++test -n "$SANDBOX_ACTIVE" && skip_ "Gentoo: Test known bad under sandbox (#413621)" ++ + print_ver_ ls + require_strace_ stat + +--- a/tests/misc/env-S.pl ++++ b/tests/misc/env-S.pl +@@ -30,6 +30,11 @@ $env = $1; + # Turn off localization of executable's output. + @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3; + ++# Skip if sandbox is enabled ++if ($ENV{SANDBOX_ACTIVE}) { ++ CuSkip::skip "Gentoo: Test known bad under sandbox (#675802)\n"; ++} ++ + my @Tests = + ( + # Test combination of -S and regular arguments +--- a/tests/rm/deep-2.sh ++++ b/tests/rm/deep-2.sh +@@ -17,6 +17,9 @@ + # along with this program. If not, see . + + . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src ++# Avoid #413621 until #548250 is resolved ++test -n "$SANDBOX_ACTIVE" && skip_ "Gentoo: Test known bad under sandbox (#413621)" ++ + print_ver_ rm + require_perl_ + -- cgit v1.2.3-65-gdbad