Bug 474223

Summary: chkconfig fails LSB init.d tests
Product: [Fedora] Fedora Reporter: Stew Benedict <stewb>
Component: chkconfigAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: herrold, notting, rh-bugzilla, rvokal
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-09 20:04:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
re-enable initd tests 3,5, apply from /opt/lsb/test/core none

Description Stew Benedict 2008-12-02 21:03:38 UTC
Description of problem:
LSB, since 3.2, has a series of tests that check the functionality of the install_initd, remove_initd scripts. Systems based on Red Hat's chkconfig typically fail 2 of these tests, where a strict dependency on another service is involved.

Version-Release number of selected component (if applicable):
chkconfig-1.3.38-1

How reproducible:
100%

Steps to Reproduce:
1. install/run lsb-test-core: http://ftp.linuxfoundation.org/pub/lsb/repositories/yum/lsb-4.0/repo-ia32/lsb-test-core-3.97.0-1.i486.rpm
2. 
3.
  
Actual results:
/tset/initd/misc/install/general-tc 3 FAIL
/tset/initd/misc/install/general-tc 5 FAIL

Expected results:
All tests should pass

Additional info:
Some patches/mods were applied to chkconfig around 2005, when I did some work on this for Mandriva and sent it upstream. For a while Mandriva passed these tests, but they have since backed off some of the changes. A patch against 1.3.20 I used for LSB's SI build can be found here:

http://bzr.linux-foundation.org/lsb/devel/si?cmd=content;rev=stewb%40linux-foundation.org-20080428123712-jel9rr75eut4om30;pathrevid=pqm%40linux-foundation.org-20080620112025-scvq05mfzg74weym;path=build/patches/chkconfig-1.3.20-lsb-si.patch

Bug at the LSB end (with more journal detail):

http://bugs.linuxbase.org/show_bug.cgi?id=2443

Spec reference:
http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html

Comment 1 Bill Nottingham 2008-12-04 19:51:19 UTC
Fixed in 1.3.39-1. You can follow the commits at http://git.fedorahosted.org/git/?p=chkconfig.git ; some of the code may be cleaned up later.

This is enabled *only* if it's called as install_initd/remove_initd; it's really bad behavior to do this in the general case.

Comment 2 Stew Benedict 2008-12-11 16:55:52 UTC
Grabbed a git snapshot of 1.3.40 and built it to test on F10/x86_64, now test 3,4 fail:

/tset/initd/misc/install/general-tc 3 FAIL
/tset/initd/misc/install/general-tc 4 FAIL

ref:
http://git.fedorahosted.org/git/?p=chkconfig.git;a=snapshot;h=74ab891968c5ba0e5d43ab16c5edba578c425f62;sf=tgz

Comment 3 Bill Nottingham 2009-03-06 06:46:27 UTC
Current git (as of 4ed064e287e2dd04290c7cc503b38e2f43693118) should solve both failures.

FYI - test #2 in the test suite is not really correct - an implementation could do all dependency resolution at runtime and ignore lexical sorting entirely. (Of course, I'm not sure there are any implementations that actually *do* this.)

Comment 4 Stew Benedict 2009-03-09 13:29:15 UTC
I'm still seeing issues using http://git.fedorahosted.org/git/?p=chkconfig.git;a=snapshot;h=bdef046f4feb0340e15bd02fbe45d7d1e3050405;sf=tgz

Built chkconfig on F10, x86_64 and ran just the init.d tests (I'll attach a patch to re-enable tests 3,5, which we've disabled due to this issue):

/tset/initd/misc/install/general-tc 2 FAIL
/tset/initd/misc/install/general-tc 5 FAIL

[root@fc10-64 test_sets]# /sbin/chkconfig --version
chkconfig version 1.3.42
[root@fc10-64 test_sets]# cat /etc/redhat-release 
Fedora release 10 (Cambridge)
[root@fc10-64 test_sets]# pwd
/opt/lsb/test/core/tet/test_sets
[root@fc10-64 test_sets]# cat scen.exec
all
        "total tests in LSBinitd 15"
        /tset/initd/misc/utils/utils-tc
        /tset/initd/misc/init-functions/init-functions-tc
        /tset/initd/misc/install/general-tc

Comment 5 Stew Benedict 2009-03-09 13:30:57 UTC
Created attachment 334515 [details]
re-enable initd tests 3,5, apply from /opt/lsb/test/core

Comment 6 Bill Nottingham 2009-03-09 20:04:46 UTC
Fixed. All the tests (run individually, setting up the test suite was too painful) pass for me.

http://git.fedorahosted.org/git/?p=chkconfig.git;a=commitdiff;h=fa16d756ce801b2dfbff25972f43989398ad5317

Comment 7 Stew Benedict 2009-03-10 18:04:25 UTC
Thanks, current git build also passed here.

Comment 8 Bill Nottingham 2010-03-16 19:39:11 UTC
*** Bug 522053 has been marked as a duplicate of this bug. ***