From patchwork Tue Feb 13 11:09:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinevere Larsen X-Patchwork-Id: 85659 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 24ECB3858435 for ; Tue, 13 Feb 2024 11:11:10 +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 452193858410 for ; Tue, 13 Feb 2024 11:10:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 452193858410 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 452193858410 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=1707822645; cv=none; b=vCNNAiOb21jJc2SQXKxIytU0qMm+H5YAz04t8em89KCpy+9XuzHEfqJB/St+pWup0nlfEQ4KCxzYRzbrsmtZAOIM7fd9WHngzmODs3xK3egSKcZ+voPo+RrtZiB6Rwkjd4xF+Y63oY4kBganSSKP8JvC47M7LsknfVAtn8tqpwM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707822645; c=relaxed/simple; bh=rIx1iGuJRMgyNvuD5sAV+/oVXPV0x9bhBEykz4fvM58=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=RVLZtbdoqFiEs8N8gW+7Oy6QEC3AeX+F+qyr1X1DyHeAQySlLefgHzH8NWYgzG2/itw1fK2bBuQcaOA1ZLjFQYSpzk04tuJjWNGX4+K2OR1yryj1LZP6UfLgKa33CBtFemWwHcfcovKzLmIEc9B+/oS0YotQ72MnxF8opqFiM7Y= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707822643; 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=IqyBKNdWf23TCq/bbWX8GfHZdr3JNQCJcKnboBmg7AU=; b=fshvAwCA93lHXVJAM2NOwqDDstvTIKGpaeK5exnvj5iNL35olC2hkrrGmK5A0Z1u7+3Sxr qMDgRGrIO3bBHMaWAIgVCQs+CJteIrGUv7f3fadeZ4ZJPY5e+ZMARlMbum5Au8hAQtuerN TIJ7zP7UZ64WnOwjG0GAolCXY73x/vc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-384-m0DCa9NwM4OJYoXjw0L16w-1; Tue, 13 Feb 2024 06:10:41 -0500 X-MC-Unique: m0DCa9NwM4OJYoXjw0L16w-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 650EA84AF80 for ; Tue, 13 Feb 2024 11:10:41 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.224.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E065340C106C; Tue, 13 Feb 2024 11:10:40 +0000 (UTC) From: Guinevere Larsen To: gdb-patches@sourceware.org Cc: Guinevere Larsen Subject: [PATCH v2 2/2] gdb/testsuite: reduce gdb.threads/threadcrash.exp reliance on libc symbols Date: Tue, 13 Feb 2024 12:09:25 +0100 Message-ID: <20240213110924.123394-4-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=-11.7 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 6c638838043..3905ad6f936 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 }