From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Taylan Kammer Newsgroups: gmane.lisp.guile.bugs Subject: bug#72370: srfi-64: test-apply requires at least one specifier Date: Wed, 2 Oct 2024 01:16:17 +0200 Message-ID: <2217f76c-64f1-45c2-867a-dc9e0c08a439@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31834"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Tomas Volf <~@wolfsden.cz>, 72370@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Wed Oct 02 01:18:19 2024 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1svm8I-00088g-BX for guile-bugs@m.gmane-mx.org; Wed, 02 Oct 2024 01:18:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svm84-0000Y7-Px; Tue, 01 Oct 2024 19:18:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svm82-0000Xr-OW for bug-guile@gnu.org; Tue, 01 Oct 2024 19:18:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svm82-0000rL-Cp for bug-guile@gnu.org; Tue, 01 Oct 2024 19:18:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:References:From:MIME-Version:Date:To:Subject; bh=9TyCBTgiWHMjnaDk4QUCd+CleEzyQqixBGOdkOZZ1hI=; b=W8M8oWWKWiaFG3Udq9kz/x0Zx7LiWlieKup92cbyI0+Yc3CMZiAQcWd73lSYzxBeaONJpSRwsuXeENozz4uIX8ADIgRn+i+lXmdLK5zNRbmI7y5A+WP1X3Pdma6MCftSuS43AXppNRYw7gE2MRE1+IMLVoIFHMC3KxGEvQ4OCI02VmmPyaFxeihJxajsxtgV7/7Pi9s5NokYMsFKTF24KE/ED29P4GTV8NUeiGVTse4mBjpUM+Y/LPFQu/Pw0Hgdib4YWSnaMA+X7nQW+iVc0rfTgXVl7T8clmcSgKQCPDRh0T26+V0GKTrUuXb+YunWghwv198bhlBdWxEcj8o86w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svm81-00088G-Qy for bug-guile@gnu.org; Tue, 01 Oct 2024 19:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Taylan Kammer Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 01 Oct 2024 23:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72370 X-GNU-PR-Package: guile Original-Received: via spool by 72370-submit@debbugs.gnu.org id=B72370.172782464931245 (code B ref 72370); Tue, 01 Oct 2024 23:18:01 +0000 Original-Received: (at 72370) by debbugs.gnu.org; 1 Oct 2024 23:17:29 +0000 Original-Received: from localhost ([127.0.0.1]:54291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svm7V-00087t-Dk for submit@debbugs.gnu.org; Tue, 01 Oct 2024 19:17:29 -0400 Original-Received: from mail-ej1-f44.google.com ([209.85.218.44]:39599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svm7S-00087n-1u for 72370@debbugs.gnu.org; Tue, 01 Oct 2024 19:17:27 -0400 Original-Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a8a7dddd2bdso83210266b.2 for <72370@debbugs.gnu.org>; Tue, 01 Oct 2024 16:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727824580; x=1728429380; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=9TyCBTgiWHMjnaDk4QUCd+CleEzyQqixBGOdkOZZ1hI=; b=Ej+sFrfx8j/U2mLR+bWjeBBdeOfkcnfxQCETJ3w8UO3zu1Q1T/ID/Rm3kPcPQEzNfH RYAKJBVIvdUG0w4jUOWZgH2RSJq3+eWX2tuo8cdCiqSGmsnsSPfbpGTJzU8C/h4aS9sI P8a2YRCQjcg+2NYmB7P5yEDv2UPy3myPToiSOjXRF/uLpV3Cc3YyrY1LV7LF/pbsJHKt oaFeEG9/9qLovykl7YaOdmwLyxEci4ycyQQTFP9J6fFU0EccsRrpIsLLW5vwW8jS+qlk 49BxIxaFVNXoP01zZujIpw9vXVVpDo+FU/9JDWxDnzxOM6nyWAI9i239sbrt7wfnFk25 lQqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727824580; x=1728429380; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9TyCBTgiWHMjnaDk4QUCd+CleEzyQqixBGOdkOZZ1hI=; b=dG/y/H2sRLajLLey6H7vnG2palURghLx+4avXbt9R30KScRs4rXW2VA7LT+N7pYC8s j4H3oTeiUl8lX+47Hd3Gj6W9Vjq06orjqMkQSF+fuS4dnbt/Ecao8/XNOnpD3qE2Y2qc kAqWJ+32JiYJWhSvy2E+OSxOyT/MW3kROhfBxl4KIUudWJj/4XDcbH2GYRXZtfSA3WLg MB234c8V2RIvXNEEkghJAXQvC6TK9Mx5Yq18nqM6+f5BJDNN7fy/Um2xuIjz35BR/Ckf eECtoG4vA3BTDwLxzPCqu7+0JGeJjeZZYQAwq4LyLuDaFBXPqC4XyIwYZ3nGTvDjVYy+ YyqQ== X-Forwarded-Encrypted: i=1; AJvYcCUJF5zmYfpz7corFnpd235tvwCcbcdtVWQb3Isagqt0gjvvyR67Ku+3tGNq6J6jFoH2/FjTwg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwgJeQrh9b5kit+CfS7C+4asWetiwx1EtIuaUss/ykbJ3yt4+zr ll9896aQFInBIgYu3qfCWHLgWO3UGdVUzvwSpcug2gvS0dhE8iFR X-Google-Smtp-Source: AGHT+IHQwFh+8A55KZB8uxRX3HlNyMT5rInuqZmrVaaD6+HAhKkhYOMimodBofaKFrN6TXPoHnwG4Q== X-Received: by 2002:a05:6402:27c6:b0:5c4:14db:4a03 with SMTP id 4fb4d7f45d1cf-5c8b1b995camr250335a12.8.1727824580177; Tue, 01 Oct 2024 16:16:20 -0700 (PDT) Original-Received: from ?IPV6:2003:106:8f04:c300:95ac:529d:6db3:196b? (p200301068f04c30095ac529d6db3196b.dip0.t-ipconnect.de. [2003:106:8f04:c300:95ac:529d:6db3:196b]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c88248b628sm6747062a12.66.2024.10.01.16.16.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Oct 2024 16:16:19 -0700 (PDT) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:11014 Archived-At: On 30.09.2024 20:50, Taylan Kammer wrote: > 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 specification says the following regarding the test-apply: >> >>> If one or more specifiers are listed then only tests matching the specifiers >>> are executed. >> That implies that specifiers are optional and the following code should work: >> >> (use-modules (srfi srfi-64)) >> (test-apply (λ () #t)) >> >> However it does not: >> >> Backtrace: >> In ice-9/boot-9.scm: >> 1752:10 8 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) >> In unknown file: >> 7 (apply-smob/0 #) >> In ice-9/boot-9.scm: >> 724:2 6 (call-with-prompt _ _ #) >> In ice-9/eval.scm: >> 619:8 5 (_ #(#(#))) >> In ice-9/boot-9.scm: >> 2836:4 4 (save-module-excursion _) >> 4388:12 3 (_) >> In srfi/srfi-64/testing.scm: >> 947:34 2 (test-apply #) >> 938:47 1 (test-apply # . _) >> In unknown file: >> 0 (reverse #t) >> >> ERROR: In procedure reverse: >> In procedure reverse: Wrong type argument in position 1: #t >> >> Have a nice day >> Tomas Volf > If anyone's wondering why I don't want to work with the upstream SRFI-64 code, reading the implementation of test-apply is all you need. :-) > > It almost makes me think it must be machine-generated code, or intentionally obfuscated. But anyway. > > My implementation actually had a similar bug, but it should be fixed now with this commit: > >     https://codeberg.org/taylan/scheme-srfis/commit/3091e3b863d53a012b4be4376814bb67bf09020d > > I've also noticed the other issue with test-apply that you reported as a separate bug report, and will fix that later. > > Thanks a ton for all these reports, because it seems you've really caught a ton of edge-cases, and some glaring issues in seldom-used parts of the API. > > - Taylan > By the way, I just noticed another issue with test-apply: It will sometimes call the supplied test runner's on-final handler, and sometimes not. I had made sure to imitate the behavior one-to-one in my own SRFI-64 implementation, but looking at the code one more time and pondering on the behavior a bit, this seems rather arbitrary and most likely not intended. So, I've changed it in my implementation so that the on-final handler will always be called at the end when using test-apply. Fix is implemented with this commit:     https://codeberg.org/taylan/scheme-srfis/commit/a33b9f0cd4558d255605eccfa1a59111b8eb3716 - Taylan