From patchwork Wed Feb 14 09:17:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinevere Larsen X-Patchwork-Id: 85704 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 10283385C6EE for ; Wed, 14 Feb 2024 09:19:38 +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 ESMTPS id CEE5A3857340 for ; Wed, 14 Feb 2024 09:19:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CEE5A3857340 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 CEE5A3857340 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=1707902346; cv=none; b=vH+HKAwG2Pv/gHTUq8PFDAp2mHlXPH9irfcHZvc7/t2gw9mTmrl3VmOWoVYYSRT8pLhMrsTVFGES0EwJeiwueh50GR295jAzCTkEE0VL/1U6t+43s5+FUmDj8Lp9hHSlGVuXQRMmj26EJsuxQZCJK/aIn7RFTKszJM7kR6BvRbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707902346; c=relaxed/simple; bh=H4r6Equ2ERohiG8djW4Chf/WbtXdmVSE/AU6Nuvpwic=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=YjTUrxJA8p/pgvFhlxhjYvXtmLaQoJ/SkJ+xb6cDGenDddhdluXFrekEiW3ZRSPci6gOtre5nZLBG2bEns1qdtFvuBIhCe4ufQD7KSi0T4vAQeUjEqw2l+fM16cCAFbsCwfyWFSODhquCpUJIGbUj9ZMIdsUnPBXA0FofIq2afA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707902344; 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=Q5GYIsusndaEI9HBDG+DjdOCDIuqrDQFqvPHGBQOlNk=; b=OB3SEv9L+EFve4lBtqT4DquEXIlUZWyBNPXzeN9AUfLt2nh1TlFlnYrBRR93rO51YsnaZl zjefGh1Oq/5y4DoVCn+xUqdT/03IpnFs+Dzb24auDSd80CwrLW6AZpbYx1FcdPzcU/W23A 2jPbP8AeY0nzgLbJx1gBEA+U2JxU/Ck= 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-158-Tvwix7xKNXuFjfGWrSc2Iw-1; Wed, 14 Feb 2024 04:19:02 -0500 X-MC-Unique: Tvwix7xKNXuFjfGWrSc2Iw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 4EFCE3C025B0 for ; Wed, 14 Feb 2024 09:19:02 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.226.35]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CC03D2166B36; Wed, 14 Feb 2024 09:19:01 +0000 (UTC) From: Guinevere Larsen To: gdb-patches@sourceware.org Cc: Guinevere Larsen Subject: [PATCH v3 2/2] gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc symbols Date: Wed, 14 Feb 2024 10:17:13 +0100 Message-ID: <20240214091712.223928-4-blarsen@redhat.com> In-Reply-To: <20240214091712.223928-2-blarsen@redhat.com> References: <20240214091712.223928-2-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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_H4, RCVD_IN_MSPIKE_WL, 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 The test gdb.threads/threadcrash.exp demanded GDB to fully unwind and print the names of all functions. However, some of the functions are from the libc library, and so the test implicitly demanded libc symbols to be available, and would fail otherwise, as was raised in PR gdb/31293. This commit changes it so we only explicitly check for functions that are provided by threadcrash.c to fix that Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31293 --- gdb/testsuite/gdb.threads/threadcrash.exp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp index bf4534179e2..2bbedcce58e 100644 --- a/gdb/testsuite/gdb.threads/threadcrash.exp +++ b/gdb/testsuite/gdb.threads/threadcrash.exp @@ -40,26 +40,23 @@ proc thread_apply_all {} { exp_continue } -re "\[^\n\]*syscall_task .location=SIGNAL_ALT_STACK\[^\n\]*" { - lappend test_list [multi_line ".*sleep.*" \ - ".*do_syscall_task .location=SIGNAL_ALT_STACK.*" \ + lappend test_list [multi_line ".*do_syscall_task .location=SIGNAL_ALT_STACK.*" \ ".*signal_handler.*" \ ".*signal handler called.*" \ - ".*pthread_kill.*" \ + ".*" \ ".*thread_function.*"] exp_continue } -re "\[^\n\]*syscall_task .location=SIGNAL_HANDLER\[^\n\]*" { - lappend test_list [multi_line ".*sleep.*" \ - ".*do_syscall_task .location=SIGNAL_HANDLER.*" \ + lappend test_list [multi_line ".*do_syscall_task .location=SIGNAL_HANDLER.*" \ ".*signal_handler.*" \ ".*signal handler called.*" \ - ".*pthread_kill.*" \ + ".*" \ ".*thread_function.*"] exp_continue } -re "\[^\n\]*syscall_task .location=NORMAL\[^\n\]*" { - lappend test_list [multi_line ".*sleep.*" \ - ".*do_syscall_task .location=NORMAL.*" \ + lappend test_list [multi_line ".*do_syscall_task .location=NORMAL.*" \ ".*thread_function.*"] exp_continue } @@ -67,7 +64,7 @@ proc thread_apply_all {} { lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_ALT_STACK.*" \ ".*signal_handler.*" \ ".*signal handler called.*" \ - ".*pthread_kill.*" \ + ".*" \ ".*thread_function.*"] exp_continue } @@ -75,7 +72,7 @@ proc thread_apply_all {} { lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_HANDLER.*" \ ".*signal_handler.*" \ ".*signal handler called.*" \ - ".*pthread_kill.*" \ + ".*" \ ".*thread_function.*"] exp_continue }