chrony: add nixos test for ptp_kvm
This commit is contained in:
parent
48ecda0962
commit
b355be2d91
2 changed files with 25 additions and 0 deletions
|
@ -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 {};
|
||||
|
|
24
nixos/tests/chrony-ptp.nix
Normal file
24
nixos/tests/chrony-ptp.nix
Normal 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')
|
||||
'';
|
||||
})
|
Loading…
Reference in a new issue