1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

leniency in the "unused modules are removed" gc.test

* libguile/foreign.h: Remove comment about the finalizer bit, as I don't
  think that is the case any more.

* test-suite/tests/gc.test: Ignore flakiness in the gc-modules test.
This commit is contained in:
Andy Wingo 2012-02-02 00:10:11 +01:00
parent 7e9a301b7f
commit 52de2ab45a
2 changed files with 18 additions and 8 deletions

View file

@ -1,7 +1,7 @@
#ifndef SCM_FOREIGN_H
#define SCM_FOREIGN_H
/* Copyright (C) 2010, 2011 Free Software Foundation, Inc.
/* Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@ -23,8 +23,7 @@
/* A "foreign pointer" is a wrapped C pointer. It is represented by a
cell whose second word is a pointer. The first word has the
`scm_tc7_pointer' type code and a bit saying whether it has an
associated finalizer or not.
`scm_tc7_pointer' type code.
The basic idea is that we can help the programmer to avoid cutting herself,
but we won't take away her knives. */

View file

@ -22,6 +22,16 @@
#:use-module ((system base compile) #:select (compile)))
;; Some of these tests verify that things are collectable. As we use a
;; third-party conservative collector, we really can't guarantee that --
;; we can try, but on some platforms, on some versions (possibly), the
;; test might fail. But we don't want that to stop the build. So,
;; instead of failing, throw 'unresolved.
;;
(define (maybe-gc-flakiness result)
(or result
(throw 'unresolved)))
;;;
;;; miscellaneous
;;;
@ -73,11 +83,12 @@
(gc) ;; thrice: because the test doesn't succeed with only
;; one gc round. not sure why.
(= (let lp ((i 0))
(if (guard)
(lp (1+ i))
i))
total)))
(maybe-gc-flakiness
(= (let lp ((i 0))
(if (guard)
(lp (1+ i))
i))
total))))
(pass-if "Lexical vars are collectable"
(let ((l (compile