From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 15eOGplXU2GQCgAAWB0awg (envelope-from ) for ; Tue, 28 Sep 2021 13:57:45 -0400 Received: by simark.ca (Postfix, from userid 112) id 60EB01EE25; Tue, 28 Sep 2021 13:57:45 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (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 simark.ca (Postfix) with ESMTPS id A9FF51EDDB for ; Tue, 28 Sep 2021 13:57:44 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5CA55385842E for ; Tue, 28 Sep 2021 17:57:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5CA55385842E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632851864; bh=WbtzDZfgRGS0t+zzdVgQ+6i5J955xLXKZry7mSDrAMU=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Ii4N9oFbdcJ36iw50VJ8T0Bth8wC78gQG5dFG1DYda+NX6T5VZFwz2MgSi/02xsrJ ot23FvaVxQoH9iCjjw4JmHdiXaZpTcDKkTb8DkbE4UO/Qhg3mQuKBE7JV3ILOqzmBe rut68XGqSE9VNOw/F/loRdiw7RFtQ6fdAw64aqTw= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 753EF3858409 for ; Tue, 28 Sep 2021 17:57:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 753EF3858409 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 A8D4A22346; Tue, 28 Sep 2021 17:57:25 +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 8BFDE13ACB; Tue, 28 Sep 2021 17:57:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id /IG6IIVXU2FiNAAAMHmgww (envelope-from ); Tue, 28 Sep 2021 17:57:25 +0000 Date: Tue, 28 Sep 2021 19:57:24 +0200 To: gdb-patches@sourceware.org Subject: [PATCH][gdb/testsuite] Fix gdb.multi/multi-term-settings.exp Message-ID: <20210928175722.GA15861@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, When running test-case gdb.multi/multi-term-settings.exp in conjunction with: ... $ stress -c $(($(cat /proc/cpuinfo | grep -c ^processor) + 1)) ... I run into: ... (gdb) PASS: gdb.multi/multi-term-settings.exp: \ inf1_how=attach: inf2_how=attach: info inferiors pid=14783, count=59^M pid=14783, count=60^M ... pid=14783, count=118^M pid=14783, count=119^M pid=14778, count=90^M pid=14778, count=91^M pid=14778, count=92^M pid=14778, count=93^M pid=14778, count=94^M pid=14778, count=95^M PASS: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: continue Quit^M (gdb) FAIL: gdb.multi/multi-term-settings.exp: \ inf1_how=attach: inf2_how=attach: stop with control-c (SIGINT) ... It occurred to me that the "Continuing." we see otherwise is not shown and that it's possible that the control-C that is send is caught by gdb when printing this. Fix this by waiting for the "Continuing." message before sending control-C. Tested on x86_64-linux. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24929 Any comments? Thanks, - Tom [gdb/testsuite] Fix gdb.multi/multi-term-settings.exp --- gdb/testsuite/gdb.multi/multi-term-settings.exp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.multi/multi-term-settings.exp b/gdb/testsuite/gdb.multi/multi-term-settings.exp index 20ec03d94b3..5b6cedbe509 100644 --- a/gdb/testsuite/gdb.multi/multi-term-settings.exp +++ b/gdb/testsuite/gdb.multi/multi-term-settings.exp @@ -196,13 +196,22 @@ proc coretest {inf1_how inf2_how} { set count2 0 set test "continue" + set counting 0 gdb_test_multiple $test $test { + -re "Continuing\\." { + set counting 1 + exp_continue + } -i $infs_spawn_ids -re "pid=$pid1, count=" { - incr count1 + if { $counting } { + incr count1 + } pass_or_exp_continue } -i $infs_spawn_ids -re "pid=$pid2, count=" { - incr count2 + if { $counting } { + incr count2 + } pass_or_exp_continue } -i $gdb_spawn_id -re "received signal SIGTTOU.*$gdb_prompt " {