RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 591451 - upstream test suite for libsemanage fails
Summary: upstream test suite for libsemanage fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libsemanage
Version: 6.0
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Petr Lautrbach
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-12 09:47 UTC by Milos Malik
Modified: 2015-07-22 07:33 UTC (History)
3 users (show)

Fixed In Version: libsemanage-2.0.43-5.1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-22 07:33:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1403 0 normal SHIPPED_LIVE libsemanage bug fix update 2015-07-20 18:07:13 UTC

Description Milos Malik 2010-05-12 09:47:41 UTC
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 Program Management 2010-05-12 10:39:54 UTC
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 Program Management 2011-01-07 16:06:07 UTC
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 21:31:51 UTC
*** Bug 868211 has been marked as a duplicate of this bug. ***

Comment 7 RHEL Program Management 2012-12-14 07:20:02 UTC
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 Program Management 2013-10-14 01:20:40 UTC
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 15:39:01 UTC
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 16:34:41 UTC
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 21:17:18 UTC
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 07:33:19 UTC
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.