Bug 591451 - upstream test suite for libsemanage fails
upstream test suite for libsemanage fails
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libsemanage (Show other bugs)
6.0
All Linux
low Severity low
: rc
: ---
Assigned To: Petr Lautrbach
Milos Malik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-12 05:47 EDT by Milos Malik
Modified: 2015-07-22 03:33 EDT (History)
3 users (show)

See Also:
Fixed In Version: libsemanage-2.0.43-5.1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-22 03:33:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milos Malik 2010-05-12 05:47:41 EDT
Description of problem:
Maybe the test suite is broken or libsemanage contains an error.

Version-Release number of selected component (if applicable):
checkpolicy-2.0.19-3.1.el6.i686
libselinux-2.0.90-3.el6.i686
libselinux-devel-2.0.90-3.el6.i686
libselinux-python-2.0.90-3.el6.i686
libselinux-utils-2.0.90-3.el6.i686
libsemanage-2.0.43-4.el6.i686
libsemanage-devel-2.0.43-4.el6.i686
libsemanage-python-2.0.43-4.el6.i686
libsepol-2.0.41-3.el6.i686
libsepol-devel-2.0.41-3.el6.i686
libsepol-static-2.0.41-3.el6.i686
selinux-policy-3.7.19-15.el6.noarch
selinux-policy-doc-3.7.19-15.el6.noarch
selinux-policy-minimum-3.7.19-15.el6.noarch
selinux-policy-mls-3.7.19-15.el6.noarch
selinux-policy-targeted-3.7.19-15.el6.noarch

How reproducible:
always

Steps to Reproduce:
# make >& /dev/null
# make test
make[1]: Entering directory `/root/rpmbuild/BUILD/libsemanage/tests'
./libsemanage-tests


     CUnit - A Unit testing framework for C - Version 2.1-0
     http://cunit.sourceforge.net/


Suite: semanage_store
  Test: semanage_store_access_check ... FAILED
    1. test_semanage_store.c:167  - err == -1
    2. test_semanage_store.c:178  - err == SEMANAGE_CAN_READ
    3. test_semanage_store.c:200  - err == 0
    4. test_semanage_store.c:211  - err == 0
    5. test_semanage_store.c:226  - err == -1
    6. test_semanage_store.c:237  - err == 0
    7. test_semanage_store.c:244  - err == SEMANAGE_CAN_READ
  Test: semanage_get_lock ... passed
  Test: semanage_nc_sort ... passedtest_semanage_findval: : Invalid argument
libsemanage-tests: TestRun.c:132: CU_assertImplementation: Assertion `((void *)0) != f_pCurTest' failed.
make[1]: *** [test] Aborted
make[1]: Leaving directory `/root/rpmbuild/BUILD/libsemanage/tests'

  
Actual results:
upstream test suite fails

Expected results:
upstream test suite passes
Comment 1 RHEL Product and Program Management 2010-05-12 06:39:54 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 4 RHEL Product and Program Management 2011-01-07 11:06:07 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.
Comment 6 Miroslav Grepl 2012-11-15 16:31:51 EST
*** Bug 868211 has been marked as a duplicate of this bug. ***
Comment 7 RHEL Product and Program Management 2012-12-14 02:20:02 EST
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 8 RHEL Product and Program Management 2013-10-13 21:20:40 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 9 Petr Lautrbach 2015-02-26 10:39:01 EST
There missing declaration for one symbol:

$ make DEBUG=1
..
direct_api.c: In function ‘semanage_direct_list’:
direct_api.c:1483: error: implicit declaration of function ‘semanage_module_enabled’


It's fixed in [1] which fixes also the other bug #872700

[1] https://github.com/fedora-selinux/selinux/commit/c1323f22c7ad93b975eb8b6a251b893bc88f240f
Comment 12 Petr Lautrbach 2015-03-13 12:34:41 EDT
The testsuite needs to be fixed to use char fname[] = "..."; instead of char fname[] = { ... };

I'll provide a patch and a respin.
Comment 13 Petr Lautrbach 2015-03-16 17:17:18 EDT
Note: the teststuite is not suitable to be run with root privileges:

$ head libsemanage-2.0.43.git/tests/README
Notes on tests
============================
The semanage_access_check test in the semanage_store suite simulates a
read-only filesystem by using DAC permissions. Consequently, these tests
will fail if run as root, as root can override DAC permissions.
Comment 17 errata-xmlrpc 2015-07-22 03:33:19 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1403.html

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