GNOME Bugzilla – Bug 771052
test-suite failures with modern gnupg 2.1
Last modified: 2019-02-22 11:57:53 UTC
Recently Debian switched /usr/bin/gnupg to be provided by "modern" gnupg 2.1.x This makes the test-suite fail: PASS: test-gnupg-collection 1 /gcr/gnupg-collection/properties gpg: please do a --check-trustdb gpg: starting migration from earlier GnuPG versions gpg: porting secret keys from '/tmp/gcr-tests.RAVKNY/secring.gpg' to gpg-agent gpg: key 4842D952AFC000FD: secret key imported gpg: key 268FEE686262C395: secret key imported gpg: migration succeeded gpg: please do a --check-trustdb rm: cannot remove '/tmp/gcr-tests.RAVKNY/private-keys-v1.d': Is a directory ** ERROR:gcr/test-gnupg-collection.c:120:teardown: assertion failed (error == NULL): Child process exited with code 1 (g-spawn-exit-error-quark, 1) FAIL: test-gnupg-collection 2 /gcr/gnupg-collection/load gpg: please do a --check-trustdb gpg: starting migration from earlier GnuPG versions ** ERROR:gcr/test-gnupg-collection.c:206:test_reload: assertion failed: (test->result) FAIL: test-gnupg-collection 3 /gcr/gnupg-collection/reload ERROR: test-gnupg-collection process failed: 250 PASS: test-gnupg-process 1 /gcr/gnupg-process/create PASS: test-gnupg-process 2 /gcr/gnupg-process/run_simple_output PASS: test-gnupg-process 3 /gcr/gnupg-process/run_simple_error PASS: test-gnupg-process 4 /gcr/gnupg-process/run_status_and_output PASS: test-gnupg-process 5 /gcr/gnupg-process/run_status_and_attribute PASS: test-gnupg-process 6 /gcr/gnupg-process/run_arguments_and_environment PASS: test-gnupg-process 7 /gcr/gnupg-process/run_with_homedir PASS: test-gnupg-process 8 /gcr/gnupg-process/run_with_input_and_output PASS: test-gnupg-process 9 /gcr/gnupg-process/run_fail_exit PASS: test-gnupg-process 10 /gcr/gnupg-process/run_fail_signal PASS: test-gnupg-process 11 /gcr/gnupg-process/run_and_cancel PASS: test-gnupg-process 12 /gcr/gnupg-process/run_and_cancel_later PASS: test-gnupg-process 13 /gcr/gnupg-process/run_bad_executable PASS: test-system-prompt 1 /gcr/system-prompt/open PASS: test-system-prompt 2 /gcr/system-prompt/open-failure PASS: test-system-prompt 3 /gcr/system-prompt/password PASS: test-system-prompt 4 /gcr/system-prompt/password-async PASS: test-system-prompt 5 /gcr/system-prompt/password-cancel PASS: test-system-prompt 6 /gcr/system-prompt/password-in-exchange PASS: test-system-prompt 7 /gcr/system-prompt/password-custom-exchange PASS: test-system-prompt 8 /gcr/system-prompt/confirm PASS: test-system-prompt 9 /gcr/system-prompt/confirm-async PASS: test-system-prompt 10 /gcr/system-prompt/confirm-cancel PASS: test-system-prompt 11 /gcr/system-prompt/properties PASS: test-system-prompt 12 /gcr/system-prompt/properties-unset PASS: test-system-prompt 13 /gcr/system-prompt/properties-reset PASS: test-system-prompt 14 /gcr/system-prompt/close PASS: test-system-prompt 15 /gcr/system-prompt/close-cancels PASS: test-system-prompt 16 /gcr/system-prompt/after-close-dismisses PASS: test-system-prompt 17 /gcr/system-prompt/close-from-prompter PASS: test-system-prompt 18 /gcr/system-prompt/watch-cancels ============================================================================ Testsuite summary for gcr 3.20.0 ============================================================================ # TOTAL: 597 # PASS: 594 # SKIP: 0 # XFAIL: 0 # FAIL: 2 # ERROR: 1 The first failure seems rather simple: rm: cannot remove '/tmp/gcr-tests.RAVKNY/private-keys-v1.d': Is a directory ** ERROR:gcr/test-gnupg-collection.c:120:teardown: assertion failed (error == NULL): Child process exited with code 1 (g-spawn-exit-error-quark, 1) The teardown function in gcr/test-gnupg-collection.c uses cmd = g_strdup_printf ("rm -f %s/*", test->directory); With gnupg 2.1 I have those additional files directories: /tmp/gcr-tests.WZ4YNY/.gpg-v21-migrated ← file /tmp/gcr-tests.WZ4YNY/private-keys-v1.d/ ← directory Those need to be cleaned up, as otherwise the g_rmdir fails. The second failure is not so obvious to me, all I get in the test-suite.log is ERROR:gcr/test-gnupg-collection.c:206:test_reload: assertion failed: (test->result) FAIL: test-gnupg-collection 3 /gcr/gnupg-collection/reload Would be great if you can have a look.
Created attachment 335101 [details] test-suite.log
Created attachment 337263 [details] [review] tests: fix collection tests to work with gpg 2.1
FYI Using 2500 is just a random number since apparently 0.5 sec isn't enough when gpg 2.1 does it's conversion. And if 0.5s isn't enough on the super-computer doing the rebuild tests, then we probably needs some extra margin for slower archs in Debian. (Not even sure if 2.5s is enough, but hopefully.)
The other timeouts in that test use 500000 (500s). That seems like too much, but 2.5s is still failing for some people (c.f. https://bugs.debian.org/846728). So please consider increasing it to 500000 for consistency and to be in the safe side.
Thanks Andreas for this fix. Pushing to git master. Emilio ... if you have follow up patches, they're most certainly welcome.
Attachment 337263 [details] pushed as a861934 - tests: fix collection tests to work with gpg 2.1