Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 218541 - net-libs/libsmi-0.4.8 tests failure (test request)
Summary: net-libs/libsmi-0.4.8 tests failure (test request)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-20 10:16 UTC by Peter Volkov (RETIRED)
Modified: 2008-10-30 13:29 UTC (History)
2 users (show)

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


Attachments
/dev/shm/portage/net-libs/libsmi-0.4.8/work/libsmi-0.4.8/test/smidump-cm.out (smidump-cm.out.tar.bz2,5.89 KB, application/x-bzip2)
2008-04-20 15:35 UTC, Jeroen Roovers (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Volkov (RETIRED) gentoo-dev 2008-04-20 10:16:51 UTC
Well new version of net-libs/libsmi-0.4.8 is in portage.

Jeroen, could you, please, retest this package on hppa and attach another time dir with failed tests output, so I could bump upstream on this issue another time if tests fail... Thank you.

BTW, I've didn't CC'ed other archs (e.g. ppc64) as if it fails one active arch developer is enough to work further on this bug and no need to spam others. )
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-04-20 15:35:55 UTC
Created attachment 150405 [details]
/dev/shm/portage/net-libs/libsmi-0.4.8/work/libsmi-0.4.8/test/smidump-cm.out

comparing `smidump -f cm SNMPv2-MIB' output with dumps/cm/*.
comparing `smidump -f cm IF-MIB' output with dumps/cm/*.
comparing `smidump -f cm MAU-MIB' output with dumps/cm/*.
comparing `smidump -f cm RMON2-MIB' output with dumps/cm/*.
*** smidump output differs, see smidump-cm.out/*.diff
FAIL: smidump-cm.test
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2008-04-21 10:43:08 UTC
http://mail.ibr.cs.tu-bs.de/pipermail/libsmi/2008-April/001079.html
"This "bug" seems to be caused by varying floating point accuracies.
Can you suggest a "fix" for this?"

As I do not have access to hardware I obviously do not know how to fix that... Jeroen, do you have any ideas?
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-04-21 13:31:14 UTC
(In reply to comment #2)
> http://mail.ibr.cs.tu-bs.de/pipermail/libsmi/2008-April/001079.html
> "This "bug" seems to be caused by varying floating point accuracies.

Why would it be floating point? IP addresses are normally integers, and these rather look like an endian problem to me.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2008-04-21 13:41:13 UTC
Sorry about the rearrangements, but: I am not hppa, and hppa is not the package maintainer. :)

I'll try and find some time to look into this. It could be quite trivial.
Comment 5 Guy Martin (RETIRED) gentoo-dev 2008-10-29 12:41:56 UTC
I looked into this bug and there is nothing that can be troubleshooted.

The very same test fails on x86 for me for MAU-MIB while it's not failing for RMON2-MIB.

As far as I could see, this is a small difference and corner case with FP number.

I'm thus closing this one out as I'm not gonna rewrite CPU FP instructions to make them more precise :)
Comment 6 Peter Volkov (RETIRED) gentoo-dev 2008-10-29 13:27:47 UTC
Guy thank you for investigation but I don't understood your explanation. What did you mean speaking that same test failing on x86 with MAU-MIB? x86 arch team told me that all tests passed fine and I've checked now it works here too:

comparing `smidump -f cm SNMPv2-MIB' output with dumps/cm/*.
comparing `smidump -f cm IF-MIB' output with dumps/cm/*.
comparing `smidump -f cm MAU-MIB' output with dumps/cm/*.
comparing `smidump -f cm RMON2-MIB' output with dumps/cm/*.
PASS: smidump-cm.test

How does it fail for you on x86?
Comment 7 Guy Martin (RETIRED) gentoo-dev 2008-10-29 14:24:25 UTC
It fails like this :
lifestyle smidump-cm.out # cat MAU-MIB.diff 
1297c1297
<        <rectangle val="28.67,32.93;30.37,34.62"/>
---
>        <rectangle val="28.67,32.93;30.37,34.63"/>
1681c1681
<        <rectangle val="28.67,32.93;30.37,34.62"/>
---
>        <rectangle val="28.67,32.93;30.37,34.63"/>
1740c1740
<        <rectangle val="28.67,32.93;30.37,34.62"/>
---
>        <rectangle val="28.67,32.93;30.37,34.63"/>


On my laptop :
Portage 2.1.4.5 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25.4 i686)
System uname: 2.6.25.4 i686 Intel(R) Pentium(R) M processor 2.00GHz

This is 0.4.8.
Comment 8 Peter Volkov (RETIRED) gentoo-dev 2008-10-29 15:15:51 UTC
Guy, interesting. :) Please show us complete emerge --info.
Comment 9 Guy Martin (RETIRED) gentoo-dev 2008-10-29 17:30:30 UTC
There you go :

lifestyle ~ # emerge --info
Portage 2.1.4.5 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25.4 i686)
=================================================================
System uname: 2.6.25.4 i686 Intel(R) Pentium(R) M processor 2.00GHz
Timestamp of tree: Tue, 28 Oct 2008 08:45:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -falign-functions=4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O3 -march=pentium4 -falign-functions=4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LINGUAS="en fr"
PKGDIR="/usr/portage/packages"
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"
SYNC="rsync://ftp.snt.ipv6.utwente.nl/gentoo-portage"
USE="X a52 aac acl acpi alsa berkdb bluetooth browserplugin cairo cdr cli cracklib crypt cups dbus divx dri dv dvb dvd dvdr dvdread emboss encode evo fam fbcon ffmpeg firefox flac font-server gdbm gif glibc-omitfp gnucrypt gnutls gpm gtk hal httpd iconv imap iontruetype iproute2 ipv6 irda isdnlog jack java javascript jpeg ldap libcaca linuxthreads-tls lirc live lzo mad matroska midi mikmod mmx mmxext mozilla mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcmcia pcre pdf perl pic png postgres pppd python qt3 qt3support qt4 readline real reflection rtc samba screen sdl session smux snmp speex spell spl sse sse2 ssl stream svg svga tcpd theora threads tiff truetype unicode v4l v4l2 vorbis wifi win32codecs wxwindows x264 x86 xinerama xml xorg xosd xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fr" LIRC_DEVICES="sir" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt intel mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 10 Peter Volkov (RETIRED) gentoo-dev 2008-10-29 19:23:34 UTC
Well, now I see. libsmi does not like optimizations. With old compilers it does not work with -O3. With gcc-4.3 it works with -O3 but fails with -Os. So I think it's best to replace-flags -O? -O2 always. I've updated ebuild. Please, try it. If your tests pass I'll do revision bump straight to stable to force all users rebuild this package with optimizations filtered out.
Comment 11 Guy Martin (RETIRED) gentoo-dev 2008-10-30 11:15:55 UTC
Yep that fixes it.

However I wouldn't force the users to recompile this.
I mean, floating point is meant to be imprecise. To me this test is missdesigned and should not rely on the precision of FP.

Thing is, depending on your arch/compiler/optimizations, the FP operations will be different. For example, some values will be pre calculated in some circumstances, different arch/compiler will use different ways to compute the same operations so you can't be sure of the result.


I think it's just best to ignore those small FP glitches.

HTH

Comment 12 Peter Volkov (RETIRED) gentoo-dev 2008-10-30 13:29:20 UTC
Ok, FIXED now.
I'll contact upstream on this issue and then decide to bump or not to bump :)