From patchwork Tue Dec 5 15:26:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guinevere Larsen X-Patchwork-Id: 81430 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 61182386D638 for ; Tue, 5 Dec 2023 15:33:32 +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 E6812385782F for ; Tue, 5 Dec 2023 15:33:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E6812385782F 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 E6812385782F 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=1701790399; cv=none; b=xeBOWMXVQK6orm2eP1B0ry/ZHE9qahWmB1b3tQAE1bsrrrN8qenkwO9UoRw57wwnyYCvAZBCax2aOX7+pW1kjwagSRAhLPEWca4YrW4XbIDN6eMOHEaAgvNgKmoa/WApuTgCLsfX80A8I7ifsVrs0P2Goem/wL+6SuQ0aoISS+M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701790399; c=relaxed/simple; bh=cQuebPe9Dz8SVK9TrilfV48QhpsrEX4KYkCc4UKEz64=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=D+gWKdlCJyXJibF2IMLEW1KQ2ZFpZUEnWxW6id+8tAD8FdGV73+yUznfbc8l813rnAZb3OpQfO2rwOhxVHVKGJhFIE+2Im4NbKtMzHcH1GdKBuplviaB74ZadJVaMnNs1bGIe8BmpWq0D86kzfX/HNRdAGw9i6gb/spRKbS2/2M= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701790398; 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; bh=D54m/Yh85LG4iDuGPQs/fI3sJa8k7B7lDoRK9T0VXYI=; b=Xm9pfwStTygb1hDfHIvuwsjtkhY4gyMY4c+H3rA+feaGHu7c7qWDPRw607sgBWwPssNUsh dldtwx3uN2XvaN4Sq9RwHpGX/gQp2SozNt4GGgXeGch8cXCGE34FPFlOyqwfztxA0Ml4QO DFV6QzLbsp9hCuxUJPXQuKbW83cqx8o= 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-154-r-mnJoF4PHSkNBYXqTTPOQ-1; Tue, 05 Dec 2023 10:33:11 -0500 X-MC-Unique: r-mnJoF4PHSkNBYXqTTPOQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 59BB43815F92 for ; Tue, 5 Dec 2023 15:26:17 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.225.206]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D72CB1C060AF; Tue, 5 Dec 2023 15:26:16 +0000 (UTC) From: Guinevere Larsen To: gdb-patches@sourceware.org Cc: Guinevere Larsen Subject: [PATCH] gdb/testsuite: make gdb_get_worker_threads reads default number of threads Date: Tue, 5 Dec 2023 16:26:09 +0100 Message-ID: <20231205152609.741237-1-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.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, 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 When a test in the testsuite attempts to collect the amount of worker threads GDB is able to use, it calls the proc gdb_get_worker_threads, which could understand if the number was unlimited or when it had been explicitly defined to a number, but it was unable to understand the default message. That lead to the following TCL error in some situations: ERROR: ------------------------------------------- ERROR: in testcase ERROR: invalid bareword "UNKNOWN" in expression "UNKNOWN / 2"; should be "$UNKNOWN" or "{UNKNOWN}" or "UNKNOWN(...)" or ... (...) One such example is the current buildbot instance (at least the clang version). This commit adds a new clause to the gdb_get_worker_threads that detects the default worker thread message. Reviewed-by: Keith Seitz --- gdb/testsuite/lib/gdb.exp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index d0990dcfe0e..148476cf42d 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -10034,6 +10034,9 @@ proc gdb_get_worker_threads { {testname ""} } { -wrap -re "^The number of worker threads GDB can use is unlimited \\(currently ($::decimal)\\)\\." { set worker_threads $expect_out(1,string) } + -wrap -re "^The number of worker threads GDB can use is the default \\(currently ($::decimal)\\)\\." { + set worker_threads $expect_out(1,string) + } -wrap -re "^The number of worker threads GDB can use is ($::decimal)\\." { set worker_threads $expect_out(1,string) }