Page MenuHome GnuPG

GPGME: Qt test t-various fails on i386
Closed, DuplicatePublic


With latest GPGME 1.16.0 there is a new test failure not observed previously on any earlier versions. This is with Qt test t-various which fails on 32-bit (i386) with the following output:

FAIL!  : TestVarious::testSignKeyWithExpiration() Compared values are not the same
   Actual   (expirationDate)   : 1969/12/31
   Expected (QDate(2106, 2, 6)): 2106/02/06
   Loc: [../../../../lang/qt/tests/t-various.cpp(359)]

Please see the included external link for a build attempted recently on Launchpad which demonstrates the above failure, with the full build log of course downloadable from the link.

The test failure appears to be due integer overflow on the test, which can be fixed by reverting the use of QDateTime::fromSecsSinceEpoch to QDateTime::fromTime_t (now deprecated, but still seemingly works fine). Attached is a patch that fixes the problem for me with all currently supported versions of Ubuntu (Launchpad PPA has successful builds for i386 with the patch used).

[off-topic] Thanks for all the great work on GnuPG over so many years now!