From patchwork Thu Apr 13 14:08:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 67699 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 924DE3858C00 for ; Thu, 13 Apr 2023 14:08:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 924DE3858C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681394929; bh=q5E6LNm7YTg4YU/L49XpJ2YMm9u9UDb3wWhfpmVJDNw=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=rKr5S1pDd9Iaq27BHzDfEq4FWRgY6JVMvCjjvWhFQedr1tDgZkrY8Jly0/8VpXlI9 Nb7fB3kinyfq+At168VJRaYF/wNn/LynmEb4otg0xcCZDPO5DMGs6dHjFwuyO1ro2X VBK/lEIovUN5LxZlWdbx1WRRMeelkgKeYLC6DD7I= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id AF6923858D32 for ; Thu, 13 Apr 2023 14:08:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF6923858D32 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EBB65218D9; Thu, 13 Apr 2023 14:08:15 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D384E13421; Thu, 13 Apr 2023 14:08:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KDebMs8MOGQ1MAAAMHmgww (envelope-from ); Thu, 13 Apr 2023 14:08:15 +0000 To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 1/8] [gdb/testsuite] Add warning for timeout in accept_gdb_output Date: Thu, 13 Apr 2023 16:08:20 +0200 Message-Id: <20230413140827.19412-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230413140827.19412-1-tdevries@suse.de> References: <20230413140827.19412-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" In accept_gdb_output we have: ... timeout { # Assume a timeout means we somehow missed the # expected result, and carry on. return 0 } ... The timeout is silent, and though in some places the return value is checked, this is not done consistently, and consequently there are silent timeouts when running the TUI testsuite (gdb.tui/*.exp and gdb.python/tui*.exp). Each timeout is 10 seconds, and there are 5 in total in the TUI tests, taking 50 seconds overall: ... real 1m0.275s user 0m10.440s sys 0m1.343s ... With an entire testsuite run taking about 30 minutes, that is about 2.5% of the time spent waiting in TUI tests. Let's make the timeouts visible using a warning, such that they can be fixed. Tested on x86_64-linux. --- gdb/testsuite/lib/tuiterm.exp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp index 05edfe9a5b1..ff38af082da 100644 --- a/gdb/testsuite/lib/tuiterm.exp +++ b/gdb/testsuite/lib/tuiterm.exp @@ -707,6 +707,8 @@ namespace eval Term { timeout { # Assume a timeout means we somehow missed the # expected result, and carry on. + warning "timeout in accept_gdb_output" + dump_screen return 0 } }