From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id F01E13858C27 for ; Tue, 17 Jan 2023 14:12:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F01E13858C27 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673964750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n+Y8Cp2vAqT8s1K2mAdoNPdecpf2it3CWvVndKY5NKg=; b=apYmxMrrPMCOEmFG1HaA9PZnxoNkWCE+2IyaVKFf01JVeP0iOa1DVpA8ktqpY5eEWnI7uG KZLiKg6yHSwfJQ3y9vbP/q+CiNWqKyqnAacLplKnD8SKmo+CeRJXccBBJJlifjL2B7DNKa B/FNbZbqGCaARyKVZahtgboUC5YKt7A= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-330-XnWeyViKMZWq8Mx33IrUaQ-1; Tue, 17 Jan 2023 09:12:29 -0500 X-MC-Unique: XnWeyViKMZWq8Mx33IrUaQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 818893C10149 for ; Tue, 17 Jan 2023 14:12:26 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.43.2.105]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1041D40C6EC4; Tue, 17 Jan 2023 14:12:25 +0000 (UTC) From: Bruno Larsen To: gdb-patches@sourceware.org Cc: Bruno Larsen Subject: [PATCH 2/2] gdb/testsuite: fix running gdb.linespec/cp-completion-aliases.exp with clang Date: Tue, 17 Jan 2023 14:00:08 +0100 Message-Id: <20230117130007.1686917-3-blarsen@redhat.com> In-Reply-To: <20230117130007.1686917-1-blarsen@redhat.com> References: <20230117130007.1686917-1-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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 List-Id: Currently, all important tests in gdb.linespec/cp-completion-aliases.exp are failing when using clang because the wrong type is being suggested for the completion. For example, running with gcc and clang we get the following output respectively: (gdb) break get_value(object_p) <- gcc version (gdb) break get_value(object*) <- clang version Since both suggestions are acceptable on their own, and the original bug was if GDB suggested both at the same time, this commit updates the test to accept both, gcc's and clang's outputs. --- .../gdb.linespec/cp-completion-aliases.exp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/gdb.linespec/cp-completion-aliases.exp b/gdb/testsuite/gdb.linespec/cp-completion-aliases.exp index 33ad72e6f05..01ec61f4591 100644 --- a/gdb/testsuite/gdb.linespec/cp-completion-aliases.exp +++ b/gdb/testsuite/gdb.linespec/cp-completion-aliases.exp @@ -27,15 +27,15 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} { # Disable the completion limit for the whole testcase. gdb_test_no_output "set max-completions unlimited" -test_gdb_complete_unique \ +test_gdb_complete_unique_re \ "break get_v" \ - "break get_value(object_p)" + "break get_value\\(object(_p|\\\*)\\)" -test_gdb_complete_unique \ +test_gdb_complete_unique_re \ "break gr" \ - "break grab_it(int_magic_t*)" + "break grab_it\\((int_magic_t|magic)\\\*\\)" -test_gdb_complete_multiple "break " "get_som" "ething(" { - "get_something(my_string_t)" - "get_something(object_p)" +test_gdb_complete_multiple_re "break " "get_som" "ething\\\(" { + "get_something\\((my_string_t|char\ const\\*)\\)" + "get_something\\(object(_p|\\*)\\)" } -- 2.39.0