Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 411967 - dev-libs/glib-2.32.1 fails tests if LC_TIME is not some english locale
Summary: dev-libs/glib-2.32.1 fails tests if LC_TIME is not some english locale
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-14 14:28 UTC by Marien Zwart (RETIRED)
Modified: 2012-04-14 23:23 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marien Zwart (RETIRED) gentoo-dev 2012-04-14 14:28:00 UTC
With LC_TIME=nl_NL.utf8 glib-2.32.1 fails its tests:

TEST: date... (pid=2449)
  /date/basic:                                                         OK
  /date/empty:                                                         OK
  /date/dmy:                                                           OK
  /date/julian:                                                        OK
  /date/dates:                                                         OK
  /date/parse:                                                         **
ERROR:date.c:141:test_parse: assertion failed (g_date_get_month (d) == 3): (10 == 3)
FAIL
GTester: last random seed: R02S86f7332a35f5c24d86e19af75e9bef1d
/bin/sh: line 1: 30796 Terminated              G_DEBUG=gc-friendly MALLOC_CHECK_=2 MALLOC_PERTURB_=$((${RANDOM:-256} % 256)) ../../glib/gtester --verbose testing option-context option-argv0 keyfile fileutils te
st-printf protocol rand strfuncs string markup-parse markup-collect markup-escape markup-subparser array-test bytes hostutils gvariant mem-overflow utf8-performance utils regex base64 sequence scannerapi shell 
collate utf8-pointer utf8-validate utf8-misc unicode checksum hmac hash cache date node convert list slist queue tree uri dir pattern logging error bookmarkfile gdatetime timeout environment mappedfile dataset sort atomic bitlock mutex rec-mutex rwlock once cond thread slice hook mainloop private asyncqueue 1bit-mutex 642026 642026-ec 1bit-emufutex spawn-multithreaded spawn-singlethread gwakeup gwakeup-fallback unix-multithreaded unix unix-nothreads include
make[4]: *** [test-nonrecursive] Error 143

Looking at a diff of 2.32.0 and 2.32.1 I think the following new test is to blame:

+  g_date_set_parse (d, "10 10 2010");
+  g_assert (g_date_valid (d));
+  g_assert_cmpint (g_date_get_month (d), ==, 10);
+  g_assert_cmpint (g_date_get_day (d), ==, 10);
+  g_assert_cmpint (g_date_get_year (d), ==, 2010);
+
+  g_date_set_parse (d, "10 March 2010");
+  g_assert (g_date_valid (d));
+  g_assert_cmpint (g_date_get_month (d), ==, 3);
+  g_assert_cmpint (g_date_get_day (d), ==, 10);
+  g_assert_cmpint (g_date_get_year (d), ==, 2010);

Unless LC_TIME is something like en_US.UTF-8 or C the second g_date_set_parse will fail (as "March" is then not a valid month name). Apparently this does not make g_date_valid false, but g_date_get_month returns 10 (from the previous parse) instead of 3.

Not sure if you want to treat this as an upstream bug in the test suite, user error (if I just set all my locale env vars to be en_US.UTF-8 the test will pass), or something to fix in the ebuild.

Portage 2.2.0_alpha100 (!../usr/portage/profiles/default/linux/amd64/10.0/desktop/gnome, gcc-4.5.3, glibc-2.14.1-r3, 3.3.1-gentoo-m5-bsd-acct-no-bridge x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.3.1-gentoo-m5-bsd-acct-no-bridge-x86_64-AMD_Athlon-tm-_II_X4_640_Processor-with-gentoo-2.1
Timestamp of tree: Unknown
ccache version 3.1.7 [disabled]
app-shells/bash:          4.2_p24
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3, 3.2.2-r1
dev-util/ccache:          3.1.7
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.9.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.10.3, 1.11.4
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.7
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo cross gamerlay-stable bitcoin gnome marienz
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10.3 google-talkplugin"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-ggdb -O2 -march=amdfam10 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /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="-ggdb -O2 -march=amdfam10 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs candy collision-protect compressdebug distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox xattr"
FFLAGS=""
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/linux/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_GB en_US nl fy fy_NL"
MAKEOPTS="-j4"
PKGDIR="/var/tmp/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/srv/gentoo-x86"
PORTDIR_OVERLAY="/usr/local/portage/cross /usr/local/portage/layman/gamerlay /usr/local/portage/layman/bitcoin /usr/local/portage/layman/gnome /usr/local/portage/private"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 apng avahi bluetooth branding bzip2 cairo caps cdda cdio cdr cli clutter colord consolekit coverage crypt cups cxx dbus device-mapper distinct-l doc dri dts dvd dvdr dvi emacs emboss encode equalizer evo exif expat ffmpeg firefox flac fontconfig fortran fuse g3dvl gif gmp gnome gnome-keyring gnome-online-accounts gpg gstreamer gtk gtk3 gtkstyle http iconv idn imap inotify ipv6 irc jpeg lame latex lcms libcaca libffi libkms libnotify libvisual llvm lua lvm lzma macvtap maildir minizip mmx mmxext mng modules mp3 mp4 mpeg multilib nautilus ncurses networkmanager nfsidmap nls nptl nptlonly numpy objc offensive ogg opengl openmp pam pam_krb5 pango pch pdf playlist plymouth png policykit ppds pppd preview-latex pulseaudio python qemu qt3support qt4 readline realtime scanner schroedinger semantic-desktop session sip socialweb speex spell spice sqlite sse sse2 sse3 ssl startup-notification svg sysfs systemd test theora tokyocabinet toolkit-scroll-bars tools truetype udev udis86 udisks unicode urwid usb vala vdpau vhost-net vorbis vpx wxwidgets x264 xattr xcb xcomposite xft xinerama xml xorg xulrunner xv xvfb xvmc zlib zsh-completion" 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 sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="plymouth caps lvm" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB en_US nl fy fy_NL" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_7 python3_2 pypy1_8" RUBY_TARGETS="ruby18" SANE_BACKENDS="u12" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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"
USE_PYTHON="2.7 2.7-pypy-1.8 3.2"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-libs/glib-2.32.1 was built with the following:
USE="doc (multilib) test xattr -debug -fam (-selinux) -static-libs -systemtap -utils"
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-04-14 21:37:02 UTC
(In reply to comment #0)
> Not sure if you want to treat this as an upstream bug in the test suite,
> user error (if I just set all my locale env vars to be en_US.UTF-8 the test
> will pass), or something to fix in the ebuild.

This is definitely an upstream bug in the test suite. Bug filed at https://bugzilla.gnome.org/show_bug.cgi?id=674117

Until it's fixed, we will need to add a workaround in the ebuild.
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-04-14 23:23:36 UTC
Should be fixed in cvs now.

>  14 Apr 2012; Alexandre Rostovtsev <tetromino@gentoo.org> glib-2.32.0.ebuild,
>  glib-2.32.1.ebuild, +files/glib-2.32.1-fix-libelf-check.patch:
>  Add elfutils/libelf as a runtime dependency, and fix libelf detection. Fix
>  datetime tests in non-English locales (bug #411967, thanks to Marien Zwart).