From Fedora Project Wiki
(create initialization (systemd) tools test case (many thanks to bill nottingham for the basis of this)) |
(fix command usage) |
||
Line 4: | Line 4: | ||
# Boot a clean installation of the Fedora release you wish to test. During testing, in all cases reboot when appropriate before performing the next test | # Boot a clean installation of the Fedora release you wish to test. During testing, in all cases reboot when appropriate before performing the next test | ||
# Test switching runlevels using the {{command|telinit}} command: {{command|telinit 1}}, {{command|telinit 2}}, {{command|telinit 3}}, {{command|telinit 4}}, {{command|telinit 5}} | # Test switching runlevels using the {{command|telinit}} command: {{command|telinit 1}}, {{command|telinit 2}}, {{command|telinit 3}}, {{command|telinit 4}}, {{command|telinit 5}} | ||
# Check that the {{ | # Check that the {{command|runlevel}} command correctly returns the current runlevel. If using an initialization system such as systemd that does not directly use the concept of runlevels, test while running in runlevel compatibility mode (for systemd, if booting to one of the special targets named after runlevels) | ||
# Run the command {{command|halt}} from a fully running system | # Run the command {{command|halt}} from a fully running system | ||
# Run the command {{command|halt -p}} from a fully running system | # Run the command {{command|halt -p}} from a fully running system | ||
Line 13: | Line 13: | ||
# Try the key sequence ctrl-alt-delete from a fully running system | # Try the key sequence ctrl-alt-delete from a fully running system | ||
# Run the commands {{command|chkconfig someservice}}, {{command|chkconfig someservice on}} and {{command|chkconfig someservice off}}, where 'someservice' is a traditional SysV service (present in {{filename|/etc/init.d}}) | # Run the commands {{command|chkconfig someservice}}, {{command|chkconfig someservice on}} and {{command|chkconfig someservice off}}, where 'someservice' is a traditional SysV service (present in {{filename|/etc/init.d}}) | ||
# Run the commands {{service someservice start}}, {{service someservice stop}} and {{service someservice restart}}, where ''someservice'' is a traditional SysV service (present in {{filename|/etc/init.d}}) | # Run the commands {{command|service someservice start}}, {{command|service someservice stop}} and {{command|service someservice restart}}, where ''someservice'' is a traditional SysV service (present in {{filename|/etc/init.d}}) | ||
# Run the commands {{/etc/init.d/someservice start}}, {{/etc/init.d/someservice stop}} and {{/etc/init.d/someservice restart}}, where ''someservice'' is a traditional SysV service (present in {{filename|/etc/init.d}}) | # Run the commands {{command|/etc/init.d/someservice start}}, {{command|/etc/init.d/someservice stop}} and {{command|/etc/init.d/someservice restart}}, where ''someservice'' is a traditional SysV service (present in {{filename|/etc/init.d}}) | ||
# If using an initialization system such as systemd which has its own native service concept which differs from SysV services, run the commands {{service someservice start}}, {{service someservice stop}} and {{service someservice restart}}, where ''someservice'' is such a native service | # If using an initialization system such as systemd which has its own native service concept which differs from SysV services, run the commands {{service someservice start}}, {{service someservice stop}} and {{service someservice restart}}, where ''someservice'' is such a native service | ||
|results= | |results= | ||
Line 36: | Line 36: | ||
# The key sequence ctrl-alt-delete from a fully running system should reboot the system | # The key sequence ctrl-alt-delete from a fully running system should reboot the system | ||
# The commands {{command|chkconfig someservice}}, {{command|chkconfig someservice on}} and {{command|chkconfig someservice off}}, where 'someservice' is a traditional SysV service, should result in, respectively, information about which runlevels the service is enabled on, enabling the service on runlevels 2, 3, 4 and 5, and disabling the service on runlevels 2, 3, 4 and 5 | # The commands {{command|chkconfig someservice}}, {{command|chkconfig someservice on}} and {{command|chkconfig someservice off}}, where 'someservice' is a traditional SysV service, should result in, respectively, information about which runlevels the service is enabled on, enabling the service on runlevels 2, 3, 4 and 5, and disabling the service on runlevels 2, 3, 4 and 5 | ||
# The commands {{service someservice start}}, {{service someservice stop}} and {{service someservice restart}} should result in, respectively, the service being started, stopped and restarted, whether it is a traditional SysV service or not | # The commands {{command|service someservice start}}, {{command|service someservice stop}} and {{command|service someservice restart}} should result in, respectively, the service being started, stopped and restarted, whether it is a traditional SysV service or not | ||
# The commands {{/etc/init.d/someservice start}}, {{/etc/init.d/someservice stop}} and {{/etc/init.d/someservice restart}}, where ''someservice'' is a traditional SysV service, should result in the service being started, stopped and restarted | # The commands {{command|/etc/init.d/someservice start}}, {{command|/etc/init.d/someservice stop}} and {{command|/etc/init.d/someservice restart}}, where ''someservice'' is a traditional SysV service, should result in the service being started, stopped and restarted | ||
}} | }} |
Revision as of 19:46, 27 August 2010
Description
This test case checks the use of tools related to the system initialization and service management process.
How to test
- Boot a clean installation of the Fedora release you wish to test. During testing, in all cases reboot when appropriate before performing the next test
- Test switching runlevels using the
telinit
command:telinit 1
,telinit 2
,telinit 3
,telinit 4
,telinit 5
- Check that the
runlevel
command correctly returns the current runlevel. If using an initialization system such as systemd that does not directly use the concept of runlevels, test while running in runlevel compatibility mode (for systemd, if booting to one of the special targets named after runlevels) - Run the command
halt
from a fully running system - Run the command
halt -p
from a fully running system - Run the command
poweroff
from a fully running system - Run the command
reboot
from a fully running system - Run the commands
shutdown
,shutdown -r
,shutdown -h
,shutdown -H
,shutdown -P
,shutdown
immediately followed byshutdown -c
,shutdown -k
,shutdown now
,shutdown +3
andshutdown 13:00
- substitute some time in the near future for 13:00 in the final command - from a fully running system - Run the commands
telinit q
,telinit Q
,telinit u
andtelinit U
from a fully running system - Try the key sequence ctrl-alt-delete from a fully running system
- Run the commands
chkconfig someservice
,chkconfig someservice on
andchkconfig someservice off
, where 'someservice' is a traditional SysV service (present in/etc/init.d
) - Run the commands
service someservice start
,service someservice stop
andservice someservice restart
, where someservice is a traditional SysV service (present in/etc/init.d
) - Run the commands
/etc/init.d/someservice start
,/etc/init.d/someservice stop
and/etc/init.d/someservice restart
, where someservice is a traditional SysV service (present in/etc/init.d
) - If using an initialization system such as systemd which has its own native service concept which differs from SysV services, run the commands Template:Service someservice start, Template:Service someservice stop and Template:Service someservice restart, where someservice is such a native service
Expected Results
- The
telinit 1
etc commands should switch to the appropriate runlevel, or equivalent in an initialization system which does not use runlevels, to an equivalent configuration - The
runlevel
command should return the current runlevel, or the appropriate runlevel if running an initialization system which does not use runlevels directly (such as systemd) in a runlevel compatibility configuration - The command
halt
should halt but not power off the system - The command
halt -p
should halt and power off the system - The command
poweroff
should halt and power off the system - The command
reboot
should reboot the system - The command
shutdown
should power off the system a minute after it is run - The command
shutdown -r
should reboot the system a minute after it is run - The command
shutdown -h
should power off the system a minute after it is run - The command
shutdown -H
should halt the system a minute after it is run - The command
shutdown -P
should power off the system a minute after it is run - The command
shutdown -c
run immediately after another shutdown command should cancel it - The command
shutdown -k
should notify all users of a pending shutdown without actually shutting down the system - The command
shutdown now
should power off the system immediately it is run - The command
shutdown +3
should power off the system three minutes after it is run - The command
shutdown 13:00
(or any other specified time) should power off the system at the specified time - The commands
telinit q
,telinit Q
,telinit u
andtelinit U
should not result in errors - The key sequence ctrl-alt-delete from a fully running system should reboot the system
- The commands
chkconfig someservice
,chkconfig someservice on
andchkconfig someservice off
, where 'someservice' is a traditional SysV service, should result in, respectively, information about which runlevels the service is enabled on, enabling the service on runlevels 2, 3, 4 and 5, and disabling the service on runlevels 2, 3, 4 and 5 - The commands
service someservice start
,service someservice stop
andservice someservice restart
should result in, respectively, the service being started, stopped and restarted, whether it is a traditional SysV service or not - The commands
/etc/init.d/someservice start
,/etc/init.d/someservice stop
and/etc/init.d/someservice restart
, where someservice is a traditional SysV service, should result in the service being started, stopped and restarted