From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oT4FK/Zn32ocehwAWB0awg (envelope-from ) for ; Mon, 26 Oct 2026 10:47:18 -0400 Received: by simark.ca (Postfix, from userid 112) id AD1D91E033; Mon, 26 Oct 2026 10:47:18 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (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 53A8B1E007 for ; Mon, 26 Oct 2026 10:47:18 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8C2004BA2E3B for ; Mon, 26 Oct 2026 14:47:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C2004BA2E3B Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 33D2C4BA23C4 for ; Mon, 26 Oct 2026 14:46:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 33D2C4BA23C4 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 33D2C4BA23C4 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793025970; cv=none; b=Vd0DXRDgTWeI2vfHI9sp+A7hEYRo8M10DDlCXgHDMl8+tZ+jJY/G2ydvggiJh+szMzSe1T0QEeby+OEDsDP8GJ569ErMRsNihshRUEPz5yregfrV9OK1PBT2erjKXVI5oEpbR5NFGiXUflzRfjYIzaLU8hxCkpPkCSmr6WentSk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793025970; c=relaxed/simple; bh=8I/tbw3x9D97uiqn9mGFsc1GQMEfotrmUJgIJl7xMYw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=nETClFBaRV3ZvqpasZbTZd/wmVCU5Wc5P8sqngKzKWrUO1pila3Ue3auFqNNm8sgQ+vZBwC8b2W1H2Wqqr+YTduOK/CPBROgEGOSY+YiTsnzOxW9kGqoQ28K8i69/N5Pi6S9wIS/49BdVsYG7clQfiPfvF/cL8eUQoER9C6PkZQ= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33D2C4BA23C4 Received: by simark.ca (Postfix) id CDE991E007; Mon, 26 Oct 2026 10:46:08 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 1/2] gdb/testsuite: fix max-completions regex in test_gdb_complete_cmd_multiple Date: Mon, 26 Oct 2026 10:45:55 -0400 Message-ID: <20261026144606.1941722-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.56.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 When called with MAX_COMPLETIONS true and a non-empty COMPLETION_WORD, test_gdb_complete_cmd_multiple fails to match the "List may be truncated" line. It expects that line to start with CMD_PREFIX only ("macro expand " in the example below), but GDB prints CMD_PREFIX ("macro expand ") followed by COMPLETION_WORD ("BEFORE_"): (gdb) complete macro expand BEFORE_ macro expand BEFORE_MACSCP1_1 macro expand BEFORE_MACSCP1_2 macro expand BEFORE_ *** List may be truncated, max-completions reached. *** Fix it by including COMPLETION_WORD in the expected line. The next patch adds a test that depends on this. I suppose that no other test uses this proc in this exact way currently, I don't see any regression following this change. Change-Id: I645197f625212dd6c654081742b3bd42fac36229 --- gdb/testsuite/lib/completion-support.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/lib/completion-support.exp b/gdb/testsuite/lib/completion-support.exp index 112c48df6cf0..0c4b72b1c073 100644 --- a/gdb/testsuite/lib/completion-support.exp +++ b/gdb/testsuite/lib/completion-support.exp @@ -246,9 +246,9 @@ proc test_gdb_complete_cmd_multiple { cmd_prefix completion_word completion_list set expected_re [make_cmd_completion_list_re $cmd_prefix $completion_list $start_quote_char $end_quote_char] if {$max_completions} { - set cmd_prefix_re [string_to_regexp $cmd_prefix] + set input_re [string_to_regexp $cmd_prefix$completion_word] append expected_re \ - "$cmd_prefix_re \\*\\*\\* List may be truncated, max-completions reached\\. \\*\\*\\*.*\r\n" + "$input_re \\*\\*\\* List may be truncated, max-completions reached\\. \\*\\*\\*.*\r\n" } set cmd_re [string_to_regexp "complete $cmd_prefix$completion_word"] base-commit: 50b7267f00c094614ab4efb43f7aac0507a436e7 -- 2.56.0