From patchwork Sat Oct 12 02:32:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Buettner X-Patchwork-Id: 98773 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 0494A385AC1C for ; Sat, 12 Oct 2024 02:43:54 +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.129.124]) by sourceware.org (Postfix) with ESMTP id 539B93857B91 for ; Sat, 12 Oct 2024 02:43:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 539B93857B91 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 539B93857B91 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728700990; cv=none; b=pbC/hSGwYxtG1C6J4V4mVur7a8KS3trtBjfHg0nLy2p9iJkCKPxlDBTx6pvDe5nzxv4Lme7D+72c2fLQzB+v3V2ORxYyplfVfrsgyR8T3ATVzZryUfiEAhFLm/qZmQr53VHCMVqoofnURSan6PPYqsMCjNIeE5ueajlwyIIoJvg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728700990; c=relaxed/simple; bh=/xjatM3GzKfdNWlq4ZVSQ25BA7TIBI1LImJcEUh3JmU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=xP5lbj5xBAq6NmAXI3UsAnIC8GDYr7DHm9ZGMuKbq+OGGcRAPDYCbqMQ50WxSu8Utm9NVn8kxUuGG/gcahTdkJGTHbD2hOma9XJZmqbzQoZ23VSXd8YtlPUBHbGkoDzoTk+V6mPcxYl22lvMfe4zR7aeXWFwDE+INmpv2KJAWJU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728700988; 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=iJZukVfG7pqG5Mi11DLiMwNulq2Tix5PZN4VvBayVv2GGpnSq7ycvshzeTjbE8185Nxjpj 5FrYCFjZkBC3LwW5+NqXV7g4gjtBm/NQCGN0AXo5oQA7pB54njCIgevXFFWzfDZAP3Uv7N 5AeuMF4rG6+ljoEE7pP+wjx+1CpMzvU= Received: from mx-prod-mc-01.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-187-PNQ3T7g_PuWkl-f9ctxO9w-1; Fri, 11 Oct 2024 22:43:05 -0400 X-MC-Unique: PNQ3T7g_PuWkl-f9ctxO9w-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 61B20195608C for ; Sat, 12 Oct 2024 02:43:04 +0000 (UTC) Received: from f41-1.lan (unknown [10.22.64.14]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8B67819560AA; Sat, 12 Oct 2024 02:43:03 +0000 (UTC) From: Kevin Buettner To: gdb-patches@sourceware.org Cc: Kevin Buettner Subject: [PATCH v2 02/11] Allow TLS access to work in gdb.server/no-thread-db.exp Date: Fri, 11 Oct 2024 19:32:43 -0700 Message-ID: <20241012024220.101084-3-kevinb@redhat.com> In-Reply-To: <20241012024220.101084-1-kevinb@redhat.com> References: <20241012024220.101084-1-kevinb@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.8 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)"