diff options
| author | Rob Browning <rlb@defaultvalue.org> | 2020-09-19 14:09:04 -0500 |
|---|---|---|
| committer | Rob Browning <rlb@defaultvalue.org> | 2022-03-16 22:23:37 -0500 |
| commit | 6e82a4516ae597d8f1b64c2831bf14f1899f40ad (patch) | |
| tree | a4cc782ec40381ca1581017cacf173cd87c58eb7 | |
| parent | f18f67022314eefced887df0a470a440f70f592c (diff) | |
| download | guile-6e82a4516ae597d8f1b64c2831bf14f1899f40ad.tar.gz | |
Fix "non-revealed port is closed" ports.test
Don't close the test port's file descriptor because the port still has a
reference to it, and could still close it at any time when finally
garbage collected. This did soemetimes break subsequent tests.
Bug: https://debbugs.gnu.org/43521
| -rw-r--r-- | test-suite/tests/ports.test | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test-suite/tests/ports.test b/test-suite/tests/ports.test index cd87640..66e10e3 100644 --- a/test-suite/tests/ports.test +++ b/test-suite/tests/ports.test @@ -623,9 +623,10 @@ (seek fdes 0 SEEK_CUR) ;; If we get here, it might be because PORT was not GC'd, we - ;; don't know (and we can't use a guardian because it would keep - ;; PORT alive.) - (close-fdes fdes) + ;; don't know, and we can't use a guardian because it would keep + ;; PORT alive, and we can't close the descriptor because + ;; subseuqent opens may re-use it, and then if this port is + ;; garbage collected, it'll close the descriptor unexpectedly. (throw 'unresolved)) (lambda args (system-error-errno args))))) |
