From patchwork Thu Feb 1 15:58: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: 85207 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 6E82A385800D for ; Fri, 2 Feb 2024 09:19:34 +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 677F3385801D for ; Fri, 2 Feb 2024 09:18:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 677F3385801D 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 677F3385801D 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=1706865521; cv=none; b=nlPQgmUJdsW6oIvRZ/xwvU5NXwzmen+qAFnG4tDV0MCsnB2rq890+/wYgKjk7O6y6SYGF9MRPb8aJWdLSHD5toilm6LhZzpkvdoyDlujUY4NyYIcAFhVF/jxsh9azyZNA1H5EGFU5OhYc241DM8Ty0McaDIjnzddihA314H0kOc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706865521; c=relaxed/simple; bh=XFgj/B8/myPtprWysDx/vqQS2Zc3hbNukpCXXmkMc5Q=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JjeFzvgKeDEm5JmsHzbQlx8NQSMxMoXL+WYWr2+ozv6TB4NfcDJpUB8uwcgYCuxfnaOKs5o+JO0TOOU8F0mcZ/4SO3JstJy/wVzdt3hN/f5BrfkvqQjWnk9eo6cwBrBJkRMbtu6zxdTW0x3g+17Fm8ouqUJ8BgDQcTg8Zrf/fWM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706865518; 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=K0FZSKB3+PWD4EkasRNfsbcwk0QIUHO1VlJtoTA3wNk=; b=DYLiBTfoUscrTM8kgg0ypmbxtXAgZiC9/4tMoEqrR4s/xRefN3I91YVGFyFLCtiflFbMWQ D0H4I3Q5T+TrG+qUU7lafrGe48mfx7uHSgPlayGMeaRvKRcIuCde31efnz5UXLk+jV64BQ fEmynVbMIlE9Og0l4HGT7r0yT1XYsyo= 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-646-eSXV-WhPNlqGqwW8k188Uw-1; Fri, 02 Feb 2024 04:18:36 -0500 X-MC-Unique: eSXV-WhPNlqGqwW8k188Uw-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 A0EE03816D84 for ; Fri, 2 Feb 2024 09:18:36 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.226.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 29E8B40C9444; Fri, 2 Feb 2024 09:18:36 +0000 (UTC) From: Guinevere Larsen To: gdb-patches@sourceware.org Cc: Guinevere Larsen Subject: [PATCH 2/2] gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc symbols Date: Thu, 1 Feb 2024 16:58:13 +0100 Message-ID: <20240201155812.1189388-4-blarsen@redhat.com> In-Reply-To: <20240201155812.1189388-2-blarsen@redhat.com> References: <20240201155812.1189388-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.2 required=5.0 tests=BAYES_00, DATE_IN_PAST_12_24, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, 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 362c4c5879d..337135f812a 100644 --- a/gdb/testsuite/gdb.threads/threadcrash.exp +++ b/gdb/testsuite/gdb.threads/threadcrash.exp @@ -57,26 +57,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 } @@ -84,7 +81,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 } @@ -92,7 +89,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 }