New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VM test closure checks #70981
base: staging
Are you sure you want to change the base?
VM test closure checks #70981
Conversation
Thank you for your contributions.
|
Do we still care about this? Seems like it might be useful to include in the upcoming release. |
I marked this as stale due to inactivity. → More info |
Is there something I can do to help with getting this PR merged? |
@@ -410,6 +410,27 @@ in | |||
''; | |||
}; | |||
|
|||
# FIXME: should move this to top-level.nix. | |||
system.forbiddenDependencies = mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll split this in to a separate pr and address the FIXME
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Ensure that NixOS configurations don't have -dev paths | ||
# or gcc.out in their closures. | ||
system.forbiddenDependencies = mkDefault "(-dev$)|(-gcc-[0-9\.]+$)|(gcc-wrapper)"; | ||
system.maxClosureSize = mkDefault (1024 * 1024 * 1024); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my experience with GHC, it will be the tests on ARM that run into such a check first.
Those are may be undermaintained, so they'd (wrongly) end up in the bag of tests considered flaky, so I wouldn't want to burden all tests with a (default) closure size check. Instead, we could check some key services or even just the empty NixOS on a single, popular system
, such as x86_64-linux
. (e.g. nixosTests.empty-system-closure-size
, so the problem can be spotted at a glance)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I think.
This adds checks to ensure that the
config.system.build.toplevel
derivation of a VM does not have-dev
outputs orgcc
in its closure, and that the size of the closure is not unexpectedly high. (The default is 1 GiB, but this can be overriden per test.)