Re: coreutils-9.6 tests/chroot/chroot-credentials failure
"Xi Ruoyao" ([email protected] via lfs-support Mailing List) <[email protected]> Sat, 02 Aug 2025 19:19:23 +0800
| Newsgroups | gmane.linux.lfs.support |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 2025-07-29 at 18:01 -0500, Bruce Dubbs wrote: > On 7/29/25 4:20 PM, revsuine ([email protected] via lfs-support Mailing List) wrote: > > Book: LFS 12.3 SYSV > > Section: 8.58 > > > > Hi there, tests/chroot/chroot-credentials is failing for me with coreutils-9.6. > > I've not deviated from the book instructions at all (or at least I haven't > > deliberately done so), and have applied the patch as instructed in section 8.58. > > Here is the output from tests/test-suite.log: > > > > =============================================== > > GNU coreutils 9.6: ./tests/test-suite.log > > =============================================== > > > > # TOTAL: 36 > > # PASS: 20 > > # SKIP: 15 > > # XFAIL: 0 > > # FAIL: 1 > > # XPASS: 0 > > # ERROR: 0 > > > > System information (uname -a): Linux 6.12.40_1 #1 SMP PREEMPT_DYNAMIC Mon Jul 28 > > 02:46:56 UTC 2025 x86_64 > > > > .. contents:: :depth: 2 > > It's really irritating to have to scroll through 2700+ lines to find the one test > that failed. Even then, there is a lot of meaningless text. > > > > FAIL: tests/chroot/chroot-credentials > > ===================================== > > [snip] > > > + id -u +12342 > > id: '+12342': no such user > > ++ chroot --userspec=+12342:+5678 / id -G > > + test 5678 = 5678 > > + returns_ 125 chroot --userspec=+12342 / true > > chroot: no group specified for unknown uid: 12342 > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > I have no idea where this comes from. The user should be 'tester' which should have > an id of 101. > > It looks like you may have missed the command 'groupadd -g 102 dummy -U tester' or > are not running the test in chroot. Unfortunately your analysis is not correct. This is not the real cause of the failure, so for the OP it was correct to paste the full output. The real failure can be identified by searching for "fail=1": ++ chroot --userspec=:101 / id -G ++ id -G + test 101 = '101 0' + fail=1 The corresponding test is: test "$(chroot --userspec=:$NON_ROOT_GROUP / id -G)" = \ "$NON_ROOT_GID $(id -G)" || fail=1 The failure does not make sense. It indicates the root user does not belong to its own group (i.e. the root group). Maybe this is some so-called "security feature" of the host distro or the OP is compiling in some sandboxed environment. -- Xi Ruoyao <[email protected]> -- http://lists.linuxfromscratch.org/sympa/info/lfs-support Unsubscribe: See the above information page