From 244b70040392ab04d0e570d984e1b654a8f58d77 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 22 May 2026 20:54:57 +1000 Subject: [PATCH 1/4] nixosTests.simple-vm: rename from nixosTests.simple renamed because we now have different kinds of tests --- ci/eval/compare/default.nix | 2 +- ci/eval/outpaths.nix | 2 +- ci/github-script/check-target-branch.js | 2 +- nixos/release-combined.nix | 2 +- nixos/release-small.nix | 4 ++-- nixos/tests/all-tests.nix | 2 +- nixos/tests/nixos-test-driver/skip-typecheck.nix | 2 +- nixos/tests/{simple.nix => simple-vm.nix} | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) rename nixos/tests/{simple.nix => simple-vm.nix} (86%) diff --git a/ci/eval/compare/default.nix b/ci/eval/compare/default.nix index 4d651afe092e..1e1036e8da9f 100644 --- a/ci/eval/compare/default.nix +++ b/ci/eval/compare/default.nix @@ -188,7 +188,7 @@ let kernel: rebuilds: lib.nameValuePair "10.rebuild-${kernel}-stdenv" (lib.elem "stdenv" rebuilds) ) rebuildsByKernel // { - "10.rebuild-nixos-tests" = lib.elem "nixosTests.simple" (extractPackageNames diffAttrs.rebuilds); + "10.rebuild-nixos-tests" = lib.elem "nixosTests.simple-vm" (extractPackageNames diffAttrs.rebuilds); }; } ); diff --git a/ci/eval/outpaths.nix b/ci/eval/outpaths.nix index 6c29ff403b47..577ecfc4d18a 100755 --- a/ci/eval/outpaths.nix +++ b/ci/eval/outpaths.nix @@ -108,6 +108,6 @@ in tweak ( (removeAttrs nixpkgsJobs blacklist) // { - nixosTests = lib.filterAttrs (name: _: name == "simple") nixosJobs.tests; + nixosTests = lib.filterAttrs (name: _: name == "simple-vm") nixosJobs.tests; } ) diff --git a/ci/github-script/check-target-branch.js b/ci/github-script/check-target-branch.js index cdb2670aeac0..8a3dd0456944 100644 --- a/ci/github-script/check-target-branch.js +++ b/ci/github-script/check-target-branch.js @@ -99,7 +99,7 @@ async function checkTargetBranch({ github, context, core, dry }) { ...Object.values(changed.rebuildCountByKernel), ) const rebuildsAllTests = - changed.attrdiff.changed.includes('nixosTests.simple') + changed.attrdiff.changed.includes('nixosTests.simple-vm') // https://github.com/NixOS/nixpkgs/pull/481205#issuecomment-3790123921 // These should go to staging-nixos instead of master, diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix index 40eb4a0d34ae..faa47068e706 100644 --- a/nixos/release-combined.nix +++ b/nixos/release-combined.nix @@ -202,7 +202,7 @@ rec { (onFullSupported "nixos.tests.proxy") (onFullSupported "nixos.tests.sddm.default") (onFullSupported "nixos.tests.shadow") - (onFullSupported "nixos.tests.simple") + (onFullSupported "nixos.tests.simple-vm") (onFullSupported "nixos.tests.sway") (onFullSupported "nixos.tests.switchTest") (onFullSupported "nixos.tests.udisks2") diff --git a/nixos/release-small.nix b/nixos/release-small.nix index 461afb49d4db..a6a3addd3bfc 100644 --- a/nixos/release-small.nix +++ b/nixos/release-small.nix @@ -67,7 +67,7 @@ rec { php predictable-interface-names proxy - simple + simple-vm ; latestKernel = { inherit (nixos'.tests.latestKernel) @@ -165,7 +165,7 @@ rec { "nixos.tests.predictable-interface-names.unpredictable" "nixos.tests.predictable-interface-names.unpredictableNetworkd" "nixos.tests.proxy" - "nixos.tests.simple" + "nixos.tests.simple-vm" "nixpkgs.jdk" "nixpkgs.tests.stdenv.tests-stdenv-gcc-stageCompare" "nixpkgs.opensshTest" diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 3475d14e7f26..644dfc90e7e7 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1508,7 +1508,7 @@ in shoko = import ./shoko.nix { inherit runTest; }; signal-desktop = runTest ./signal-desktop.nix; silverbullet = runTest ./silverbullet.nix; - simple = runTest ./simple.nix; + simple-vm = runTest ./simple-vm.nix; sing-box = runTest ./sing-box.nix; sks = runTest ./sks.nix; slimserver = runTest ./slimserver.nix; diff --git a/nixos/tests/nixos-test-driver/skip-typecheck.nix b/nixos/tests/nixos-test-driver/skip-typecheck.nix index b36e4a819693..887cab290389 100644 --- a/nixos/tests/nixos-test-driver/skip-typecheck.nix +++ b/nixos/tests/nixos-test-driver/skip-typecheck.nix @@ -1,5 +1,5 @@ /** - nixosTests.simple, but with skipTypeCheck. + nixosTests.simple-vm, but with skipTypeCheck. This catches regressions in the wiring, e.g. https://github.com/NixOS/nixpkgs/pull/511225 */ diff --git a/nixos/tests/simple.nix b/nixos/tests/simple-vm.nix similarity index 86% rename from nixos/tests/simple.nix rename to nixos/tests/simple-vm.nix index f9b9db05302b..51fe6b596d29 100644 --- a/nixos/tests/simple.nix +++ b/nixos/tests/simple-vm.nix @@ -1,5 +1,5 @@ { - name = "simple"; + name = "simple-vm"; nodes.machine = { }; From cdc68a268ce96acf39abf37c360ab1a58d6cdb17 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 22 May 2026 11:54:05 +1000 Subject: [PATCH 2/4] nixos/tests: add simple-container nixosTests.simple-vm but using an nspawn container --- nixos/tests/all-tests.nix | 1 + nixos/tests/simple-container.nix | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 nixos/tests/simple-container.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 644dfc90e7e7..f4308311858c 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1508,6 +1508,7 @@ in shoko = import ./shoko.nix { inherit runTest; }; signal-desktop = runTest ./signal-desktop.nix; silverbullet = runTest ./silverbullet.nix; + simple-container = runTest ./simple-container.nix; simple-vm = runTest ./simple-vm.nix; sing-box = runTest ./sing-box.nix; sks = runTest ./sks.nix; diff --git a/nixos/tests/simple-container.nix b/nixos/tests/simple-container.nix new file mode 100644 index 000000000000..269853423651 --- /dev/null +++ b/nixos/tests/simple-container.nix @@ -0,0 +1,11 @@ +{ + name = "simple-container"; + + containers.machine = { }; + + testScript = '' + start_all() + machine.wait_for_unit("multi-user.target") + machine.shutdown() + ''; +} From 70558450409e91a92d4a50b6fb2676cf0305cd5c Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 22 May 2026 11:54:05 +1000 Subject: [PATCH 3/4] nixos/release{,-small}: add nixosTests.simple-container nixosTests.simple-vm but using an nspawn container --- nixos/release-combined.nix | 1 + nixos/release-small.nix | 2 ++ 2 files changed, 3 insertions(+) diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix index faa47068e706..d6ec21f82226 100644 --- a/nixos/release-combined.nix +++ b/nixos/release-combined.nix @@ -202,6 +202,7 @@ rec { (onFullSupported "nixos.tests.proxy") (onFullSupported "nixos.tests.sddm.default") (onFullSupported "nixos.tests.shadow") + (onFullSupported "nixos.tests.simple-container") (onFullSupported "nixos.tests.simple-vm") (onFullSupported "nixos.tests.sway") (onFullSupported "nixos.tests.switchTest") diff --git a/nixos/release-small.nix b/nixos/release-small.nix index a6a3addd3bfc..8db36109abf7 100644 --- a/nixos/release-small.nix +++ b/nixos/release-small.nix @@ -67,6 +67,7 @@ rec { php predictable-interface-names proxy + simple-container simple-vm ; latestKernel = { @@ -165,6 +166,7 @@ rec { "nixos.tests.predictable-interface-names.unpredictable" "nixos.tests.predictable-interface-names.unpredictableNetworkd" "nixos.tests.proxy" + "nixos.tests.simple-container" "nixos.tests.simple-vm" "nixpkgs.jdk" "nixpkgs.tests.stdenv.tests-stdenv-gcc-stageCompare" From c103da6a19c623e6e5c8c791d8012c29855bb802 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 22 May 2026 18:34:16 +1000 Subject: [PATCH 4/4] ci: add nixosTests.simple-container nixosTests.simple-vm but using an nspawn container --- ci/eval/compare/default.nix | 4 +++- ci/eval/outpaths.nix | 4 +++- ci/github-script/check-target-branch.js | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ci/eval/compare/default.nix b/ci/eval/compare/default.nix index 1e1036e8da9f..e596b6d1994f 100644 --- a/ci/eval/compare/default.nix +++ b/ci/eval/compare/default.nix @@ -172,6 +172,7 @@ let rebuildCountByKernel = lib.mapAttrs ( kernel: kernelRebuilds: lib.length kernelRebuilds ) rebuildsByKernel; + rebuildNames = extractPackageNames diffAttrs.rebuilds; in writeText "changed-paths.json" ( builtins.toJSON { @@ -188,7 +189,8 @@ let kernel: rebuilds: lib.nameValuePair "10.rebuild-${kernel}-stdenv" (lib.elem "stdenv" rebuilds) ) rebuildsByKernel // { - "10.rebuild-nixos-tests" = lib.elem "nixosTests.simple-vm" (extractPackageNames diffAttrs.rebuilds); + "10.rebuild-nixos-tests" = + lib.elem "nixosTests.simple-container" rebuildNames || lib.elem "nixosTests.simple-vm" rebuildNames; }; } ); diff --git a/ci/eval/outpaths.nix b/ci/eval/outpaths.nix index 577ecfc4d18a..afbce48f3321 100755 --- a/ci/eval/outpaths.nix +++ b/ci/eval/outpaths.nix @@ -108,6 +108,8 @@ in tweak ( (removeAttrs nixpkgsJobs blacklist) // { - nixosTests = lib.filterAttrs (name: _: name == "simple-vm") nixosJobs.tests; + nixosTests = lib.filterAttrs ( + name: _: name == "simple-container" || name == "simple-vm" + ) nixosJobs.tests; } ) diff --git a/ci/github-script/check-target-branch.js b/ci/github-script/check-target-branch.js index 8a3dd0456944..01c062d410ab 100644 --- a/ci/github-script/check-target-branch.js +++ b/ci/github-script/check-target-branch.js @@ -99,6 +99,7 @@ async function checkTargetBranch({ github, context, core, dry }) { ...Object.values(changed.rebuildCountByKernel), ) const rebuildsAllTests = + changed.attrdiff.changed.includes('nixosTests.simple-container') || changed.attrdiff.changed.includes('nixosTests.simple-vm') // https://github.com/NixOS/nixpkgs/pull/481205#issuecomment-3790123921