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
nixos/tests: add predictable-interface-names.nix #34305
Conversation
Should we also test this with networkd enabled? |
Honestly, no idea. But if someone thinks it is a good idea I can add it. |
Well i pushed a commit to test with networkd as well |
Thanks for this! I would like this test added to |
@adisbladis Oh, yeah, totally! |
Here is my attempt at adding this test to
I have no idea how to fix this so some help would be greatly appreciated :) |
791c8eb
to
55fd41b
Compare
let boolToString = x: if x then "yes" else "no"; in | ||
let testWhenSetTo = predictable: withNetworkd: | ||
makeTest { | ||
name = "predictableInterfaceNames-${boolToString predictable}-with-networkd-${boolToString withNetworkd}"; |
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 would like these attribute names to be more descriptive.
Instead of yes
and no
I think we should do something along these lines:
"predictableInterfaceNames-${lib.optionalString (!predictable) "un"}predictable${lib.optionalString withNetworkd "-with-networkd"}"
@symphorien It was just a matter of replacing In my mind this one is good to go as soon as my comment about the drv/attribute names is resolved. I do want one of the release managers to merge this as we touch release-critical infrastructure. |
I tried to address @adisbladis 's request to change the name.
This behavior depends on the name of the derivation and is deterministic (I already had encountered such behavior when I was using "true" and "false" instead of "yes" and "no"). |
since this is independent from predictable interface names, I filed an issue: #34393 |
81df5a5
to
5965906
Compare
@adisbladis I changed from your suggestion to |
Feeling pretty good about this now. 👍 |
Thanks! |
Motivation for this change
#33738
Things done
I tested that the revision incriminated in the issue makes the test fail, and that the test succeeds on current revision.
I think this test should be added to "release critical tests" as well, but I don't know how to do it (if it is in
nixpkgs).
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)