#1064486 rnp: FTBFS: Errors while running CTest

#1064486#5
Date:
2024-02-23 00:31:28 UTC
From:
To:
Dear Maintainer,

The package has a ftbfs issue on my local amd64 build:

```
260/260 Test #255: cli_tests-Encryption ..........................................................   Passed   60.86 sec

98% tests passed, 6 tests failed out of 260

Total Test time (real) =  71.61 sec

The following tests FAILED:
         90 - rnp_tests.test_ffi_security_profile (Failed)
        159 - rnp_tests.test_rnp_access (Failed)
        166 - rnp_tests.rnpkeys_generatekey_verifykeyHomeDirNoPermission (Failed)
        174 - rnp_tests.test_key_add_userid (Failed)
        258 - cli_tests-EncryptElgamal (Failed)
        259 - cli_tests-Misc (Failed)
Errors while running CTest
make[1]: *** [Makefile:94: test] Error 8
make[1]: Leaving directory '/<<PKGBUILDDIR>>/build'
dh_auto_test: error: cd build && make -j16 test ARGS\+=--verbose ARGS\+=-j16 returned exit code 2
make: *** [debian/rules:33: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-02-22T22:48:30Z
```

It was failed on riscv64 also, but less test cases than amd64:

```
The following tests FAILED:
	 90 - rnp_tests.test_ffi_security_profile (Failed)
	174 - rnp_tests.test_key_add_userid (Failed)
	251 - cli_tests-EncryptElgamal (Failed)
Errors while running CTest
make[1]: *** [Makefile:94: test] Error 8
```

The full buildd log is here:
https://buildd.debian.org/status/fetch.php?pkg=rnp&arch=riscv64&ver=0.17.0-3%2Bb2&stamp=1708576037&raw=0

#1064486#10
Date:
2024-04-20 12:12:11 UTC
From:
To:
The following tests FAILED:
         83 - rnp_tests.test_ffi_decrypt_wrong_mpi_bits (Failed)
         90 - rnp_tests.test_ffi_security_profile (Failed)
        174 - rnp_tests.test_key_add_userid (Failed)
        254 - cli_tests-EncryptElgamal (Failed)

Upstream's GIT head does not fail. I tried bisecting but gave up, there
are too many errors, especially when gtest was integrated and tried to
build itself with -Werror. Ouch.

cu Andreas

#1064486#15
Date:
2024-05-04 19:14:12 UTC
From:
To:
found 1064486 0.16.3-1
tags 1064486 + ftbfs bookworm trixie sid
thanks

El 20/4/24 a las 14:12, Andreas Metzler escribió:

Hello. This is also happening in bookworm, I assume that for the same underlying reason,
so I'm adding the bookworm version.

I've put several build logs (both successful and failed, to compare) here:

https://people.debian.org/~sanvila/build-logs/bookworm/

Note that in those build logs I'm using different sbuild backends, but I believe
they are not the reason why now it fails while it did not before.
I suspect of openssl, but I have not made any test to confirm.

Thanks.

#1064486#24
Date:
2024-05-05 16:29:48 UTC
From:
To:
[...]


Hmm. Perhaps a timebomb, i.e. one of the keys used in the testsuite
expired.

cu Andreas

#1064486#29
Date:
2024-05-06 17:13:14 UTC
From:
To:
Control: tags -1 fixed-upstream


Hello,

Indeed it is a timebomb. Since 0.17.1 works I had a look at
git log src/tests/key-add-userid.cpp
and found

commit 07745e2e5fa6078b95fb5c24575929eb2a19ca03
Author: Nickolay Olshevsky <o.nickolay@gmail.com>
Date:   Fri Jan 19 16:05:32 2024 +0200

    Update tests to match SHA1 cutoff date for key signatures.
[...]
     selfsig0.primary = false;
+    auto curtime = global_ctx.time();
+    global_ctx.set_time(curtime > SHA1_KEY_FROM ? SHA1_KEY_FROM - 100 : 0);


SHA1_KEY_FROM is #defined in src/tests/support.h to 1705629600, which
was Fri Jan 19 03:00:00 CET 2024.

cu Andreas