tests: Add option "allow-del" to run-threaded
authorAndre Heinecke <aheinecke@gnupg.org>
Thu, 6 Jun 2019 07:19:02 +0000 (09:19 +0200)
committerAndre Heinecke <aheinecke@gnupg.org>
Thu, 6 Jun 2019 07:19:02 +0000 (09:19 +0200)
commite6f28273062ff26344163e219c1b784ae99de980
treede5b5ed7ead8844557fec2804b90569ddc8a0955
parent024a7f75d4b8e017b92a13552b23e7fb1d22a5ce
tests: Add option "allow-del" to run-threaded

* 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/run-threaded.c