From patchwork Tue Jul 23 13:17:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 33780 Received: (qmail 119830 invoked by alias); 23 Jul 2019 13:17:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 119820 invoked by uid 89); 23 Jul 2019 13:17:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Jul 2019 13:17:06 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3FE32ACB8; Tue, 23 Jul 2019 13:17:03 +0000 (UTC) Date: Tue, 23 Jul 2019 15:17:01 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Keith Seitz Subject: [committed][gdb/testsuite] Add missing initial prompt read in multidictionary.exp Message-ID: <20190723131700.GA25365@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes Hi, When running multidictionary.exp in conjunction with: ... $ stress -c $(($(cat /proc/cpuinfo | grep -c "^processor") + 1)) ... we get: ... Running gdb/testsuite/gdb.dwarf2/multidictionary.exp ... ERROR: Couldn't load multidictionary into gdb. === gdb Summary === nr of unresolved testcases 1 ... The multidictionary test-case needs -readnow, and achieves this using: ... gdb_spawn_with_cmdline_opts "-readnow" gdb_load ... but the initial gdb prompt is not read. Usually, the following gdb_load command accidentally consumes that initial prompt (at the gdb_expect for the kill command in gdb_file_cmd). But under high load, that doesn't happen and we run into the error. Fix this by consuming the initial gdb prompt after spawning gdb. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Add missing initial prompt read in multidictionary.exp gdb/testsuite/ChangeLog: 2019-07-23 Tom de Vries PR testsuite/24842 * gdb.dwarf2/multidictionary.exp: Consume initial prompt after gdb_spawn_with_cmdline_opts. --- gdb/testsuite/gdb.dwarf2/multidictionary.exp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gdb/testsuite/gdb.dwarf2/multidictionary.exp b/gdb/testsuite/gdb.dwarf2/multidictionary.exp index 5588ef2144..c307ed8adc 100644 --- a/gdb/testsuite/gdb.dwarf2/multidictionary.exp +++ b/gdb/testsuite/gdb.dwarf2/multidictionary.exp @@ -148,6 +148,12 @@ if {[build_executable $testfile.exp $testfile [list $asm_file $srcfile] {}] \ # We force the DIEs above to be read in via "-readnow". gdb_spawn_with_cmdline_opts "-readnow" +set test "initial prompt" +gdb_test_multiple "" $test { + -re ".*$gdb_prompt $" { + pass "$test" + } +} gdb_load $binfile # All we need to do is check whether GDB is alive. Without