summaryrefslogtreecommitdiffstats
path: root/tests/gpgscm (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests: Harmonize temporary and socket directory handling.Justus Winter2017-03-061-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/tests.scm (mkdtemp): Do not magically obey the environment variable 'TMP', make sure to always return an absolute path. * tests/gpgme/Makefile.am (TMP): Drop variable. (TESTS_ENVIRONMENT): Drop 'TMP'. * tests/gpgme/gpgme-defs.scm (create-gpgmehome): Start the agent. Do not create private key store, the agent does that for us. * tests/gpgsm/Makefile.am (TMP): Drop variable. (TESTS_ENVIRONMENT): Drop 'TMP'. * tests/gpgme/gpgme-defs.scm (create-gpgsmhome): Start the agent. Do not create private key store, the agent does that for us. * tests/migrations/Makefile.am (TMP): Drop variable. (TESTS_ENVIRONMENT): Drop 'TMP'. * tests/migrations/common.scm (gpgconf): New variable. (run-test): Create and remove socket directory. * tests/migrations/extended-pkf.scm (src-tarball): Remove variable. (setup): Remove function. (trigger-migration): Likewise. Use 'run-test' to execute the test. * tests/migrations/from-classic.scm (src-tarball): Remove variable. (setup): Remove function. Use 'run-test' to execute the tests. * tests/openpgp/Makefile.am (TMP): Drop variable. (TESTS_ENVIRONMENT): Drop 'TMP'. * tests/openpgp/README: Do not mention 'TMP'. * tests/openpgp/defs.scm (with-home-directory): New macro. (create-legacy-gpghome): Do not create private key store, the agent does that for us. (start-agent): Make sure to terminate the right agent with 'atexit'. -- Previously, the test suite relied upon creating home directories in '/tmp'. This has been problematic in some build environments, although POSIX mandates that '/tmp' must be available. We now rely on 'gpgconf --create-socketdir' to create a suitable socket directory for us. This allows us to get rid of some cruft. It also aligns the environment the tests are run in closer with the environment that we intend that GnuPG runs in. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Fix creation of temporary directories.Justus Winter2017-03-061-1/+6
| | | | | | | * tests/gpgscm/ffi.c (do_mkdtemp): Use a larger buffer for the template. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Improve parsing.Justus Winter2017-02-281-0/+3
| | | | | | | | * tests/gpgscm/scheme.c (port_increment_current_line): Avoid creating the same integer if the delta is zero. This happens a lot during parsing, and puts pressure on the memory allocator. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Fix calculating the line number.Justus Winter2017-02-281-2/+2
| | | | | | | | * tests/gpgscm/scheme.c (opexe_5): Only increment the line number on newlines. Fixes-commit: 7cc57e2c63d0fa97569736419db5c76117e7685b Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Track source locations in every kind of ports.Justus Winter2017-02-282-96/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/scheme-private.h (struct port): Move location information out of the union. * tests/gpgscm/scheme.c (mark): All ports need marking now. (gc): Likewise all ports on the load stack. (port_clear_location): Adapt accordingly. Also, add an empty function for !SHOW_ERROR_LINE. (port_increment_current_line): Likewise. (port_reset_current_line): Drop function in favor of... (port_init_location): ... this new function. (file_push): Simplify. (file_pop): Likewise. (port_rep_from_filename): Likewise. (port_rep_from_file): Likewise. (port_rep_from_string): Also initialize the location. (port_rep_from_scratch): Likewise. (port_close): Simplify and generalize. (skipspace): Likewise. (token): Likewise. (_Error_1): Generalize. (opexe_5): Likewise. (scheme_deinit): Simplify and generalize. (scheme_load_named_file): Likewise. (scheme_load_string): Also initialize the location. -- This change tracks the location of source code loaded from non-file ports that is used in error messages. It also simplifies the code quite a bit. Signed-off-by: Justus Winter <justus@g10code.com>
* Clean up word replication.Yuri Chornoivan2017-02-211-1/+1
| | | | | | | | | -- This fixes extra word repetitions (like "the the" or "is is") in the code and docs. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* gpgscm: Guard use of tagged expressions.Justus Winter2017-02-172-6/+6
| | | | | | | | | | | | | * tests/gpgscm/init.scm (vm-history-print): Check that the tag added to expressions when parsing source files matches the expected format. * tests/gpgscm/lib.scm (assert): Likewise. -- This makes the error handling more robust. We saw the assumption about the format of the tags being violated on one build system, and it obscured the view on the underlying problem. Signed-off-by: Justus Winter <justus@g10code.com>
* tests,build: Fix distcheck.Justus Winter2017-02-151-1/+2
| | | | | | | * tests/gpgscm/Makefile.am (EXTRA_DIST): Add 'time.scm'. Fixes-commit: 127e1e532da4083ccd3c307555b6177fab16f408 Signed-off-by: Justus Winter <justus@g10code.com>
* tests: Check expiration times of created keys.Justus Winter2017-02-153-0/+54
| | | | | | | | | | | | * tests/gpgscm/ffi.c (do_get_time): New function. (ffi_init): Expose new function. * tests/gpgscm/ffi.scm (get-time): Document new function. * tests/gpgscm/time.scm: New file. * tests/openpgp/quick-key-manipulation.scm: Use the new facilities to check the expiration times of created keys. * tests/openpgp/tofu.scm: Use the new module. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Tune the hash tables.Justus Winter2017-01-311-3/+5
| | | | | | | | | | * tests/gpgscm/scheme.c (oblist_initial_value): Increase the size of the hash table based on the number of symbols used after initializing the interpreter. (new_frame_in_env): Increase the size of the hash table based on the number of variables in the global environement. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Optimize environment lookups and insertions.Justus Winter2017-01-311-50/+116
| | | | | | | | | | | | | | | | | | * tests/gpgscm/scheme.c (pointercmp): New function. (new_slot_spec_in_env): Add and use slot for insertions. (find_slot_spec_in_env): New variant of 'find_slot_in_env' that returns the slot on failures. (find_slot_in_env): Express using the new function. (new_slot_in_env): Update callsite. (opexe_0): Optimize lookup-or-insert. (opexe_1): Likewise. (scheme_define): Likewise. -- Optimize environment lookups by keeping the lists in the hash table or the list sorted. Optimize the insertions by passing the slot computed by the lookup to the insertion. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Fix build with list environments.Justus Winter2017-01-311-0/+1
| | | | | | | * tests/gpgscm/scheme.c (new_slot_spec_in_env): Provide preallocation inforomation if USE_ALIST_ENV. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Optimize symbol lookups and insertions.Justus Winter2017-01-311-23/+61
| | | | | | | | | | | | | | | | | * tests/gpgscm/scheme.c (oblist_find_by_name): Keep the list of symbols sorted, return the slot where a new symbol must be inserted on lookup failures. (oblist_add_by_name): Add the new symbol at the given slot. (mk_symbol): Adjust callsite. (gensym): Likewise. (assign_syntax): Likewise. -- Optimize symbol lookups by keeping the lists in the hash table (or the list if compiled with USE_OBJECT_LIST) sorted by the symbol names. Optimize the insertions by passing the slot computed by the lookup to the insertion. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Fix build with object list.Justus Winter2017-01-311-0/+1
| | | | | | | * tests/gpgscm/scheme.c (oblist_add_by_name): Provide preallocation information if USE_OBJECT_LIST. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Remove unused functions.Justus Winter2017-01-311-24/+0
| | | | | | | * tests/gpgscm/scheme.c (check_cell_alloced): Remove function. (check_range_alloced): Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Use a compact vector representation.Justus Winter2017-01-302-27/+36
| | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/scheme-private.h (struct cell): Add a compact vector representation. * tests/gpgscm/scheme.c (vector_length): Use new representation. (vector_size): New macro. (get_vector_object): Use the new representation. (fill_vector): Likewise. (vector_elem): Likewise. (set_vector_elem): Likewise. (mark): Likewise. (gc): Likewise. Be careful not to confuse immediate values for type flags. (finalize_cell): Vectors now require finalization. -- Previously, vectors were represented using consecutive cons cells, wasting one word per cell for the type information. Fix that by using a flat array. Previously, a vector of size N required 1 + (n + 1) / 2 cells. Now it uses 1 + (n - 1 + 2) / 3 cells. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Provide framework for immediate values.Justus Winter2017-01-301-23/+39
| | | | | | | | | | | | | * tests/gpgscm/scheme.c (IMMEDIATE_TAG): New macro. ({is,set,clr}_immediate): Likewise. (enum scheme_types): Make type tags disjoint from immediate values. (TYPE_BITS): We need one more bit now. (ADJ,T_MASKTYPE): Compute values. -- Immediate values are disjoint from all type tags and pointers, allowing us to store immediate values in all memory locations. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Fix setting the line of the first gc reservation.Justus Winter2017-01-301-1/+1
| | | | | | * tests/gpgscm/scheme.c (_gc_disable): Negate guard. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Introduce macro for the vector length.Justus Winter2017-01-301-12/+13
| | | | | | | | | | | | | | | | | | | | * tests/gpgscm/scheme.c (vector_length): New macro. (get_vector_object): Use the new macro. (oblist_add_by_name): Likewise. (oblist_find_by_name): Likewise. (oblist_all_symbols): Likewise. (mk_vector): Likewise. (mark): Likewise. (new_slot_spec_in_env): Likewise. (find_slot_spec_in_env): Likewise. (opexe_2): Likewise. (opexe_5): Likewise. -- Introducing an abstraction reduces the coupling between code using vectors and the implementation of vectors. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Fail if too many arguments are given.Justus Winter2017-01-022-6/+4
| | | | | | | * tests/gpgscm/scheme.c (opexe_0): Enable check. * tests/gpgscm/tests.scm (test::report): Remove superfluous argument. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Add 'finally', rework all macros.Justus Winter2017-01-022-44/+52
| | | | | | | | | | | | | | | * tests/gpgscm/init.scm (finally): New macro. * tests/gpgscm/tests.scm (letfd): Rewrite. (with-working-directory): Likewise. (with-temporary-working-directory): Likewise. (lettmp): Likewise. -- Rewrite all our macros using 'define-macro'. Use the new control flow mechanism 'finally', or 'dynamic-wind' where appropriate. Make sure the macros are hygienic. Reduce code duplication. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Use boxed values for source locations.Justus Winter2017-01-022-46/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/scheme-private.h (struct port): Use boxed values for filename and current line. This allows us to use the same Scheme object for labeling all expressions in a file. * tests/gpgscm/scheme.c (file_push): Use boxed type for filename. (mark): Mark location objects of port objects. (gc): Mark location objects in the load stack. (port_clear_location): New function. (port_reset_current_line): Likewise. (port_increment_current_line): Likewise. (file_pop): Adapt accordingly. (port_rep_from_filename): Likewise. (port_rep_from_file): Likewise. (port_close): Likewise. (skipspace): Likewise. (token): Likewise. (_Error_1): Likewise. (opexe_0): Likewise. (opexe_5): Likewise. (scheme_deinit): Likewise. (scheme_load_file): Likewise. (scheme_load_named_file): Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Guard use of union member.Justus Winter2016-12-211-1/+1
| | | | | | | | * tests/gpgscm/scheme.c (opexe_5): Check that we have a file port before accessing filename. Fixes a crash on 32-bit architectures. Fixes-commit: e7429b1ced0c69fa7901f888f8dc25f00fc346a4 Signed-off-by: Justus Winter <justus@g10code.com>
* tests: Move argument parser.Justus Winter2016-12-201-0/+25
| | | | | | | * tests/gpgme/gpgme-defs.scm (flag): Move... * tests/gpgscm/tests.scm: ... over here. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Change associativity of ::.Justus Winter2016-12-191-3/+12
| | | | | | | | * tests/gpgscm/scheme.c (mk_atom): Change associativity of the :: infix-operator. This makes it possible to naturally express accessing nested structures (e.g. a::b::c). Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Display location when assertions fail.Justus Winter2016-12-191-6/+9
| | | | | | | * tests/gpgscm/lib.scm (assert): Use location information if available. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Make exception handling more robust.Justus Winter2016-12-191-1/+2
| | | | | | * tests/gpgscm/init.scm (throw'): Check that args is a list. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Print failed and skipped tests.Justus Winter2016-12-131-5/+13
| | | | | | | * tests/gpgscm/tests.scm (test-pool::report): Print failed and skipped tests at the end. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Generalize the test runner.Justus Winter2016-12-131-8/+9
| | | | | | | | * tests/gpgscm/tests.scm (test::scm) Add explicit name argument. (test::binary): Likewise. Also, add missing unquote. * tests/openpgp/run-tests.scm: Adapt accordingly. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Move the test runner to the Scheme library.Justus Winter2016-12-131-0/+151
| | | | | | | * tests/openpgp/run-tests.scm: Move most of the code... * tests/gpgscm/tests.scm: ... here. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Improve library functions.Justus Winter2016-12-132-34/+88
| | | | | | | | | | | | | * tests/gpgscm/tests.scm (absolute-path?): New function. (canonical-path): Use the new function. * tests/gpgscm/lib.scm (string-split-pln): New function. (string-indexp, string-splitp): Likewise. (string-splitn): Express using the above function. (string-ltrim, string-rtrim): Fix corner case. (list->string-reversed): New function. (read-line): Fix performance. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Better error reporting.Justus Winter2016-12-086-62/+122
| | | | | | | | | | | | | | | | | | | | * tests/gpgscm/ffi.scm: Move the customized exception handling and atexit logic... * tests/gpgscm/init.scm: ... here. (throw): Record the current history. (throw'): New function that is history-aware. (rethrow): New function. (*error-hook*): Use the new throw'. * tests/gpgscm/main.c (load): Fix error handling. (main): Save and use the 'sc->retcode' as exit code. * tests/gpgscm/repl.scm (repl): Print call history. * tests/gpgscm/scheme.c (_Error_1): Make a snapshot of the history, use it to provide a accurate location of the expression causing the error at runtime, and hand the history trace to the '*error-hook*'. (opexe_5): Tag all lists at parse time with the current location. * tests/gpgscm/tests.scm: Update calls to 'throw', use 'rethrow'. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Keep a history of calls for error messages.Justus Winter2016-12-085-4/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/init.scm (vm-history-print): New function. * tests/gpgscm/opdefines.h: New opcodes 'CALLSTACK_POP', 'APPLY_CODE', and 'VM_HISTORY'. * tests/gpgscm/scheme-private.h (struct history): New definition. (struct scheme): New field 'history'. * tests/gpgscm/scheme.c (gc): Mark objects in the history. (history_free): New function. (history_init): Likewise. (history_mark): Likewise. (add_mod): New macro. (sub_mod): Likewise. (tailstack_clear): New function. (callstack_pop): Likewise. (callstack_push): Likewise. (tailstack_push): Likewise. (tailstack_flatten): Likewise. (callstack_flatten): Likewise. (history_flatten): Likewise. (opexe_0): New variable 'callsite', keep track of the expression if it is a call, implement the new opcodes, record function applications in the history. (opexe_6): Implement new opcode. (scheme_init_custom_alloc): Initialize history. (scheme_deinit): Free history. * tests/gpgscm/scheme.h (USE_HISTORY): New macro. -- This patch makes TinySCHEME keep a history of function calls. This history can be used to produce helpful error messages. The history data structure is inspired by MIT/GNU Scheme. Signed-off-by: Justus Winter <justus@g10code.com> fu history
* gpgscm: Add flag TAIL_CONTEXT.Justus Winter2016-12-081-8/+44
| | | | | | | | | | | * tests/gpgscm/scheme.c (S_FLAG_TAIL_CONTEXT): New macro. This flag indicates that the interpreter is evaluating an expression in a tail context (see R5RS, section 3.5). (opexe_0): Clear and set the flag according to the rules layed out in R5RS, section 3.5. (opexe_1): Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Add flags to the interpreter.Justus Winter2016-12-082-5/+44
| | | | | | | | | | | | * tests/gpgscm/scheme-private.h (struct scheme): Add field 'flags'. * tests/gpgscm/scheme.c (S_OP_MASK): New macro. (S_FLAG_MASK, s_set_flag, s_clear_flag, s_get_flag): Likewise. (_s_return): Unpack the encoded opcode and flags. (s_save): Encode the flags along with the opcode. Use normal integers to encode the result. (scheme_init_custom_alloc): Initialize 'op' and 'flags'. Signed-off-by: Justus Winter <justus@g10code.com>
* gpgscm: Implement tags.Justus Winter2016-12-083-0/+91
| | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/opdefines.h: Add opcodes to create and retrieve tags. * tests/gpgscm/scheme.c (T_TAGGED): New macro. (mk_tagged_value): New function. (has_tag): Likewise. (get_tag): Likewise. (mark): Mark tag. (opexe_4): Implement new opcodes. * tests/gpgscm/scheme.h (USE_TAGS): New macro. -- Tags are similar to property lists, but property lists can only be attached to symbols. Tags can not be attached to an existing object, but a tagged copy can be created. Once done, the tag can be manipulated in constant time. Using this during parsing will enable us to produce meaningful error messages. Signed-off-by: Justus Winter <justus@g10code.com>
* 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 <justus@g10code.com>
* tests: Rename 'error' to 'fail'.Justus Winter2016-12-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 <justus@g10code.com>
* 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 <neal@g10code.com>
* 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 <justus@g10code.com>
* 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 <justus@g10code.com>
* 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 <justus@g10code.com>
* 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 <justus@g10code.com>
* gpgscm: Refactor.Justus Winter2016-11-221-6/+6
| | | | | | * tests/gpgscm/scheme.c (opexe_0): Reduce code duplication. Signed-off-by: Justus Winter <justus@g10code.com>
* 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 <justus@g10code.com>
* 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 <justus@g10code.com>
* 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 <justus@g10code.com>
* 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 <justus@g10code.com>
* gpgscm: Fix string.Justus Winter2016-11-171-1/+1
| | | | | | * tests/gpgscm/scheme.c (type_to_string): Fix string. Signed-off-by: Justus Winter <justus@g10code.com>
* 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 <justus@g10code.com>