Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 688460 - app-crypt/p11-kit-0.23.12: test failure /builder/valid-date
Summary: app-crypt/p11-kit-0.23.12: test failure /builder/valid-date
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2019-06-22 07:59 UTC by Alexey
Modified: 2019-07-02 05:51 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,699.38 KB, text/x-log)
2019-06-22 07:59 UTC, Alexey
Details
emerge --info (file_688460.txt,18.17 KB, text/plain)
2019-06-22 08:00 UTC, Alexey
Details
test-suite.log (test-suite.log,4.23 KB, text/x-log)
2019-06-22 08:05 UTC, Alexey
Details
a.c (a.c,723 bytes, text/plain)
2019-06-29 17:03 UTC, Alon Bar-Lev (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2019-06-22 07:59:48 UTC
Created attachment 580340 [details]
build.log

FAIL: test-builder 16 /builder/valid-date                                                                                                                                                                                                                                         
# test-builder: assertion failed ((0UL) == rv): (0 == 19)                                                                                                                                                                                                                         
# test-builder: in test_valid_dates() at test-builder.c:816
Comment 1 Alexey 2019-06-22 08:00:31 UTC
Created attachment 580342 [details]
emerge --info
Comment 2 Alexey 2019-06-22 08:05:08 UTC
Created attachment 580358 [details]
test-suite.log
Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2019-06-28 23:29:58 UTC
Hi,
Can you please try the latest version now in portage?
If it fails, I need your help, please check what branch returns false in type_date[1], you can add printf() before the return, if this is difficult I will send you a patch.
Thanks!

[1] https://github.com/p11-glue/p11-kit/blob/master/trust/builder.c#L241
Comment 4 Alexey 2019-06-29 07:37:36 UTC
It's https://github.com/p11-glue/p11-kit/blob/master/trust/builder.c#L270

tm.tm_mday == 10
two.tm_mday == 9
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2019-06-29 09:20:24 UTC
Thanks!
Can you dump all fields in tm and two? What is your timezone?
Comment 6 Alexey 2019-06-29 14:47:56 UTC
{printf("%i %i %i vs %i %i %i\n", tm.tm_year, tm.tm_mon, tm.tm_mday, two.tm_year, two.tm_mon, two.tm_mday); return false;}

100 10 10 vs 100 10 9

Europe/Dublin
Comment 7 Alon Bar-Lev (RETIRED) gentoo-dev 2019-06-29 17:03:36 UTC
Created attachment 581418 [details]
a.c

We need to reproduce this outside of package... very strange. Please see this file... can you please try to reproduce and send the output? Please try both 32bit and 64bit, as I see 32bit is the one that failing for you.

Once I will be able to reproduce this locally, I can provide a fix, however, it does not make sense that the date simply changes...

Thanks!
Comment 8 Alexey 2019-06-29 22:17:46 UTC
gcc testtime.c && ./a.out

TZ=(null)
0=IST 1=GMT timezone=-3600 daylight=1
tm_isdst=   0, tm_yday=  0, tm_wday= 0, 0100-10-10 00:00:00
tm_isdst=   1, tm_yday=313, tm_wday= 4, 0100-10-09 23:00:00

gcc -m32 testtime.c && ./a.out

TZ=(null)
0=IST 1=GMT timezone=-3600 daylight=1
tm_isdst=   0, tm_yday=  0, tm_wday= 0, 0100-10-10 00:00:00
tm_isdst=   1, tm_yday=313, tm_wday= 4, 0100-10-09 23:00:00

Given that, I don't know why the test passes on 64...
Comment 9 Alon Bar-Lev (RETIRED) gentoo-dev 2019-07-01 10:45:24 UTC
OK, this is actually a p11-kit bug... good you found it.
Can you please test this[1] patch?

Thanks!

[1] https://github.com/p11-glue/p11-kit/pull/236/files
Comment 10 Alexey 2019-07-01 18:54:29 UTC
The test has passed on 0.23.12, thanks
Comment 11 Larry the Git Cow gentoo-dev 2019-07-02 05:51:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a252cace3c34490668017794a229f6ddf6a3f7d8

commit a252cace3c34490668017794a229f6ddf6a3f7d8
Author:     Alon Bar-Lev <alonbl@gentoo.org>
AuthorDate: 2019-07-02 05:50:20 +0000
Commit:     Alon Bar-Lev <alonbl@gentoo.org>
CommitDate: 2019-07-02 05:50:56 +0000

    app-crypt/p11-kit: fix date handling
    
    Closes: https://bugs.gentoo.org/show_bug.cgi?id=688460
    Thanks: Alexey
    Signed-off-by: Alon Bar-Lev <alonbl@gentoo.org>
    Package-Manager: Portage-2.3.66, Repoman-2.3.11
    RepoMan-Options: --force

 .../p11-kit/files/p11-kit-0.23.12-mktime.patch     | 26 ++++++++++++++++++++++
 ...it-0.23.12.ebuild => p11-kit-0.23.12-r1.ebuild} |  4 ++++
 ....23.16.1.ebuild => p11-kit-0.23.16.1-r1.ebuild} |  4 ++++
 3 files changed, 34 insertions(+)