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#72377: srfi-64: test-eq evaluates test-name multiple times Date: Wed, 2 Oct 2024 00:22:19 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------kHOTmmGH0oiMuk1V7ZP0vjnT" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29482"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Tomas Volf <~@wolfsden.cz>, 72377@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Wed Oct 02 00:24:10 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 1svlHu-0007X6-6x for guile-bugs@m.gmane-mx.org; Wed, 02 Oct 2024 00:24:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svlHq-00028o-JK; Tue, 01 Oct 2024 18:24:06 -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 1svlHn-00028Q-EB for bug-guile@gnu.org; Tue, 01 Oct 2024 18:24: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 1svlHm-0003iI-RJ for bug-guile@gnu.org; Tue, 01 Oct 2024 18:24:03 -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:From:References:MIME-Version:Date:To:Subject; bh=/fJJol7Nt4TRo0ghtGK9L3NCCFYOOUeZfuxpN6Xl1T0=; b=fmy4YZf9R94202f4caVb+Hzq3/BOHstseA8SNEcHOjhCvSXuv5NhPyY59scGfeVmGFQ24W3/IEORtRim/+MN2UDenPX9xh9TZAn8GYNwwISa/MpS+qqEx1XxXlwJRBFMj30yxgocFrH5Tu45uZjJylpXrnHM3dCKb7AZvqz3cXX6kQi0r1up1HtoeZNNHPgw8114IH24Yj+ciN7JObRZs8RDu0iRx5dbFPn6X+xwNZRP/keBYZVMPIpgnoHDvZdbLSayvlnRcA7aEU4dIxVic/BqnVNABno6eeln7Chzb3+qppKFZr6OeK8mYU9X2BkOLh0JHek3dZxoalPD2SjJUg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svlHm-0005v5-4p for bug-guile@gnu.org; Tue, 01 Oct 2024 18:24:02 -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 22:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72377 X-GNU-PR-Package: guile Original-Received: via spool by 72377-submit@debbugs.gnu.org id=B72377.172782140322722 (code B ref 72377); Tue, 01 Oct 2024 22:24:02 +0000 Original-Received: (at 72377) by debbugs.gnu.org; 1 Oct 2024 22:23:23 +0000 Original-Received: from localhost ([127.0.0.1]:54054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svlH8-0005uQ-Vf for submit@debbugs.gnu.org; Tue, 01 Oct 2024 18:23:23 -0400 Original-Received: from mail-ej1-f49.google.com ([209.85.218.49]:41969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svlH7-0005uK-Ds for 72377@debbugs.gnu.org; Tue, 01 Oct 2024 18:23:21 -0400 Original-Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a8a7dddd2c3so68980066b.3 for <72377@debbugs.gnu.org>; Tue, 01 Oct 2024 15:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727821341; x=1728426141; darn=debbugs.gnu.org; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=/fJJol7Nt4TRo0ghtGK9L3NCCFYOOUeZfuxpN6Xl1T0=; b=TPMJ/mRAgcBfVnV0UmJd4Mub950dejz6TEzk+BZkae1PCdTrod/2A5Qojrt/icDGsH DuaRLUyUWfdT78LfrM7npMAFZg1RqjwsgLTb9FbwophK2Ys/f1V0wnoMQr1wkH/FcRwY TZncxQ1WkQ8DlVyZLS3RXgBEufjBSLlIavSz7KLFGtnQ5O0Ae/Zx+3T1OqHNTpDkrc/e DbzjktlvjVnuHYUIDSBcmzdtFgYGl6Eq7eQps4fkVqH3SLy0GoVO+ayX5VkKOPBjtuY1 hoi8K0kynOxPZtfbtUwbTS8OsIeEZ+k0Fi+RfeHGRMsEELtoGqHEZm3yx3EO1mHjzzG0 XVfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727821341; x=1728426141; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=/fJJol7Nt4TRo0ghtGK9L3NCCFYOOUeZfuxpN6Xl1T0=; b=WqRvcn8S06a1JaVFjygm1eYdanGXU6+YSOcjqGScJXpHRS3vcMr5XZqMBS05/RkULl lIxbkD+wG4SyE6HRmAFp/pFfZr1SpJZy1IRpfdkFH3su+5Ul10g1tw3ptzsSXTSwVRAB +YClEvW99O9H96/evojtRztjVEvcW9RwKfUfqGZw0iHRwstS0nUWrrtuKucIX3osMyle oFGx234ozKXidOzFrB6SSwzkrvlBKBeTLAwcMHX3noDuZtu85CkVB+/jxbbitqNlIK1i AP5nZ3hjcJsraTylakjNXeOTYl/P9PaT8XKAKI7E8LRBgE/PzXhqGNQ6Z2LExSkxKkd1 AFog== X-Forwarded-Encrypted: i=1; AJvYcCW+ecAktd+37Z4K/v2y/Fug1UYn9aM69jjBfCxVI29cOkdZUqw0jgdWz806q73pa63vgKQagg==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yzx6OggIwtFj0NP1JFzydRzWPfcDYlCb71BYr5nC24tI7Wiiv1r w9VGWDAuG3/4Emz7HwoEhtWdE7Bwx5T/4ma8cYAyJR5F2yuTxSEKj/0cEmtS X-Google-Smtp-Source: AGHT+IHFlhdNikpbK7hMJyDlW7zupwwmMyh+UcN4RtCUuH60lZmR6PKFd8MRaWM+/fpDCvCHi/G7PQ== X-Received: by 2002:a05:6402:3549:b0:5c8:8381:c0f9 with SMTP id 4fb4d7f45d1cf-5c8b18d6041mr289688a12.2.1727821340808; Tue, 01 Oct 2024 15:22: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-5c882493acasm7004503a12.83.2024.10.01.15.22.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Oct 2024 15:22:20 -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:11008 Archived-At: This is a multi-part message in MIME format. --------------kHOTmmGH0oiMuk1V7ZP0vjnT Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 that test-eq is equivalent to: > >> (test-assert [test-name] (eq? expected test-expr)) > Hence the test-assert's requirement to evaluate test-name only once applies. > > However the test-name is evaluated multiple times: > > (use-modules (srfi srfi-64)) > (test-begin "x") > (test-eq (pk "t") #t #t) > > Leading to: > > ;;; ("t") > > ;;; ("t") > > Have a nice day > Tomas Volf > > Same exact deal as in bug reports 72372, 72373, 72375, and 72376. Fixing 72375 would fix this one too, as test-eq, test-eqv, and test-equal share a helper procedure, and the bug is in that helper procedure. Already fixed in my implementation. - Taylan --------------kHOTmmGH0oiMuk1V7ZP0vjnT Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
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 that test-eq is equivalent to:

(test-assert [test-name] (eq? expected test-expr))
Hence the test-assert's requirement to evaluate test-name only once applies.

However the test-name is evaluated multiple times:

    (use-modules (srfi srfi-64))
    (test-begin "x")
    (test-eq (pk "t") #t #t)

Leading to:

    ;;; ("t")

    ;;; ("t")

Have a nice day
Tomas Volf


Same exact deal as in bug reports 72372, 72373, 72375, and 72376.

Fixing 72375 would fix this one too, as test-eq, test-eqv, and test-equal share a helper procedure, and the bug is in that helper procedure.

Already fixed in my implementation.

- Taylan

--------------kHOTmmGH0oiMuk1V7ZP0vjnT--