From patchwork Fri Oct 25 02:26:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Buettner X-Patchwork-Id: 99519 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 14BFC3858C39 for ; Fri, 25 Oct 2024 03:36:13 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 113F73858D34 for ; Fri, 25 Oct 2024 03:35:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 113F73858D34 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 113F73858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729827307; cv=none; b=KC45Gg7l3GvGSJyEdZzbpzk7bPSI0bV7obs8CRSwhlN5xFAaOfeJtuYcKHxxSDCakQhrMooKxskGzSIVMQkdNSQyhAA75ZxK1PZXKZvfPiy/tmqzgbcfnk+wzETJSStFwipJGHu8bSf9FaExhDxm+X3k6ePlaO+EjbwMDqRk9zI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729827307; c=relaxed/simple; bh=/xjatM3GzKfdNWlq4ZVSQ25BA7TIBI1LImJcEUh3JmU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=yCs7EsRBxmywGmiTZs54d52wx/qFOVplsF0YtlSZ/UfHkvf/Sr3haYpVjk6ZNXaZunoqaZE8LAC2jgSUlUfOlcmgzN8Q23rUHeZgXEABYpR0ygfAAAAAw5HTDhPZbUYgU22laMw4zePPYB0UY/rRj/x4o6CX5NME73B2gr8MEAQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729827303; 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=ibMUVLjAjzoNerlX70etYfgrVfMRAp7rH8ZrL3jAb2Q=; b=Tsxhw5QoeEy59YSywnzYUk0ydrB5V8gxlBYuAKSvTCtGhDzfb+ZylYPFZMNZtQzQHfZ8iT IV1zwiR59M3oSvOOntqVNwmg1WaioPOO8FhmntxPth7PtyFjpsMJ2d3WrDOXngCdTidVGh bmQRnPcFfGSENvq8UpIPvXcOX6zyMQg= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-622-rikpg3L8Mba1YP_WNV0ChA-1; Thu, 24 Oct 2024 23:35:02 -0400 X-MC-Unique: rikpg3L8Mba1YP_WNV0ChA-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8C69C19560AD for ; Fri, 25 Oct 2024 03:35:01 +0000 (UTC) Received: from f41-1.lan (unknown [10.22.64.38]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B02933000198; Fri, 25 Oct 2024 03:35:00 +0000 (UTC) From: Kevin Buettner To: gdb-patches@sourceware.org Cc: Kevin Buettner Subject: [PATCH v3 02/11] Allow TLS access to work in gdb.server/no-thread-db.exp Date: Thu, 24 Oct 2024 19:26:20 -0700 Message-ID: <20241025033431.36274-3-kevinb@redhat.com> In-Reply-To: <20241025033431.36274-1-kevinb@redhat.com> References: <20241025033431.36274-1-kevinb@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.9 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_H3, RCVD_IN_MSPIKE_WL, 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 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~patchwork=sourceware.org@sourceware.org The patches later in the series add GDB-internal TLS support for certain targets. This commit updates the "print foo" test in gdb.server/no-thread-db.exp to accept either a TLS failure (when libthread_db isn't available) or printing the correct answer, which will occur when GDB's internal TLS address resolution can be used. I'm making this change prior to the commits which actually add the GDB-internal TLS support in order to avoid tripping regression testers. --- gdb/testsuite/gdb.server/no-thread-db.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.server/no-thread-db.exp b/gdb/testsuite/gdb.server/no-thread-db.exp index 656fad1a560..baad81b0f8e 100644 --- a/gdb/testsuite/gdb.server/no-thread-db.exp +++ b/gdb/testsuite/gdb.server/no-thread-db.exp @@ -57,6 +57,8 @@ gdb_breakpoint ${srcfile}:[gdb_get_line_number "after tls assignment"] gdb_continue_to_breakpoint "after tls assignment" # Printing a tls variable should fail gracefully without a libthread_db. +# Alternately, the correct answer might be printed due GDB's internal +# TLS support for some targets. set re_exec "\[^\r\n\]*[file tail $binfile]" gdb_test "print foo" \ - "Cannot find thread-local storage for Thread \[^,\]+, executable file $re_exec:\[\r\n\]+Remote target failed to process qGetTLSAddr request" + "= 1|(?:Cannot find thread-local storage for Thread \[^,\]+, executable file $re_exec:\[\r\n\]+Remote target failed to process qGetTLSAddr request)"