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 955532 - dbus package doesn't run %check tests
Summary: dbus package doesn't run %check tests
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dbus
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Colin Walters
QA Contact: Desktop QE
URL:
Whiteboard:
: 877655 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-23 08:53 UTC by Matěj Cepl
Modified: 2014-06-13 11:44 UTC (History)
1 user (show)

Fixed In Version: 1:1.6.12-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:44:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
updated suggested patch (1.14 KB, patch)
2013-06-26 13:16 UTC, Matěj Cepl
no flags Details | Diff
updated suggested patch (1.75 KB, patch)
2013-06-26 16:58 UTC, Matěj Cepl
no flags Details | Diff
WIP patch to enable tests (1.50 KB, patch)
2013-07-03 19:01 UTC, Colin Walters
no flags Details | Diff
suggested improvement (941 bytes, patch)
2013-08-14 15:48 UTC, Matěj Cepl
no flags Details | Diff

Description Matěj Cepl 2013-04-23 08:53:50 UTC
Description of problem:
Just to make this into hyperlinkable item. Posting our discussion on #desktop from some time ago:

Apr 16 23:27:44 <mcepl_>        walters: I cannot find anywhere --enable-tests (or --enable-embedded-tests and --enable-modular-tests). What am I missing?
Apr 17 00:26:24 <walters>       mcepl_, they default to on
Apr 17 00:26:38 <walters>       mcepl_,         Building modular tests:   auto
Apr 17 00:26:43 <mcepl_>        except it doesn't work when I try to run them now
Apr 17 00:26:54 <mcepl_>        I get tests: no
Apr 17 00:26:57 <walters>       although there is a bug here in that we're not depending on pkgconfig(gio-2.0) in the build root
Apr 17 00:27:09 <walters>       there are a number of tests that use glib
Apr 17 00:27:42 <mcepl_>        what's wrong with explicit --enable-tests (which makes the tests run for me ... one is failing BTW)
Apr 17 00:27:54 <walters>       which tests?  embedded or modular?
Apr 17 00:29:13 <mcepl_>        I run --enable-tests ... http://mcepl.fedorapeople.org/tmp/test-suite.log
Apr 17 00:30:02 <mcepl_>        otherwise if it is a question of missing package, I would just add it to BuildRequires, what's wrong with that?
Apr 17 00:57:17 <walters>       mcepl_, here's what i have so far, http://pastebin.mozilla.org/2311923
Apr 17 00:57:33 <walters>       it turns out to be rather awful because we need to BR dbus-python and pygobject and...
Apr 17 00:58:24 <walters>       the rpm model is just crappy here, so much saner to run tests in a VM

Just to add the latest results. I have incorporated dbus into our QA tests and when I run my tests now https://beaker.engineering.redhat.com/jobs/407845 (one test is basically just rebuilding the package and hoping for unit tests to run in %check) I get a log http://lab-02.rhts.eng.bos.redhat.com/beaker/logs/results/62605+/62605578/test_log--desktop-rhel7-dbus-dbus-unit-tests.log ... i.e., %check is not run at all (if it is even available).

Version-Release number of selected component (if applicable):
dbus-1.6.8-3.el7

How reproducible:
100%

Steps to Reproduce:
1.run rpmbuild --rebuild dbus*.src.rpm
2.
3.
  
Actual results:
succeeds but doesn't run any unittests

Expected results:
it should run unit tests.

Additional info:

Comment 2 Matěj Cepl 2013-04-24 16:04:54 UTC
*** Bug 877655 has been marked as a duplicate of this bug. ***

Comment 3 Colin Walters 2013-04-24 16:39:24 UTC
Any chance you could make this patch against the fedora rawhide spec instead of rhel?

Comment 4 Matěj Cepl 2013-06-26 13:16:17 UTC
Created attachment 765577 [details]
updated suggested patch

Comment 5 Matěj Cepl 2013-06-26 13:18:35 UTC
(In reply to Colin Walters from comment #3)
> Any chance you could make this patch against the fedora rawhide spec instead
> of rhel?

Actually the patch in comment 3 is same for RHEL-7 as well as for Rawhide.

Comment 7 Matěj Cepl 2013-06-26 16:58:55 UTC
Created attachment 765705 [details]
updated suggested patch

OK, added exit 1 to the failing branch of %if and eliminated duplicity of %check sections.

Comment 8 Colin Walters 2013-07-03 19:01:46 UTC
Created attachment 768397 [details]
WIP patch to enable tests

Ok, this patch I think is a lot clearer than yours; all we conceptually need to do is --enable-tests.

However...you must not have been using mock because as I mentioned before, if we enable the tests we need a whole slew of new build dependencies just for %check.  This patch includes them.

Where I ran into further trouble is that dbus-launch wants an X session; I was able to provide one via Xvfb in a hacky way, but then dbus-launch still failed.  Needs more investigation.

Ideally we'd have a generic tool "run-with-tmp-Xvfb" that did this in a more robust way that could simply be prepended to "make check" invocations.

Comment 9 Colin Walters 2013-07-19 00:38:55 UTC
Ok, pushed with a hack to disable the autolaunch test which can't work as is.

http://pkgs.fedoraproject.org/cgit/dbus.git/commit/?id=a1e9fcfdadcba3038e21eed336f207c98cee3ede
https://brewweb.devel.redhat.com/taskinfo?taskID=6058174

Looks like there's one test that only asserts on s390.

Comment 11 Colin Walters 2013-07-25 18:15:42 UTC
Ok, this works in current RHEL7, but fails in Fedora rawhide:

*** stack smashing detected ***: ./../dbus/dbus-test terminated

Comment 12 Matěj Cepl 2013-08-14 15:48:53 UTC
Created attachment 786585 [details]
suggested improvement

(In reply to Colin Walters from comment #11)
> Ok, this works in current RHEL7, but fails in Fedora rawhide:

OK, two things (after checking the latest on rhel-7.0 branch, commit 4c426435acd4e910fa1c3b72483856f17de6d36a):

1) first of all see the attached patch. Yes, it is a nitpick, but have mercy on our (soon to be) old eyes (we may also grep on PASS/FAIL strings).
2) looking at the diff between my patch and the result I see different options of %configure in the %check section. I had also --enable-installed-tests and --with-systemdsystemunitdir=/lib/systemd/system/ (not sure why the latter). It it OK, these two are missing?

Best,

Matěj

Comment 13 Colin Walters 2013-09-05 14:32:48 UTC
Applied.

(If you do make future patches, please make them against dist-git and use "git commit", then "git format-patch").

Comment 15 Matěj Cepl 2013-11-19 16:48:47 UTC
Looking at http://download.devel.redhat.com/brewroot/packages/dbus/1.6.12/5.el7/data/logs/x86_64/build.log I see tests running.

Comment 16 Ludek Smid 2014-06-13 11:44:53 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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