Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 304813 - kde-base/kcalc-4.4.2 fails test with ru locale (and likely many others, . versus , problem)
Summary: kde-base/kcalc-4.4.2 fails test with ru locale (and likely many others, . ver...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: kde4tests 313999
  Show dependency tree
 
Reported: 2010-02-13 07:29 UTC by Guseinov Alexey
Modified: 2010-06-03 21:00 UTC (History)
1 user (show)

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 Guseinov Alexey 2010-02-13 07:29:35 UTC
kcalc expects, that 5.3 is floating number, but it is not if decimal delimiter is ,. So converting it to float gives 0.

Reproducible: Always

Steps to Reproduce:
1. Select ru_RU.UTF-8 locale
2. emerge kcalc

Actual Results:  
 * >>> Test phase [test]: kde-base/kcalc-4.3.3                                                                                                               
make -j3 -j1 test                                                                                                                                            
Running tests...
Start processing tests
Test project /var/tmp/portage/kde-base/kcalc-4.3.3/work/kcalc-4.3.3_build
  1/  1 Testing KNumber                       ***Failed

0% tests passed, 1 tests failed out of 1

The following tests FAILED:
          1 - KNumber (Failed)

If you look at log file 
# cat Testing/Temporary/LastTest.log
Start testing: Feb 13 10:11 MSK
----------------------------------------------------------
Changing directory into: /var/tmp/portage/kde-base/kcalc-4.3.3/work/kcalc-4.3.3_build/kcalc/knumber/tests
1/1 Testing: KNumber
1/1 Test: KNumber
Command: "/var/tmp/portage/kde-base/kcalc-4.3.3/work/kcalc-4.3.3_build/kcalc/knumber/tests/knumbertest.shell"
Directory: /var/tmp/portage/kde-base/kcalc-4.3.3/work/kcalc-4.3.3_build/kcalc/knumber/tests
"KNumber" start time: Feb 13 10:11 MSK
Output:
----------------------------------------------------------
Testing Constructors:
Testing result of: KNumber(5) should give 5 and gives 5....
The type of the result should be Integer and gives Integer....  OK
Testing type of: KNumber(5.3) should give Float and gives Float....OK
Testing type of: KNumber(0.0) should give Float and gives Float....OK
Testing result of: KNumber("5") should give 5 and gives 5....
The type of the result should be Integer and gives Integer....  OK
Testing result of: KNumber("5/3") should give 5/3 and gives 5/3....
The type of the result should be Fraction and gives Fraction....  OK
Testing result of: KNumber("5/1") should give 5 and gives 5....
The type of the result should be Integer and gives Integer....  OK
Testing result of: KNumber("0/12") should give 0 and gives 0....
The type of the result should be Integer and gives Integer....  OK
Read decimals as fractions:
Testing result of: KNumber("5") should give 5 and gives 5....
The type of the result should be Integer and gives Integer....  OK
Testing result of: KNumber("1.2") should give 6/5 and gives 6/5....
The type of the result should be Fraction and gives Fraction....  OK
Testing result of: KNumber("-0.02") should give -1/50 and gives -1/50....
The type of the result should be Fraction and gives Fraction....  OK
Testing result of: KNumber("5e-2") should give 1/20 and gives 1/20....
The type of the result should be Fraction and gives Fraction....  OK
Testing result of: KNumber("1.2e3") should give 1200 and gives 1200....
The type of the result should be Integer and gives Integer....  OK
Testing result of: KNumber("0.02e+1") should give 1/5 and gives 1/5....
The type of the result should be Fraction and gives Fraction....  OK
Read decimals as floats:
Testing result of: KNumber("5.3") should give 5.3 and gives 0....
The type of the result should be Float and gives Float....  Failed
----------------------------------------------------------
"KNumber" end time: Feb 13 10:11 MSK
"KNumber" time elapsed: 00:00:00
----------------------------------------------------------

End testing: Feb 13 10:11 MSK


Expected Results:  
Expected result can be seen by making the same tests with C locale:
gus kcalc-4.3.3_build # pwd
/var/tmp/portage/kde-base/kcalc-4.3.3/work/kcalc-4.3.3_build
gus kcalc-4.3.3_build # LC_ALL="C" make -j3 -j1 test
Running tests...
Start processing tests
Test project /var/tmp/portage/kde-base/kcalc-4.3.3/work/kcalc-4.3.3_build
  1/  1 Testing KNumber                          Passed

100% tests passed, 0 tests failed out of 1

By the way, LC_ALL="C" emerge kcalc works.

# emerge --info =kde-base/kcalc-4.3.3
Portage 2.1.7.17 (default/linux/amd64/10.0/developer, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.31-gentoo-r6 x86_64)
=================================================================                                                
                        System Settings                                                                          
=================================================================                                                
System uname: Linux-2.6.31-gentoo-r6-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_6000+-with-gentoo-1.12.13   
Timestamp of tree: Fri, 12 Feb 2010 16:15:02 +0000                                                               
app-shells/bash:     4.0_p35                                                                                     
dev-java/java-config: 2.1.10                                                                                     
dev-lang/python:     2.6.4                                                                                       
dev-util/cmake:      2.6.4-r3                                                                                    
sys-apps/baselayout: 1.12.13                                                                                     
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 ut2003 sun-bcla-java-vm"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=k8-sse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /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 /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=k8-sse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests collision-protect cvs distlocks fixpackages multilib-strict news parallel-fetch protect-owned sandbox sfperms sign splitdebug strict test unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ http://gentoo.osuosl.org ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.mirrors.pair.com/"
LC_ALL="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="ru"
MAKEOPTS="-j3"
PKGDIR="/usr/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/science /usr/portage/local/layman/Spring /usr/portage/local/user"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 apm asf bash-completion berkdb bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus doc dri dts dvd dvdr dvdread emboss encode evo exif fam ffmpeg firefox flac fortran ftp gd gdbm gif glut gnome gpm gstreamer gtk gtk2 hal iconv icq ieee1394 im_sensors imagemagick java joystick jpeg jpeg2k kde lame ldap libnotify mad mikmod mime mjpeg mmx mng modules mp3 mp4 mpeg mpi mudflap multilib musicbrainz mysql ncurses nls nptl nptlonly ogg oggvorbis opengl openmp overlays pam pcre pda pdf perl php png ppds pppd python qt qt3support qt4 quicktime quotas readline reflection samba sdl session sharedmem snmp sockets socks5 spell spl sse sse2 ssl startup-notification svg sysfs tcpd theora thunar tidy tiff tokenizer truetype unicode usb vorbis x264 xine xinerama xml xml2 xorg xulrunner xv xvid zlib" ALSA_CARDS="intel8x0" 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status userdir usertrack vhost_alias" CAMERAS="canon ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2010-03-12 16:24:47 UTC
Could you please check if this problem is still present in 4.3.5? 
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2010-04-18 00:07:01 UTC
Confirmed for 4.4.2 (with de_DE.utf8@euro, same problem)
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2010-05-16 21:33:41 UTC
Fixed in the overlay, please test...
Comment 4 Dror Levin (RETIRED) gentoo-dev 2010-06-03 21:00:52 UTC
Moved fix to tree for both 4.4.2 and 4.4.3, thanks!