Bug 523385 - initscript collected problems LSB-compilant tuned service
Summary: initscript collected problems LSB-compilant tuned service
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tuned
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: InitScriptsProject
TreeView+ depends on / blocked
 
Reported: 2009-09-15 09:52 UTC by Jan Ščotka
Modified: 2010-02-04 10:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-25 10:50:40 UTC


Attachments (Terms of Use)

Description Jan Ščotka 2009-09-15 09:52:54 UTC
There are some problems with LSB-compilants of initscript against
https://fedoraproject.org/wiki/Packaging/SysVInitScript definition.

service: tuned

I've created some test and there is output of run (PASS menas that it started correctly, FAIL, that there is some problem with returncode, explanaition in brackets):

:: [   LOG    ] :: >>>>>>>>> service start
:: [   PASS   ] ::  Service must start without problem
:: [   PASS   ] ::  Then Status command 
:: [   PASS   ] ::  Already started service 
:: [   PASS   ] ::  Again status command 
:: [   LOG    ] :: >>>>>>>>> service restart
:: [   PASS   ] ::  Restarting of service
:: [   PASS   ] ::  Status command 
:: [   LOG    ] :: >>>>>>>>> service stop
:: [   PASS   ] ::  Stopping service 
:: [   PASS   ] ::  Status of stopped service 
:: [   PASS   ] ::  Stopping service again 
:: [   PASS   ] ::  Status of stopped service 
:: [   LOG    ] :: >>>>>>>>> pid file
:: [   FAIL   ] :: File /var/run/tuned.pid should exist 
:: [   PASS   ] :: Running 'echo 666666 > /var/run/tuned.pid'
:: [   PASS   ] ::  Existing pid file, but service not started 
:: [   LOG    ] :: >>>>>>>>> lock file
:: [   PASS   ] :: File /var/lock/subsys/tuned should exist
:: [   PASS   ] :: Running 'touch /var/lock/subsys/tuned'
:: [   PASS   ] ::  Existing lock file, but service not started 
:: [   LOG    ] :: >>>>>>>>> insufficient rights
:: [   PASS   ] ::  Starting service for restarting under nonpriv user 
:: [   FAIL   ] :: Insufficient rights, restarting resrvice under nonprivileged user must fail (Expected 4, got 1)
:: [   LOG    ] :: >>>>>>>>> operations
:: [   PASS   ] ::  Service have to implement start function 
:: [   PASS   ] ::  Service have to implement restart function 
:: [   PASS   ] ::  Service have to implement status function 
:: [   FAIL   ] ::  Service have to implement usage function  (Expected 0, got 2)
:: [   PASS   ] ::  Service have to implement condrestart function 
:: [   PASS   ] ::  Service have to implement try-restart function 
:: [   PASS   ] ::  Service have to implement reload function 
:: [   PASS   ] ::  Service have to implement force-reload function 
:: [   LOG    ] :: >>>>>>>>> nonexist operations
:: [   PASS   ] ::  Testing proper return code when nonexisting function
:: [   LOG    ] :: >>>>>>>>> invalid arguments
:: [   PASS   ] ::  When no arguments added to service, it must fail with proper return code 


There are some problems:
* there should be pid file (is required by LSB) and then return proper code
* when user have insufficinet rights it must return code 4
* there should be implemented function usage

Comment 1 Petr Lautrbach 2009-09-16 20:28:41 UTC
fix pushed to upstream

Comment 2 Petr Lautrbach 2009-09-21 14:34:21 UTC
fixed version pushed to rawhide  http://koji.fedoraproject.org/koji/taskinfo?taskID=1694805

all tests passed, only pid file test needs some sleep after 'service tuned start'


Note You need to log in before you can comment on or make changes to this bug.