aboutsummaryrefslogtreecommitdiffstats
path: root/tests/run-threaded.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* core: Detect bad passphrase error on certificate importIngo Klöcker2021-12-221-1/+2
| | | | | | | | | | | | | | | | | | | | | * src/import.c (gpgme_op_import_result): Check fpr for NULL. (parse_error): New. (import_status_handler): Handle error status line. * doc/gpgme.texi (gpgme_import_status_t): Mention that fpr can be NULL. * tests/gpg/t-import.c (check_result): Check fpr for NULL. * tests/run-threaded.c (delete_impres): Check fpr for NULL. -- When importing an encrypted certificate a wrong passphrase may be entered. In this case gpgsm emits a status line with a bad passphrase error and an "invalid object" error. To make it possible for callers to handle a wrong passphrase error more gracefully, an import status with bad passphrase error is added to the import result for each status line with bad passphrase error. GnuPG-bug-id: 5713
* core: Allow for older compilers.Werner Koch2021-05-121-1/+2
| | | | | | | | | | | | | | | * tests/run-verify.c (main): Remove C99-only syntax. * tests/run-threaded.c (start_keylistings): Ditto. -- Older gcc's do not grok this and there is no real need for it. run-verify.c:324: error: ‘for’ loop initial declarations are only allowed in C99 mode run-verify.c:324: note: use option -std=c99 or -std=gnu99 to compile your code Reported-by: Lars Hecking
* tests: Minor fix to run-threaded.c.Werner Koch2019-06-061-1/+5
| | | | | | | | | | * tests/run-threaded.c (random_data_close): Correct FD test. -- An invalid DS is -1 and not 0; this fix is for correctness and does not chnage anything in the real world. Signed-off-by: Werner Koch <[email protected]>
* tests: Add option "allow-del" to run-threadedAndre Heinecke2019-06-061-0/+74
| | | | | | | | | | | | | | | * tests/run-threaded.c (main): Handle allow-del. (allow-del): New. Variable to allow deletion of keys. (import): Delete key after import if allow-del is set. (delete_impres): Delete keys from an import result. (delete_fpr): Delete a key by fingerprint. -- This is intended to test write access and locking of the keyring by repeatedly importing and deleting pubkeys. It is an option because it might cause keyring corruption etc. so it should be explicitly enabled.
* tests: Implement import in run-threadedAndre Heinecke2019-06-051-0/+36
| | | | | * tests/run-threaded.c (import): New. (do_data_op): Call it.
* tests: Use synced output for error in run-threadedAndre Heinecke2019-06-051-2/+2
| | | | * tests/run-threaded.c (do_data_op): Use synced out macro.
* tests: Avoid variable named the same as a macroAndre Heinecke2019-06-051-8/+8
| | | | | | | | * tests/run-threaded.c (decrypt, verify): Don't use a variable name that is also a macro. -- It just looks confusing and strange at first glance.
* tests,w32: Fix thread creation in run-threadedAndre Heinecke2019-06-051-2/+4
| | | | | * tests/run-threaded.c (create_thread): Check proper return value and not return value of CloseHandle.
* tests: Fix memleak in run-threadedAndre Heinecke2019-02-111-0/+1
| | | | * tests/run-threaded.c (verify): Free msg.
* Add SPDX identifiers to most source filesWerner Koch2018-11-161-18/+19
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* tests: Add run-threaded for multithread testsAndre Heinecke2018-11-151-0/+678
* tests/Makefile.am (run-threaded): Add. * tests/run-threaded.c: New. -- This test is intended to help detect race conditions or other multithread problems. It can also be used to put the whole GnuPG system under extreme load.