From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2UbbBLalm2G8ewAAWB0awg (envelope-from ) for ; Mon, 22 Nov 2021 09:14:14 -0500 Received: by simark.ca (Postfix, from userid 112) id 01D6E1F0CE; Mon, 22 Nov 2021 09:14:13 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_DYNAMIC autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3B3AE1E940 for ; Mon, 22 Nov 2021 09:14:13 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A1264385840F for ; Mon, 22 Nov 2021 14:14:12 +0000 (GMT) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by sourceware.org (Postfix) with ESMTPS id 5E85C3858406 for ; Mon, 22 Nov 2021 14:14:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5E85C3858406 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-wr1-f41.google.com with SMTP id c4so32947566wrd.9 for ; Mon, 22 Nov 2021 06:14:02 -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:references:from:in-reply-to :content-transfer-encoding; bh=SGVNtieKvTz6+eCmvHwmCl8T/lxQSG+kQS9hftH3EqI=; b=dNFhkQ7ff7SAVwUCREb5SX4G7VX01vbaGdYaksHPOJ8hnzY9CHjMyI2dGvETFR5y9b 7tM1etvtLLlQhrmQza5wAVcin5Yn5NBwMHo2J//uCZFoInmHnrfhtZHIU4P7WvILqCP+ JxhZQU7StKEiCugAyupcz/iDX5g1tVQTHZrzCfy3rdZ/iZP+nBqLV+W5vL6eWksn5wL6 lJc75ysD5mzJ6i8KVRXD0WlWzWKZbVPhUcbpWi47QaVuoDO539yL/XFBvVjNqhQ+2lS6 kTeCMjxtll7v0MmgSty7dR/DIX6347C51LUxXqlGGshhhh4DvQnYGeH9JObsRLS0Hlqj ji6w== X-Gm-Message-State: AOAM5316GMqE9Jet1q+/zw+T7qq/TO3zQE9oXmc4TyJv92Z3qfii1h9J lfl2qnROeGYsvolzkwLYezIkkLfhRG/6+Q== X-Google-Smtp-Source: ABdhPJxxtz+NfIKspeEybRI3FS7/fQElmZF5tL/K+8N7e83hlDmHObJuE3k+51B2OCzm/WEA3FZt5A== X-Received: by 2002:a5d:5850:: with SMTP id i16mr36123324wrf.410.1637590441083; Mon, 22 Nov 2021 06:14:01 -0800 (PST) Received: from ?IPV6:2001:8a0:f912:1a00:fb57:3faf:e98:b979? ([2001:8a0:f912:1a00:fb57:3faf:e98:b979]) by smtp.gmail.com with ESMTPSA id s63sm10116018wme.22.2021.11.22.06.13.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Nov 2021 06:14:00 -0800 (PST) Message-ID: Date: Mon, 22 Nov 2021 14:13:59 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH 03/29] gdb/testsuite: Remove duplicates from gdb.base/interp.exp Content-Language: en-US To: Lancelot SIX , gdb-patches@sourceware.org References: <20211121175636.779325-1-lsix@lancelotsix.com> <20211121175636.779325-4-lsix@lancelotsix.com> From: Pedro Alves In-Reply-To: <20211121175636.779325-4-lsix@lancelotsix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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