ci: propagate RUNC_ALLOW_UNSAFE_TESTS to ssh session

The RUNC_ALLOW_UNSAFE_TESTS variable set in the Cirrus CI env block
does not reach the integration tests because they are executed via
"ssh -tt localhost make ...", which starts a new login shell that
does not inherit the caller's environment. As a result, unsafe tests
are always skipped in Cirrus CI even though the intent is to run them.

Fix this by exporting the variable in /root/.bashrc (same way we
already handle PATH), so the ssh session picks it up.

See #5212 (comment).

Fixes: 9932ad19 ("tests/int: introduce the concept of unsafe tests")
Signed-off-by: RedMakeUp <girafeeblue@gmail.com>
This commit is contained in:
RedMakeUp
2026-04-06 06:26:08 +00:00
parent 65bf6dc661
commit 8178af4930
+2 -2
View File
@@ -15,8 +15,6 @@ task:
BATS_VERSION: "v1.12.0"
LIBPATHRS_VERSION: "0.2.4"
RPMS: gcc git-core iptables jq glibc-static libseccomp-devel make criu fuse-sshfs container-selinux policycoreutils cargo lld wget
# Allow potentially unsafe tests.
RUNC_ALLOW_UNSAFE_TESTS: yes
# yamllint disable rule:key-duplicates
matrix:
- DISTRO: almalinux-8
@@ -85,6 +83,8 @@ task:
/home/runc/script/setup_rootless.sh
# set PATH
echo 'export PATH=/usr/local/go/bin:/usr/local/bin:$PATH' >> /root/.bashrc
# Allow potentially unsafe tests.
echo 'export RUNC_ALLOW_UNSAFE_TESTS=yes' >> /root/.bashrc
# Setup ssh localhost for terminal emulation (script -e did not work)
ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519 -N ""
cat /root/.ssh/id_ed25519.pub >> /root/.ssh/authorized_keys