From patchwork Tue Feb 13 11:09:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinevere Larsen X-Patchwork-Id: 85658 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 C43FA3858004 for ; Tue, 13 Feb 2024 11:11:08 +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 ESMTPS id 8C12F385828E for ; Tue, 13 Feb 2024 11:10:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C12F385828E 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 8C12F385828E 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=1707822644; cv=none; b=UWLhPLqwfwhmx9tvNeptxdIpTkbyeJnZWQRUl4agn7Eepe71J1XYffAn4cfJyDgTtWWKNWi4iSLmPCZPQIPOUukB/uo7Lll5wUMcFszVpBA2GYdgSbcrxc1XgCVJ3jhT5fThM4ro7vscLU84YRL1GGWbd7hPHJQ6kTNZQH3o0vU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707822644; c=relaxed/simple; bh=7VsmzX39i0cSjXGEU+RZOoeCELdaMH3MguMCFPU1aro=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=O9En1GhIAwTmEaZ2cIjhbk17qwqJzg+7YEZ0S6ksqrojvVrXtTmefg0crc7CfITJJCiIGSVimehRPXRajpr8gm7geIKjvwbN7RDSVPtlmqQqslH2Q7w9WrfY1b3uB7ZA+X9WuOm1KPrFqYY3E3hagbac0RrK75HvLzyTq+hQxfQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707822642; 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=M52s5+cPvj/BWwP8gn0IN5y545tY3TJX58hBXpU2Br8=; b=hb+PQbEBXsN4xDexSz/5C/bTguXzglAacf6GvK3DWeNV1mt58EAThKhvLKS2Gcjk2vdTZJ /r8guLaKBuflDXUXqr5B3YjF784aAM0Kn1Znlwh7XrIMsJyte1RczIWmgS+In4olreA/D0 PuAT1qqDe813y+oOZIMrMDPw2rqL84k= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-675-WPSOKDmLPsuIuhE7A34VfQ-1; Tue, 13 Feb 2024 06:10:41 -0500 X-MC-Unique: WPSOKDmLPsuIuhE7A34VfQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id A8A46280A9A9 for ; Tue, 13 Feb 2024 11:10:40 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.224.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2FB2640149AA; Tue, 13 Feb 2024 11:10:40 +0000 (UTC) From: Guinevere Larsen To: gdb-patches@sourceware.org Cc: Guinevere Larsen Subject: [PATCH v2 1/2] gdb/testsuite: fix gdb.threads/threadcrash.exp on 32-bit arm targets Date: Tue, 13 Feb 2024 12:09:24 +0100 Message-ID: <20240213110924.123394-3-blarsen@redhat.com> In-Reply-To: <20240213110924.123394-2-blarsen@redhat.com> References: <20240213110924.123394-2-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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, T_SCC_BODY_TEXT_LINE 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 There are 2 issues with the test gdb.threads/threadcrash.exp on arm targets, both relating to issues in how the targets handles gcores. The first is that the test fails to cout the number of threads in the inferior and the second is that GDB can't properly backtrace from a gcore. The first error is fixed on this commit by getting the convenience variable _inferior_thread_count as opposed to calculating it based on the output of "info threads" For the second, this test just emits a single xfail referring back to PR corefiles/31294, which tracks the issues with gcores in 32-bit arm targets. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31294 --- gdb/testsuite/gdb.threads/threadcrash.exp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp index 996e020d1e8..6c638838043 100644 --- a/gdb/testsuite/gdb.threads/threadcrash.exp +++ b/gdb/testsuite/gdb.threads/threadcrash.exp @@ -27,12 +27,9 @@ proc test_thread_count {} { set thread_count 0 - gdb_test_multiple "info threads" "getting thread count" -lbl { - -re "Thread" { - incr thread_count - exp_continue - } - -re "$::gdb_prompt " { + gdb_test_multiple "print \$_inferior_thread_count" "getting thread count" { + -re ".* = (\[0-9]+).*" { + set thread_count $expect_out(1,string) gdb_assert {$thread_count == 7} } } @@ -230,4 +227,8 @@ test_live_inferior test_corefile -test_gcore +if { [is_aarch32_target] } { + kfail "gcore tests fail on 32-bit arm, see PR corefiles/31294" +} else { + test_gcore +}