From a7cda6835fc042a0a70d3e1983863aad0183d229 Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Mon, 4 Nov 2024 00:51:58 -0500 Subject: [PATCH] nixos/tests/switchTest: Remove spurious dbus reload checks Previously, the base system had grub in `systemPackages` but the specialisations did not. This is because of a few factors: - Grub was enabled in the nixos config - Specialisations set `grub.device = "nodev"` (see: system/activation/no-clone.nix) - Grub is added to `systemPackages` depending on whether `devices == ["nodev"]` This meant that switching between the base system and a specialisation always changed `system-path.drv`, which is a reload trigger for dbus. With grub disabled in this test, this no longer happens. --- nixos/tests/switch-test.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/tests/switch-test.nix b/nixos/tests/switch-test.nix index 617f4d67d577..98b145c58e81 100644 --- a/nixos/tests/switch-test.nix +++ b/nixos/tests/switch-test.nix @@ -742,7 +742,7 @@ in { out = switch_to_specialisation("${machine}", "") assert_contains(out, "stopping the following units: test.mount\n") assert_lacks(out, "NOT restarting the following changed units:") - assert_contains(out, "reloading the following units: ${dbusService}\n") + assert_lacks(out, "reloading the following units:") assert_lacks(out, "\nrestarting the following units:") assert_lacks(out, "\nstarting the following units:") assert_lacks(out, "the following new units were started:") @@ -750,7 +750,7 @@ in { out = switch_to_specialisation("${machine}", "storeMountModified") assert_lacks(out, "stopping the following units:") assert_contains(out, "NOT restarting the following changed units: -.mount") - assert_contains(out, "reloading the following units: ${dbusService}\n") + assert_lacks(out, "reloading the following units:") assert_lacks(out, "\nrestarting the following units:") assert_lacks(out, "\nstarting the following units:") assert_lacks(out, "the following new units were started:") @@ -761,7 +761,7 @@ in { out = switch_to_specialisation("${machine}", "swap") assert_lacks(out, "stopping the following units:") assert_lacks(out, "NOT restarting the following changed units:") - assert_contains(out, "reloading the following units: ${dbusService}\n") + assert_lacks(out, "reloading the following units:") assert_lacks(out, "\nrestarting the following units:") assert_lacks(out, "\nstarting the following units:") assert_contains(out, "the following new units were started: swapfile.swap") @@ -770,7 +770,7 @@ in { assert_contains(out, "stopping swap device: /swapfile") assert_lacks(out, "stopping the following units:") assert_lacks(out, "NOT restarting the following changed units:") - assert_contains(out, "reloading the following units: ${dbusService}\n") + assert_lacks(out, "reloading the following units:") assert_lacks(out, "\nrestarting the following units:") assert_lacks(out, "\nstarting the following units:") assert_lacks(out, "the following new units were started:") @@ -791,7 +791,7 @@ in { assert_lacks(out, boot_loader_text) # test does not install a bootloader assert_lacks(out, "stopping the following units:") assert_lacks(out, "NOT restarting the following changed units:") - assert_contains(out, "reloading the following units: ${dbusService}\n") # huh + assert_lacks(out, "reloading the following units:") assert_lacks(out, "\nrestarting the following units:") assert_lacks(out, "\nstarting the following units:") assert_contains(out, "the following new units were started: test.service\n") @@ -868,7 +868,7 @@ in { assert_lacks(out, boot_loader_text) # test does not install a bootloader assert_lacks(out, "stopping the following units:") assert_lacks(out, "NOT restarting the following changed units:") - assert_contains(out, "reloading the following units: ${dbusService}\n") # huh + assert_lacks(out, "reloading the following units:") assert_lacks(out, "\nrestarting the following units:") assert_lacks(out, "\nstarting the following units:") assert_contains(out, "the following new units were started: test.service\n")