From patchwork Thu Apr 13 14:08:22 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: 67697 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 C8D023857714 for ; Thu, 13 Apr 2023 14:08:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8D023857714 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681394920; bh=sT0LWq4Tp9V+sBRsvzPT6Mr1v/dEoKj8/635cxpK+lw=; 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=EyprCxVjrzHhmtBcsyr340nf9LoLGgY8ihPszE+U6jWCinoG8+5YTug92wPabycD6 UanmrKSleZDAVeF1edwqFxsndQecTsmv8DmLzrJcx+wNMuPpCB43Aa3Sy/sXnJPZ+G S15Cow9yh0/hGMATuT75ds5AYyJ+svNSSkU4lyXQ= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 00E413858D37 for ; Thu, 13 Apr 2023 14:08:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 00E413858D37 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-out2.suse.de (Postfix) with ESMTPS id 304491FD66; Thu, 13 Apr 2023 14:08:16 +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 1978B13421; Thu, 13 Apr 2023 14:08:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id SDKuBNAMOGQ1MAAAMHmgww (envelope-from ); Thu, 13 Apr 2023 14:08:16 +0000 To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 3/8] [gdb/testsuite] Fix timeout in gdb.tui/corefile-run.exp Date: Thu, 13 Apr 2023 16:08:22 +0200 Message-Id: <20230413140827.19412-4-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" With test-case gdb.tui/corefile-run.exp we run into: ... WARNING: timeout in accept_gdb_output PASS: gdb.tui/corefile-run.exp: load corefile ... The timeout happens in this command: ... Term::command "core-file $core" ... because it tries to match "(gdb) $cmd" but $cmd is split over two lines: ... 16 (gdb) core-file /data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb.tui/co 17 refile-run/corefile-run.core 18 [New LWP 5370] 19 Core was generated by `/data/vries/gdb/leap-15-4/build/gdb/testsuite/outputs/gdb 20 .tui/corefile-run/coref'. 21 Program terminated with signal SIGTRAP, Trace/breakpoint trap. 22 #0 main () at tui-layout.c:21 23 (gdb) ... Fix this by using send_gdb "$cmd\n" and wait_for "Program terminated" instead. Tested on x86_64-linux. --- gdb/testsuite/gdb.tui/corefile-run.exp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.tui/corefile-run.exp b/gdb/testsuite/gdb.tui/corefile-run.exp index 6769dfbd800..a81d7e7c208 100644 --- a/gdb/testsuite/gdb.tui/corefile-run.exp +++ b/gdb/testsuite/gdb.tui/corefile-run.exp @@ -63,7 +63,8 @@ set text [Term::get_all_lines] gdb_assert {![string match "No Source Available" $text]} \ "initial source listing" -Term::command "core-file $core" +send_gdb "core-file $core\n" +Term::wait_for "Program terminated" Term::check_contents "load corefile" "$src_line_nr *$src_line.*$gdb_prompt .*" Term::command "run"