Bug 955532

Summary: dbus package doesn't run %check tests
Product: Red Hat Enterprise Linux 7 Reporter: Matěj Cepl <mcepl>
Component: dbusAssignee: Colin Walters <walters>
Status: CLOSED CURRENTRELEASE QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: pvine
Target Milestone: rcKeywords: TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1:1.6.12-5.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:44:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
updated suggested patch
none
updated suggested patch
none
WIP patch to enable tests
none
suggested improvement none

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.