Skip to content

plans: set sbin-inclusive PATH for test execution (fix tmt 1.75.0 regression)#65

Open
andrewlukoshko wants to merge 2 commits into
almalinuxfrom
fix/sbin-path-tmt-1.75
Open

plans: set sbin-inclusive PATH for test execution (fix tmt 1.75.0 regression)#65
andrewlukoshko wants to merge 2 commits into
almalinuxfrom
fix/sbin-path-tmt-1.75

Conversation

@andrewlukoshko
Copy link
Copy Markdown
Member

Problem

The compose-tests suite started failing on the same commit that previously passed:

Both runs are the same commit (1b49e3e) with the same test scripts, so the regression is environmental.

Every failing test fails with command not found (or a missing artifact downstream of one) on a binary that lives in /usr/sbin or /sbin:

Test(s) Missing command
p_audit auditctl (auditd never starts)
p_bridge-utils, p_network, p_tcpdump ip, ifconfig, tcpdump
p_openssh, p_passwd, p_shadow-utils, p_dovecot useradd, userdel, usermod, runuser
p_initscripts, p_tftp-server service
p_nfs, p_vsftpd exportfs, setsebool
p_cracklib cracklib-check
p_logwatch, p_iptraf, p_mdadm logwatch, iptraf-ng, mdadm
/tests/podman useradd, usermod, userdel
/tests/libbpf-tools bpf-* helpers

Root cause

The workflow pip installs tmt unpinned. Between the two runs it moved 1.74.0 → 1.75.0, which shipped teemtee/tmt#4900"Do not populate the default command environment with tmt process envvars." Commands run on the guest no longer inherit tmt's os.environ, so the runner's PATH (which included /usr/sbin:/sbin) is no longer forwarded. The legacy t_functional scripts and several ng tests call privileged tools by bare name and depend on sbin being on PATH.

Fix

Set an explicit sbin-inclusive PATH in the legacy and ng plan environments, making the suite independent of tmt's env-forwarding behavior (robust across future tmt upgrades).

PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

Andrew Lukoshko added 2 commits June 7, 2026 18:48
tmt 1.75.0 stopped leaking the runner's process environment into test
commands (teemtee/tmt#4900), so /usr/sbin and /sbin are no longer on PATH
by default. The legacy t_functional scripts and several ng tests invoke
privileged tools (useradd, ip, service, auditctl, setsebool, tcpdump,
mdadm, cracklib-check, bpf-*, ...) by bare name and broke with
'command not found' on tmt >= 1.75.0, while passing on 1.74.0.

Set an explicit sbin-inclusive PATH in the legacy and ng plan
environments so the suite is independent of tmt's env-forwarding
behavior.
Same tmt 1.75.0 regression (teemtee/tmt#4900): HOME is no longer
forwarded to test commands. p_go's 'go build' then fails with
'build cache is required ... neither $XDG_CACHE_HOME nor $HOME are
defined', leaving /var/tmp/go-test uncreated. Restore HOME=/root
(the value tmt forwarded before 1.75.0) in both plan environments.
@andrewlukoshko
Copy link
Copy Markdown
Member Author

Follow-up: added `HOME: "/root"` to both plan environments.

The PATH fix cleared all the command not found failures, but p_go remained red — same tmt 1.75.0 regression (teemtee/tmt#4900), this time because HOME is no longer forwarded:

build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
./test_go.sh: line 28: /var/tmp/go-test: No such file or directory

go build needs HOME/GOCACHE to locate its build cache; without it the binary is never produced. HOME=/root is the value tmt forwarded before 1.75.0, so this just restores prior behavior. (Seen in run 27098743377.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant