From: Taylan Kammer <taylan.kammer@gmail.com>
To: Tomas Volf <~@wolfsden.cz>, 72378@debbugs.gnu.org
Subject: bug#72378: srfi-64: top-level test-group does not work
Date: Wed, 2 Oct 2024 00:25:40 +0200 [thread overview]
Message-ID: <b0ea04e7-c2bd-4726-85b9-fc6d9ce18af9@gmail.com> (raw)
In-Reply-To: <ZqlEXtxqb81geJ_7@ws>
On 30.07.2024 21:51, Tomas Volf wrote:
> Hello,
>
> I think I found a bug in (srfi srfi-64) module shipped with GNU Guile.
>
> The test-group is defined as equivalent to:
>
> (if (not (test-to-skip% suite-name))
> (dynamic-wind
> (lambda () (test-begin suite-name))
> (lambda () decl-or-expr ...)
> (lambda () (test-end suite-name))))
>
> `test-to-skip%' is not defined anywhere (great), however in the text we have
> this sentence:
>
>> However, the entire group is skipped if it matched an active test-skip
> Since active skip list is mandated to be a property of test runner, in case the
> test runner does not exist yet, there cannot be active skip list. Hence the
> group should run. However:
>
> (use-modules (srfi srfi-64))
> (test-group "x"
> #t)
>
> Leads to:
>
> Backtrace:
> In ice-9/boot-9.scm:
> 1752:10 6 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
> In unknown file:
> 5 (apply-smob/0 #<thunk 7fc490169300>)
> In ice-9/boot-9.scm:
> 724:2 4 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
> In ice-9/eval.scm:
> 619:8 3 (_ #(#(#<directory (guile-user) 7fc49016cc80>)))
> In ice-9/boot-9.scm:
> 2836:4 2 (save-module-excursion _)
> 4388:12 1 (_)
> In /home/wolf/src/guile-wolfsden/tests/srfi-64/test-group-top-level.srfi64test:
> 8:0 0 (_)
>
> /home/wolf/src/guile-wolfsden/tests/srfi-64/test-group-top-level.srfi64test:8:0: In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): #f
>
> Have a nice day
> Tomas Volf
>
>
I don't know how to fix this in the reference implementation that Guile uses, and don't care to find out because (as you seem to have noticed) the implementation is somewhat over-complicated in many parts.
But in any case, my implementation isn't affected by this bug, and your example works as intended with it.
- Taylan
prev parent reply other threads:[~2024-10-01 22:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 19:51 bug#72378: srfi-64: top-level test-group does not work Tomas Volf
2024-10-01 22:25 ` Taylan Kammer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b0ea04e7-c2bd-4726-85b9-fc6d9ce18af9@gmail.com \
--to=taylan.kammer@gmail.com \
--cc=72378@debbugs.gnu.org \
--cc=~@wolfsden.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).