-
Notifications
You must be signed in to change notification settings - Fork 123
gpgme: working gpgme unit test prototype #2035
Conversation
That was really quick! Thank you for testing this! |
@ingwinlu Could you please help me to install @markus2330 I started to work on this last week but did not find time, so far, to complete it. |
I have a running unit test that creates a 1024 bit RSA key by utilizing |
jenkins build libelektra please |
jenkins build clang please |
I may have broken something. Sorry! |
That is on purpose. Only a single build is allowed to create docker images at a time (to avoid clogging the build system). This is further refined in #2003. I guess you had old builds running and hence the new ones were blocked. This is also improved in #2003 were new builds auto cancel the old ones. There should be debian packages on sid and stretch for gpgme-dev: https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=libgpgme-dev What other questions did you have? |
Everything works 😃 Thank you for your quick response! |
#2003 is merged now. @ingwinlu Does @petermax2 now need to rebase or will the changes take effect immediately? |
to test how the build server responds
jenkins build libelektra please |
So we have a working key generation. GPGME created three 512 bit RSA private keys with sub-keys. 🎉
I wanted to repeat the test more often, but ran into a time-out. So far, |
key generation is hard on the build server because there is only very
little entropy
…On 1 June 2018 at 07:05, Peter Nirschl ***@***.***> wrote:
So we have a working key generation. GPGME created three 512 bit RSA
private keys with sub-keys. 🎉
139/223 Test #99: testmod_gpgme ............................ Passed 96.54 sec
I wanted to repeat the test more often, but ran into a time-out.
So far, gpgme looks to be promising. Maybe it would be worth the effort
to replace my gpg.c module with gpgme?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2035 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEOv-kD-A1-hOaQNYZkbk_y2QQN76aSCks5t4MubgaJpZM4UVa7u>
.
|
An interesting case would be where the current test cases fail and only gpgme succeeds. Maybe you can run all crypto test cases in a loop until they fail? ( And afaik key generation isn't something our plugins do, so I would not test that. |
I added the test case, which fails on the build server (for the |
Unfortunately the build server is down for the weekend. I think we need to repeat this more than 20 times. Afaik in all build jobs of the last weeks the failure happened only once. And I think you need to repeat the whole test case (with ctest) so that actually a new TMPDIR/HOME is used. |
|
||
gpgme_check_version (NULL); | ||
setlocale (LC_ALL, ""); | ||
gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not globally change anything (and especially not locales, this might make applications dysfunctional). If we set it, it should only be done for the gpgme context but why set it at all?
It looks like gpgme is engineered properly, as far as I saw it everything seems to be operating only on its context (and never globally, except in gpgme_set_locale if a NULL pointer is passed).
It might be useful to allocate the gpgme context only once (in open), it might be faster then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The gpgme
manual recommends to set the locale for initializing gpgme
. I am not sure why they recommend it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine for prototyping but probably should not be used like this in any released software.
What stands against creating a gpgme context to solve the issue (and not have to rely on maybe wonky locale)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What stands against creating a gpgme context to solve the issue (and not have to rely on maybe wonky locale)?
It would lead to yet another configuration setting of the plugin. If the locales are broken, pinentries shown by other applications will be broken, too, won't they?
But if we set the locales for the context is a minor thing. I only wanted to note that we must not set it globally.
The build server is currently configured to kill build jobs after a certain time of inactivity on stdout. This is to avoid zombie jobs. The current key generation takes long enough without producing output that this policy is enforced. |
I close this PR for now and continue the work later on. |
Affects #896 , #1973 , #2008
Purpose
This is just a unit test that is supposed to run on the build server.
PLEASE DO NOT MERGE!!
Checklist
Check relevant points but please do not remove entries.
For docu fixes, spell checking, and similar nothing
needs to be checked.
@markus2330 please review my pull request