From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id NjxJChHIQWgJKQIAWB0awg (envelope-from ) for ; Thu, 05 Jun 2025 12:38:41 -0400 Received: by simark.ca (Postfix, from userid 112) id 197161E102; Thu, 5 Jun 2025 12:38:41 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8956B1E0C2 for ; Thu, 5 Jun 2025 12:38:40 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C5A643858408 for ; Thu, 5 Jun 2025 16:38:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5A643858408 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by sourceware.org (Postfix) with ESMTPS id 348CC3858D33 for ; Thu, 5 Jun 2025 16:38:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 348CC3858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 348CC3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749141483; cv=none; b=YmbJy4Cg0lFKWcIZA4Tec2h+3HBTzzVDnMBEjSfoQZPq2YjBqu9G038mywTSYg313s4MvYorylCEYetEdAfrJi9zwJadoekpm867eAMlOV7UCwjGCANb+6o2sQ3kqJQsv9IH9O2DEDbJlkC/TZ8I04HgKhwuY2zkkZQ2K7X+JnY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1749141483; c=relaxed/simple; bh=t9+nfgDenjfGYJMJ+hfvp1oD3GuCFgcv1OPcb8YG6nQ=; h=Message-ID:Date:MIME-Version:Subject:From:To; b=lF1OzxMyNq2fT3bHm3iUgejYCqTz4ZSzwynHQ+obd6HReRfSzlSBZK+TLcuBKbum8DMaKWVodCxMwhE2DhgBRFjqLH7+yyzhI214ak5XptJ0htoum7euWj3neU1j/9J3LqINjiKyGg5ZMNGoDzfrsNpg4MTYgZdmiEL64B3ZFE4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 348CC3858D33 Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-442f4a3a4d6so7391215e9.0 for ; Thu, 05 Jun 2025 09:38:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749141482; x=1749746282; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=W7Ly894Xw7liQ3c12TJFIBd+nBm0mAKPFdtAdjdahkE=; b=gatICz4G4FwY2MFPzDzbHl7q7Ya37zz9n/wIFEegZWD98tJmKzR+ji4+xR7fXKEU2K iSitDJI5xT3nYyWxvNbydDfOhqLQZ/GWXzCNkoZHmhzpwtIIIefJBT87c+peSS7Tcs9l ylYjk1Ma2PeR8VBoMhMoZH994cFyrl5wJxjwafGArWdIcDXE2bzbdEsXOwFB7lRFeK5E LfZwa2rOBfWeCuk8Y5jr0lyyGRTVnva2AL4jzH0+OI/tpiY0U/Tv45/IaWzgvj8+taa2 XTKUhHlyrUN00f4rPaxEdtTLriHzgCGxo/y0KSvATCRLNSb772BmniGkDufn7LlEV2sR c+vw== X-Forwarded-Encrypted: i=1; AJvYcCUZjz73LlSPRGUwbW6HBSnAgxoAG3tet8IGeViUZzEWwgpDFi/sMC7QlK353lUyJdvZ31cXDkgJmhJV8g==@sourceware.org X-Gm-Message-State: AOJu0Yw7p7PtVO/nJeltpwcoH0ZxxhIwKlpfLG8NDfEFHEr9FpTpW8WW 6me0N4o5FlCdo3pWsh8MGPWbeGBGHqNhtjFUiyVATN1gxRzjVpntl7lozIoqJdwU X-Gm-Gg: ASbGncsGghAvbiXhW/gKKwDXijfYlT3b2QY52ChoPJ2xGtneKWjw+XWcnmmuOdM0+QW i5bHtSIrwHHkqwBNs0UK+07G7L1Tn4KMJ3ZPZni7a/rezWExA9TNstLlm+O8da2Pb+EocSVp3uJ 8YylW7yXL2JssoD5YwWHaEGDgN9TXXVP8yyLQHzWQWCjZUV11MXxctyGNwLMZrO5+Z69rtrR6/F 3n3XlT4B0cFQrQNi18utgPGZDeTpI2VpzpxNktMIMOx1biWqUNr3SzfrWeXBNygpYM94I1TpJyf qwzI0Lpafv6e89XYaPaS6GtXYarwzvxDIgJ6AxpecqMNPy51u6l8+xzgr7RrcL/jYE2/F6XaN1f MtoGx80+sN4j1xqwK6bg= X-Google-Smtp-Source: AGHT+IF7p1/ICDjh4+PYF8UbmjKZsUbPBuyntK+n2NJiOsXbJhH7VEyFPe6Yb/g0deYFen78Umf9HQ== X-Received: by 2002:a05:600c:8b26:b0:43b:c6a7:ac60 with SMTP id 5b1f17b1804b1-451f889179amr44475685e9.10.1749141481794; Thu, 05 Jun 2025 09:38:01 -0700 (PDT) Received: from ?IPV6:2001:8a0:facf:2b00:451a:975e:a6cb:7552? ([2001:8a0:facf:2b00:451a:975e:a6cb:7552]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-451f9816ccfsm30675015e9.15.2025.06.05.09.38.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Jun 2025 09:38:01 -0700 (PDT) Message-ID: <1d374acd-c8e9-48d2-b253-a4584366d953@palves.net> Date: Thu, 5 Jun 2025 17:37:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] of [PATCH v2 42/47] gdb_test_multiple: Anchor prompt match if -lbl From: Pedro Alves To: Tom de Vries , gdb-patches@sourceware.org References: <20250519132308.3553663-1-pedro@palves.net> <20250519132308.3553663-43-pedro@palves.net> <9c94d111-a9a6-4c89-9e8e-4d5386f1562f@suse.de> <401356fc-d91b-4c70-89e2-9d9971b6b094@palves.net> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 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 Hi! On 2025-05-28 12:59, Pedro Alves wrote: > +gdb_test_multiple "command" "" -lbl { > + -re "^command(?=\r\n)" { > + verbose -log > + incr saw_command > + exp_continue > + } > + -re "^\r\nprefix foo(?=\r\n)" { > + verbose -log > + incr saw_prefix_foo > + exp_continue > + } > + -re "^\r\nprefix bar(?=\r\n)" { > + verbose -log > + incr saw_prefix_bar > + exp_continue > + } > + -re "^\r\nprefix (?=\r\n)" { > + verbose -log > + incr saw_prefix > + exp_continue > + } Reading back, I realized that this example looks a bit silly as is, because you could fix it by just moving the "prefix " case earlier than the "prefix foo/bar" cases. I should make the command output something after "prefix", like "prefix xxx", and then the regexp should match something like: -re "^\r\nprefix [^\r\n]*(?=\r\n)" { That's more like what the original testcase that exposed the issue does. I'll send an updated patch soon.