Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 384853 - dev-libs/glib-2.30.0 fails tests
Summary: dev-libs/glib-2.30.0 fails tests
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2011-09-28 22:21 UTC by Pacho Ramos
Modified: 2011-10-16 21:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (glib-2.30.0:20110928-203526.log,579.83 KB, text/plain)
2011-09-28 22:21 UTC, Pacho Ramos
Details
patch for glib-2.30.0.ebuild to fix tests (glib-2.30.0.ebuild.patch,2.44 KB, patch)
2011-09-29 02:34 UTC, Alexandre Rostovtsev (RETIRED)
Details | Diff
patch for glib-2.30.0.ebuild to fix tests (glib-2.30.0.ebuild.patch,3.79 KB, patch)
2011-09-30 09:53 UTC, Alexandre Rostovtsev (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2011-09-28 22:21:30 UTC
Looks like tests are still relying on python :-/

TEST: gdbus-connection... (pid=13931)
  /gdbus/connection/basic:                                             OK
  /gdbus/connection/life-cycle:                                        OK
  /gdbus/connection/send:                                              OK
  /gdbus/connection/signals:                                           OK
  /gdbus/connection/filter:                                            Traceback (most recent call last):
  File "./gdbus-testserver.py", line 3, in <module>
    import gobject
ImportError: No module named gobject
Timeout waiting 30 sec on service
**
ERROR:gdbus-connection.c:826:test_connection_filter_on_timeout: code should not be reached
cleaning up bus with pid 13956
FAIL
GTester: last random seed: R02S0647778947588e691b89d669e8ad4f99


Reproducible: Always




Portage 2.1.10.19 (default/linux/amd64/10.0/desktop/gnome, gcc-4.4.5, glibc-2.12.2-r0, 2.6.38-tuxonice-r2 x86_64)
=================================================================
System uname: Linux-2.6.38-tuxonice-r2-x86_64-Intel-R-_Core-TM-_i5-2410M_CPU_@_2.30GHz-with-gentoo-2.0.3
Timestamp of tree: Wed, 28 Sep 2011 20:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/ccache:          2.4-r9
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.5, 4.5.3-r1, 4.6.1-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo sunrise x11 rainyday x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/distfiles"
FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles fixpackages multilib-strict news parallel-fetch protect-owned sandbox sfperms sign split-log strict test test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ http://ftp.heanet.ie/pub/gentoo/"
LANG="es_ES.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="es es_ES en_US"
MAKEOPTS="-j5"
PKGDIR="/usr/local/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/x11 /usr/portage/local/layman/rainyday /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 applet bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdr cli consolekit cracklib crypt cups cvs cxx dbus djvu dri dts dvd dvdr dvi eds emboss enchant encode evo exif fam fat ffmpeg firefox flac fortran fuse gdbm gdu gif gnome gnome-keyring gpm gstreamer gtk gtk3 gtkstyle iconv jpeg kpathsea latex lcms ldap libnotify lyx mad mms mmx mmxext mng modules mono mp3 mp4 mpeg mudflap multilib musicbrainz nautilus ncurses network-cron networkmanager nls nptl nptlonly ntfs ntp nvidia ogg opengl openmp optimized-qmake pam pango pch pcre pdf perl png policykit ppds pppd python qt3support readline reiserfs sdl session smp sna spell sse sse2 sse3 ssl ssse3 startup-notification svg sysfs t1lib tcpd test theora threads tiff truetype udev unicode usb vaapi vcd vdpau vorbis wifi x264 xcb xml xorg xulrunner xv xvid youtube zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es es_ES en_US" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev nvidia vesa intel i915 i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Pacho Ramos gentoo-dev 2011-09-28 22:21:50 UTC
Created attachment 288135 [details]
build.log
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-09-29 02:34:08 UTC
Created attachment 288171 [details, diff]
patch for glib-2.30.0.ebuild to fix tests

Confirming. I didn't notice the problem because I had a broken config in my /etc/portage/env that silently prevented me from running tests on glib :/

The attached patch makes the following changes to fix the issue:
* add python-2 as a build-time dependency when USE=test (we cannot use python.eclass because that will make python a run-time dependency, see bug #377549).
* sed gdbus-testserver.py and gtester-report to use python2 (can't use python_convert_shebangs since we are not using python.eclass). As far as I can tell, these are the only python scripts that the test suite runs.
* hard-disable the /gdbus/connection/life-cycle test (it randomly fails around 1/3 of the time when I try to run it).
* bring back the code from 2.28.x ebuilds to disable tests requiring gdbus-testserver.py when dbus-python or pygobject:2 are unavailable (otherwise, there will be circular dependencies when FEATURES=test). In addition, symlink gdbus-testserver.py to /bin/true in this case to prevent an assertion.

I have tested a patched 2.30.0 ebuild around a dozen times in different ways, and the tests seem to behave properly now.
Comment 3 Pacho Ramos gentoo-dev 2011-09-29 09:20:43 UTC
(In reply to comment #2)
> Created attachment 288171 [details, diff]
> patch for glib-2.30.0.ebuild to fix tests
> 
> Confirming. I didn't notice the problem because I had a broken config in my
> /etc/portage/env that silently prevented me from running tests on glib :/
> 
> The attached patch makes the following changes to fix the issue:
> * add python-2 as a build-time dependency when USE=test (we cannot use
> python.eclass because that will make python a run-time dependency, see bug
> #377549).

Regarding python.eclass making python a RDEPEND, I think it's common to all packages using python, but I would still use it as that DEPEND/RDEPEND would only be added with USE "test". Other option would be to also skip python requiring tests when a "python" USE flag is not set. What do you think?

(Will CC python team and Arfrever to let them check this, as I am not sure about not using python.eclass and doing the changes manually)

> * sed gdbus-testserver.py and gtester-report to use python2 (can't use
> python_convert_shebangs since we are not using python.eclass). As far as I can
> tell, these are the only python scripts that the test suite runs.
> * hard-disable the /gdbus/connection/life-cycle test (it randomly fails around
> 1/3 of the time when I try to run it).

Have you reported this to upstream? In that case, please let me know the bug reference to add it as a comment before skipping it in the ebuild.

> * bring back the code from 2.28.x ebuilds to disable tests requiring
> gdbus-testserver.py when dbus-python or pygobject:2 are unavailable (otherwise,
> there will be circular dependencies when FEATURES=test). In addition, symlink
> gdbus-testserver.py to /bin/true in this case to prevent an assertion.
> 

Fine :D

> I have tested a patched 2.30.0 ebuild around a dozen times in different ways,
> and the tests seem to behave properly now.

Thanks a lot
Comment 4 Arfrever Frehtes Taifersar Arahesis 2011-09-29 14:28:24 UTC
python.eclass adds dependency on Python only when PYTHON_DEPEND variable is set before inheriting python.eclass. "test" USE flag can enable build-time dependency on Python.
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-09-29 16:51:37 UTC
(In reply to comment #4)
> python.eclass adds dependency on Python only when PYTHON_DEPEND variable is set
> before inheriting python.eclass. "test" USE flag can enable build-time
> dependency on Python.

Great!

(In reply to comment #3)
> Have you reported this to upstream? In that case, please let me know the bug
> reference to add it as a comment before skipping it in the ebuild.

No, because I cannot reproduce the test failure when running make check from a tarball in my home directory, so I am not sure whether this is really an upstream bug or something subtle about our src_test().
Comment 6 Arfrever Frehtes Taifersar Arahesis 2011-09-30 06:43:10 UTC
Maybe there should be run-time dependency on Python due to /usr/bin/gtester-report.

install-exec-hook target changes shebang in gtester-report, so calling sed in src_prepare() doesn't have desired effect.
Comment 7 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-09-30 09:50:33 UTC
(In reply to comment #6)
> install-exec-hook target changes shebang in gtester-report, so calling sed in
> src_prepare() doesn't have desired effect.

You are right, calling sed in src_prepare() has no useful effect in this case. However, for the install-exec-hook to work right, PYTHON needs to be set (or passed to emake install).

> Maybe there should be run-time dependency on Python due to
> /usr/bin/gtester-report.

I don't want to add a hard run-time dependency due to bug #377549.

After grepping through gnome sources, it appears that /usr/bin/gtester-report is only used for "make test-report" in a number of libraries (gtk+, cogl, clutter, libpeas, and webkit-gtk). However, it is not used when doing "make check", and so it's not needed as a dependency for building or testing any Gentoo package. The only reason to care about it is to make life convenient for the small number of users who are doing their own software development with glib and who want to generate pretty test report files.

This is by contrast with gdbus-codegen, which really is required for building some packages.

Probably this situation would be best handled by a USE flag (maybe "utils"?), and adding an ewarn if the USE flag is disabled (and hence /usr/bin/gtester-report is non-functional). And perhaps this USE flag could also, for the sake of convenience, pull in gdbus-codegen.
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-09-30 09:53:19 UTC
Created attachment 288345 [details, diff]
patch for glib-2.30.0.ebuild to fix tests

Changes relative to the previous patch:
* switch to EAPI3 and inherit python
* add a utils USE flag. It will pull in python and gdbus-codegen as runtime deps.
* "python_set_active_version 2" instead of sedding gdbus-testserver.py
* do not do anything with gtester-report in src_prepare(), we don't run it
* call "emake install" with PYTHON variable set to correctly install /usr/bin/gtester-report
* add an elog if installing glib with USE=-utils and no python2 installed
Comment 9 Arfrever Frehtes Taifersar Arahesis 2011-09-30 12:24:40 UTC
I suggest:

src_install() {
	...
	if ! use utils; then
		rm "${ED}usr/bin/gtester-report"
	fi
	...
}

Instead of additional elog message.
Comment 10 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-10-03 23:26:06 UTC
(In reply to comment #9)
> I suggest:
[...]
> Instead of additional elog message.

Sure, that also works.
Comment 11 Pacho Ramos gentoo-dev 2011-10-16 21:37:02 UTC
+*glib-2.30.1-r1 (16 Oct 2011)
+
+  16 Oct 2011; Pacho Ramos <pacho@gentoo.org> +glib-2.30.1-r1.ebuild,
+  +files/glib-2.30.1-homedir-env.patch, metadata.xml:
+  Fix python ddependency issues as it's needed in some cases, bug #384853 (by
+  Alexandre Rostovtsev and Arfrever Frehtes Taifersar Arahesis); depend more
+  scrictly on dev-util/gdbus-codegen to prevent unwanted mixes (and also help
+  maintainers to remember both need to be bumped at the same time); utils die
+  themselves with eapi4 (drop unneeded dies then); handle the G_HOME
+  environment variable to override the passwd entry, upstream bug #142568;
+  handle the G_HOME environment variable to override the passwd entry, upstream
+  bug #142568 (by Debian folks);
+  workaround-gio-test-failure-without-userpriv.patch looks to be no longer
+  needed as upstream bug should be fixed; assert-msg-test prefers to have gdb
+  installed when running test.
+