commit:     b6c182cea4b7c5516ddaa3d69dad06fd1c088ae7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 23 20:08:20 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 23 20:08:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6c182ce

sys-apps/coreutils: backport test fixes to 9.4

Bug: https://bugs.gentoo.org/413621
Bug: https://bugs.gentoo.org/629660
Bug: https://bugs.gentoo.org/803377
Bug: https://bugs.gentoo.org/898370
Bug: https://bugs.gentoo.org/910640
Bug: https://bugs.gentoo.org/926349
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/coreutils/coreutils-9.4.ebuild | 59 +++++++++++++++++++++++++--------
 1 file changed, 45 insertions(+), 14 deletions(-)

diff --git a/sys-apps/coreutils/coreutils-9.4.ebuild 
b/sys-apps/coreutils/coreutils-9.4.ebuild
index 40a2c20ada63..4c826357e157 100644
--- a/sys-apps/coreutils/coreutils-9.4.ebuild
+++ b/sys-apps/coreutils/coreutils-9.4.ebuild
@@ -82,7 +82,13 @@ RDEPEND+="
        !net-mail/base64
        !sys-apps/mktemp
        !<app-forensics/tct-1.18-r1
-       !<net-fs/netatalk-2.0.3-r4"
+       !<net-fs/netatalk-2.0.3-r4
+"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+       # gnulib FPs (bug #898370)
+       unreachable MIN alignof static_assert
+)
 
 pkg_setup() {
        if use test ; then
@@ -186,15 +192,6 @@ src_configure() {
 }
 
 src_test() {
-       # Known to fail with FEATURES=usersandbox (bug #439574):
-       #   -  tests/du/long-from-unreadable.sh} (bug #413621)
-       #   -  tests/rm/deep-2.sh (bug #413621)
-       #   -  tests/dd/no-allocate.sh (bug #629660)
-       if has usersandbox ${FEATURES} ; then
-               ewarn "You are emerging ${P} with 'usersandbox' enabled." \
-                       "Expect some test failures or emerge with 
'FEATURES=-usersandbox'!"
-       fi
-
        # Non-root tests will fail if the full path isn't
        # accessible to non-root users
        chmod -R go-w "${WORKDIR}" || die
@@ -219,10 +216,44 @@ src_test() {
        mkwrap mount umount
 
        addwrite /dev/full
-       #export RUN_EXPENSIVE_TESTS="yes"
-       #export COREUTILS_GROUPS="portage wheel"
-       env PATH="${T}/mount-wrappers:${PATH}" gl_public_submodule_commit= \
-               emake -k check VERBOSE=yes
+
+       #local -x RUN_EXPENSIVE_TESTS="yes"
+       #local -x COREUTILS_GROUPS="portage wheel"
+       local -x PATH="${T}/mount-wrappers:${PATH}"
+       local -x gl_public_submodule_commit=
+
+       local xfail_tests=(
+               # bug #629660
+               #tests/dd/no-allocate.sh
+
+               # bug #675802
+               tests/env/env-S
+               tests/env/env-S.pl
+
+               # bug #413621 and bug #548250
+               tests/du/long-from-unreadable.sh
+               tests/ls/removed-directory
+               tests/ls/removed-directory.sh
+               tests/ls/stat-free-symlinks
+               tests/ls/stat-free-symlinks.sh
+               tests/rm/deep-2
+               tests/rm/deep-2.sh
+
+               # We have a patch which fixes this (bug #259876)
+               #tests/touch/not-owner
+               #tests/touch/not-owner.sh
+
+               # bug #910640
+               tests/tty/tty-eof.pl
+       )
+
+       # We set DISABLE_HARD_ERRORS because some of the tests hard error-out
+       # because of sandbox. They're skipped above but DISABLE_HARD_ERRORS is 
needed
+       # to downgrade them to FAIL.
+       emake -k check \
+               VERBOSE=yes \
+               DISABLE_HARD_ERRORS=yes \
+               XFAIL_TESTS="${xfail_tests[*]}"
 }
 
 src_install() {

Reply via email to