aboutsummaryrefslogtreecommitdiffstats
path: root/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* gpgscm: Generalize 'for-each-p'.Justus Winter2016-12-081-7/+8
| | | | | | | | * tests/gpgscm/tests.scm (for-each-p): Generalize to N lists like for-each. (for-each-p'): Likewise. Signed-off-by: Justus Winter <[email protected]>
* tests: Add test for '--quick-set-expire'.Justus Winter2016-12-071-0/+22
| | | | | | * tests/openpgp/quick-key-manipulation.scm: Test '--quick-set-expire'. Signed-off-by: Justus Winter <[email protected]>
* tests: Improve quick key manipulation test.Justus Winter2016-12-071-7/+1
| | | | | | | * tests/openpgp/quick-key-manipulation.scm: Do not update the trust database, rather be more specific when filtering the user ids. Signed-off-by: Justus Winter <[email protected]>
* tests: Add test importing a revocation certificate.Justus Winter2016-12-063-1/+48
| | | | | | | | * tests/openpgp/Makefile.am (XTESTS): Add new test. * tests/openpgp/import-revocation-certificate.scm: New file. * tests/openpgp/samplemsgs/revoke-2D727CC768697734.asc: Likewise. Signed-off-by: Justus Winter <[email protected]>
* tests: Rename 'error' to 'fail'.Justus Winter2016-12-0619-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/tests.scm (error): Rename to 'fail'. 'error' is a primitive function (an opcode) of the TinySCHEME vm, and 'error' is also defined by R6RS. Better avoid redefining that. Fix all call sites. * tests/openpgp/4gb-packet.scm: Adapt. * tests/openpgp/decrypt-multifile.scm: Likewise. * tests/openpgp/ecc.scm: Likewise. * tests/openpgp/export.scm: Likewise. * tests/openpgp/gpgtar.scm: Likewise. * tests/openpgp/gpgv-forged-keyring.scm: Likewise. * tests/openpgp/import.scm: Likewise. * tests/openpgp/issue2015.scm: Likewise. * tests/openpgp/issue2346.scm: Likewise. * tests/openpgp/issue2419.scm: Likewise. * tests/openpgp/key-selection.scm: Likewise. * tests/openpgp/mds.scm: Likewise. * tests/openpgp/multisig.scm: Likewise. * tests/openpgp/setup.scm: Likewise. * tests/openpgp/signencrypt.scm: Likewise. * tests/openpgp/ssh-import.scm: Likewise. * tests/openpgp/tofu.scm: Likewise. * tests/openpgp/verify.scm: Likewise. Signed-off-by: Justus Winter <[email protected]>
* tests: Remove debugging display.Justus Winter2016-12-061-1/+0
| | | | | | * tests/openpgp/tofu.scm: Remove debugging display. Signed-off-by: Justus Winter <[email protected]>
* tests: Update distributed filesNeal H. Walfield2016-12-061-2/+21
| | | | | | | | | | | | | | | | | | | | | * tests/openpgp/Makefile.am (TEST_FILES): Remove tofu-keys.asc, tofu-keys-secret.asc, tofu-2183839A-1.txt, tofu-BC15C85A-1.txt and tofu-EE37CF96-1.txt. Add tofu/conflicting/1C005AF3.gpg, tofu/conflicting/1C005AF3-secret.gpg, tofu/conflicting/1C005AF3-1.txt, tofu/conflicting/1C005AF3-2.txt, tofu/conflicting/1C005AF3-3.txt, tofu/conflicting/1C005AF3-4.txt, tofu/conflicting/1C005AF3-5.txt, tofu/conflicting/B662E42F.gpg, tofu/conflicting/B662E42F-secret.gpg, tofu/conflicting/B662E42F-1.txt, tofu/conflicting/B662E42F-2.txt, tofu/conflicting/B662E42F-3.txt, tofu/conflicting/B662E42F-4.txt, tofu/conflicting/B662E42F-5.txt, tofu/conflicting/BE04EB2B.gpg, tofu/conflicting/BE04EB2B-secret.gpg, tofu/conflicting/BE04EB2B-1.txt, tofu/conflicting/BE04EB2B-2.txt, tofu/conflicting/BE04EB2B-3.txt, tofu/conflicting/BE04EB2B-4.txt, tofu/conflicting/BE04EB2B-5.txt and tofu/conflicting/README. -- Signed-off-by: Neal H. Walfield <[email protected]> Fixes-commit: d5b18d6
* tests: Change (interactive-shell) to start an interactive shellNeal H. Walfield2016-12-061-1/+1
| | | | | | | * tests/gpgscm/tests.scm (interactive-shell): Start an interactive shell. Signed-off-by: Neal H. Walfield <[email protected]>
* tests: Check the signature count in the TOFU TFS record.Neal H. Walfield2016-12-061-0/+56
| | | | | | | * tests/openpgp/tofu.scm: Check the signature count in the TOFU TFS record. Signed-off-by: Neal H. Walfield <[email protected]>
* tests: Replace data used by the TOFU conflict test.Neal H. Walfield2016-12-0628-192/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/openpgp/tofu-2183839A-1.txt: Remove file. * tests/openpgp/tofu-BC15C85A-1.txt: Remove file. * tests/openpgp/tofu-EE37CF96-1.txt: Remove file. * tests/openpgp/tofu-keys-secret.asc: Remove file. * tests/openpgp/tofu-keys.asc: Remove file. * tests/openpgp/tofu/conflicting/1C005AF3.gpg: New file. * tests/openpgp/tofu/conflicting/1C005AF3-secret.gpg: New file. * tests/openpgp/tofu/conflicting/1C005AF3-1.txt: New file. * tests/openpgp/tofu/conflicting/1C005AF3-2.txt: New file. * tests/openpgp/tofu/conflicting/1C005AF3-3.txt: New file. * tests/openpgp/tofu/conflicting/1C005AF3-4.txt: New file. * tests/openpgp/tofu/conflicting/1C005AF3-5.txt: New file. * tests/openpgp/tofu/conflicting/B662E42F.gpg: New file. * tests/openpgp/tofu/conflicting/B662E42F-secret.gpg: New file. * tests/openpgp/tofu/conflicting/B662E42F-1.txt: New file. * tests/openpgp/tofu/conflicting/B662E42F-2.txt: New file. * tests/openpgp/tofu/conflicting/B662E42F-3.txt: New file. * tests/openpgp/tofu/conflicting/B662E42F-4.txt: New file. * tests/openpgp/tofu/conflicting/B662E42F-5.txt: New file. * tests/openpgp/tofu/conflicting/BE04EB2B.gpg: New file. * tests/openpgp/tofu/conflicting/BE04EB2B-secret.gpg: New file. * tests/openpgp/tofu/conflicting/BE04EB2B-1.txt: New file. * tests/openpgp/tofu/conflicting/BE04EB2B-2.txt: New file. * tests/openpgp/tofu/conflicting/BE04EB2B-3.txt: New file. * tests/openpgp/tofu/conflicting/BE04EB2B-4.txt: New file. * tests/openpgp/tofu/conflicting/BE04EB2B-5.txt: New file. * tests/openpgp/tofu/conflicting/README: New file. * tests/openpgp/tofu.scm: Update accordingly. -- Signed-off-by: Neal H. Walfield <[email protected]> There are two motivations for this change. First, we decided that test data should live in a subdirectory rather than in tests/openpgp. Second, secret key material is password protected, and I don't remember the password that I used. (The new data is not password protected.) I have also added some new examples of signed messages.
* tests: New test for '--enarmor' and '--dearmor'.Justus Winter2016-12-052-0/+32
| | | | | | | * tests/openpgp/Makefile.am (XTESTS): Add new test. * tests/openpgp/enarmor.scm: New file. Signed-off-by: Justus Winter <[email protected]>
* tests,build: Fix distcheck.Justus Winter2016-12-011-1/+3
| | | | | | | | * tests/openpgp/Makefile.am (sample_msgs): Add messages required for the new test 'verify-multifile.scm'. Fixes-commit: 12af8e84a32df728462da09a00a8bec24a487720 Signed-off-by: Justus Winter <[email protected]>
* tests: Add test for '--verify --multifile'.Justus Winter2016-12-012-0/+42
| | | | | | | * tests/openpgp/Makefile.am (XTESTS): Add new test. * tests/openpgp/verify-multifile.scm: New file. Signed-off-by: Justus Winter <[email protected]>
* tests: Add test for '--encrypt --multifile'.Justus Winter2016-11-302-0/+40
| | | | | | | * tests/openpgp/Makefile.am (XTESTS): Add new test. * tests/openpgp/encrypt-multifile.scm: New file. Signed-off-by: Justus Winter <[email protected]>
* tests: Add test for '--decrypt --multifile'.Justus Winter2016-11-292-0/+48
| | | | | | | * tests/openpgp/Makefile.am (XTESTS): Add new test. * tests/openpgp/decrypt-multifile.scm: New file. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Avoid truncating pointers.Justus Winter2016-11-291-2/+3
| | | | | | | * tests/gpgscm/scheme.c (_alloc_cellseg): Avoid truncating pointers on systems where sizeof(unsigned long) < sizeof(void *). Signed-off-by: Justus Winter <[email protected]>
* tests: Add test for the ssh key export.Justus Winter2016-11-284-1/+147
| | | | | | | | | | | * tests/openpgp/Makefile.am (XTESTS): Add new test. (sample_keys): Add new files. * tests/openpgp/samplekeys/authenticate-only.pub.asc: New file. * tests/openpgp/samplekeys/authenticate-only.sec.asc: Likewise. * tests/openpgp/ssh-export.scm: Likewise. GnuPG-bug-id: 2848 Signed-off-by: Justus Winter <[email protected]>
* tests: Rename ssh test.Justus Winter2016-11-282-1/+1
| | | | | | | * tests/openpgp/ssh.scm: Rename to 'ssh-import.scm'. * tests/openpgp/Makefile (XTESTS): Likewise. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Make 'reverse' compatible with 'reverse_in_place'.Justus Winter2016-11-231-4/+4
| | | | | | | | * tests/gpgscm/scheme.c (reverse): Update prototype, add terminator argument. (opexe_4): Update callsite. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Clean sweeped cells.Justus Winter2016-11-231-2/+2
| | | | | | * tests/gpgscm/scheme.c (gc): Zero typeflag and car of free cells. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix initialization of 'sink'.Justus Winter2016-11-231-1/+1
| | | | | | | * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Also initialize cdr. Signed-off-by: Justus Winter <[email protected]>
* g10: If the set of UTKs changes, invalidate any changed policies.Neal H. Walfield2016-11-221-0/+21
| | | | | | | | | | | | | | | | * g10/trustdb.c (tdb_utks): New function. * g10/tofu.c (check_utks): New function. (initdb): Call it. * tests/openpgp/tofu.scm: Modify test to check the effective policy of keys whose effective policy changes when we change the set of UTKs. -- Signed-off-by: Neal H. Walfield <[email protected]> If the set of ultimately trusted keys changes, then it is possible that a binding's effective policy changes. To deal with this, we detect when the set of ultimately trusted keys changes and invalidate all cached policies.
* gpgscm: Refactor.Justus Winter2016-11-221-6/+6
| | | | | | * tests/gpgscm/scheme.c (opexe_0): Reduce code duplication. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix property lists.Justus Winter2016-11-222-32/+56
| | | | | | | | | | | | * tests/gpgscm/opdefines.h (put, get): Check arguments. Also rename to 'set-symbol-property' and 'symbol-property', the names used by Guile, because put and get are too unspecific. * tests/gpgscm/scheme.c (hasprop): Only symbols have property lists. (get_property): New function. (set_property): Likewise. (opexe_4): Use the new functions. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix installation of error handler.Justus Winter2016-11-221-0/+1
| | | | | | | * tests/gpgscm/ffi.scm: Set '*error-hook*' again so that the interpreter will use our function. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Use a static pool of cells for small integers.Justus Winter2016-11-223-19/+108
| | | | | | | | | | | | | | | | | | * tests/gpgscm/scheme-private.h (struct scheme): New fields for the static integer cells. * tests/gpgscm/scheme.c (_alloc_cellseg): New function. (alloc_cellseg): Use the new function. (MAX_SMALL_INTEGER): New macro. (initialize_small_integers): New function. (mk_small_integer): Likewise. (mk_integer): Return a small integer if possible. (_s_return): Do not free 'op' if it is a small integer. (s_save): Use a small integer to box the opcode. (scheme_init_custom_alloc): Initialize small integers. (scheme_deinit): Free chunk of small integers. * tests/gpgscm/scheme.h (USE_SMALL_INTEGERS): New macro. Signed-off-by: Justus Winter <[email protected]>
* tests: Delay querying the avaliable algorithms.Justus Winter2016-11-227-16/+17
| | | | | | | | | | | | | * tests/openpgp/defs.scm: Set verbosity earlier, turn 'all-*-algos' into promises. * tests/openpgp/conventional-mdc.scm: Force the promises. * tests/openpgp/conventional.scm: Likewise. * tests/openpgp/encrypt-dsa.scm: Likewise. * tests/openpgp/encrypt.scm: Likewise. * tests/openpgp/gpgtar.scm: Likewise. * tests/openpgp/sigs.scm: Likewise. Signed-off-by: Justus Winter <[email protected]>
* g10: Cache the effective policy. Recompute it when required.Neal H. Walfield2016-11-211-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/tofu.c (initdb): Add column effective_policy to the bindings table. (record_binding): New parameters effective_policy and set_conflict. Save the effective policy. If SET_CONFLICT is set, then set conflict according to CONFLICT. Otherwise, preserve the current value of conflict. Update callers. (get_trust): Don't compute the effective policy here... (get_policy): ... do it here, if it was not cached. Take new parameters, PK, the public key, and NOW, the time that the operation started. Update callers. (show_statistics): New parameter PK. Pass it to get_policy. Update callers. (tofu_notice_key_changed): New function. * g10/gpgv.c (tofu_notice_key_changed): New stub. * g10/import.c (import_revoke_cert): Take additional argument CTRL. Pass it to keydb_update_keyblock. * g10/keydb.c (keydb_update_keyblock): Take additional argument CTRL. Update callers. [USE_TOFU]: Call tofu_notice_key_changed. * g10/test-stubs.c (tofu_notice_key_changed): New stub. * tests/openpgp/tofu.scm: Assume that manually setting a binding's policy to auto does not cause the tofu engine to forget about any conflict. -- Signed-off-by: Neal H. Walfield <[email protected]> We now store the computed policy in the tofu DB (in the effective_policy column of the bindings table) to avoid computing it every time, which is expensive. Further, policy is never overridden in case of a conflict. Instead, we detect a conflict if CONFLICT is not empty. This change is backwards compatible to existing DBs. The only minor incompatibility is that unresolved conflicts won't be automatically resolved in case we import a direct signature, or cross signatures.
* gpgscm: Re-enable the garbage collector in case of errors.Justus Winter2016-11-171-1/+3
| | | | | | | * tests/gpgscm/scheme.c (opexe_0): Enable gc before calling 'Error_1'. Fixes-commit: 83c184a66b73f312425b01008f0495610e5329a4 Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix string.Justus Winter2016-11-171-1/+1
| | | | | | * tests/gpgscm/scheme.c (type_to_string): Fix string. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Mark cells requiring finalization.Justus Winter2016-11-151-5/+6
| | | | | | | | | | | | | | | * tests/gpgscm/scheme.c (T_FINALIZE): New macro. (mk_port): Use the new macro. (mk_foreign_object): Likewise. (mk_counted_string): Likewise. (mk_empty_string): Likewise. (gc): Only call 'finalize_cell' for cells with the new flag. -- This speeds up the sweep phase of the garbage collector considerably because most cells do not require finalization. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Recover more cells.Justus Winter2016-11-151-0/+1
| | | | | | | | * tests/gpgscm/scheme.c (_s_return): Recover the cell holding the opcode. Fixes-commit: e0cbd3389e2dd6ec19ee3a4c7bad81fa0f1907f5 Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Avoid cell allocation overhead.Justus Winter2016-11-142-44/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/scheme-private.h (struct scheme): New fields 'inhibit_gc', 'reserved_cells', and 'reserved_lineno'. * tests/gpgscm/scheme.c (GC_ENABLED): New macro. (USE_GC_LOCKING): Likewise. (gc_reservations): Likewise. (gc_reservation_failure): New function. (_gc_disable): Likewise. (gc_disable): New macro. (gc_enable): Likewise. (gc_enabled): Likewise. (gc_consume): Likewise. (get_cell_x): Consume reserved cell if garbage collection is disabled. (_get_cell): Assert that gc is enabled. (get_cell): Only record cell in the list of recently allocated cells if gc is enabled. (get_vector_object): Likewise. (gc): Assert that gc is enabled. (s_return): Add comment, adjust call to '_s_return'. (s_return_enable_gc): New macro. (_s_return): Add flag 'enable_gc' and re-enable gc if set. (oblist_add_by_name): Use the new facilities to protect the allocations. (new_frame_in_env): Likewise. (new_slot_spec_in_env): Likewise. (s_save): Likewise. (opexe_0): Likewise. (opexe_1): Likewise. (opexe_2): Likewise. (opexe_5): Likewise. (opexe_6): Likewise. (scheme_init_custom_alloc): Initialize the new fields. -- Every time a cell is allocated, the interpreter may run out of free cells and do a garbage collection. This is problematic because it might garbage collect objects that have been allocated, but are not yet made available to the interpreter. Previously, we would plug such newly allocated cells into the list of newly allocated objects rooted at car(sc->sink), but that requires allocating yet another cell increasing pressure on the memory management system. A faster alternative is to preallocate the cells needed for an operation and make sure the garbage collection is not run until all allocated objects are plugged in. This can be done with gc_disable and gc_enable. This optimization can be applied incrementally. This commit picks all low-hanging fruits. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Recover cells from the list of recently allocated cells.Justus Winter2016-11-101-6/+11
| | | | | | * tests/gpgscm/scheme.c (ok_to_freely_gc): Recover cells. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Recover cells used to maintain interpreter state.Justus Winter2016-11-101-8/+31
| | | | | | | | | | * tests/gpgscm/scheme.c (free_cell): New function. (free_cons): Likewise. (_s_return): Use the new function to recover cells used to save the state of the interpreter in 's_save'. This reduces the need to do a garbage collection considerably. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Reduce opcode dispatch overhead.Justus Winter2016-11-102-228/+256
| | | | | | | | | | | | | | * tests/gpgscm/scheme.c (s_thread_to): New macro. (CASE): Likewise. (opexe_[0-6]): Use 'CASE' instead of 'case' statements, replace 's_goto' with 's_thread_to' where applicable. -- This is a straight-forward optimization that replaces 's_goto' in certain cases. Instead of returning to the calling function, and dispatching the next opcode, we can jump to the opcode handler. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Make the compile-hook configurable.Justus Winter2016-11-103-1/+12
| | | | | | | | | | * tests/gpgscm/scheme-private.h (struct scheme): Make field 'COMPILE_HOOK' optional. * tests/gpgscm/scheme.c (opexe_0): Fix guard. (scheme_init_custom_alloc): Conditionally initialize 'COMPILE_HOOK'. * tests/gpgscm/scheme.h (USE_COMPILE_HOOK): Define to 1 by default. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Drop obsolete commented-out code.Justus Winter2016-11-101-19/+0
| | | | | | * tests/gpgscm/scheme.c (opexe_5): Drop obsolete code. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Remove dubious stack implementation.Justus Winter2016-11-103-95/+0
| | | | | | | | * tests/gpgscm/scheme-private.h (struct scheme): Remove related fields. * tests/gpgscm/scheme.c: Drop all !USE_SCHEME_STACK code. * tests/gpgscm/scheme.h (USE_SCHEME_STACK): Remove macro. Signed-off-by: Justus Winter <[email protected]>
* tests: Fix environment setup.Justus Winter2016-11-081-2/+1
| | | | | | | | | * tests/openpgp/defs.scm (setup-legacy-environment): Do not call 'setup-environment' because that will start the agent, and hence register the atexit function twice. Fixes: a55393cb5f4b331cb3a715c7d9a8b91f7606f337 Signed-off-by: Justus Winter <[email protected]>
* tests: Log and display output from tests when run in parallel.Justus Winter2016-11-081-11/+22
| | | | | | | | | | | | | | * tests/openpgp/run-tests.scm (test): Add field 'logfd'. (test::new, test::set-*): Adapt accordingly. (test::set-logfd): New function. (test::open-log-file): Likewise. (test::run-sync): Use the new function. (test::run-async): Likewise. (test::report): Replay the log. (run-tests-parallel): Reverse the results to restore the original order. Signed-off-by: Justus Winter <[email protected]>
* tests: Simplify test.Justus Winter2016-11-081-18/+6
| | | | | | * tests/openpgp/issue2417.scm: Simplify. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Expose seek and associated constants.Justus Winter2016-11-082-0/+27
| | | | | | | | * tests/gpgscm/ffi.c (do_seek): New function. (ffi_init): Expose 'seek' and 'SEEK_{SET,CUR,END}'. * tests/gpgscm/lib.scm: Document the new function. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix error message.Justus Winter2016-11-081-18/+21
| | | | | | | * tests/gpgscm/ffi.c (do_wait_processes): Fix and improve error messages. Signed-off-by: Justus Winter <[email protected]>
* tests,w32: Make cleanup more robust.Justus Winter2016-11-081-2/+4
| | | | | | | | | * tests/openpgp/run-tests.scm (run-tests-parallel): Catch errors when removing the working directory. On Windows this can fail if there is still a process using one of the files there. (run-tests-sequential): Likewise. Signed-off-by: Justus Winter <[email protected]>
* tests: Write a log file for each test.Justus Winter2016-11-072-11/+13
| | | | | | | * tests/openpgp/Makefile.am (CLEANFILES): Delete logs. * tests/openpgp/run-tests.scm (test::run-sync): Write logs. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Generalize splice to write to multiple sinks.Justus Winter2016-11-072-7/+42
| | | | | | | | * tests/gpgscm/ffi.c (ordinal_suffix): New function. (do_splice): Generalize splice to write to multiple sinks. * tests/gpgscm/lib.scm (splice): Document this fact. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Drop 'len' argument from splice.Justus Winter2016-11-072-11/+5
| | | | | | | * tests/gpgscm/ffi.c (do_splice): Drop 'len' argument, no-one uses it. * tests/gpgscm/lib.scm (splice): Document foreign function. Signed-off-by: Justus Winter <[email protected]>
* tests: Move environment creation and teardown into each test.Justus Winter2016-11-0750-168/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/tests.scm (log): New function. * tests/openpgp/run-tests.scm (run-tests-parallel): Do not run the startup and teardown scripts. (run-tests-sequential): Likewise. * tests/openpgp/setup.scm: Move all functions... * tests/openpgp/defs.scm: ... here and make them less verbose. (setup-environment): New function. (setup-legacy-environment): Likewise. (start-agent): Make less verbose, run 'stop-agent' at interpreter exit. (stop-agent): Make less verbose. * tests/openpgp/finish.scm: Drop file. * tests/openpgp/Makefile.am (EXTRA_DIST): Drop removed file. * tests/openpgp/4gb-packet.scm: Use 'setup-environment' or 'setup-legacy-environment' as appropriate. * tests/openpgp/armdetach.scm: Likewise. * tests/openpgp/armdetachm.scm: Likewise. * tests/openpgp/armencrypt.scm: Likewise. * tests/openpgp/armencryptp.scm: Likewise. * tests/openpgp/armor.scm: Likewise. * tests/openpgp/armsignencrypt.scm: Likewise. * tests/openpgp/armsigs.scm: Likewise. * tests/openpgp/clearsig.scm: Likewise. * tests/openpgp/conventional-mdc.scm: Likewise. * tests/openpgp/conventional.scm: Likewise. * tests/openpgp/decrypt-dsa.scm: Likewise. * tests/openpgp/decrypt.scm: Likewise. * tests/openpgp/default-key.scm: Likewise. * tests/openpgp/detach.scm: Likewise. * tests/openpgp/detachm.scm: Likewise. * tests/openpgp/ecc.scm: Likewise. * tests/openpgp/encrypt-dsa.scm: Likewise. * tests/openpgp/encrypt.scm: Likewise. * tests/openpgp/encryptp.scm: Likewise. * tests/openpgp/export.scm: Likewise. * tests/openpgp/finish.scm: Likewise. * tests/openpgp/genkey1024.scm: Likewise. * tests/openpgp/gpgtar.scm: Likewise. * tests/openpgp/gpgv-forged-keyring.scm: Likewise. * tests/openpgp/import.scm: Likewise. * tests/openpgp/issue2015.scm: Likewise. * tests/openpgp/issue2417.scm: Likewise. * tests/openpgp/issue2419.scm: Likewise. * tests/openpgp/key-selection.scm: Likewise. * tests/openpgp/mds.scm: Likewise. * tests/openpgp/multisig.scm: Likewise. * tests/openpgp/quick-key-manipulation.scm: Likewise. * tests/openpgp/seat.scm: Likewise. * tests/openpgp/shell.scm: Likewise. * tests/openpgp/signencrypt-dsa.scm: Likewise. * tests/openpgp/signencrypt.scm: Likewise. * tests/openpgp/sigs-dsa.scm: Likewise. * tests/openpgp/sigs.scm: Likewise. * tests/openpgp/ssh.scm: Likewise. * tests/openpgp/tofu.scm: Likewise. * tests/openpgp/use-exact-key.scm: Likewise. * tests/openpgp/verify.scm: Likewise. * tests/openpgp/version.scm: Likewise. * tests/openpgp/issue2346.scm: Likewise and simplify. -- The previous Bourne Shell-based test suite created the environment before running all tests, and tore it down after executing them. When we created the Scheme-based test suite, we kept this design at first, but introduced a way to run each test in its own environment to prevent tests from interfering with each other. Nevertheless, every test started out with the same environment. Move the creation of the test environment into each test. This gives us finer control over the environment each test is run in. It also makes it possible to run each test by simply executing it using gpgscm without the use of the runner. Furthermore, it has the neat side-effect of speeding up the test suite if run in parallel. Signed-off-by: Justus Winter <[email protected]>
* tests: Do not allow tests to be run in a shared environment.Justus Winter2016-11-072-38/+9
| | | | | | | | | | | * tests/openpgp/README: Update. * tests/openpgp/run-tests.scm (run-tests-parallel-shared): Drop function. (run-tests-parallel-isolated): Rename to 'run-tests-parallel'. (run-tests-sequential-shared): Drop function. (run-tests-sequential-isolated): Rename to 'run-tests-sequential'. Signed-off-by: Justus Winter <[email protected]>