From patchwork Thu Oct 10 07:25:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 98641 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 4D8533857C5F for ; Thu, 10 Oct 2024 07:26:24 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id 6AB023858C2B for ; Thu, 10 Oct 2024 07:25:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6AB023858C2B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6AB023858C2B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728545115; cv=none; b=LziWe52zu3GYIz94DRCi8jTHWYxeukap9TIsFExNn0XhSij0FXrvN0kXStg2vGVTtODSY0T09DwM5+5a1hSyWZlScC7rSqgmSHAxkBjn6aanhoItHPEAHIDBVpFaJ3wifTK0lrXCJb9uLNth8gtDAw9iM7j9JCJ8DZahjexr4QM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728545115; c=relaxed/simple; bh=cU2nDsrFILcxXSrd/bG/1A58juWctPeDeW3D72iZJwU=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=XmXnCN8/BTVtzO7hHr+WEo6GW4ww46/XUcuR4g6bW1440KJqJgOprsDB5P8sriysq8hkApVl4ChvdRy5vQ5Ok+HIWRsDWCL27UE9QM97O+JQXNTnVgAot+2drzZGIQoS73vk0nlJEm8KpSH6k4fyWGYr36D2EMlOqdhXKiUGo/w= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7B8421FE92 for ; Thu, 10 Oct 2024 07:25:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728545111; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=9jcCgY1gxFGzW1sgrfJEtK9a0sFJ7HDacAWlpmnq0mM=; b=Qc/28nycDioBL9tEhaOZ/RFOVSWJkc2pXAcs9gTKBUyYBcxuoKmBVqooWSt98yQWBMyiCB QmBkbs90wAIgq4NANjuZiZrtijTHJsQ10iDJeN5X2NvT/INWtYQYa0IOExaiyMTi0+Zi8t C5uhY0Njr79cm6NzuXldkci6VHQ2Bjc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728545111; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=9jcCgY1gxFGzW1sgrfJEtK9a0sFJ7HDacAWlpmnq0mM=; b=3fhpckSFI6DCWTlOJFNw/W6L+SFrRvtpnDaNQl+2dxsSF7g750TE2/VjzKB2qgjmKjgCAN nzn7ElfGmdWDmuBw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728545111; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=9jcCgY1gxFGzW1sgrfJEtK9a0sFJ7HDacAWlpmnq0mM=; b=Qc/28nycDioBL9tEhaOZ/RFOVSWJkc2pXAcs9gTKBUyYBcxuoKmBVqooWSt98yQWBMyiCB QmBkbs90wAIgq4NANjuZiZrtijTHJsQ10iDJeN5X2NvT/INWtYQYa0IOExaiyMTi0+Zi8t C5uhY0Njr79cm6NzuXldkci6VHQ2Bjc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728545111; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=9jcCgY1gxFGzW1sgrfJEtK9a0sFJ7HDacAWlpmnq0mM=; b=3fhpckSFI6DCWTlOJFNw/W6L+SFrRvtpnDaNQl+2dxsSF7g750TE2/VjzKB2qgjmKjgCAN nzn7ElfGmdWDmuBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 63F3013A6E for ; Thu, 10 Oct 2024 07:25:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id tmkFF1eBB2cqWgAAD6G6ig (envelope-from ) for ; Thu, 10 Oct 2024 07:25:11 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 1/5] [gdb/testsuite] Fix some test-cases for check-read1 (gdb_test_lines) Date: Thu, 10 Oct 2024 09:25:06 +0200 Message-Id: <20241010072510.25545-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,imap1.dmz-prg2.suse.org:helo]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SCC_5_SHORT_WORD_LINES, 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.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org I ran the testsuite in an environment simulating a stressed system in combination with check-read1. This exposes a few more FAILs. Fix some by using gdb_test_lines, as well as related gdb_get_lines. Tested on x86_64-linux. --- .../premature-dummy-frame-removal.exp | 14 ++-- gdb/testsuite/gdb.btrace/exception.exp | 28 ++++---- gdb/testsuite/gdb.cp/overload.exp | 69 +++++++++---------- gdb/testsuite/gdb.python/py-framefilter.exp | 22 +++--- gdb/testsuite/gdb.reverse/sigall-precsave.exp | 4 +- .../gdb.server/bkpt-other-inferior.exp | 30 ++++---- gdb/testsuite/gdb.server/ext-run.exp | 4 +- 7 files changed, 83 insertions(+), 88 deletions(-) base-commit: 1001055e3552760015661dd9b081435051fe1340 diff --git a/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp b/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp index 19e28bb6631..c813fbeb3d2 100644 --- a/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp +++ b/gdb/testsuite/gdb.base/premature-dummy-frame-removal.exp @@ -80,12 +80,10 @@ gdb_test_multiple "p some_func ()" "" { # debug, to format of which isn't fixed. All we care about is that # GDB is still running afterwards. # -# All of the debug output makes this really slow when testing with the -# special read1 version of expect, hence the timeout factor. -with_read1_timeout_factor 10 { - gdb_test_no_output "set debug frame on" - gdb_test "p some_func ()" ".*" \ - "repeat p some_func () with frame debug on" - gdb_test_no_output "set debug frame off" -} +gdb_test_no_output "set debug frame on" +gdb_test_lines "p some_func ()" \ + "repeat p some_func () with frame debug on" \ + ".*" +gdb_test_no_output "set debug frame off" + gdb_test "p 1 + 2 + 3" " = 6" diff --git a/gdb/testsuite/gdb.btrace/exception.exp b/gdb/testsuite/gdb.btrace/exception.exp index 61cc6c904b6..f27e40f2bcd 100755 --- a/gdb/testsuite/gdb.btrace/exception.exp +++ b/gdb/testsuite/gdb.btrace/exception.exp @@ -64,17 +64,17 @@ gdb_expect_list "flat" "\r\n$gdb_prompt $" [list \ ] # show the branch trace with calls indented -send_gdb "record function-call-history /c 1\n" -gdb_expect_list "indented" "\r\n$gdb_prompt $" [list \ - [multi_line \ - "1\tmain\\(\\)" \ - "2\t test\\(\\)" \ - "3\t foo\\(\\)" \ - "4\t bar\\(\\)" \ - "5\t bad\\(\\)\r" \ - ] "" \ - [multi_line \ - "\[0-9\]*\t test\\(\\)" \ - "\[0-9\]*\tmain\\(\\)" \ - ] "" \ - ] +set lines [gdb_get_lines "record function-call-history /c 1"] +set re1 \ + [multi_line \ + "1\tmain\\(\\)" \ + "2\t test\\(\\)" \ + "3\t foo\\(\\)" \ + "4\t bar\\(\\)" \ + "5\t bad\\(\\)\r"] +set re2 \ + [multi_line \ + "\[0-9\]*\t test\\(\\)" \ + "\[0-9\]*\tmain\\(\\)"] + +gdb_assert { [regexp $re1.*$re2 $lines] } "indented" diff --git a/gdb/testsuite/gdb.cp/overload.exp b/gdb/testsuite/gdb.cp/overload.exp index ef26ae57a7f..da9deefb790 100644 --- a/gdb/testsuite/gdb.cp/overload.exp +++ b/gdb/testsuite/gdb.cp/overload.exp @@ -89,42 +89,39 @@ set re_synth "foo & operator=\\(foo const ?&\\);" gdb_test "print foo_instance1" "\\$\[0-9\]+ = \{ifoo = 111, ccpfoo = 0x0\}" -gdb_test_multiple "ptype foo_instance1" "ptype foo_instance1" { - -re "type = $re_class${ws}$XX_fields${ws}$re_synth${ws}$re_dtor${ws}$re_ctor${ws}$re_methods$nl\}$nl$gdb_prompt $" { - # gcc 2.95.3 -gstabs+, no "const" on "const char *" - # TODO: gdb.base/constvar.exp has XFAILed this kind of problem for a - # long time, but an XFAIL really needs an external bug report. - # -- chastain 2003-12-31 - # setup_xfail "*-*-*" - # fail "ptype foo_instance1" - # TODO: this should be a KFAIL. - pass "ptype foo_instance1 (shorter match)" - } - -re "type = $re_class${ws}$re_fields${ws}$re_synth${ws}$re_dtor${ws}$re_ctor${ws}$re_methods$nl\}$nl$gdb_prompt $" { - # gcc 2.95.3 -gstabs+ if "const char *" ever gets fixed - pass "ptype foo_instance1" - } - -re "type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$XX_dtor${ws}$re_methods$nl\}$nl$gdb_prompt $" { - # gcc 3.3.2 -gdwarf-2, "~foo(int)" - # TODO: kfail this - # kfail "gdb/1113" "ptype foo_instance1" - pass "ptype foo_instance1 (shorter match)" - } - -re "type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$re_dtor${ws}$re_methods$nl\}$nl$gdb_prompt $" { - # gcc 3.3.2 -gdwarf-2, if the dtor bug gets fixed - # gcc HEAD -gdwarf-2 (abi-2) - # TODO: just pass this - pass "ptype foo_instance1 (shorter match)" - } - -re "type = $re_class${ws}$re_fields${ws}$re_synth${ws}$re_ctor${ws}$re_dtor${ws}$re_methods$nl\}$nl$gdb_prompt $" { - # gcc 3.3.2 -gstabs+ - # TODO: enough with the "shorter match" - pass "ptype foo_instance1 (shorter match)" - } - -re "type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$re_dtor${ws}$re_methods${ws}$re_synth$nl\}$nl$gdb_prompt $" { - # gcc HEAD -gstabs+ (abi-2) - pass "ptype foo_instance1 (shorter match)" - } +set lines [gdb_get_lines "ptype foo_instance1"] +set test "ptype foo_instance1 output" +if { [regexp "^type = $re_class${ws}$XX_fields${ws}$re_synth${ws}$re_dtor${ws}$re_ctor${ws}$re_methods$nl\}\r\n$" $lines] } { + # gcc 2.95.3 -gstabs+, no "const" on "const char *" + # TODO: gdb.base/constvar.exp has XFAILed this kind of problem for a + # long time, but an XFAIL really needs an external bug report. + # -- chastain 2003-12-31 + # setup_xfail "*-*-*" + # fail "ptype foo_instance1" + # TODO: this should be a KFAIL. + pass "$test (shorter match)" +} elseif { [regexp "^type = $re_class${ws}$re_fields${ws}$re_synth${ws}$re_dtor${ws}$re_ctor${ws}$re_methods$nl\}\r\n$" $lines] } { + # gcc 2.95.3 -gstabs+ if "const char *" ever gets fixed + pass "$test" +} elseif { [regexp "^type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$XX_dtor${ws}$re_methods$nl\}\r\n$" $lines] } { + # gcc 3.3.2 -gdwarf-2, "~foo(int)" + # TODO: kfail this + # kfail "gdb/1113" "ptype foo_instance1" + pass "$test (shorter match)" +} elseif { [regexp "^type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$re_dtor${ws}$re_methods$nl\}\r\n$" $lines] } { + # gcc 3.3.2 -gdwarf-2, if the dtor bug gets fixed + # gcc HEAD -gdwarf-2 (abi-2) + # TODO: just pass this + pass "$test (shorter match)" +} elseif { [regexp "^type = $re_class${ws}$re_fields${ws}$re_synth${ws}$re_ctor${ws}$re_dtor${ws}$re_methods$nl\}\r\n$" $lines] } { + # gcc 3.3.2 -gstabs+ + # TODO: enough with the "shorter match" + pass "$test (shorter match)" +} elseif { [regexp "^type = $re_class${ws}$re_fields${ws}$re_ctor${ws}$re_dtor${ws}$re_methods${ws}$re_synth$nl\}\r\n$" $lines] } { + # gcc HEAD -gstabs+ (abi-2) + pass "$test (shorter match)" +} else { + fail $test } # Print variables and method calls. diff --git a/gdb/testsuite/gdb.python/py-framefilter.exp b/gdb/testsuite/gdb.python/py-framefilter.exp index 374d352c981..3a325bd6e0b 100644 --- a/gdb/testsuite/gdb.python/py-framefilter.exp +++ b/gdb/testsuite/gdb.python/py-framefilter.exp @@ -82,11 +82,10 @@ gdb_breakpoint [gdb_get_line_number "Inner test breakpoint"] gdb_continue_to_breakpoint "Inner test breakpoint" # Test multiple local blocks. -gdb_test "bt full no-filters" \ +gdb_test_lines "bt full no-filters" "" \ ".*#0.*end_func.*h = 9.*f = 42.*g = 19.*bar = $hex \"Inside block x2\".*d = 15.*e = 14.*foo = $hex \"Inside block\".*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*" -gdb_test "bt full" \ - ".*#0.*cnuf_dne.*h = 9.*f = 42.*g = 19.*bar = $hex \"Inside block x2\".*d = 15.*e = 14.*foo = $hex \"Inside block\".*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*" \ - "bt full with filters" +gdb_test_lines "bt full" "bt full with filters" \ + ".*#0.*cnuf_dne.*h = 9.*f = 42.*g = 19.*bar = $hex \"Inside block x2\".*d = 15.*e = 14.*foo = $hex \"Inside block\".*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*" # Test pagination can be aborted even for frame filters. gdb_test_no_output "set height 5" "pagination quit - set height limited" @@ -161,15 +160,12 @@ gdb_test "bt -2" \ gdb_test "bt 3" \ ".*#0.*end_func.*#1.*in funca \\(\\).*#2.*in funcb \\(j=10\\)\[^#\]*More stack frames follow.*" \ "bt 3 with frame-filter Reverse disabled" -gdb_test "bt no-filter full" \ - ".*#0.*end_func.*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*#1.*in funca \\(\\).*#2.*in funcb \\(j=10\\).*bar = \{a = 42, b = 84\}.*" \ - "bt no-filters full with Reverse disabled" -gdb_test "bt full" \ - ".*#0.*end_func.*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*#1.*in funca \\(\\).*#2.*in funcb \\(j=10\\).*bar = \{a = 42, b = 84\}.*#22.*in func1 \\(\\).*#23.*in func2 \\(f=3\\).*elided = $hex \"Elided frame\".*fb = \{nothing = $hex \"Elided Foo Bar\", f = 84, s = 38\}.*bf = $hex.*" \ - "bt full with Reverse disabled" -gdb_test "bt full hide" \ - ".*#0.*end_func.*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*#1.*in funca \\(\\).*#2.*in funcb \\(j=10\\).*bar = \{a = 42, b = 84\}.*#22.*in func1 \\(\\)\[^#\]*#24.*in func3 \\(i=3\\).*" \ - "bt full hide with Reverse disabled" +gdb_test_lines "bt no-filter full" "bt no-filters full with Reverse disabled" \ + ".*#0.*end_func.*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*#1.*in funca \\(\\).*#2.*in funcb \\(j=10\\).*bar = \{a = 42, b = 84\}.*" +gdb_test_lines "bt full" "bt full with Reverse disabled" \ + ".*#0.*end_func.*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*#1.*in funca \\(\\).*#2.*in funcb \\(j=10\\).*bar = \{a = 42, b = 84\}.*#22.*in func1 \\(\\).*#23.*in func2 \\(f=3\\).*elided = $hex \"Elided frame\".*fb = \{nothing = $hex \"Elided Foo Bar\", f = 84, s = 38\}.*bf = $hex.*" +gdb_test_lines "bt full hide" "bt full hide with Reverse disabled" \ + ".*#0.*end_func.*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*#1.*in funca \\(\\).*#2.*in funcb \\(j=10\\).*bar = \{a = 42, b = 84\}.*#22.*in func1 \\(\\)\[^#\]*#24.*in func3 \\(i=3\\).*" # Re-enable Reverse gdb_test_no_output "enable frame-filter global Reverse" \ diff --git a/gdb/testsuite/gdb.reverse/sigall-precsave.exp b/gdb/testsuite/gdb.reverse/sigall-precsave.exp index aab4551c874..902772a4ef1 100644 --- a/gdb/testsuite/gdb.reverse/sigall-precsave.exp +++ b/gdb/testsuite/gdb.reverse/sigall-precsave.exp @@ -155,7 +155,7 @@ gdb_test "break $breakloc" \ "breakpoint at end of main" # Signal handlers must be disabled -gdb_test "handle all nostop noprint" +gdb_test_lines "handle all nostop noprint" "" "" # The list of signals that the program generates, in the order they # are generated. @@ -276,7 +276,7 @@ gdb_test "record restore $precsave" \ "reload precord save file" # Signal handlers must be re-enabled -gdb_test "handle all stop print" +gdb_test_lines "handle all stop print" "" "" # Make the first signal SIGABRT because it is always supported. set sig_supported 1 diff --git a/gdb/testsuite/gdb.server/bkpt-other-inferior.exp b/gdb/testsuite/gdb.server/bkpt-other-inferior.exp index 78d1ae029cb..46c07d1926a 100644 --- a/gdb/testsuite/gdb.server/bkpt-other-inferior.exp +++ b/gdb/testsuite/gdb.server/bkpt-other-inferior.exp @@ -77,19 +77,23 @@ foreach inf_sel {1 2} { gdb_test_no_output "set debug remote 1" - gdb_test_multiple "break -q main" "set breakpoint" { - -re "Sending packet: \\\$qXfer:auxv:read.*$gdb_prompt $" { - # Symbol lookup may access the target to read AUXV in - # order to determine the debug base for SVR4 linker - # namespaces. - xfail "$gdb_test_name" - } - -re "Sending packet.*$gdb_prompt $" { - fail "$gdb_test_name" - } - -re "^break -q main\r\nBreakpoint .* at .*$gdb_prompt $" { - pass "$gdb_test_name" - } + set lines [gdb_get_lines "break -q main"] + + set test "set breakpoint" + set re_xfail \ + [string_to_regexp {Sending packet: $qXfer:auxv:read}] + if { [regexp $re_xfail $lines] } { + # Symbol lookup may access the target to read AUXV in + # order to determine the debug base for SVR4 linker + # namespaces. + xfail $test + } elseif { [regexp "Sending packet:" $lines] } { + fail $test + } else { + set re \ + "Breakpoint $decimal at $hex: \[^\r\n\]+" + set re "^$re\r\n$" + gdb_assert { [regexp $re $lines] } $test } gdb_test_no_output "set debug remote 0" diff --git a/gdb/testsuite/gdb.server/ext-run.exp b/gdb/testsuite/gdb.server/ext-run.exp index 6f7b5bdf446..296af984703 100644 --- a/gdb/testsuite/gdb.server/ext-run.exp +++ b/gdb/testsuite/gdb.server/ext-run.exp @@ -58,8 +58,8 @@ if { [istarget *-*-linux*] } { if { $do_xml_test } { # This is done in a way to avoid the timeout that can occur from # applying .* regexp to large output. - gdb_test_sequence "info os processes" "get process list" \ - { "pid +user +command" "1 +root +\[/a-z\]*(init|systemd|bash)" } + gdb_test_lines "info os processes" "get process list" \ + "^pid +user +command.*\r\n1 +root +\[/a-z\]*(init|systemd|bash)" } }