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

  1. Install the chrony package: sudo dnf install chrony.
  2. Make sure your system is connected to the internet.

How to test

  1. Start the chronyd service: sudo systemctl start chronyd.
  2. Check the status of the service to ensure it's running: sudo systemctl status chronyd.
  3. Use chronyc to see tracking statistics: chronyc tracking.
  4. Use chronyc to see information about peers: chronyc sources.

Expected Results

  1. The chronyd service starts without any errors.
  2. The service status indicates that chronyd is active and running.
  3. The chronyc tracking command should provide valid statistics and show the system's synchronization status.
  4. The chronyc sources command should list NTP servers (by default from the system's pool) with their current state.

Optional

For advanced testing:

  1. Introduce an artificial clock skew and observe chrony correcting it.
  2. Temporarily block NTP traffic (using iptables or other means) and check how chronyd responds.
  3. Customize the chrony configuration (e.g., use different NTP servers) and validate the behavior.
  4. Test chrony's behavior after system reboots or when transitioning between different network environments.