mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
Tweak the "unused modules are removed" test.
* test-suite/tests/gc.test ("gc")["unused modules are removed"]: Add loop to clean up stale references from the stack.
This commit is contained in:
parent
2cf7ff2e79
commit
9035e9d6db
1 changed files with 16 additions and 12 deletions
|
@ -64,6 +64,11 @@
|
||||||
|
|
||||||
(for-each (lambda (x) (guard (make-module))) (iota total))
|
(for-each (lambda (x) (guard (make-module))) (iota total))
|
||||||
|
|
||||||
|
;; Avoid false references to the modules on the stack.
|
||||||
|
(let cleanup ((i 20))
|
||||||
|
(and (> i 0)
|
||||||
|
(begin (cleanup (1- i)) i)))
|
||||||
|
|
||||||
(gc)
|
(gc)
|
||||||
(gc) ;; twice: have to kill the weak vectors.
|
(gc) ;; twice: have to kill the weak vectors.
|
||||||
(gc) ;; thrice: because the test doesn't succeed with only
|
(gc) ;; thrice: because the test doesn't succeed with only
|
||||||
|
@ -74,4 +79,3 @@
|
||||||
(lp (1+ i))
|
(lp (1+ i))
|
||||||
i))
|
i))
|
||||||
total))))
|
total))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue