From Fedora Project Wiki
Description
chrony is a suite of utilities for maintaining the accuracy of computer clocks. It includes chronyd, a daemon that can synchronize the system clock with NTP servers, and chronyc, a command-line client for managing chronydThis test case ensures that the chrony suite functions correctly to synchronize the system clock with NTP servers.
Setup
- Install the
package:
chronysudo dnf install chrony. - Make sure your system is connected to the internet.
How to test
- Start the
chronydservice:sudo systemctl start chronyd. - Check the status of the service to ensure it's running:
sudo systemctl status chronyd. - Use
chronycto see tracking statistics:chronyc tracking. - Use
chronycto see information about peers:chronyc sources.
Expected Results
- The
chronydservice starts without any errors. - The service status indicates that
chronydis active and running. - The
chronyc trackingcommand should provide valid statistics and show the system's synchronization status. - The
chronyc sourcescommand should list NTP servers (by default from the system's pool) with their current state.
Optional
For advanced testing:
- Introduce an artificial clock skew and observe
chronycorrecting it. - Temporarily block NTP traffic (using
iptablesor other means) and check howchronydresponds. - Customize the
chronyconfiguration (e.g., use different NTP servers) and validate the behavior. - Test
chrony's behavior after system reboots or when transitioning between different network environments.
