From Fedora Project Wiki

Revision as of 16:14, 7 September 2010 by Zbyszek (talk | contribs) (chkconfig someservice just returns 0 or 1, --list is needed to actually get output)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This test case checks the use of tools related to the system initialization and service management process.


How to test

  1. 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
  2. Test switching runlevels using the telinit command: telinit 1, telinit 2, telinit 3, telinit 4, telinit 5
  3. 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)
  4. Run the command halt from a fully running system
  5. Run the command halt -p from a fully running system
  6. Run the command poweroff from a fully running system
  7. Run the command reboot from a fully running system
  8. Run the commands shutdown, shutdown -r, shutdown -h, shutdown -H, shutdown -P, shutdown immediately followed by shutdown -c, shutdown -k, shutdown now, shutdown +3 and shutdown 13:00 - substitute some time in the near future for 13:00 in the final command - from a fully running system
  9. Run the commands telinit q, telinit Q, telinit u and telinit U from a fully running system
  10. Try the key sequence ctrl-alt-delete from a fully running system
  11. Run the commands chkconfig someservice, chkconfig someservice on and chkconfig someservice off, where 'someservice' is a traditional SysV service (present in /etc/init.d)
  12. Run the commands service someservice start, service someservice stop and service someservice restart, where someservice is a traditional SysV service (present in /etc/init.d)
  13. 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)
  14. 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

Expected Results

  1. 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
  2. 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
  3. The command halt should halt but not power off the system
  4. The command halt -p should halt and power off the system
  5. The command poweroff should halt and power off the system
  6. The command reboot should reboot the system
  7. The command shutdown should power off the system a minute after it is run
  8. The command shutdown -r should reboot the system a minute after it is run
  9. The command shutdown -h should power off the system a minute after it is run
  10. The command shutdown -H should halt the system a minute after it is run
  11. The command shutdown -P should power off the system a minute after it is run
  12. The command shutdown -c run immediately after another shutdown command should cancel it
  13. The command shutdown -k should notify all users of a pending shutdown without actually shutting down the system
  14. The command shutdown now should power off the system immediately it is run
  15. The command shutdown +3 should power off the system three minutes after it is run
  16. The command shutdown 13:00 (or any other specified time) should power off the system at the specified time
  17. The commands telinit q, telinit Q, telinit u and telinit U should not result in errors
  18. The key sequence ctrl-alt-delete from a fully running system should reboot the system
  19. The commands chkconfig someservice && echo ON, chkconfig --list someservice, chkconfig someservice on and chkconfig 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
  20. 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
  21. 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