After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771052 - test-suite failures with modern gnupg 2.1
test-suite failures with modern gnupg 2.1
Status: RESOLVED FIXED
Product: gcr
Classification: Core
Component: General
git master
Other Linux
: Normal major
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-09-08 12:11 UTC by Michael Biebl
Modified: 2019-02-22 11:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test-suite.log (430.80 KB, text/plain)
2016-09-08 12:17 UTC, Michael Biebl
  Details
tests: fix collection tests to work with gpg 2.1 (1.42 KB, patch)
2016-10-09 10:19 UTC, Andreas Henriksson
none Details | Review

Description Michael Biebl 2016-09-08 12:11:04 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.
Comment 1 Michael Biebl 2016-09-08 12:17:52 UTC
Created attachment 335101 [details]
test-suite.log
Comment 2 Andreas Henriksson 2016-10-09 10:19:29 UTC
Created attachment 337263 [details] [review]
tests: fix collection tests to work with gpg 2.1
Comment 3 Andreas Henriksson 2016-10-09 10:23:26 UTC
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.)
Comment 4 Emilio Pozuelo Monfort 2017-02-05 10:27:41 UTC
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.
Comment 5 Stef Walter 2017-02-06 10:52:14 UTC
Thanks Andreas for this fix. Pushing to git master.

Emilio ... if you have follow up patches, they're most certainly welcome.
Comment 6 Stef Walter 2017-02-06 10:52:20 UTC
Attachment 337263 [details] pushed as a861934 - tests: fix collection tests to work with gpg 2.1