From Fedora Project Wiki

(note that service other than sshd can be tested if desired)
(chrony-wait.service must be disabled otherwise chronyd.service is started by this. Enable chrony again if it was before the test.)
 
(3 intermediate revisions by 3 users not shown)
Line 6: Line 6:
# Perform an installation of the Fedora release you wish to test, making as few choices as possible and making the most obvious and simple choices where choice is required
# Perform an installation of the Fedora release you wish to test, making as few choices as possible and making the most obvious and simple choices where choice is required
|actions=
|actions=
{{admon/note|Service used for testing|You may use another service for testing if necessary (for instance, testing Fedora Cloud images remotely, where disabling sshd would prevent you accessing the system). Ensure it is a service which works reliably - this is a test of the service management mechanism, not of the particular service.}}
{{admon/note|Service used for testing|You may use another service for testing if necessary. Ensure it is a service which works reliably - this is a test of the service management mechanism, not of the particular service.}}
# Log in to the installed system
# Log in to the installed system
# In a console, run the following commands:
# In a console, run the following commands:
#: {{command|su -c 'systemctl stop sshd.service'}}
#: {{command|sudo systemctl stop chronyd.service}}
#: {{command|su -c 'systemctl disable sshd.service'}}
#: {{command|sudo systemctl disable chronyd.service}}
#: {{command|sudo systemctl disable chrony-wait.service}}
# Now reboot. Log in again, and run the following commands:
# Now reboot. Log in again, and run the following commands:
#: {{command|su -c 'systemctl status sshd.service'}}
#: {{command|sudo systemctl status chronyd.service}}
#: {{command|ps aux <nowiki>|</nowiki> grep sshd}}
#: {{command|ps aux <nowiki>|</nowiki> grep chronyd}}
#: {{command|su -c 'systemctl start sshd.service'}}
#: {{command|sudo systemctl start chronyd.service}}
#: {{command|su -c 'systemctl status sshd.service'}}
#: {{command|sudo systemctl status chronyd.service}}
#: {{command|ps aux <nowiki>|</nowiki> grep sshd}}
#: {{command|ps aux <nowiki>|</nowiki> grep chronyd}}
#: {{command|su -c 'systemctl stop sshd.service'}}
#: {{command|sudo systemctl stop chronyd.service}}
#: {{command|su -c 'systemctl status sshd.service'}}
#: {{command|sudo systemctl status chronyd.service}}
#: {{command|ps aux <nowiki>|</nowiki> grep sshd}}
#: {{command|ps aux <nowiki>|</nowiki> grep chronyd}}
#: {{command|su -c 'systemctl enable sshd.service'}}
#: {{command|sudo systemctl enable chronyd.service}}
# Now reboot. Log in again, and run the following commands:
# Now reboot. Log in again, and run the following commands:
#: {{command|su -c 'systemctl status sshd.service'}}
#: {{command|sudo systemctl status chronyd.service}}
#: {{command|ps aux <nowiki>|</nowiki> grep sshd}}
#: {{command|ps aux <nowiki>|</nowiki> grep chronyd}}
#: {{command|su -c 'systemctl disable sshd.service'}}
#: {{command|sudo systemctl disable chronyd.service}}
# Now reboot. Log in again, and run the following commands:
# Now reboot. Log in again, and run the following commands:
#: {{command|su -c 'systemctl status sshd.service'}}
#: {{command|sudo systemctl status chronyd.service}}
#: {{command|ps aux <nowiki>|</nowiki> grep sshd}}
#: {{command|ps aux <nowiki>|</nowiki> grep chronyd}}
# If chrony was enabled before starting the test, then enable and start it again.
#: {{command|sudo systemctl start chrony-wait.service}}
#: {{command|sudo systemctl enable chronyd.service}}
#: {{command|sudo systemctl start chronyd.service}}
|results=
|results=
# Each time they appear, the commands {{command|su -c 'systemctl status sshd.service'}} and {{command|ps aux <nowiki>|</nowiki> grep sshd}} check whether the service is running. The expected results, in order, are:
# Each time they appear, the commands {{command|sudo systemctl status chronyd.service}} and {{command|ps aux <nowiki>|</nowiki> grep chronyd}} check whether the service is running. The expected results, in order, are:
#: Disabled and inactive (not running)
#: Disabled and inactive (not running)
#: Disabled but active (running)
#: Disabled but active (running)

Latest revision as of 14:55, 9 May 2021

Note.png
Associated release criterion
This test case is associated with the Basic_Release_Criteria#system-service-manipulation release criterion. If you are doing release validation testing, a failure of this test case may be a breach of that release criterion. If so, please file a bug and nominate it as blocking the appropriate milestone, using the blocker bug nomination page.


Description

This test case tests whether starting, stopping, enabling and disabling system services works as expected.

Setup

  1. Perform an installation of the Fedora release you wish to test, making as few choices as possible and making the most obvious and simple choices where choice is required

How to test

Note.png
Service used for testing
You may use another service for testing if necessary. Ensure it is a service which works reliably - this is a test of the service management mechanism, not of the particular service.
  1. Log in to the installed system
  2. In a console, run the following commands:
    sudo systemctl stop chronyd.service
    sudo systemctl disable chronyd.service
    sudo systemctl disable chrony-wait.service
  3. Now reboot. Log in again, and run the following commands:
    sudo systemctl status chronyd.service
    ps aux | grep chronyd
    sudo systemctl start chronyd.service
    sudo systemctl status chronyd.service
    ps aux | grep chronyd
    sudo systemctl stop chronyd.service
    sudo systemctl status chronyd.service
    ps aux | grep chronyd
    sudo systemctl enable chronyd.service
  4. Now reboot. Log in again, and run the following commands:
    sudo systemctl status chronyd.service
    ps aux | grep chronyd
    sudo systemctl disable chronyd.service
  5. Now reboot. Log in again, and run the following commands:
    sudo systemctl status chronyd.service
    ps aux | grep chronyd
  6. If chrony was enabled before starting the test, then enable and start it again.
    sudo systemctl start chrony-wait.service
    sudo systemctl enable chronyd.service
    sudo systemctl start chronyd.service

Expected Results

  1. Each time they appear, the commands sudo systemctl status chronyd.service and ps aux | grep chronyd check whether the service is running. The expected results, in order, are:
    Disabled and inactive (not running)
    Disabled but active (running)
    Disabled and inactive (not running)
    Enabled and active (running)
    Disabled and inactive (not running)