Bug 1416818 - make check fails (also could you please add %check section to spec?)
Summary: make check fails (also could you please add %check section to spec?)
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libsecret
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: David King
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-26 14:35 UTC by Matěj Cepl
Modified: 2019-09-23 18:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-23 18:31:05 UTC
Target Upstream Version:


Attachments (Terms of Use)
log of the make check (3.05 KB, text/plain)
2017-01-26 14:35 UTC, Matěj Cepl
no flags Details
Fedora patch to enable make check (4.58 KB, patch)
2017-01-26 22:59 UTC, David King
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 777826 0 Normal RESOLVED Custom Vala compile rules do not pass -fPIC in CFLAGS 2021-01-07 13:34:29 UTC

Description Matěj Cepl 2017-01-26 14:35:13 UTC
Created attachment 1244789 [details]
log of the make check

Description of problem:
See the attached effort to run make check in the build tree where I just run rhpkg local on rhel-7.4 branch.

Version-Release number of selected component (if applicable):
libsecret-0.18.2-2.el7

How reproducible:
100%

Steps to Reproduce:
1.checkout rhel-7.4 branch of the RHEL repository
2.rhpkg local
3.cd libsecret-* ; make check

Actual results:
the build of the testing binaries fails

Expected results:
the tests should run

Additional info:
Also, would you consider a possibility to add %check section to the SPEC file of libsecret?

Comment 1 David King 2017-01-26 22:59:00 UTC
Created attachment 1244877 [details]
Fedora patch to enable make check

The PIC failure is because the custom Vala build rules do not pass through the -fPIC argument from CFLAGS. Fixing that involves adding "-X -fPIC" to VALA_TESTS_FLAGS (in libsecret/Makefile.am). Once that is done, you realise that the test suite relies on various Python modules that are not checked in configure (at least dbus-python and gi, in other words pygobject). Once those are installed, you then find that the test suite relies on a running D-Bus session bus, which is neither set up nor verified by the test rules. Then, some tests use Python 2 and some use Python 3, meaning that both versions of pygobject are required. Additionally, gjs is required for the JavaScript tests. Finally, a further patch from upstream git is required to fix a missing define when building a Vala test, as the define is again not passed through to the compiler invoked by valac.

I can only guess that the test suite is not meant to be run by people who are not libsecret developers.

Enabling the test suite does not block the rebase of libsecret to a newer version, as it is a feature request and not a regression between the current version and the rebase. I would happily close this as UPSTREAM, given that the test suite in the released version is broken (the Vala test alone causes a test to fail). However, I have a locally-modified .spec with a couple of patches that allows the tests to pass, so I will look at writing the relevant configure checks and filing an upstream bug. And then fixing the Fedora package. And finally fixing the RHEL package.

Comment 2 Matěj Cepl 2017-03-08 13:55:52 UTC
Thank you very much for the work you put into this.

(In reply to David King from comment #1)
> The PIC failure is because the custom Vala build rules do not pass through
> the -fPIC argument from CFLAGS. Fixing that involves adding "-X -fPIC" to
> VALA_TESTS_FLAGS (in libsecret/Makefile.am). Once that is done, you realise
> that the test suite relies on various Python modules that are not checked in
> configure (at least dbus-python and gi, in other words pygobject). Once
> those are installed, you then find that the test suite relies on a running
> D-Bus session bus, which is neither set up nor verified by the test rules.
> Then, some tests use Python 2 and some use Python 3, meaning that both
> versions of pygobject are required. Additionally, gjs is required for the
> JavaScript tests. Finally, a further patch from upstream git is required to
> fix a missing define when building a Vala test, as the define is again not
> passed through to the compiler invoked by valac.

None of these seems like completely stop-the-press problem. We probably would need an option to switch of Python3-requiring tests, but I don’t see it as a problem to run tests inside of gnome-session and have additional requirements.

> I can only guess that the test suite is not meant to be run by people who
> are not libsecret developers.

That is obvious, but could it be modified so that it could be run with
developers held QA hands from a distance?

> Enabling the test suite does not block the rebase of libsecret to a newer
> version, as it is a feature request and not a regression between the current
> version and the rebase.

Certainly. Thank you again.


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