From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by sourceware.org (Postfix) with ESMTPS id 5AF203858D3C for ; Fri, 10 Dec 2021 22:01:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5AF203858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f42.google.com with SMTP id o19-20020a1c7513000000b0033a93202467so7668893wmc.2 for ; Fri, 10 Dec 2021 14:01:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=G7uKIs4uncOTa4D0XD1/iKQGt98gnhzXtEWHqBqJB70=; b=VHgWeDh6Hd0h7JSw+d84XGwDjRbvaiRn9u1vsDHF/cMCim+uUuJZygB9nyS0fxfL2M mtdGLLlFjjaGaWkZ4efZhBUsa/c70m+cp7A9ajQEtycFxIOo6vh7l0HUk4MFclD5Tdsx p9db++WiLp5Evxdk6HdCc7r9hi4zlV8p81jAAKmJ9bqhjfvqGczCAPyxyExzjqn1+Oze WS4qgkXSt8vak1Yb6LnqfN9taK9z2q3M9dcHsdRMXHjuBBqxMU915yiJdP1OBlDPJJ9X K50P4XHyLtH46F/uibybRupUr4bUGhduY3K1wkPSg14iGxPakHPMlQ/3E27iLbBkVqnC afsA== X-Gm-Message-State: AOAM530j/SDGuTRbFLE3swfiJFegAaRMBJHb74BUu26nd0LowdeOn6cS xVwKPzKQYVGBZJGPoAdVGhI= X-Google-Smtp-Source: ABdhPJyBNRM6sX4RhRj/5o04T/fQj/wl2UTjqIXpJoJ+2poywOfxuEekG8huq2sQCeETjt1H/VR/5g== X-Received: by 2002:a05:600c:34c2:: with SMTP id d2mr20821991wmq.102.1639173684394; Fri, 10 Dec 2021 14:01:24 -0800 (PST) Received: from ?IPV6:2001:8a0:f912:1a00:d3db:ac91:4b9e:1449? ([2001:8a0:f912:1a00:d3db:ac91:4b9e:1449]) by smtp.gmail.com with ESMTPSA id g13sm602889wri.102.2021.12.10.14.01.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Dec 2021 14:01:23 -0800 (PST) Message-ID: <2af98178-7c4f-f0b7-e63a-327c914e09c5@palves.net> Date: Fri, 10 Dec 2021 22:01:22 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH 03/29] gdb/testsuite: Remove duplicates from gdb.base/interp.exp Content-Language: en-US To: Lancelot SIX Cc: gdb-patches@sourceware.org References: <20211121175636.779325-1-lsix@lancelotsix.com> <20211121175636.779325-4-lsix@lancelotsix.com> <20211122173357.iyzk2puf7uxcczie@Plymouth> From: Pedro Alves In-Reply-To: <20211122173357.iyzk2puf7uxcczie@Plymouth> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , X-List-Received-Date: Fri, 10 Dec 2021 22:01:27 -0000 On 2021-11-22 17:33, Lancelot SIX wrote: > On Mon, Nov 22, 2021 at 02:13:59PM +0000, Pedro Alves wrote: >> On 2021-11-21 17:56, Lancelot SIX via Gdb-patches wrote: >>> # Regression test for crash when an exception occurs in mi_parse. >>> -gdb_test_multiple "interpreter-exec mi \"-break-insert --thread a\"" \ >>> - "regression test for mi_parse crash" { >>> +set cmd "interpreter-exec mi \"-break-insert --thread a\"" >>> +gdb_test_multiple $cmd "regression test for mi_parse crash" { >> >> This "regression test for mi_parse crash" message is used if this >> gdb_test_multiple detects an internal error, a timeout, etc. >> >>> -re ".error,msg=.Invalid value for the '--thread' option.\r\n$gdb_prompt " { >>> pass "$cmd" >> >> ... while here we use $cmd. >> >> This means that this test can have its result oscillate like this: >> >> -FAIL: regression test for mi_parse crash" >> +PASS: interpreter-exec mi "-break-insert --thread a" >> ... >> +PASS: interpreter-exec mi "-break-insert --thread a" >> -FAIL: regression test for mi_parse crash" >> >> >> The "modern" pattern would be to not have a $cmd variable at all, pass an empty >> string as second argument to gdb_test_multiple, and then passing $gdb_test_name >> to "pass". Like: >> >> gdb_test_multiple "interpreter-exec mi \"-break-insert --thread a\"" "" { >> -re .... { >> pass $gdb_test_multiple >> } >> } >> >> >> Though simplest is to pass $cmd as second argument too like other >> gdb_test_multiple invocations in the file: >> >> gdb_test_multiple $cmd $cmd { >> ... >> >> >> >> Could you take care of this while at it? >> >> Pedro Alves > > Hi, > > Thanks for the inputs. > > I have updated the patch as follows. Thanks, this is OK.