Skip to content

Commit 7a37f0b

Browse files
committed
agent(rhel8): skip tests in nspawn on RHEL 8.6 and older
As we're missing [0] in these versions which is not trivial to backport into such old systemd versions, and it breaks the nspawn runs with: Spawning container TEST-01-BASIC--1 on /var/tmp/systemd-test.0kzKzL/nspawn-root. Press ^] three times within 1s to kill container. systemd 239 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=legacy) Detected virtualization systemd-nspawn. Detected architecture x86-64. Welcome to CentOS Stream 9! Set hostname to <systemd-testsuite>. Initializing machine ID from container UUID. Failed to add address 127.0.0.1 to loopback interface: Operation not permitted Failed to add address ::1 to loopback interface: Operation not permitted Failed to bring loopback interface up: Operation not permitted Found cgroup on /sys/fs/cgroup/systemd, legacy hierarchy Using cgroup controller name=systemd. File system hierarchy is at /sys/fs/cgroup/systemd. Failed to install release agent, ignoring: No such file or directory Failed to create /init.scope control group: Operation not permitted Failed to allocate manager object: Operation not permitted [!!!!!!] Failed to allocate manager object, freezing. Freezing execution. Trying to halt container. Send SIGTERM again to trigger immediate termination. Container TEST-01-BASIC--1 terminated by signal KILL. [0] redhat-plumbers/systemd-rhel8#286
1 parent e4f1f24 commit 7a37f0b

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

agent/testsuite-rhel8.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,19 @@ for t in test/TEST-??-*; do
155155
# about them, so let's tell it to whitelist all known syscalls
156156
export NSPAWN_ARGUMENTS="--system-call-filter=@known"
157157

158+
if grep 'seccomp_init_for_arch(.*SCMP_ACT_ERRNO(EPERM)' src/nspawn/nspawn-seccomp.c; then
159+
# In very old RHEL 8 systemd versions (8.6.0 and older) we're missing patch series [0] that configure
160+
# nspawn's seccomp filters to return ENOSYS instead of EPERM for unknown syscalls. And given we have
161+
# to run the CI for RHEL 8 systemd on C9S, we get a bunch of unknown syscalls when running nspawn which
162+
# breaks the nspawn runs (the workaround above with $NSPAWN_ARGUMENTS doesn't help here).
163+
#
164+
# Given the series we're missing is not trivial to backport, especially into such old systemd versions,
165+
# let's just skip the nspawn runs there to have at least some test coverage.
166+
#
167+
# [0] https://github.com/redhat-plumbers/systemd-rhel8/pull/286
168+
export TEST_NO_NSPAWN=1
169+
fi
170+
158171
# Suffix the $TESTDIR of each retry with an index to tell them apart
159172
export MANGLE_TESTDIR=1
160173
# FIXME: retry each task again if it fails (i.e. run each task twice at most)

0 commit comments

Comments
 (0)