Summary: | sys-apps/coreutils-8.15 - src_test(): errors setting up rm/deep-2 and du/long-from-unreadable | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Claes <letharion> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | emeric.maschino, erikdenstore+gbugs, kentnl, kingjon3377, rhill, ryao, sam, tampakrap, tka, toralf |
Priority: | Normal | Keywords: | PullRequest, TESTFAILURE |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/gentoo/gentoo/pull/15562 https://github.com/gentoo/gentoo/pull/28348 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 548250 | ||
Bug Blocks: | |||
Attachments: |
Failing build log.
sandbox-paths.patch |
Description
Claes
2012-04-26 12:32:26 UTC
FEATURES="-test" works around the problem. Created attachment 310181 [details]
Failing build log.
deep-2: set-up failure: ERROR: rm/deep-2 long-from-unreadable: set-up failure: ERROR: du/long-from-unreadable *** Bug 443978 has been marked as a duplicate of this bug. *** I had sys-apps/coreutils-8.20 fail with the same errors. When emerged with FEATURES="-usersandbox" all the tests complete successfully. The test that fail both try to do something with very long paths (longer than PATH_MAX). I think the problem is that is isn't handled correctly by the sandbox. I see this with sys-apps/coreutils-8.22 and sys-apps/sandbox-2.6-r1. The errors do not happen with FEATURES=-usersandbox. Some diagnosis on reproducing the failure on 8.21: Looking in the test for rm/deep-2, I find 3 interesting errors: --- + perl -e 'my $d = "x" x 200; foreach my $i (1..52)' -e ' { mkdir ($d, 0700) && chdir $d or die "$!" }' Numerical result out of range at -e line 2. --- This is the "setup failure", I believe. --- + chmod -R u+rwx /var/tmp/portage/sys-apps/coreutils-8.21/work/coreutils-8.21/gt-deep-2.sh.1SYU chmod: cannot read directory '<BIGLONGDIRHERE>': File name too long --- --- + rm -rf /var/tmp/portage/sys-apps/coreutils-8.21/work/coreutils-8.21/gt-deep-2.sh.1SYU rm: cannot remove '<BIGLONGDIRHERE>': Directory not empty --- The problem dir is 4100 characters long, and has 20x path-parts 200 characters in length: https://gist.github.com/kentfredric/ad533fa2aa225240ea8a#file-gt-deep-sh-txt-L25 long-from-unreadable has the same pattern of failure, with a problem dir 4112 characters long, again, with 20x 200 character path parts. https://gist.github.com/kentfredric/ad533fa2aa225240ea8a#file-gt-long-from-unreadable-sh-txt-L24 why the perl script can create them, but coreutils can't chmod or remove them, seems like an important thing to work out. Curiously, it doesn't even look like a _test_ failure, but a failure of the framework to cleanup the test after the test failed to be created. goto fail ? :) Created attachment 402310 [details, diff] sandbox-paths.patch Attached patch when applied last to the existing 8.21 patch series, allows sandboxed tests to pass, while not skipping the tests on unsandboxed systems. It relies on the presence of SANDBOX_ACTIVE to make the tests skip, which I believe suitable for usersandbox/sandbox. People who want to try this themselves, add the patch to the patch dir, and add the following after the existing epatch statement in src_prepare epatch "${FILESDIR}"/sandbox-paths.patch This will allow testing to be expected to pass until bug #548250 is properly resolved and propagated. *** Bug 403279 has been marked as a duplicate of this bug. *** *** Bug 353783 has been marked as a duplicate of this bug. *** *** Bug 346877 has been marked as a duplicate of this bug. *** Still happens with 8.26 on hppa. Still happening with coreutils-8.28 and sys-apps/sandbox-2.12. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0edff67f453a7509c08fce538d3da9c947daa433 commit 0edff67f453a7509c08fce538d3da9c947daa433 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2017-11-06 16:20:43 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2017-11-06 16:20:57 +0000 sys-apps/coreutils: Rev bump to address multiple test failures - Running test suite with FEATURES=usersandbox is no longer supported due to various sandbox issues. (bug #413621, #439574, #629660) - Due to sandbox failures previously disabled tests re-enabled. (bug #415487) - tests/ls/readdir-mountpoint-inode test failure fixed. (bug #353164) - "caps" USE flag description more specified. (bug #617702 - Tools/programs/libraries used in test suite now listed in DEPEND="test? (...)" which requires re-keywording for some architectures. Bug: https://bugs.gentoo.org/413621 Bug: https://bugs.gentoo.org/439574 Bug: https://bugs.gentoo.org/629660 Bug: https://bugs.gentoo.org/415487 Closes: https://bugs.gentoo.org/353164 Closes: https://bugs.gentoo.org/617702 Package-Manager: Portage-2.3.13, Repoman-2.3.4 sys-apps/coreutils/Manifest | 1 + sys-apps/coreutils/coreutils-8.28-r1.ebuild | 210 ++++++++++++++++++++++++++++ sys-apps/coreutils/metadata.xml | 1 + 3 files changed, 212 insertions(+)} *** Bug 636746 has been marked as a duplicate of this bug. *** *** Bug 636746 has been marked as a duplicate of this bug. *** chroot ~ # grep ERROR: /var/tmp/portage/sys-apps/coreutils-8.29-r1/temp/build.log # ERROR: 2 ERROR: tests/rm/deep-2 ERROR: tests/du/long-from-unreadable # ERROR: 2 # ERROR: 0 * ERROR: sys-apps/coreutils-8.29-r1::gentoo failed (test phase): chroot ~ # grep ERROR: /var/tmp/portage/sys-apps/coreutils-8.30/temp/build.log # ERROR: 2 ERROR: tests/rm/deep-2 ERROR: tests/du/long-from-unreadable # ERROR: 2 # ERROR: 0 * ERROR: sys-apps/coreutils-8.30::gentoo failed (test phase): (In reply to Rolf Eike Beer from comment #17) > chroot ~ # grep ERROR: > /var/tmp/portage/sys-apps/coreutils-8.29-r1/temp/build.log > # ERROR: 2 > ERROR: tests/rm/deep-2 > ERROR: tests/du/long-from-unreadable > # ERROR: 2 > # ERROR: 0 > * ERROR: sys-apps/coreutils-8.29-r1::gentoo failed (test phase): > chroot ~ # grep ERROR: > /var/tmp/portage/sys-apps/coreutils-8.30/temp/build.log > # ERROR: 2 > ERROR: tests/rm/deep-2 > ERROR: tests/du/long-from-unreadable > # ERROR: 2 > # ERROR: 0 > * ERROR: sys-apps/coreutils-8.30::gentoo failed (test phase): Disable FEATURES="usersandbox" for this package, as instructed. > * You are emerging coreutils-8.28 with 'usersandbox' enabled. Expect some test failures or emerge with 'FEATURES=-usersandbox'! Ideally more than a warning here, might help avoid future bug reports? (In reply to Kent Fredric (IRC: kent\n) from comment #18) > Disable FEATURES="usersandbox" for this package, as instructed. > > > * You are emerging coreutils-8.28 with 'usersandbox' enabled. Expect some test failures or emerge with 'FEATURES=-usersandbox'! > > Ideally more than a warning here, might help avoid future bug reports? I have no clear answer for that. We have multiple options: a) RESTRICT=test b) Check for FEATURES=userpriv in src_test and skip tests if found c) Remove (=patch like shown in comment #8) these two tests Because this is a core package, option "a" isn't a valid option for me -- we have to run tests regularly and a restriction just because of a broken Gentoo sandbox would make this unnecessarily difficult: At the moment, users interested in running tests, can disable that feature just for this package but they cannot work around a general restriction without modifying the ebuild (and even if there would be such an option, I bet we would still get "false positives" just because someone forced tests and missed that warning). same argument applies to option "c": This is a core package and we need to test this functionality. Option "b" or maybe sort of option "c" (i.e. conditional removal of these two tests if FEATURES=userpriv) would work in theory. However I don't like that idea: Imagine we want to stabilize a new version and expect that people, at least arch teams, during stabilization, will run these tests. If they forget about that requirement they would mark that package stable because 'all tests passed' but in theory there could be a bug which affects core functionality in a core package. Maybe we can detect these two failures and don't fail with FEATURES=userpriv. I.e. implement a hack like https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/openjpeg/openjpeg-2.3.0.ebuild?id=b4459aa17d4d7b5bf9150a31f4b409733ca5cbb6#n90 But I am not sure if - it's worth to do something like that - we even should something like that in general (another hack...) - see reason for option "b": Maybe if we wouldn't talk about something like 'the mother of all core packages' *SCNR* ... At the moment, false positive rate is very low, we may reconsider this if we start seeing more false positive because people don't read logs before reporting bugs but until then, I think I'd like to keep current 'solution'. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a48e67d33ef6edd58b2cd6111884dbb4fdef7491 commit a48e67d33ef6edd58b2cd6111884dbb4fdef7491 Author: Sam James (sam_c) <sam@cmpct.info> AuthorDate: 2020-04-29 10:00:59 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-04-29 15:21:16 +0000 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) <sam@cmpct.info> Closes: https://github.com/gentoo/gentoo/pull/15562 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> 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(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b53422e8c5e1d2426b89dd23004d3935d0e7f2f8 commit b53422e8c5e1d2426b89dd23004d3935d0e7f2f8 Author: Peter Levine <plevine457@gmail.com> AuthorDate: 2022-11-20 09:05:55 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-11-23 01:43:39 +0000 dev-cpp/gtest: exclude tests that fail due to usersandbox Patching internal code to overcome test failure due to the usersandbox feature flag seems misguided. Other packages opt to skip such tests rather than patching compiled code or turning off usersandbox (bug# 413621, 603244). Let's do that. Bug: https://bugs.gentoo.org/413621 Bug: https://bugs.gentoo.org/603244 Signed-off-by: Peter Levine <plevine457@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> dev-cpp/gtest/gtest-9999.ebuild | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=502e78b6185f3351434b7345dd9b36ce4131a76e commit 502e78b6185f3351434b7345dd9b36ce4131a76e Author: Sam James <sam@gentoo.org> AuthorDate: 2024-03-23 20:01:05 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-03-23 20:02:03 +0000 sys-apps/coreutils: add 9.4_p20240323 (unkeyworded) Reworked tests as well. Closes: https://bugs.gentoo.org/413621 Closes: https://bugs.gentoo.org/629660 Closes: https://bugs.gentoo.org/803377 Closes: https://bugs.gentoo.org/898370 Closes: https://bugs.gentoo.org/910640 Closes: https://bugs.gentoo.org/926349 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/coreutils/Manifest | 3 + sys-apps/coreutils/coreutils-9.4_p20240323.ebuild | 302 ++++++++++++++++++++++ sys-apps/coreutils/coreutils-9999.ebuild | 63 +++-- 3 files changed, 352 insertions(+), 16 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6c182cea4b7c5516ddaa3d69dad06fd1c088ae7 commit b6c182cea4b7c5516ddaa3d69dad06fd1c088ae7 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-03-23 20:08:20 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-03-23 20:08:20 +0000 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@gentoo.org> sys-apps/coreutils/coreutils-9.4.ebuild | 59 +++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 14 deletions(-) |