Skip to content

Commit 620ea6f

Browse files
committed
nextest: Fix heavyweight test serialization filter
The previous filter used ~^libvirt_run and ~^to_disk, but nextest's ~ operator does substring matching and treats ^ as a literal character, so these patterns never matched anything. The threads-required = 4 override was silently never applied. Switch to /regex/ syntax which supports proper anchoring, and broaden coverage to include all tests that spawn QEMU VMs: - test(/to_?disk/) catches both to_disk and todisk (varlink) variants - test(/^test_libvirt_run/) and the other libvirt VM-creating tests - test(/^test_base_disk_creation/) (527s in CI) - test(=test_varlink_ephemeral_run_ps_and_ssh) Without this, two concurrent to-disk tests on a 16 GB CI runner can trigger the OOM killer (observed as exit code 137 / SIGKILL on test_varlink_todisk_creates_disk). Also change threads-required from 4 to 2 to match test-threads, which is semantically equivalent but clearer. Assisted-by: OpenCode (Claude Opus 4)
1 parent b7a69cc commit 620ea6f

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

.config/nextest.toml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,22 @@ path = "junit.xml"
3434
store-success-output = true
3535
store-failure-output = true
3636

37-
# Per-test overrides for libvirt tests that create VMs
38-
# Tests that run `bootc install` can be heavy, so require 4 threads to limit parallelism
37+
# Per-test overrides for tests that create VMs or run `bootc install`.
38+
# These are memory-hungry (each spins up a QEMU VM with swap), so on the
39+
# 16 GB CI runners two of them in parallel can trigger the OOM killer.
40+
# Requiring all 2 threads effectively serialises them.
41+
#
42+
# NOTE: use /regex/ syntax, not ~substring — the ~ operator treats ^ $ as
43+
# literal characters, so ~^foo never matches anything.
3944
[[profile.integration.overrides]]
40-
filter = 'test(~^libvirt_run) | test(~^to_disk)'
41-
threads-required = 4
45+
filter = '''
46+
test(/to_?disk/)
47+
| test(/^test_libvirt_run/)
48+
| test(/^test_libvirt_(comprehensive|ssh_integration|port_forward_(xml|connectivity))/)
49+
| test(/^test_base_disk_creation/)
50+
| test(=test_varlink_ephemeral_run_ps_and_ssh)
51+
'''
52+
threads-required = 2
4253

4354
# Timeout for test_run_ephemeral_with_instancetype which hangs in CI due to
4455
# GitHub Actions environment changes (passes locally, last passed in CI on Feb 5)

0 commit comments

Comments
 (0)