From patchwork Sat Oct 29 13:56:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 59623 Return-Path: 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 420773858291 for ; Sat, 29 Oct 2022 13:56:36 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id ED0DD3858D32 for ; Sat, 29 Oct 2022 13:56:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ED0DD3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wm1-x334.google.com with SMTP id 14-20020a05600c228e00b003cf4eaef74eso4511629wmf.0 for ; Sat, 29 Oct 2022 06:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=content-transfer-encoding:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=D+qkyPyFJdg1MUppImdA2/4q2KcqyvwJnswla2VpgKA=; b=L2a8UDHmfMGMkH/Ytscx6GtW7fBvut8HYRv1nafnZooSqZdKf0cF/AypQ96aEKEWeq VhzA5V80XPIjkSniiB2n9OZIYBVw9v0+3ttVcZfPAl1Cu9hnq3lW0x0aUO8EkUvh71Ns mIZzzVnqA7Uz3KmUMQYLym+KE6DiWNXdzm4XulpdPfutr6/5Tq49B9DC+cKkvd+/OSBI xzldJJjdG6poI7tqM4v7WgG9IUHDGB9ZIDmAr02KjOs49HMhFXur5h4ZoU1S0xt/vVM6 cuBhAU6On/e98up3Y3bnD1ZvNY0Mqsp20V1Vy5hFO0KcF42Ld5MT2BLdE6uRm9GV66r0 tPuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=D+qkyPyFJdg1MUppImdA2/4q2KcqyvwJnswla2VpgKA=; b=GBQI4+CfBdbs2fW/FkYZtAQbPDu5ow+He+sSH6vDoP1RkkKpZJwK5jRmg0w54MF/fA Bz+Vmv1Q6aLo2RiOAl50AmxCXtMihOK7CSWKYZaMiNe1Mb/laado6wRB2K3bS94Pqyf3 W1l5lBfUhhmZ3prQZWKc3u1m/lfKfhxjBSgjkNEEMygmAmmVVrPUWS37q7xwy5zpiaD7 siJToW6y2T2pUDCSqIe+LzpuJzeGr+sqSZnp0qbcl1MuQ9LyngDdTQGRLuLPJuX0KQqP wZrkKlmyz7w/IK0Xy9WNeu91xAF2PCfg3zND0SLLVL5GYI5ICG5hOvWObQsKQ5iE94Yi H1yQ== X-Gm-Message-State: ACrzQf3sB6pHDGmKIGIDbSR4Rwf0DRHokY59dWda3zmM3DP/DeAs2KQv r3DuKtDOVPMmO/YXfa23i/Epim0b7sDsP2ig X-Google-Smtp-Source: AMsMyM7RmrLJIugLC5kaQ641LZTkBjLXjj7BVMGjjJmSpbl1YhkqIZjX2zbUbjXOCiBOeEcoFh68JA== X-Received: by 2002:a1c:730e:0:b0:3b4:b0c0:d616 with SMTP id d14-20020a1c730e000000b003b4b0c0d616mr2582063wmb.72.1667051780713; Sat, 29 Oct 2022 06:56:20 -0700 (PDT) Received: from tpp.orcam.me.uk (tpp.orcam.me.uk. [2001:8b0:154:0:ea6a:64ff:fe24:f2fc]) by smtp.gmail.com with ESMTPSA id i10-20020adffdca000000b00236674840e9sm1583243wrs.59.2022.10.29.06.56.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2022 06:56:20 -0700 (PDT) Date: Sat, 29 Oct 2022 14:56:19 +0100 (BST) From: "Maciej W. Rozycki" To: Simon Marchi Subject: [OB PATCH] gdb/testsuite: Wrap `param_integer_error' in gdb.guile/scm-parameter.exp In-Reply-To: Message-ID: References: <20221024164338.1762303-1-simon.marchi@efficios.com> <8ef2b43b-9ac4-3a50-3c93-753c8dcfe001@simark.ca> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Simon Marchi , Tom de Vries , gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Wrap an overlong line in the definition of `param_integer_error' in gdb.guile/scm-parameter.exp. No functional change. --- On Wed, 26 Oct 2022, Simon Marchi wrote: > >>>   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: Thanks, though why such a rush to fix a benign test failure while the review took months in the first place? FWIW I have been struggling to get multiple versions of Guile compiled and installed locally (easier) and then GDB built against each of them (tougher). As it turns out our documentation is misleading. We have: `--with-guile[=GUILE]' Build GDB with GNU Guile scripting support. (Done by default if libguile is present and found at configure time.) If your host does not have Guile installed, you can find it at `https://www.gnu.org/software/guile/'. The optional argument GUILE can be a version number, which will cause `configure' to try to use that version of Guile; or the file name of a `pkg-config' executable, which will be queried to find the information needed to compile and link against Guile. (and similarly in `./configure --help'), so one could have thought `--with-guile=2.0' will work. Well, not. You need to specify both the name and the version, e.g.: `--with-guile=guile-2.0', which I find kind of awkward: why would one want to have a Guile package under a name that is not "guile"? I think documentation is sensible and it's implementation that ought to be fixed. But that is not enough. Still I got: checking whether to use guile... guile-2.0 checking for pkg-config... /usr/bin/pkg-config checking for usable guile from /usr/bin/pkg-config... checking for scm_set_automatic_finalization_enabled... no configure: error: in `.../gdb': configure: error: linking guile version guile-2.0 test program failed See `config.log' for more details make[1]: *** [Makefile:12496: configure-gdb] Error 1 This is because I have built local Guile as static libraries only and dependencies are not pulled with the (incorrect) `pkg-config' invocation we have in our configury. I got these issues sorted now and will be posting fixes soon. With these in place I have figured out that the message changed between Guile 2.0 and 2.2. Last but not least here's a fix I committed as obvious to correct an overlong line you have introduced with your change. While we do have an exemption for TCL code, there's no need to make use of it here and these long lines hit clarity of code badly. I have verified this test case to still pass after my change. Maciej --- gdb/testsuite/gdb.guile/scm-parameter.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) gdb-test-scm-parameter-error-wrap.diff Index: src/gdb/testsuite/gdb.guile/scm-parameter.exp =================================================================== --- src.orig/gdb/testsuite/gdb.guile/scm-parameter.exp +++ src/gdb/testsuite/gdb.guile/scm-parameter.exp @@ -185,7 +185,9 @@ foreach_with_prefix kind { set param_integer_error \ [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: )?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"