initd ASSERTs
"Wichmann, Mats D" <[email protected]>
| Newsgroups | gmane.linux.lsb.test-suite |
|---|---|
| Message-ID | <A06801158AE07847B27A52C1A074BC1D080F67E6@fmsmsx404.amr.corp.intel.com> |
I've done a review of the assertions, and have proposed cleanup. Most of this is editorial - spelling, consistently use "activate" instead of "install" for the action taken, make sure the correct return codes are described, etc. I'm attaching (inline) the diff - I hope that's reviewable as is, if not I'll try some other method. I apolologise, it's not terribly readable as a diff since there's a change to almost every line. There's another round of changes following behind this if these editorial changes are acceptable. -- mats --- ASSERTs 2005-06-21 06:21:22.000000000 -0600 +++ nASSERTs 2005-06-21 06:47:15.000000000 -0600 @@ -2,95 +2,95 @@ V1.1 ->># This test case assume a SYSV init inmplemenation ->># There will be two init scripts. Each should be installed as ->># start scripts in 2,3,4,5 and stop scripts in 0,1,6. ->># Since there is an assumption that this is being executed on a ->># a SYSV init system, then init scripts should exist in /etc/init.d ->># and we will provide an environment path for the parent directoy of rc0.d ->># through rc6.d +>># There will be two test init scripts. Each should be started +>># in LSB run levels 2,3,4,5 and stopped in run levels 0,1,6 as +>># defined in 20.5 Run Levels. Per 20.4, Installation and Removal +>># of Init Scripts, the init scripts should exist in /etc/init.d +>># prior to calling install_initd or remove_init. +>># +>># This test case assumes a SYSV init implementation, so we check +>># the target directories rcN.d where N is the runlevel. We will +>># provide a path to the parent directory of rc0.d through rc6.d >># >># There will be 5 tests cases as follows, with the following attributes: >># initA will have no dependencies. ->># initB will depend on initA +>># initB will depend on the boot facility provided by initA >>ASSERTION Good 20.3-1 ->> install_init will install an init script +>> install_initd shall activate an init script. >> Conforming applications may install one or more init scripts. These init >> scripts must be activated by invoking the install_initd command. ->> Defaiut-Stop and Default-Start define which run levels should by default ->> run the init script with a start (stop) argument to start (stop) the ->> services controlled by the init script +>> Comment block keywords Default-Stop and Default-Start define which run +>> levels should by default run the init script with a start (stop) argument +>> to start (stop) the services controlled by the init script >>STRATEGY ->> The system will be verified clean, the install script initB will be copied +>> The system will be verified clean, the init script initB will be copied >> from the scripts directory to /etc/init.d and then install_initd will be ->> invoked. The appropriate rcn.d directorys will be examined to ensure +>> invoked. The appropriate rcN.d directories will be examined to ensure >> placement of the start and stop scripts. >>ASSERTION Good 20.3-2 ->> install_init will install an init script that depends on another script ->> already being installed. +>> install_initd shall activate an init-script that depends on a boot +>> facility which is available. +>> install_initd shall succeed if the init script has been successfully +>> activated or if the init script was already activated. >> The init-script system should insure init scripts which provide the >> Required-Start facilities are started before starting this script. >>STRATEGY >> The system will be verified clean, the install scripts initA and initB ->> will be copied ->> from the scripts directory to /etc/init.d and then install_initd will be ->> invoked first for initB and then for initA. The approporiate rcn.d ->> directories will be examined to ensure placement of the start and stop ->> scripts. +>> will be copiedfrom the scripts directory to /etc/init.d and then +>> install_initd will be invoked first for initB and then for initA. +>> The approporiate rcN.d directories will be examined to ensure placement +>> of the start and stop scripts. >>ASSERTION BAD 20.3-3 ->> install_init will not install an init script if the scripts depends on ->> another scripts which is not installed. +>> install_initd shall not activate an init-script and fail with an exit +>> status of one if the script depends on a boot facility which is not +>> available. >> The init-script system should insure init scripts which provide the >> Required-Start facilities are started before starting this script. >>STRATEGY >> The system will be verified clean, the install script initA will be copied >> from the scripts directory to /etc/init.d and then install_initd will be ->> invoked. The appropriate rcn.d directorys will be examined to ensure +>> invoked. The appropriate rcN.d directories will be examined to ensure >> placement of the start and stop scripts. In this case, there should be >> no start and stop scripts for initA and the return value should be 1. >>ASSERTION Good 20.4-4 ->> remove_init will un-install a script ->> The remove_initd program shall return an exit status of zero if the init ->> script has been successfully deactivated or if the init script is not ->> activated. +>> remove_initd shall deactivate an init-script. +>> remove_initd shall succeed if the init script has been successfully +>> deactivated or if the init script was already activated. >>STRATEGY >> The system will be verified clean, the install script initB will be copied >> from the scripts directory to /etc/init.d and then install_initd will be ->> invoked. The appropriate rcn.d directorys will be examined to ensure ->> placement of the start and stop scripts. the remove_init will be invoked ->> to un-install the script. The relevent directories shall be examined to ->> ensure no start and stop scripts exist in the rcn.d directories. +>> invoked. The appropriate rcN.d directories will be examined to ensure +>> placement of the start and stop scripts. remove_initd will be invoked +>> to deactivate the script. The relevant directories shall be examined to +>> ensure no start and stop scripts exist in the rcN.d directories. >>ASSERTION Bad 20.4-5 ->> install_init will not un-install an init script if there is a different ->> package depending in this script. +>> remove_initd shall not deactivate an init script and fail with an exit +>> status of one if there is a remaining dependency on the boot facility +>> provided by the script. >>STRATEGY >> The system will be verified clean, the install scripts initA and initB will ->> be copied ->> from the scripts directory to /etc/init.d and then install_initd will be ->> invoked for first initB and then init!. The appropriate rcn.d directorys ->> will be examined to ensure ->> placement of the start and stop scripts. remove_initd will then be invoked ->> to attempt to un-install initB. This should fail, return 0. All start ->> and stop scripts should remain unchanged. - - +>> be copied from the scripts directory to /etc/init.d and then install_initd +>> will be invoked for first initB and then initA. The appropriate rcN.d +>> directories will be examined to ensure placement of the start and stop +>> scripts. remove_initd will then be invoked to attempt to un-install initB. +>> This should fail with an exit status of one. All start and stop scripts +>> should remain unchanged. >>ASSERTION Good 20.8-1 >> Each conforming init script shall execute the commands in the file -/lib/lsb/init-functions in the current environment (see shell special built-in -command dot) +>> /lib/lsb/init-functions in the current environment (see shell special +>> built-in command dot) >>STRATEGY >> This test will verify the existence of /lib/lsb/init-functions. -