Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 184484
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Crypto team <crypto@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Rickard Närström <rickard.narstrom@gmail.com>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
gnupg-2.0.5-test.patch gnupg-2.0.5-test.patch patch Alon Bar-Lev (RETIRED) 2007-07-07 16:07 0000 397 bytes Details | Diff
gnupg-2.0.5-gettime.patch gnupg-2.0.5-gettime.patch patch Alon Bar-Lev (RETIRED) 2007-07-07 16:52 0000 575 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 184484 depends on: Show dependency tree
Bug 184484 blocks: 137705
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-07-07 10:24 0000
----
make[1]: Entering directory
`/var/tmp/paludis/app-crypt/gnupg-2.0.5/work/gnupg-2.0.5/common'
make  check-TESTS
make[2]: Entering directory
`/var/tmp/paludis/app-crypt/gnupg-2.0.5/work/gnupg-2.0.5/common'
PASS: t-convert
t-gettime.c:68: test 2 failed
t-gettime.c:68: test 4 failed
t-gettime.c:68: test 5 failed
t-gettime.c:68: test 6 failed
t-gettime.c:68: test 7 failed
t-gettime.c:68: test 8 failed
t-gettime.c:68: test 9 failed
t-gettime.c:68: test 10 failed
t-gettime.c:68: test 11 failed
t-gettime.c:68: test 12 failed
t-gettime.c:68: test 13 failed
t-gettime.c:68: test 14 failed
t-gettime.c:68: test 15 failed
FAIL: t-gettime
====================================
1 of 2 tests failed
Please report to bug-gnupg@gnupg.org
====================================
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory
`/var/tmp/paludis/app-crypt/gnupg-2.0.5/work/gnupg-2.0.5/common'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory
`/var/tmp/paludis/app-crypt/gnupg-2.0.5/work/gnupg-2.0.5/common'
make: *** [check-recursive] Error 1

!!! ERROR in app-crypt/gnupg-2.0.5:
!!! In src_test at line 29
!!! make check failed

!!! Call stack:
!!!    * src_test (/usr/libexec/paludis/src_test.bash:29)
!!!    * ebuild_f_test (/usr/libexec/paludis/src_test.bash:71)
!!!    * ebuild_main (/usr/libexec/paludis/ebuild.bash:363)
!!!    * main (/usr/libexec/paludis/ebuild.bash:381)


!!! This package failed inside the test phase. You should read
!!!    http://paludis.pioto.org/faq.html
!!! for more information on packages with test phase failures.


die trap: exiting with error.
----


Some of those testfailure are because I am using a TAI timezone, changing to a
UTC timezone and some (but not all) of them will succeed.

----
# TZ=Europe/Stockholm ./t-gettime
t-gettime.c:68: test 4 failed
t-gettime.c:68: test 5 failed
t-gettime.c:68: test 6 failed
t-gettime.c:68: test 7 failed
t-gettime.c:68: test 8 failed
t-gettime.c:68: test 15 failed
----

------- Comment #1 From Rickard Närström 2007-07-07 10:26:15 0000 -------
Sorry forgot...

----
paludis 0.24.2

Built by paludisbuild@workstation on 2007-05-14T15:27:02+0200
CXX:         x86_64-pc-linux-gnu-g++ 4.1.2 20070214 (  (gdc 0.23, using dmd
1.007)) (Gentoo 4.1.2)
CXXFLAGS:    -O3 -fomit-frame-pointer -march=k8 -pipe
LDFLAGS:
DATADIR:     /usr/share
LIBDIR:      /usr/lib64
LIBEXECDIR:  /usr/libexec
SYSCONFDIR:  /etc
stdlib:      GNU libstdc++ 20070214
libebt:      1.3.0
libwrapiter: 1.0.0
sandbox:     enabled

Repository virtuals:
    Configuration information:
        format:                virtuals

Repository installed_virtuals:
    Configuration information:
        format:                installed_virtuals

Repository gentoo:
    Configuration information:
        buildroot:             /var/tmp/paludis
        cache:                 /var/paludis/repositories/gentoo/metadata/cache
        distdir:               /var/paludis/distfiles
        eclassdirs:            /var/paludis/repositories/gentoo/eclass
        format:                ebuild
        location:              /var/paludis/repositories/gentoo
        names_cache:           /var/paludis/repositories/gentoo/.cache/names
        newsdir:               /var/paludis/repositories/gentoo/metadata/news
        pkgdir:                /var/paludis/repositories/gentoo/packages
        profiles:             
/var/paludis/repositories/gentoo/profiles/default-linux/amd64/2007.0/desktop
        securitydir:           /var/paludis/repositories/gentoo/metadata/glsa
        setsdir:               /var/paludis/repositories/gentoo/sets
        sync:                  rsync://rsync.europe.gentoo.org/gentoo-portage/
        sync_options:
        write_cache:           /var/empty

    Package information:
        app-admin/eselect-compiler: (none)
        dev-java/java-config:  1.3.7, 2.0.33-r1
        dev-lang/python:       2.4.4-r4
        dev-python/pycrypto:   2.0.1-r5
        dev-util/ccache:       (none)
        dev-util/confcache:    (none)
        sys-apps/sandbox:      1.2.18.1
        sys-devel/autoconf:    2.13, 2.61-r1
        sys-devel/automake:    1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
        sys-devel/binutils:    2.17
        sys-devel/gcc-config:  1.3.16
        sys-devel/libtool:     1.5.24
        virtual/os-headers:    2.6.21

    Variable information:
        ACCEPT_KEYWORDS:
        AUTOCLEAN:
        CBUILD:                x86_64-pc-linux-gnu
        CFLAGS:                -Os -fomit-frame-pointer -march=k8 -pipe
        CHOST:                 x86_64-pc-linux-gnu
        CONFIG_PROTECT:
        CONFIG_PROTECT_MASK:
        CTARGET:
        CXXFLAGS:              -Os -fomit-frame-pointer -march=k8 -pipe
        DISTDIR:               /var/paludis/distfiles
        FEATURES:
        GENTOO_MIRRORS:
        INSTALL_MASK:
        LANG:
        LC_ALL:                C
        LDFLAGS:               -Wl,-O1 -Wl,--as-needed
        LINGUAS:
        MAKEOPTS:
        PKGDIR:
        PORTAGE_COMPRESS:
        PORTAGE_COMPRESS_FLAGS:
        PORTAGE_RSYNC_EXTRA_OPTS:
        PORTAGE_RSYNC_OPTS:
        PORTAGE_TMPDIR:        /var/tmp/paludis
        PORTDIR:               /var/paludis/repositories/gentoo
        PORTDIR_OVERLAY:
        SYNC:
        USE:

Repository installed:
    Configuration information:
        buildroot:             /var/tmp/paludis
        format:                vdb
        location:              /var/db/pkg
        names_cache:           /var/db/pkg/.cache/names
        provides_cache:        /var/db/pkg/.cache/provides
        root:                  /
        world:                 /var/db/pkg/world

Repository ricce_n-local:
    Configuration information:
        buildroot:             /var/tmp/paludis
        cache:                 /var/empty
        distdir:               /var/paludis/distfiles
        eclassdirs:            /var/paludis/repositories/gentoo/eclass
/var/paludis/repositories/local/eclass
        format:                ebuild
        location:              /var/paludis/repositories/local
        master_repository:     gentoo
        names_cache:           /var/empty
        newsdir:               /var/paludis/repositories/local/metadata/news
        pkgdir:                /var/paludis/repositories/gentoo/packages
        profiles:             
/var/paludis/repositories/gentoo/profiles/default-linux/amd64/2007.0/desktop
        securitydir:           /var/paludis/repositories/local/metadata/glsa
        setsdir:               /var/paludis/repositories/local/sets
        sync:
        sync_options:
        write_cache:           /var/empty
----

------- Comment #2 From Alon Bar-Lev (RETIRED) 2007-07-07 10:45:37 0000 -------
Is t-gettime is the only failing?

------- Comment #3 From Rickard Närström 2007-07-07 11:22:32 0000 -------
Yes only t-gettime fails. I did run 'make -k check' and no test after t-gettime
failed ether.

------- Comment #4 From Alon Bar-Lev (RETIRED) 2007-07-07 15:11:46 0000 -------
OK.
As far as I see, at:
common/gettime.c

There are two new functions:
isotime2epoch()
epoch2isotime()

The t-gettime is new for these...
If test4 is fails it is probably because util.h::atoi_4 macro is incorrect.
Can you please add:
printf ("year=%d\n", year);
Before:
/* Basic checks.  */
At:
common/gettime.c::isotime2epoch()

------- Comment #5 From Rickard Närström 2007-07-07 15:40:09 0000 -------
Output is after adding the line:
----
year=1970
year=1970
year=1998
t-gettime.c:68: test 2 failed
year=1970
year=1969
t-gettime.c:68: test 4 failed
year=1900
t-gettime.c:68: test 5 failed
t-gettime.c:68: test 6 failed
t-gettime.c:68: test 7 failed
t-gettime.c:68: test 8 failed
year=2001
t-gettime.c:68: test 9 failed
year=2007
t-gettime.c:68: test 10 failed
year=2007
t-gettime.c:68: test 11 failed
year=2007
t-gettime.c:68: test 12 failed
year=2007
t-gettime.c:68: test 13 failed
year=2007
t-gettime.c:68: test 14 failed
t-gettime.c:68: test 15 failed
---

------- Comment #6 From Alon Bar-Lev (RETIRED) 2007-07-07 15:44:14 0000 -------
Thanks!
Strange...
Can you please run the test with --verbose?

------- Comment #7 From Rickard Närström 2007-07-07 16:03:49 0000 -------
./t-gettime --verbose
year=1970
year=1970
year=1998
t-gettime.c:68: test 2 failed
string `19980815T143712' exp: 903191832 got: 903191853
year=1970
year=1969
t-gettime.c:68: test 4 failed
string `19691231T235959' exp: -1 got: 4294967295
year=1900
t-gettime.c:68: test 5 failed
string `19000101T000000' exp: -1 got: 4294967295
t-gettime.c:68: test 6 failed
string `' exp: -1 got: 4294967295
t-gettime.c:68: test 7 failed
string `19000101T00000' exp: -1 got: 4294967295
t-gettime.c:68: test 8 failed
string `20010101t123456' exp: -1 got: 4294967295
year=2001
t-gettime.c:68: test 9 failed
string `20010101T123456' exp: 978352496 got: 978352518
year=2007
t-gettime.c:68: test 10 failed
string `20070629T160000' exp: 1183132800 got: 1183132823
year=2007
t-gettime.c:68: test 11 failed
string `20070629T160000:' exp: 1183132800 got: 1183132823
year=2007
t-gettime.c:68: test 12 failed
string `20070629T160000,' exp: 1183132800 got: 1183132823
year=2007
t-gettime.c:68: test 13 failed
string `20070629T160000 ' exp: 1183132800 got: 1183132823
year=2007
t-gettime.c:68: test 14 failed
string `20070629T160000
' exp: 1183132800 got: 1183132823
t-gettime.c:68: test 15 failed
string `20070629T160000.' exp: -1 got: 4294967295

------- Comment #8 From Alon Bar-Lev (RETIRED) 2007-07-07 16:07:20 0000 -------
Created an attachment (id=124150) [details]
gnupg-2.0.5-test.patch

Found it!

------- Comment #9 From Rickard Närström 2007-07-07 16:31:12 0000 -------
That patch solved test 4, 5, 6, 7, 8 and 15.

test 2, 9, 10, 11, 12, 13 and 14 still fails with a TAI timezone.

------- Comment #10 From Alon Bar-Lev (RETIRED) 2007-07-07 16:35:48 0000 -------
I cannot reproduce this:
TZ="Asia/Bangkok" ./t-gettime
Works...

------- Comment #11 From Alon Bar-Lev (RETIRED) 2007-07-07 16:52:53 0000 -------
Created an attachment (id=124158) [details]
gnupg-2.0.5-gettime.patch

Please try the following... It should ignore timezone and daylight.

------- Comment #12 From Alon Bar-Lev (RETIRED) 2007-07-07 17:36:04 0000 -------
So that we can keep track

------- Comment #13 From Rickard Närström 2007-07-07 17:44:27 0000 -------
No that path didn't help. -- everything in the right folder is TAI timezones
try "right/Asia/Bangkok" or "right/Europe/Stockholm" (my timezone) and it will
fail.

see bug #137705 for more info on TAI vs. UTC

------- Comment #14 From Alon Bar-Lev (RETIRED) 2007-07-07 18:28:53 0000 -------
Correct me if I am wrong...
But the time calculated without the patch is correct, the expected test result
is incorrect.
So the test should detect if the timezone is TAI and if so add the leap seconds
to the expected results.

Do you know an API to determine if TAI is used? tzset() does not tell this, and
gettimeofday() does not either.

------- Comment #15 From Rickard Närström 2007-07-07 19:02:42 0000 -------
Take a look at http://bugs.gentoo.org/attachment.cgi?id=97631 -- it is meant to
solve a similar problem in openntpd.

But it is probably a good idea to talk about this with upstream.

------- Comment #16 From Alon Bar-Lev (RETIRED) 2007-07-07 19:14:43 0000 -------
Opps...

------- Comment #17 From Alon Bar-Lev (RETIRED) 2007-12-13 18:54:32 0000 -------
See URL, upstream refuses to solve this... Blaming glibc...

------- Comment #18 From Daniel Black 2009-02-15 03:09:18 0000 -------
patch has taken effect in upstream 2.0.9 and 2.0.10.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug