Message ID | 20221024164338.1762303-1-simon.marchi@efficios.com |
---|---|
State | New |
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B8D43385828C for <patchwork@sourceware.org>; Mon, 24 Oct 2022 16:44:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B8D43385828C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666629853; bh=nAdy89hyeJ84/BP++rDXW+PNcUPnETAp68eq7HeN6k0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=MEF/eDZ5xCm3mjdUbIdTTZOUhuNiMFJ5sqKeRhpaqUKCCgdchtJxBbvC+tWFDqw0h HHn+WzOy0jCesKL9OFUiYp/G1V8TiapavwkU4QbnnxQWvIOS2uTBTfbK2maKp0ai4J Y8qna93KBF0tF03twPUybhYklpqDE2x1AuRPNi+o= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 5B3083858022 for <gdb-patches@sourceware.org>; Mon, 24 Oct 2022 16:43:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5B3083858022 X-ASG-Debug-ID: 1666629819-0c856e13fd14685a0001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id ncEvNPkLWxp1BJWE (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO); Mon, 24 Oct 2022 12:43:39 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@efficios.com X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from epycamd.internal.efficios.com (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtp.ebox.ca (Postfix) with ESMTP id CE0E1441D64; Mon, 24 Oct 2022 12:43:38 -0400 (EDT) X-Barracuda-RBL-IP: 192.222.180.24 X-Barracuda-Effective-Source-IP: 192-222-180-24.qc.cable.ebox.net[192.222.180.24] X-Barracuda-Apparent-Source-IP: 192.222.180.24 To: gdb-patches@sourceware.org Subject: [PATCH] gdb/testsuite: fix gdb.guile/scm-parameter.exp "wrong type argument" test pattern Date: Mon, 24 Oct 2022 12:43:38 -0400 X-ASG-Orig-Subj: [PATCH] gdb/testsuite: fix gdb.guile/scm-parameter.exp "wrong type argument" test pattern Message-Id: <20221024164338.1762303-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1666629819 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 2701 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.101648 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Spam-Status: No, score=-3498.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Simon Marchi <simon.marchi@efficios.com> Cc: "Maciej W . Rozycki" <macro@embecosm.com>, Simon Marchi <simon.marchi@efficios.com> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
gdb/testsuite: fix gdb.guile/scm-parameter.exp "wrong type argument" test pattern
|
|
Commit Message
Simon Marchi
Oct. 24, 2022, 4:43 p.m. UTC
Since commit 90319cefe3 ("GDB/Guile: Don't assert that an integer value is boolean"), I see: FAIL: gdb.guile/scm-parameter.exp: kind=PARAM_ZINTEGER: test-PARAM_ZINTEGER-param: guile (set-parameter-value! test-PARAM_ZINTEGER-param #:unlimited) FAIL: gdb.guile/scm-parameter.exp: kind=PARAM_ZUINTEGER: test-PARAM_ZUINTEGER-param: guile (set-parameter-value! test-PARAM_ZUINTEGER-param #:unlimited) This comes from the fact that GDB outputs this: ERROR: In procedure set-parameter-value!: In procedure gdbscm_set_parameter_value_x: Wrong type argument in position 2 (expecting integer): #:unlimited Error while executing Scheme code. while the test expects an additional "ERROR:" on the second line, something like this: ERROR: In procedure set-parameter-value!: ERROR: In procedure gdbscm_set_parameter_value_x: Wrong type argument in position 2 (expecting integer): #:unlimited Error while executing Scheme code. The patch below fixes the test for me. I believe that the first two lines are output by Guile itself, in the SCM_ASSERT_TYPE macro. I tried on different systems, different Guile versions (2.0, 2.2 and 3.0) and I always get the former output, never the output the test expects. I presume the patch below isn't right, as there is surely some systems that do print the latter output, otherwise Maciej (the original author) would have noticed it. I presume we'll need to accept both outputs. But I'd like we if could clarify when we get which. Change-Id: I9dc45e7492a4f08340cad974610242ed689de959 --- gdb/testsuite/gdb.guile/scm-parameter.exp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Comments
On Mon, 24 Oct 2022, Simon Marchi wrote: > I believe that the first two lines are output by Guile itself, in the > SCM_ASSERT_TYPE macro. I tried on different systems, different Guile > versions (2.0, 2.2 and 3.0) and I always get the former output, never > the output the test expects. I presume the patch below isn't right, as > there is surely some systems that do print the latter output, otherwise > Maciej (the original author) would have noticed it. I presume we'll > need to accept both outputs. But I'd like we if could clarify when we > get which. FTR I'm still looking into it and like you I have hesitated to just paper the issue over by allowing both outputs without first understanding what is really going on here. I cannot rule out a distribution-specific patch causing a discrepancy here, but I feel like tracking it down. NB guile 2.0.13 here, reporting as: guile (GNU Guile) 2.0.13 Packaged by Debian (2.0.13-deb+1-5.4) (and it seems like I have said version consistently throughout my relevant development machines except for different "-deb+..." suffixes). It must have had long distribution maintenance history. Maciej
On 2022-10-24 19:22, Maciej W. Rozycki wrote: > On Mon, 24 Oct 2022, Simon Marchi wrote: > >> I believe that the first two lines are output by Guile itself, in the >> SCM_ASSERT_TYPE macro. I tried on different systems, different Guile >> versions (2.0, 2.2 and 3.0) and I always get the former output, never >> the output the test expects. I presume the patch below isn't right, as >> there is surely some systems that do print the latter output, otherwise >> Maciej (the original author) would have noticed it. I presume we'll >> need to accept both outputs. But I'd like we if could clarify when we >> get which. > > FTR I'm still looking into it and like you I have hesitated to just paper > the issue over by allowing both outputs without first understanding what > is really going on here. I cannot rule out a distribution-specific patch > causing a discrepancy here, but I feel like tracking it down. > > NB guile 2.0.13 here, reporting as: > > guile (GNU Guile) 2.0.13 > Packaged by Debian (2.0.13-deb+1-5.4) According to that version number, it looks like Ubuntu 20.04? https://packages.ubuntu.com/focal/guile-2.0 I tried building on Ubuntu 20.04 against guile-2.0, and I see the same result as you. And when I try guile2.0 on Arch Linux (this package [1]), I also see the same result as you. So I must have tested it wrong previously. You can dig further if you want, but I'd be fine just accepting both outputs and saying that guile-2.0 outputs the additional ERROR: while subsequent versions do not. Simon [1] https://aur.archlinux.org/packages/guile2.0
On 10/25/22 03:08, Simon Marchi via Gdb-patches wrote: > > > On 2022-10-24 19:22, Maciej W. Rozycki wrote: >> On Mon, 24 Oct 2022, Simon Marchi wrote: >> >>> I believe that the first two lines are output by Guile itself, in the >>> SCM_ASSERT_TYPE macro. I tried on different systems, different Guile >>> versions (2.0, 2.2 and 3.0) and I always get the former output, never >>> the output the test expects. I presume the patch below isn't right, as >>> there is surely some systems that do print the latter output, otherwise >>> Maciej (the original author) would have noticed it. I presume we'll >>> need to accept both outputs. But I'd like we if could clarify when we >>> get which. >> >> FTR I'm still looking into it and like you I have hesitated to just paper >> the issue over by allowing both outputs without first understanding what >> is really going on here. I cannot rule out a distribution-specific patch >> causing a discrepancy here, but I feel like tracking it down. >> >> NB guile 2.0.13 here, reporting as: >> >> guile (GNU Guile) 2.0.13 >> Packaged by Debian (2.0.13-deb+1-5.4) > > According to that version number, it looks like Ubuntu 20.04? > > https://packages.ubuntu.com/focal/guile-2.0 > > I tried building on Ubuntu 20.04 against guile-2.0, and I see the same > result as you. And when I try guile2.0 on Arch Linux (this package > [1]), I also see the same result as you. So I must have tested it wrong > previously. > > You can dig further if you want, but I'd be fine just accepting both > outputs and saying that guile-2.0 outputs the additional ERROR: while > subsequent versions do not. > FWIW, I did the same here in commit 6bbe1a929c6 ("[gdb/testsuite] Fix gdb.guile/scm-breakpoint.exp with guile 3.0"). Thanks, - Tom
On 10/26/22 03:15, Tom de Vries wrote: > On 10/25/22 03:08, Simon Marchi via Gdb-patches wrote: >> >> >> On 2022-10-24 19:22, Maciej W. Rozycki wrote: >>> On Mon, 24 Oct 2022, Simon Marchi wrote: >>> >>>> I believe that the first two lines are output by Guile itself, in the >>>> SCM_ASSERT_TYPE macro. I tried on different systems, different Guile >>>> versions (2.0, 2.2 and 3.0) and I always get the former output, never >>>> the output the test expects. I presume the patch below isn't right, as >>>> there is surely some systems that do print the latter output, otherwise >>>> Maciej (the original author) would have noticed it. I presume we'll >>>> need to accept both outputs. But I'd like we if could clarify when we >>>> get which. >>> >>> FTR I'm still looking into it and like you I have hesitated to just paper >>> the issue over by allowing both outputs without first understanding what >>> is really going on here. I cannot rule out a distribution-specific patch >>> causing a discrepancy here, but I feel like tracking it down. >>> >>> NB guile 2.0.13 here, reporting as: >>> >>> guile (GNU Guile) 2.0.13 >>> Packaged by Debian (2.0.13-deb+1-5.4) >> >> According to that version number, it looks like Ubuntu 20.04? >> >> https://packages.ubuntu.com/focal/guile-2.0 >> >> I tried building on Ubuntu 20.04 against guile-2.0, and I see the same >> result as you. And when I try guile2.0 on Arch Linux (this package >> [1]), I also see the same result as you. So I must have tested it wrong >> previously. >> >> You can dig further if you want, but I'd be fine just accepting both >> outputs and saying that guile-2.0 outputs the additional ERROR: while >> subsequent versions do not. >> > > FWIW, I did the same here in commit 6bbe1a929c6 ("[gdb/testsuite] Fix gdb.guile/scm-breakpoint.exp with guile 3.0"). Thanks, then I just went ahead and pushed this: From ee7f721ea2f51cd6cda301ce6a68e84f61c31e0c Mon Sep 17 00:00:00 2001 From: Simon Marchi <simon.marchi@efficios.com> Date: Mon, 24 Oct 2022 12:43:38 -0400 Subject: [PATCH] gdb/testsuite: fix gdb.guile/scm-parameter.exp "wrong type argument" test pattern for Guile >= 2.2 Since commit 90319cefe3 ("GDB/Guile: Don't assert that an integer value is boolean"), I see: FAIL: gdb.guile/scm-parameter.exp: kind=PARAM_ZINTEGER: test-PARAM_ZINTEGER-param: guile (set-parameter-value! test-PARAM_ZINTEGER-param #:unlimited) FAIL: gdb.guile/scm-parameter.exp: kind=PARAM_ZUINTEGER: test-PARAM_ZUINTEGER-param: guile (set-parameter-value! test-PARAM_ZUINTEGER-param #:unlimited) This comes from the fact that GDB outputs this: ERROR: In procedure set-parameter-value!: In procedure gdbscm_set_parameter_value_x: Wrong type argument in position 2 (expecting integer): #:unlimited Error while executing Scheme code. while the test expects an additional "ERROR:" on the second line, something like this: ERROR: In procedure set-parameter-value!: ERROR: In procedure gdbscm_set_parameter_value_x: Wrong type argument in position 2 (expecting integer): #:unlimited Error while executing Scheme code. Guile 2.0 outputs the `ERROR:` on the second line, while later versions do not. Change the pattern to accept both outputs. This is similar to commit 6bbe1a929c6 ("[gdb/testsuite] Fix gdb.guile/scm-breakpoint.exp with guile 3.0"). Change-Id: I9dc45e7492a4f08340cad974610242ed689de959 --- gdb/testsuite/gdb.guile/scm-parameter.exp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.guile/scm-parameter.exp b/gdb/testsuite/gdb.guile/scm-parameter.exp index b9f2d8252117..0b2076c40576 100644 --- a/gdb/testsuite/gdb.guile/scm-parameter.exp +++ b/gdb/testsuite/gdb.guile/scm-parameter.exp @@ -183,10 +183,10 @@ foreach_with_prefix kind { "end" set param_integer_error \ - "ERROR: In procedure set-parameter-value!:\r\nERROR: In procedure\ - gdbscm_set_parameter_value_x: Wrong type argument in position 2\ - \\(expecting integer\\): #:unlimited\r\nError while executing Scheme\ - code\\." + [multi_line \ + "ERROR: In procedure set-parameter-value!:" \ + "(ERROR: )?In procedure gdbscm_set_parameter_value_x: Wrong type argument in position 2 \\(expecting integer\\): #:unlimited" \ + "Error while executing Scheme code\\."] set param_minus_one_error "integer -1 out of range" set param_minus_two_range "integer -2 out of range" set param_minus_two_unlimited "only -1 is allowed to set as unlimited"
diff --git a/gdb/testsuite/gdb.guile/scm-parameter.exp b/gdb/testsuite/gdb.guile/scm-parameter.exp index b9f2d825211..5d72da935bc 100644 --- a/gdb/testsuite/gdb.guile/scm-parameter.exp +++ b/gdb/testsuite/gdb.guile/scm-parameter.exp @@ -183,10 +183,10 @@ foreach_with_prefix kind { "end" set param_integer_error \ - "ERROR: In procedure set-parameter-value!:\r\nERROR: In procedure\ - gdbscm_set_parameter_value_x: Wrong type argument in position 2\ - \\(expecting integer\\): #:unlimited\r\nError while executing Scheme\ - code\\." + [multi_line \ + "ERROR: In procedure set-parameter-value!:" \ + "In procedure gdbscm_set_parameter_value_x: Wrong type argument in position 2 \\(expecting integer\\): #:unlimited" \ + "Error while executing Scheme code\\."] set param_minus_one_error "integer -1 out of range" set param_minus_two_range "integer -2 out of range" set param_minus_two_unlimited "only -1 is allowed to set as unlimited"