summaryrefslogtreecommitdiff
path: root/test-suite
Commit message (Expand)AuthorAgeFilesLines
...
* Fix compilation of rank 0 typed array literals...* module/system/vm/assembler.scm (simple-uniform-vector?): array-length fails for rank 0 arrays; fix the shape condition. * test-suite/tests/arrays.test: Test reading of #0f64(x) in compilation context. Daniel Llorens2016-11-231-1/+7
* Add asyncs test...* test-suite/tests/asyncs.test: New file. Andy Wingo2016-11-191-0/+138
* Back to simple unlock-mutex...* libguile/threads.c (scm_unlock_mutex): Bind to unlock-mutex. * libguile/threads.h: Remove scm_unlock_mutex_timed. * libguile/deprecated.h: Add scm_unlock_mutex_timed. * libguile/deprecated.c (scm_unlock_mutex_timed): Deprecate. * test-suite/tests/threads.test: Update unlock-mutex tests to use wait-condition-variable if they would wait on a cond. Andy Wingo2016-11-051-9/+7
* Remove unchecked-unlock facility from Guile mutexes...* libguile/threads.c (fat_mutex): Remove unchecked_unlock member. (make_fat_mutex): Adapt. (scm_make_mutex_with_flags): Remove unchecked-unlock flag. (scm_make_recursive_mutex): Likewise. (fat_mutex_unlock): Remove unchecked-unlock case. * test-suite/tests/threads.test: Remove unchecked-unlock test. Andy Wingo2016-11-051-5/+1
* Recursively locking a SRFI-18 mutex blocks...* libguile/threads.c (fat_mutex_lock): allow-external-unlock mutexes can't be recursive, but a recursive lock attempt can be unblocked by an external thread, so these mutexes shouldn't throw an error on recursive lock attempts. * test-suite/tests/srfi-18.test: Add tests. Andy Wingo2016-11-051-0/+35
* Remove fat mutex abandoned mutex error...* libguile/threads.c (fat_mutex_lock): Remove abandoned mutex error, as SRFI-18 is responsible for this. * test-suite/tests/threads.test: Update test. Andy Wingo2016-11-051-9/+4
* Remove lock-mutex owner facility...* libguile/threads.c (scm_lock_mutex_timed): Deprecate "owner" argument. (fat_mutex_lock): Remove owner argument. (fat_mutex_unlock): Don't pass owner to scm_lock_mutex_timed. * test-suite/tests/threads.test: Remove tests of mutex-owner. Andy Wingo2016-11-041-12/+1
* SRFI-18 mutexes disjoint from Guile mutexes...* module/srfi/srfi-18.scm (<mutex>): Define as a wrapper type around Guile mutexes. (thread-mutexes): New variable. (with-thread-mutex-cleanup): New facility to abandon mutexes on SRFI-18 thread exit. Not yet used. (make-thread): Use SRFI-18 interfaces. (make-mutex): Reimplement for our boxed mutexes. (mutex-state): Adapt. (mutex-lock!): Adapt. (mutex-unlock!): Adapt. * test-suite/tests/srfi-18.test: Don't assume that SRFI-18 mutexes are the same as Guile mutexes. Andy Wingo2016-11-041-3/+6
* Remove thread cleanup facility...* NEWS: Add entry. * doc/ref/api-scheduling.texi (Threads): Remove thread-cleanup docs. * libguile/threads.c (guilify_self_1, do_thread_exit): (scm_set_thread_cleanup_x, scm_thread_cleanup): Remove these. * libguile/threads.h (scm_i_thread): Remove cleanup_handler. * module/ice-9/threads.scm: * module/ice-9/deprecated.scm (thread-cleanup, set-thread-cleanup!): Remove. * test-suite/tests/threads.test: Adapt to test cancel-thread return values and not test thread-cleanup procs. Andy Wingo2016-10-311-25/+4
* srfi-18: Use srfi-35 conditions....* module/srfi/srfi-18.scm: Use srfi-35 conditions instead of our home-grown equivalent system. (thread-exception-handlers): Remove unused table. (srfi-18-exception-handler): Always capture key consed to args; no special case for bare key. * test-suite/tests/srfi-18.test (provided?): Adapt to reason always being key+args. Andy Wingo2016-10-301-1/+1
* Fix tree-il code generation for ECMAscript `new' expression....The compiler was producing `((toplevel foo))' instead of `(toplevel foo)'. Changed to use `call' form with target type and spliced constructor arguments. * module/language/ecmascript/compile-tree-il.scm (comp): Replace `@impl' shorthand with `call' + `@implv' for better control over resulting tree-il. * test-suite/tests/ecmascript.test (compiler): Add test for "new Object();" Signed-off-by: Ludovic Courtès <ludo@gnu.org> Julian Graham2016-10-251-1/+7
* Move thread bindings to (ice-9 threads)...* libguile/init.c (scm_i_init_guile): Don't call scm_init_thread_procs. * libguile/threads.c (scm_init_ice_9_threads): Rename from scm_init_thread_procs, make static. (scm_init_threads): Register scm_init_thread_procs extension. * libguile/threads.h (scm_init_thread_procs): Remove decl. * module/ice-9/boot-9.scm: Load (ice-9 threads), so that related side effects occur early. * module/ice-9/deprecated.scm (define-deprecated): Fix to allow deprecated bindings to appear in operator position. Export deprecated bindings. (define-deprecated/threads, define-deprecated/threads*): Trampoline thread bindings to (ice-9 threads). * module/ice-9/futures.scm: Use ice-9 threads. * module/ice-9/threads.scm: Load scm_init_ice_9_threads extension. Reorder definitions and imports so that the module circularity with (ice-9 futures) continues to work. * module/language/cps/intmap.scm: * module/language/cps/intset.scm: * module/language/tree-il/primitives.scm: Use (ice-9 threads). * module/language/cps/reify-primitives.scm: Reify current-thread in (ice-9 threads) module. * module/srfi/srfi-18.scm: Use ice-9 threads with a module prefix, and adapt all users. Use proper keywords in module definition form. * test-suite/tests/filesys.test (test-suite): * test-suite/tests/fluids.test (test-suite): * test-suite/tests/srfi-18.test: Use ice-9 threads. * NEWS: Add entry. * doc/ref/api-scheduling.texi (Threads): Update. * doc/ref/posix.texi (Processes): Move current-processor-count and total-processor-count docs to Threads. Andy Wingo2016-10-233-8/+12
* Deprecate arbiters...* libguile/arbiters.c: * libguile/arbiters.h: * test-suite/tests/arbiters.test: Delete files. * libguile/deprecated.c: * libguile/deprecated.h: Move arbiters code here. * doc/ref/api-scheduling.texi: Remove section on arbiters. * libguile.h: * libguile/Makefile.am: * libguile/init.c: * module/oop/goops.scm: * test-suite/Makefile.am: Remove mention of arbiters. * NEWS: Update. Andy Wingo2016-10-172-103/+0
* Fix slot allocation for prompts...* module/language/cps/slot-allocation.scm (add-prompt-control-flow-edges): Fix to add links from prompt bodies to handlers, even in cases where the handler can reach the body but the body can't reach the handler. * test-suite/tests/compiler.test ("prompt body slot allocation"): Add test case. Andy Wingo2016-10-111-0/+25
* Texinfo serialization: add braces when needed...* module/texinfo/serialize.scm (include, empty-command, inline-text): (inline-args, inline-text-args, eol-text-args, eol-text, eol-args) (environ, table-environ, paragraph, item, entry, fragment, serialize) (stexi->texi): Pass extra rest? parameter around to indicate arguments that can take any number of subforms without being surrounded by braces. (embrace, serialize-text-args): Surround non-rest arguments with braces. * test-suite/tests/texinfo.serialize.test: Add tests. Andy Wingo2016-10-111-1/+8
* Avoid deprecated _IONBF in http tests...* test-suite/tests/web-http.test ("chunked encoding"): Avoid deprecated _IONBF. Andy Wingo2016-09-141-4/+4
* Avoid deprecated statprof interface in test...* test-suite/tests/statprof.test ("return values"): Avoid deprecated with-statprof. Andy Wingo2016-09-141-5/+6
* Compiler support for atomics...* doc/ref/vm.texi (Inlined Atomic Instructions): New section. * libguile/vm-engine.c (VM_VALIDATE_ATOMIC_BOX, make-atomic-box) (atomic-box-ref, atomic-box-set!, atomic-box-swap!) (atomic-box-compare-and-swap!): New instructions. * libguile/vm.c: Include atomic and atomics-internal.h. (vm_error_not_a_atomic_box): New function. * module/ice-9/atomic.scm: Register primitives with the compiler. * module/language/cps/compile-bytecode.scm (compile-function): Add support for atomic ops. * module/language/cps/effects-analysis.scm: Add comment about why no effects analysis needed. * module/language/cps/reify-primitives.scm (primitive-module): Add case for (ice-9 atomic). * module/language/tree-il/primitives.scm (*effect-free-primitives*): (*effect+exception-free-primitives*): Add atomic-box?. * module/system/vm/assembler.scm: Add new instructions. * test-suite/tests/atomic.test: Test with compilation and interpretation. Andy Wingo2016-09-061-27/+28
* Add atomic boxes...* doc/ref/api-scheduling.texi (Atomics): New manual section. * libguile.h: Include atomic.h. * libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): (DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Add atomic. * libguile/atomic.c: * libguile/atomic.h: New files. * libguile/atomics-internal.h (scm_atomic_set_scm, scm_atomic_ref_scm) (scm_atomic_swap_scm, scm_atomic_compare_and_swap_scm): New facilities. * libguile/goops.c (class_atomic_box, scm_sys_goops_early_init): Add support for <atomic-box>. Remove duplicate <keyword> fetch. * libguile/init.c (scm_i_init_guile): Call scm_register_atomic_box. * libguile/print.c (iprin1): Add atomic box case. * libguile/tags.h (scm_tc7_atomic_box): New tag. * libguile/validate.h (SCM_VALIDATE_ATOMIC_BOX): New macro. * module/Makefile.am (SOURCES): Add ice-9/atomic.scm. * module/ice-9/atomic.scm: New file. * module/oop/goops.scm (<atomic-box>): New var. Andy Wingo2016-09-061-0/+59
* GOOPS caches created vtables...* libguile/goops.c (scm_i_define_class_for_vtable): Cache created vtables. Fixes #24286. * test-suite/tests/goops.test ("classes for built-in types"): Add tests. Andy Wingo2016-09-021-1/+11
* Avoid flushing buffers for ftell...* libguile/ports.c (scm_seek): Avoid flushing buffers for an ftell. Also allows non-random-access ports to ftell() if they have a seek implementation, as is the case for custom binary ports with a get-position function but no set-position function. * test-suite/tests/ports.test: Adapt expectations, reverting changes made in April by me in b77fb752dd7e14876741ecb6360ef0319eae18e0. Andy Wingo2016-08-311-4/+4
* Add tests for make-custom-binary-input/output-port...* test-suite/tests/r6rs-ports.test ("8.2.13 Input/output ports"): Add tests for custom binary input/output ports, copied from existing binary input and binary output tests. Christopher Allan Webber2016-08-311-1/+382
* Correct section number for "Input Ports" tests....* test-suite/tests/r6rs-ports.test: Correct "Input Ports" section heading from "7.2.7" -> "8.2.7", "7.2.5" -> "8.2.5", "7.2.8" -> "8.2.8", and "7.2.11" -> "8.2.11". Christopher Allan Webber2016-08-311-4/+4
* Add file descriptor finalizers...* doc/ref/posix.texi (Ports and File Descriptors): Document new interfaces. * libguile/filesys.c (scm_close, scm_close_fdes) * libguile/fports.c (fport_close): * libguile/ioext.c (scm_primitive_move_to_fdes): Call scm_run_fdes_finalizers. * module/ice-9/fdes-finalizers.scm: * test-suite/tests/fdes-finalizers.test: * libguile/fdes-finalizers.h: * libguile/fdes-finalizers.c: New files. * module/Makefile.am: * test-suite/Makefile.am: * libguile/Makefile.am: * libguile.h: * libguile/init.c: Wire up new files. Andy Wingo2016-08-302-0/+66
* ETag list headers accept sloppy etags...* module/web/http.scm (parse-entity-tag): Add #:sloppy-delimiters keyword argument, and return a second value indicating the end position. (parse-entity-tag-list): Use parse-entity-tag, so that we also accept sloppy etags that aren't qstrings. * test-suite/tests/web-http.test ("request headers"): Add a test. Andy Wingo2016-08-281-0/+2
* Add meta/build-env...* meta/build-env.in: New file which sets up an environment that does not inherit GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH (unless cross-compiling). * doc/ref/Makefile.am (autoconf-macros.texi): * libguile/Makefile.am (snarf2checkedtexi): * module/Makefile.am (ice-9/psyntax-pp.go): * test-suite/standalone/Makefile.am (GUILE_INSTALL_LOCALE): * am/bootstrap.am (.scm.go): * am/guilec (.scm.go): Use build-env. * configure.ac: Create build-env. Andy Wingo2016-07-101-1/+1
* tests-suite: resurrect invoking check-guile --coverage....* test-suite/guile-test (main): remove (the-vm) from with-code-coverage call. Jan Nieuwenhuizen2016-06-281-1/+1
* Constant-folding eq? and eqv? uses deduplication...* test-suite/tests/peval.test ("partial evaluation"): Add tests. * module/language/tree-il/peval.scm (peval): Constant-fold eq? and eqv? using equal?, anticipating deduplication. Andy Wingo2016-06-241-0/+8
* On Darwin, skip tests that depend on setrlimit...On Darwin, setrlimit is ignored, and these tests do not terminate. There doesn't seem to be another way to limit the memory allocated by a process. * test-suite/standalone/test-stack-overflow: Skip this test on Darwin. * test-suite/standalone/test-out-of-memory: Skip this test on Darwin. Daniel Llorens2016-06-242-0/+13
* Fix texinfo->html for @acronym, @itemize...* module/texinfo/html.scm (itemize, acronym, tag-replacements, rules): Fix HTML serialization of @itemize and @acronym. Fixes #21772. * test-suite/tests/texinfo.html.test: New file. * test-suite/Makefile.am: Add new file. Andy Wingo2016-06-242-0/+37
* Don't serialize uninterned symbols...* module/system/vm/assembler.scm (intern-constant): Don't serialize uninterned symbols. * test-suite/tests/rtl.test ("bad constants"): Add a test. Andy Wingo2016-06-231-0/+10
* Fix race between SMOB marking and finalization...* libguile/smob.c (clear_smobnum): New helper. (finalize_smob): Re-set the smobnum to the "finalized smob" type before finalizing. Fixes #19883. (scm_smob_prehistory): Pre-register a "finalized smob" type, which has no mark procedure. * test-suite/standalone/test-smob-mark-race.c: New file. * test-suite/standalone/Makefile.am: Arrange to build and run the new test. Andy Wingo2016-06-232-0/+71
* Fix relative file name canonicalization on paths with "."...* libguile/filesys.c (scm_i_relativize_path): Canonicalize the file names elements that we will be using as prefixes. Fixes the case where a load path contains a relative file name: #19540. * test-suite/tests/ports.test ("%file-port-name-canonicalization"): Add tests that elements of the load path are canonicalized. Andy Wingo2016-06-231-7/+8
* Fix (< 'foo) compilation...* module/language/tree-il/primitives.scm (expand-chained-comparisons): Fix (< 'foo) compilation. * test-suite/tests/compiler.test ("regression tests"): Add test case. Andy Wingo2016-06-211-1/+5
* Fix srfi-64.test for #:select borkage. The irony......* test-suite/tests/srfi-64.test: Fix for recent #:select borkage. Andy Wingo2016-06-211-1/+2
* `define!' instruction returns the variable...* doc/ref/vm.texi (Top-Level Environment Instructions): Update documentation. * libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump, sadly. * module/system/vm/assembler.scm (*bytecode-minor-version*): Bump. * libguile/vm-engine.c (define!): Change to store variable in dst slot. * module/language/tree-il/compile-cps.scm (convert): * module/language/cps/compile-bytecode.scm (compile-function): Adapt to define! change. * module/language/cps/effects-analysis.scm (current-module): Fix define! effects. Incidentally here was the bug: in Guile 2.2 you can't have effects on different object kinds in one instruction, without reverting to &unknown-memory-kinds. * test-suite/tests/compiler.test ("regression tests"): Add a test. Andy Wingo2016-06-211-0/+8
* Update and-let-star.test...* test-suite/tests/and-let-star.test ("and-let*"): Update test expectations. Andy Wingo2016-06-211-4/+4
* Add SRFI-2 (and-let*) test suite....* test-suite/tests/srfi-2.test: New file. * test-suite/Makefile.am (SCM_TESTS): Add it. Taylan Ulrich Bayırlı/Kammer2016-06-212-0/+78
* Add R6RS bytevector->string, string->bytevector...* module/rnrs/io/ports.scm (string->bytevector): (bytevector->string): New procedures. * module/rnrs.scm: Export new procedures. * test-suite/tests/r6rs-ports.test: Add string->bytevector and bytevector->string tests. Andy Wingo2016-06-211-0/+134
* Implement R6RS output-port-buffer-mode...* module/rnrs/io/ports.scm (r6rs-open): Set buffer-mode on new port. (output-port-buffer-mode): Implement and export. * module/rnrs.scm (rnrs): Export output-port-buffer-mode * test-suite/tests/r6rs-ports.test (test-output-file-opener): Add tests. Andy Wingo2016-06-211-0/+18
* (rnrs hashtables): Hash functions of eq? and eqv? hashtables...Also pinging this thread with a (very slightly) updated patch. :-) [2. text/x-diff; 0001-Hashtable-hash-function-returns-f-on-eq-and-eqv-tabl.patch] From 17599f6ce7ba0beb100e80455ff99af07333d871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= <taylanbayirli@gmail.com> Date: Tue, 21 Jun 2016 00:23:29 +0200 Subject: [PATCH] Hashtable-hash-function returns #f on eq and eqv tables. * module/rnrs/hashtables.scm (r6rs:hashtable)[type]: New field. (r6rs:hashtable-type): New procedure. * test-suite/tests/r6rs-hashtables.test: Add related tests. Taylan Ulrich Bayırlı/Kammer2016-06-211-1/+5
* (rnrs hashtables): Mutation of immutable hashtable ignored...Pinging this thread with a (very slightly) updated patch. :-) [2. text/x-diff; 0001-Hashtable-set-errors-on-immutable-hashtable.patch] From 7f35d515d711e255bba5a89a013d9d92034edf41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= <taylanbayirli@gmail.com> Date: Tue, 21 Jun 2016 00:25:19 +0200 Subject: [PATCH] Hashtable-set! errors on immutable hashtable. * module/rnrs/hashtables.scm (hashtable-set!): Raise an assertion violation error when the hashtable is immutable. * test-suite/tests/r6rs-hashtables.test: Fix accordingly. Taylan Ulrich Bayırlı/Kammer2016-06-211-2/+4
* Fix fixnum-range changes in R6RS fixnum bitops...* module/rnrs/arithmetic/fixnums.scm (fxcopy-bit, fxbit-field) (fxcopy-bit-field, fxarithmetic-shift) (fxarithmetic-shift-left, fx-arithmetic-shift-right) (fxrotate-bit-field, fxreverse-bit-field): Enforce range on amount by which to shift. Fixes #14917. * test-suite/tests/r6rs-arithmetic-fixnums.test ("fxarithmetic-shift-left"): Update test to not shift left by a negative amount. Andy Wingo2016-06-211-1/+1
* Add another code coverage test...* test-suite/tests/coverage.test ("line-execution-counts"): Add a test from Taylan Ulrich B, from bug #14849. Andy Wingo2016-06-211-1/+19
* Fix peval on (call-with-values foo (lambda (x) x))...* module/language/tree-il/peval.scm (peval): Don't inline (call-with-values foo (lambda (x) exp)) to (let ((x (foo))) exp). The idea is that call-with-values sets up an explicit context in which we are requesting an explicit return arity, and that dropping extra values when there's not a rest argument is the wrong thing. Fixes #13966. * test-suite/tests/peval.test ("partial evaluation"): Update test. Andy Wingo2016-06-201-2/+4
* Fix size measurement in bytevector_large_set...* libguile/bytevectors.c (bytevector_large_set): Fix computation of value size in words. * test-suite/tests/bytevectors.test: Add test. Thanks to Ben Rocer <fleabyte@mail.com> for the bug report and fix. Andy Wingo2016-06-201-1/+5
* Fix uri-decode behavior for "+"...* module/web/uri.scm (uri-decode): Add #:decode-plus-to-space? keyword argument. (split-and-decode-uri-path): Don't decode plus to space. * doc/ref/web.texi (URIs): Update documentation. * test-suite/tests/web-uri.test ("decode"): Add tests. * NEWS: Add entry. Based on a patch by Brent <brent@tomski.co.za>. Andy Wingo2016-06-201-1/+4
* Update port documentation, rename sports to suspendable ports...* module/ice-9/suspendable-ports.scm: Rename from ice-9/sports.scm, and adapt module names. Remove exports that are not related to the suspendable ports facility; we want people to continue using the port operations from their original locations. Add put-string to the replacement list. * module/Makefile.am: Adapt to rename. * test-suite/tests/suspendable-ports.test: Rename from sports.test. * test-suite/Makefile.am: Adapt to rename. * module/ice-9/textual-ports.scm (unget-char, unget-string): New functions. * doc/ref/api-io.texi (Textual I/O, Simple Output): Flesh out documentation. (Line/Delimited): Undocument write-line, read-string, and read-string!. This is handled by (ice-9 textual-ports). (Bytevector Ports): Fix duplicated section. (String Ports): Move the note about encodings down to the end. (Custom Ports): Add explanatory text. Remove mention of C functions; they should use the C port interface. (Venerable Port Interfaces): Add text, and make documentation refer to recommended interfaces. (Using Ports from C): Add documentation. (Non-Blocking I/O): Document more fully and adapt to suspendable-ports name change. Andy Wingo2016-06-092-4/+4
* iprin1 uses scm_c_put_string...* libguile/print.c (iprin1): Use scm_c_put_string for strings. * test-suite/test-suite/lib.scm (exception:encoding-error): Add an additional expected error string for `encoding-error'. Andy Wingo2016-05-301-1/+1
* get-bytevector-n in Scheme....* module/ice-9/sports.scm (fill-input): Add io-mode optional arg. (get-bytevector-n): New implementation. (port-bindings): Add get-bytevector-n. * test-suite/tests/sports.test: Add r6rs-ports tests. Andy Wingo2016-05-221-0/+1