chrony: add nixos test for ptp_kvm

This commit is contained in:
Gregor Kleen 2023-01-15 14:06:58 +01:00 committed by Austin Seipp
parent 48ecda0962
commit b355be2d91
2 changed files with 25 additions and 0 deletions

View file

@ -126,6 +126,7 @@ in {
cfssl = handleTestOn ["aarch64-linux" "x86_64-linux"] ./cfssl.nix {};
charliecloud = handleTest ./charliecloud.nix {};
chromium = (handleTestOn ["aarch64-linux" "x86_64-linux"] ./chromium.nix {}).stable or {};
chrony-ptp = handleTestOn ["aarch64-linux" "x86_64-linux"] ./chrony-ptp.nix {};
cinnamon = handleTest ./cinnamon.nix {};
cjdns = handleTest ./cjdns.nix {};
clickhouse = handleTest ./clickhouse.nix {};

View file

@ -0,0 +1,24 @@
import ./make-test-python.nix ({ lib, ... }:
{
name = "chrony-ptp";
nodes = {
qemuGuest = { lib, ... }: {
boot.kernelModules = [ "ptp_kvm" ];
services.chrony = {
enable = true;
extraConfig = ''
refclock PHC /dev/ptp_kvm poll 2 dpoll -2 offset 0 stratum 3
'';
};
};
};
testScript = ''
start_all()
qemuGuest.wait_for_unit('multi-user.target')
qemuGuest.succeed('systemctl is-active chronyd.service')
'';
})