QA:Testcase initialization tools
From FedoraProject
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
telinitcommand:telinit 1,telinit 2,telinit 3,telinit 4,telinit 5 - Check that the
runlevelcommand 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
haltfrom a fully running system - Run the command
halt -pfrom a fully running system - Run the command
powerofffrom a fully running system - Run the command
rebootfrom a fully running system - Run the commands
shutdown,shutdown -r,shutdown -h,shutdown -H,shutdown -P,shutdownimmediately followed byshutdown -c,shutdown -k,shutdown now,shutdown +3andshutdown 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 uandtelinit Ufrom a fully running system - Try the key sequence ctrl-alt-delete from a fully running system
- Run the commands
chkconfig someservice,chkconfig someservice onandchkconfig someservice off, where 'someservice' is a traditional SysV service (present in/etc/init.d) - Run the commands
service someservice start,service someservice stopandservice 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 stopand/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
service someservice start,service someservice stopandservice someservice restart, where someservice is such a native service
Expected Results
- The
telinit 1etc commands should switch to the appropriate runlevel, or equivalent in an initialization system which does not use runlevels, to an equivalent configuration - The
runlevelcommand 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
haltshould halt but not power off the system - The command
halt -pshould halt and power off the system - The command
poweroffshould halt and power off the system - The command
rebootshould reboot the system - The command
shutdownshould power off the system a minute after it is run - The command
shutdown -rshould reboot the system a minute after it is run - The command
shutdown -hshould power off the system a minute after it is run - The command
shutdown -Hshould halt the system a minute after it is run - The command
shutdown -Pshould power off the system a minute after it is run - The command
shutdown -crun immediately after another shutdown command should cancel it - The command
shutdown -kshould notify all users of a pending shutdown without actually shutting down the system - The command
shutdown nowshould power off the system immediately it is run - The command
shutdown +3should 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 uandtelinit Ushould not result in errors - The key sequence ctrl-alt-delete from a fully running system should reboot the system
- The commands
chkconfig someservice && echo ON,chkconfig --list someservice,chkconfig someservice onandchkconfig someservice off, where 'someservice' is a traditional SysV service, should result in, respectively, printing 'ON' if the service is enabled in the current runlevel, 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 stopandservice someservice restartshould 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 stopand/etc/init.d/someservice restart, where someservice is a traditional SysV service, should result in the service being started, stopped and restarted