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 868211 - upstream test suite for libsemanage fails
Summary: upstream test suite for libsemanage fails
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libsemanage
Version: 7.0
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: 7.0
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-19 09:35 UTC by Michal Trunecka
Modified: 2015-03-16 20:58 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-16 20:58:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michal Trunecka 2012-10-19 09:35:23 UTC
Filed from caserun https://beaker.engineering.redhat.com/tasks/executed?task=/CoreOS/libsemanage/Sanity/bz576816-upstream-test-suite&job_id=318509

CUnit tests failed.

Version-Release number of selected component (if applicable):
RHEL6.4-20121015.n.1
CUnit-2.1-0.tar.gz
libsemanage-2.0.43-4.2.el6

Steps to Reproduce: 
Run CUnit tests for libsemanage
Implemented in RHTS /CoreOS/libsemanage/Sanity/bz576816-upstream-test-suite


Actual results: 
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 (core dumped)
make[1]: Leaving directory `/root/rpmbuild/BUILD/libsemanage/tests'


Expected results:
Tests pass

Comment 2 Miroslav Grepl 2012-11-15 21:31:51 UTC

*** This bug has been marked as a duplicate of bug 591451 ***

Comment 3 Milos Malik 2013-04-11 08:57:28 UTC
# rpm -qa | grep -e libselinux -e libsepol -e libsemanage -e checkpolicy | sort
checkpolicy-2.1.12-3.el7.x86_64
libselinux-2.1.13-13.el7.x86_64
libselinux-devel-2.1.13-13.el7.x86_64
libselinux-python-2.1.13-13.el7.x86_64
libselinux-ruby-2.1.13-13.el7.x86_64
libselinux-static-2.1.13-13.el7.x86_64
libselinux-utils-2.1.13-13.el7.x86_64
libsemanage-2.1.10-2.el7.x86_64
libsemanage-devel-2.1.10-2.el7.x86_64
libsemanage-python-2.1.10-2.el7.x86_64
libsemanage-static-2.1.10-2.el7.x86_64
libsepol-2.1.9-1.el7.x86_64
libsepol-devel-2.1.9-1.el7.x86_64
libsepol-static-2.1.9-1.el7.x86_64
# 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 ... passed
Suite: semanage_utilities
  Test: semanage_is_prefix ... passed
  Test: semanage_split_on_space ... passed
  Test: semanage_split ... passed
  Test: semanage_list ... passed
  Test: semanage_str_count ... passed
  Test: semanage_rtrim ... passed
  Test: semanage_findval ... passed
  Test: slurp_file_filter ... passed

--Run Summary: Type      Total     Ran  Passed  Failed
               suites        2       2     n/a       0
               tests        11      11      10       1
               asserts      80      80      73       7
make[1]: Leaving directory `/root/rpmbuild/BUILD/libsemanage/tests'
#

Comment 5 Daniel Walsh 2013-04-11 17:13:48 UTC
 libsemanage-2.1.10-3.el7 this package required a fix to rebuild the test and works on F19.  I could not build the test package on the previous build so I am not sure what test program you are running with.  We might need to rebuild it for the current code.

Comment 6 Michal Trunecka 2013-05-27 08:01:52 UTC
Still the same results with the newest versions.

# rpm -qa | grep -e libselinux -e libsepol -e libsemanage -e checkpolicy | sort
checkpolicy-2.1.12-3.el7.x86_64
libselinux-2.1.13-15.el7.x86_64
libselinux-devel-2.1.13-15.el7.x86_64
libselinux-python-2.1.13-15.el7.x86_64
libselinux-utils-2.1.13-15.el7.x86_64
libsemanage-2.1.10-4.el7.x86_64
libsemanage-devel-2.1.10-4.el7.x86_64
libsemanage-python-2.1.10-4.el7.x86_64
libsepol-2.1.9-1.el7.x86_64
libsepol-devel-2.1.9-1.el7.x86_64
libsepol-static-2.1.9-1.el7.x86_64


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 ... passed
Suite: semanage_utilities
  Test: semanage_is_prefix ... passed
  Test: semanage_split_on_space ... passed
  Test: semanage_split ... passed
  Test: semanage_list ... passed
  Test: semanage_str_count ... passed
  Test: semanage_rtrim ... passed
  Test: semanage_findval ... passed
  Test: slurp_file_filter ... passed

--Run Summary: Type      Total     Ran  Passed  Failed
               suites        2       2     n/a       0
               tests        11      11      10       1
               asserts      80      80      73       7
make[1]: Leaving directory `/root/rpmbuild/BUILD/libsemanage/tests'

Comment 11 Daniel Walsh 2014-12-16 14:05:50 UTC
While this should be fixed it does not need to be fixed in a RHEL update.

Comment 13 Petr Lautrbach 2015-03-16 20:58:41 UTC
The testsuite is not supposed to be run with root privileges:

$ head -n 5 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.


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