From Fedora Project Wiki
(Added crond as cloud example) |
Coremodule (talk | contribs) (changed default service shown from sshd to chronyd) |
||
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 | {{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 | #: {{command|su -c 'systemctl stop chronyd.service'}} | ||
#: {{command|su -c 'systemctl disable | #: {{command|su -c '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 | #: {{command|su -c 'systemctl status chronyd.service'}} | ||
#: {{command|ps aux <nowiki>|</nowiki> grep | #: {{command|ps aux <nowiki>|</nowiki> grep chronyd}} | ||
#: {{command|su -c 'systemctl start | #: {{command|su -c 'systemctl start chronyd.service'}} | ||
#: {{command|su -c 'systemctl status | #: {{command|su -c 'systemctl status chronyd.service'}} | ||
#: {{command|ps aux <nowiki>|</nowiki> grep | #: {{command|ps aux <nowiki>|</nowiki> grep chronyd}} | ||
#: {{command|su -c 'systemctl stop | #: {{command|su -c 'systemctl stop chronyd.service'}} | ||
#: {{command|su -c 'systemctl status | #: {{command|su -c 'systemctl status chronyd.service'}} | ||
#: {{command|ps aux <nowiki>|</nowiki> grep | #: {{command|ps aux <nowiki>|</nowiki> grep chronyd}} | ||
#: {{command|su -c 'systemctl enable | #: {{command|su -c '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 | #: {{command|su -c 'systemctl status chronyd.service'}} | ||
#: {{command|ps aux <nowiki>|</nowiki> grep | #: {{command|ps aux <nowiki>|</nowiki> grep chronyd}} | ||
#: {{command|su -c 'systemctl disable | #: {{command|su -c '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 | #: {{command|su -c 'systemctl status chronyd.service'}} | ||
#: {{command|ps aux <nowiki>|</nowiki> grep | #: {{command|ps aux <nowiki>|</nowiki> grep chronyd}} | ||
|results= | |results= | ||
# Each time they appear, the commands {{command|su -c 'systemctl status | # Each time they appear, the commands {{command|su -c '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) |
Revision as of 03:02, 12 May 2020
Description
This test case tests whether starting, stopping, enabling and disabling system services works as expected.
Setup
- 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
- Log in to the installed system
- In a console, run the following commands:
su -c 'systemctl stop chronyd.service'
su -c 'systemctl disable chronyd.service'
- Now reboot. Log in again, and run the following commands:
su -c 'systemctl status chronyd.service'
ps aux | grep chronyd
su -c 'systemctl start chronyd.service'
su -c 'systemctl status chronyd.service'
ps aux | grep chronyd
su -c 'systemctl stop chronyd.service'
su -c 'systemctl status chronyd.service'
ps aux | grep chronyd
su -c 'systemctl enable chronyd.service'
- Now reboot. Log in again, and run the following commands:
su -c 'systemctl status chronyd.service'
ps aux | grep chronyd
su -c 'systemctl disable chronyd.service'
- Now reboot. Log in again, and run the following commands:
su -c 'systemctl status chronyd.service'
ps aux | grep chronyd
Expected Results
- Each time they appear, the commands
su -c 'systemctl status chronyd.service'
andps 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)