Bug 291879 - usr.bin/env/env_test:equal test fails in CI
Summary: usr.bin/env/env_test:equal test fails in CI
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: 16.0-CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Dag-Erling Smørgrav
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-12-22 20:54 UTC by Siva Mahadevan
Modified: 2025-12-23 15:33 UTC (History)
2 users (show)

See Also:


Attachments
kyua test report (1.81 KB, text/plain)
2025-12-22 20:54 UTC, Siva Mahadevan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Siva Mahadevan freebsd_committer freebsd_triage 2025-12-22 20:54:13 UTC
Created attachment 266457 [details]
kyua test report

The 'usr.bin/env/env_test:equal' testcase fails in CI:


===> usr.bin/env/env_test:equal
Result:     failed: atf-check failed; see the output of the test for details

Standard output:
Executing command [ env /tmp/kyua.m2ceW5/2/work/magic=words ]
Executing command [ env -P /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin:/tmp/kyua.m2ceW5/2/work magic=words ]
Executing command [ env command /tmp/kyua.m2ceW5/2/work/magic=words ]

Standard error:
Fail: incorrect exit status: 127, expected: 0
stdout:

stderr:
env: command: No such file or directory


I have reproduced this error using Bricoler with 100 runs for good measure and attached the failing test report in this bug:

$ bricoler run freebsd-src-regression-suite --param freebsd-src:url=/usr/src --param freebsd-src:branch= --param freebsd-src-regression-suite:hypervisor=bhyve --param freebsd-src-regression-suite:memory=4096 --param freebsd-src-regression-suite:ncpus=2 --param freebsd-src-regression-suite:parallelism=1 --param freebsd-src-regression-suite:count=100 --param freebsd-src-regression-suite:tests='usr.bin/env/env_test:equal'

@des I bisected the failure to your commit https://cgit.freebsd.org/src/commit/?id=4100bd6caa66434bc901ca48d7364bc2b5fe2cfd (usr.bin: Remove intrinsic utilities), please triage as necessary.
Comment 1 commit-hook freebsd_committer freebsd_triage 2025-12-23 10:38:44 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=745c6c0431d01b4fc3247f4eac08a2181d71e008

commit 745c6c0431d01b4fc3247f4eac08a2181d71e008
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2025-12-23 10:36:39 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-12-23 10:36:39 +0000

    Resurrect standalone command

    While command(1) is now classified by POSIX as an intrinsic utility and
    no longer required to exist as a standalone program, it turns out that
    we still have a use for it (cf. env(1)), so resurrect it.

    PR:             291879
    Fixes:          4100bd6caa66 ("usr.bin: Remove intrinsic utilities")
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D54341

 ObsoleteFiles.inc                   | 1 -
 usr.bin/Makefile                    | 1 +
 usr.bin/command/Makefile (new)      | 4 ++++
 usr.bin/command/command.sh (new +x) | 2 ++
 4 files changed, 7 insertions(+), 1 deletion(-)