From 90bb205387b4fbe83a5fedd385394f0af785628e Mon Sep 17 00:00:00 2001 From: Michael Franzl Date: Mon, 1 Jul 2024 07:49:26 +0200 Subject: [PATCH] Add regression test for libvirt NSS modules This is a regression test for the implementation in 412543ddd83f4ee235ee32772afc19483aaf83ab which was fixed in #322022. --- nixos/tests/libvirtd.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/tests/libvirtd.nix b/nixos/tests/libvirtd.nix index df80dcc21a2e..27ffaac3e62d 100644 --- a/nixos/tests/libvirtd.nix +++ b/nixos/tests/libvirtd.nix @@ -20,6 +20,11 @@ import ./make-test-python.nix ({ pkgs, ... }: { networking.hostId = "deadbeef"; # needed for zfs security.polkit.enable = true; environment.systemPackages = with pkgs; [ virt-manager ]; + + # This adds `resolve` to the `hosts` line of /etc/nsswitch.conf; NSS modules placed after it + # will not be consulted. Therefore this tests that the libvirtd NSS modules will be + # be placed early enough for name resolution to work. + services.resolved.enable = true; }; };