Skip to content

Support gc-runtime functional tests in VMs#15123

Merged
Ericson2314 merged 2 commits intoNixOS:masterfrom
obsidiansystems:gc-test-vm
Jan 30, 2026
Merged

Support gc-runtime functional tests in VMs#15123
Ericson2314 merged 2 commits intoNixOS:masterfrom
obsidiansystems:gc-test-vm

Conversation

@artemist
Copy link
Member

Motivation

This is useful to make sure that gc works with an unprivileged daemon. it is also convenient to ensure that gc works on a full NixOS system in various configurations.

Context

This test insisted on placing profiles in NIX_STATE_DIR, but all packages were removed from the profile immediately after so they did not act as garbage collector roots. Switch to directly calling nix-build, allowing the test to run in VMs without NIX_STATE_DIR.

This PR relies on #15122, it should look cleaner once that is merged.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

Due to a typo in quoteRegexChars, finding runtime garbage collection roots
was failing on paths that contained a dot, or any other regex chars that would
have to be replaced.

When fixing that error, also add tests to make sure gc continues to
work.
This test insisted on placing profiles in NIX_STATE_DIR, but all
packages were removed from the profile immediately after so they did not
act as garbage collector roots. Switch to directly calling nix-build,
allowing the test to run in VMs without NIX_STATE_DIR.
@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Jan 30, 2026
@Ericson2314 Ericson2314 enabled auto-merge January 30, 2026 17:02
@Ericson2314 Ericson2314 added this pull request to the merge queue Jan 30, 2026
Merged via the queue into NixOS:master with commit d84624d Jan 30, 2026
14 checks passed
@Ericson2314 Ericson2314 deleted the gc-test-vm branch January 30, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants