From patchwork Wed Jun 7 09:38:08 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: 70714 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 D5D1A385661A for ; Wed, 7 Jun 2023 09:38:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5D1A385661A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1686130707; bh=gIPEcfcOtjN9xtxrmiGTLlCfw3JhBtbIxcPdMpTsS1c=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=pDg8GR6GSurmOfcUTWlkR79U+klWhi6fz6jQZjCOVK85lrAq4IRqHcciz1UMepMPt uwc2/h+VbS5iurOvEdfossgLbHLkZ50kHce4i6AB7c9m6gsvR3xZnWs4zVMCWRyKTV 43+JfDr4e/t73h0qMZwMSU9CQVlN8gE+09HAmqrI= 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 7488D3858404 for ; Wed, 7 Jun 2023 09:38:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7488D3858404 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 A4FE71FDAE for ; Wed, 7 Jun 2023 09:38:03 +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 9374713776 for ; Wed, 7 Jun 2023 09:38:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id YBz3IvtPgGRcZAAAMHmgww (envelope-from ) for ; Wed, 07 Jun 2023 09:38:03 +0000 To: gdb-patches@sourceware.org Subject: [pushed 2/2] [gdb/testsuite] Add missing wait in gdb.python/tui-window-disabled.exp Date: Wed, 7 Jun 2023 11:38:08 +0200 Message-Id: <20230607093808.17532-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230607093808.17532-1-tdevries@suse.de> References: <20230607093808.17532-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, 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.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" While working on PR tui/30526, I noticed a bug in test-case gdb.python/tui-window-disabled.exp. Here we send "tui enable" to gdb, but don't wait for it to arrive before checking for a window box: ... send_gdb "tui enable\n" Term::check_box "check for python window" 0 0 80 16 ... Fix this by waiting for the prompt to be issued in TUI before doing the check. Tested on x86_64-linux. --- gdb/testsuite/gdb.python/tui-window-disabled.exp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdb/testsuite/gdb.python/tui-window-disabled.exp b/gdb/testsuite/gdb.python/tui-window-disabled.exp index bee58a86caa..fc69b2b16c2 100644 --- a/gdb/testsuite/gdb.python/tui-window-disabled.exp +++ b/gdb/testsuite/gdb.python/tui-window-disabled.exp @@ -186,7 +186,10 @@ proc run_test { cleanup_properly } { Term::command "layout test" Term::command "tui disable" + send_gdb "tui enable\n" + gdb_assert { [Term::wait_for "^$::gdb_prompt tui disable"] } "TUI renabled" + Term::check_box "check for python window" 0 0 80 16 }