From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD6343858D37; Mon, 10 Oct 2022 09:38:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD6343858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665394710; bh=d4VfHRt5Ymj+TxK1Tp+jWAQu5ilZ7U3PyMYFPT0bXUs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MAbVAyKDw6PRarMRKlRdVSWJ9Wkvg/np8lbSP88bpeGUEIAyCAFYIHBY1DzLQDfh5 LK/ZlEpNYQSh+2+yv0frHyJzC+N0Y2t1kf97t/84i8SX+JjLFHCW/YuD0iVPGU+jSK UdW+inP97mF4/4UNbKVYi9RFZQH2KsdRbxkNdU3A= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/29664] [gdb/testsuite, taskset -c 0] FAIL: gdb.base/style.exp: capture_command_output for x/1i *main Date: Mon, 10 Oct 2022 09:38:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29664 --- Comment #1 from Tom de Vries --- A minimal reproducer: ... $ cat gdb/testsuite/gdb.base/style.exp=20 load_lib gdb-python.exp clean_restart gdb_py_test_silent_cmd \ [multi_line_input \ "python" \ "\004"] \ "python, ^D" \ true set command "print 1" set test "capture_command_output for $command" set re_command [string_to_regexp ${command}] gdb_test_multiple "$command" "$test - match command" { -re "^$re_command\r\n" { pass $gdb_test_name } } gdb_test_multiple "" "$test - match output" { -re "^(\[^\r\n\]+\r\n)" { exp_continue } -re "^$gdb_prompt $" { pass $gdb_test_name } } ... I think there's a bug in the fact that we're handling a single command outp= ut using two gdb_test_multiples. But I think the root cause here is another one: we're using gdb_py_test_silent_cmd to send a command ending in ^D, but doing so adds a = "\n" at the end. This fixes it: ... set command \ [multi_line_input \ "python" \ "\004"] send_gdb $command gdb_py_test_silent_cmd \ "" \ "python, ^D" \ true ... --=20 You are receiving this mail because: You are on the CC list for the bug.=