gpgme throws a testsuite error on 32bit archs with 64bit time-t (i.e. with -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 in CPPFLAGS):
********* Start testing of AddExistingSubkeyJobTest ********* Config: Using QtTest library 5.15.15, Qt 5.15.15 (arm-little_endian-ilp32-eabi-hardfloat shared (dynamic) release build; by GCC 14.2.0), debian unknown PASS : AddExistingSubkeyJobTest::initTestCase() PASS : AddExistingSubkeyJobTest::testAddExistingSubkeyAsync() PASS : AddExistingSubkeyJobTest::testAddExistingSubkeySync() FAIL! : AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration() Compared values are not the same Actual (result.code()) : 0 Expected (static_cast<int>(GPG_ERR_INV_TIME)): 161 Loc: [../../../../lang/qt/tests/t-addexistingsubkey.cpp(238)] PASS : AddExistingSubkeyJobTest::cleanupTestCase() Totals: 4 passed, 1 failed, 0 skipped, 0 blacklisted, 3564ms ********* Finished testing of AddExistingSubkeyJobTest *********
Adding
printf("DEBUG1 sourceSubkey.expirationTime=%lli\n", sourceSubkey.expirationTime());
to lang/qt/tests/t-addexistingsubkey.cpp L268 after
const auto result = job->exec(key, sourceSubkey);
shows this output:
DEBUG1 sourceSubkey.expirationTime=-192479296
whereas amd64 shows
DEBUG1 sourceSubkey.expirationTime=4102488000
Looking at respective key we find
sub cv25519 2022-01-13 [E] [expires: 2100-01-01]
which matches
ametzler@amdahl:~$ LANG=C date -d @4102488000 Fri Jan 1 12:00:00 UTC 2100
The "-192479296" looks like an overflow. armhf has ULONG_MAX[4294967295] and LONG_MAX[2147483647] and 4294967295-4102488000+1=192479296 (ULONG_MAX minus correct time_t +1 = wrong negative date value).