libelektra: fcrypt / gpgme / crypto: test case fails
Fcrypt test cases failed on master:
122/131 MemCheck #93: testmod_fcrypt ...................***Failed 29.99 sec
OK closing connection
Terminating gpg-agent returned with status “256”FCRYPT TESTS
==================
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/src/plugins/fcrypt/testmod_fcrypt.c:161: error in test_gpg: failed to install the GPG test key
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/src/plugins/fcrypt/testmod_fcrypt.c:189: error in test_file_crypto_operations: kdb set failed
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/src/plugins/fcrypt/testmod_fcrypt.c:190: error in test_file_crypto_operations: file content did not change during encryption
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/src/plugins/fcrypt/testmod_fcrypt.c:193: error in test_file_crypto_operations: kdb get (pregetstorage) failed
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/src/plugins/fcrypt/testmod_fcrypt.c:197: error in test_file_crypto_operations: kdb get (postgetstorage) failed
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/src/plugins/fcrypt/testmod_fcrypt.c:198: error in test_file_crypto_operations: postgetstorage did not encrypt the file again
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/src/plugins/fcrypt/testmod_fcrypt.c:233: error in test_file_signature_operations: kdb set failed
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/src/plugins/fcrypt/testmod_fcrypt.c:234: error in test_file_signature_operations: file content did not change during encryption
/home/jenkins/workspace/libelektra_master-Q2SIBK3KE2NBEMJ4WVGJXAXCSCB77DUBUULVLZDKHQEV3WNDXBMA/src/plugins/fcrypt/testmod_fcrypt.c:237: error in test_file_signature_operations: kdb get failed
fcrypt Results: 39 Tests done — 9 errors.
@petermax2 any idea?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 23 (23 by maintainers)
Commits related to this issue
- crypto: add shut-down logic in testmod_crypto Try to kill the gpg-agent if the shutdown of the agent should fail. This is an attempt to resolve #2341 . — committed to petermax2/libelektra by petermax2 4 years ago
- tests: prodive plugin function for shutting down gpg-agent This should resolve possible memory leak triggers introduced with #3404 (original issue: #2341 ). — committed to petermax2/libelektra by petermax2 4 years ago
- tests: rewrite gpg-agent shutdown code to use fork () and execv () instead of system (). See #2341 for full discussion. — committed to petermax2/libelektra by petermax2 4 years ago
- tests: rewrite gpg-agent shutdown code to use fork () and execv () instead of system (). See #2341 for full discussion. — committed to petermax2/libelektra by petermax2 4 years ago
- tests: rewrite gpg-agent shutdown code to use fork () and execv () instead of system (). See #2341 for full discussion. — committed to petermax2/libelektra by petermax2 4 years ago
- tests: rewrite gpg-agent shutdown code to use fork () and execv () instead of system (). See #2341 for full discussion. — committed to petermax2/libelektra by petermax2 4 years ago
- gpgme: prevent double-initialization by unit test This contribution is related to #2341 . — committed to petermax2/libelektra by petermax2 4 years ago
- gpgme: prevent double-initialization by unit test This contribution is related to #2341 . — committed to petermax2/libelektra by petermax2 4 years ago
- gpgme: prevent double-initialization by unit test This contribution is related to #2341 . — committed to petermax2/libelektra by petermax2 4 years ago
@petermax2 rewrote parts of the crypto tests and moved them to separate CI jobs (
debian-buster-cryptopluginsanddebian-stretch-cryptoplugins).I have not seen these tests fail since those improvements. I think it can be safely closed.
I saw this sporadically while working on a PR. It vanished after rebuilding.
I think I also saw it on my private jenkins under extremely high load. Is it at all possible that something times out here?
Glad to hear, that it’s working now. Thank you for the feedback!
https://github.com/ElektraInitiative/libelektra/blob/2e6a5795fde79158f3102c04859dc1091a9dc1d8/src/plugins/crypto/gpgagent_teardown.h#L15
I will rewrite this section to use
execvin order to gain a better understanding of what’s happening on the build server.gpgme (or gpgme in combination with valgrind) seems to cause problems if the output of stdout and stderr is being redirected.
I guess this would explain why the test output is written to the log files multiple times.
I think it’s the same (or very similar) gpg-related error. I don’t think it is necessary to open another issue.
Please ping me if the error occurs again.
The error occurred again, I’m still researching.
We also observed the exact same error caused by
testmod_cryptoon Debian Unstable during the last PR (#3395 ).It might have, but according to the description of issue #2439
testmod_fcryptonly fails regularly on the Jenkins build server.Maybe! Depending on the implementation of libassuan.