From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 706013858D39 for ; Tue, 28 Mar 2023 12:19:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 706013858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de 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 8BABF1FDC5 for ; Tue, 28 Mar 2023 12:19:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1680005981; 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=UkJNOEYSGKnb8XPSKszfioxaUy+pa+9WhF1EcAbZBx8=; b=PTPOAQBfvFUIeNbxJT5BhH80rNNgDMZH0l3thwHJfQQY3QXIlHSp5PCCQc4KnhGgRuEW4r eR11vl+5VeTbf3Xc7/qIHaRefc7lioFGDk7eVSJRlYG1JV17adn1hICPcKwrjytaJjhB/Q o9I9aRZcrAzGD647IIYxczUgGoO/DOY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1680005981; 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=UkJNOEYSGKnb8XPSKszfioxaUy+pa+9WhF1EcAbZBx8=; b=rtw2sU1NlX9A4gfVPdhD7sk2F4llbepd7iwTL8xF0rJeIricmCGA1DgTL28hqHop3eiTmT V1pufzAeVZiymGDQ== 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 77E081390D for ; Tue, 28 Mar 2023 12:19:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id UF8oHF3bImS0LwAAMHmgww (envelope-from ) for ; Tue, 28 Mar 2023 12:19:41 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [pushed] [gdb/testsuite] Fix gdb.server/non-existing-program.exp with remote-gdbserver-on-localhost Date: Tue, 28 Mar 2023 14:19:43 +0200 Message-Id: <20230328121943.5680-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.5 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: With test-case gdb.server/non-existing-program.exp and native, I have reliably: ... (gdb) builtin_spawn gdbserver stdio non-existing-program^M stdin/stdout redirected^M /bin/bash: line 0: exec: non-existing-program: not found^M During startup program exited with code 127.^M Exiting^M PASS: gdb.server/non-existing-program.exp: gdbserver exits cleanly ... But with target board remote-gdbserver-on-localhost I sometimes have: ... (gdb) builtin_spawn /usr/bin/ssh -t -l remote-target localhost gdbserver \ stdio non-existing-program^M stdin/stdout redirected^M /bin/bash: line 0: exec: non-existing-program: not found^M During startup program exited with code 127.^M Exiting^M Connection to localhost closed.^M^M PASS: gdb.server/non-existing-program.exp: gdbserver exits cleanly ... and sometimes the exact same output, but a FAIL instead. Fix this by replacing "Exiting\r\n$" with "Exiting\r\n" in the regexps. Tested on x86_64-linux. --- gdb/testsuite/gdb.server/non-existing-program.exp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.server/non-existing-program.exp b/gdb/testsuite/gdb.server/non-existing-program.exp index 32f27fa2b1c..eea1eb1d911 100644 --- a/gdb/testsuite/gdb.server/non-existing-program.exp +++ b/gdb/testsuite/gdb.server/non-existing-program.exp @@ -40,18 +40,18 @@ expect { # This is what we get on ptrace-based targets with # startup-with-shell disabled (e.g., when the SHELL variable is # unset). - -re "stdin/stdout redirected.*gdbserver: Cannot exec non-existing-program\r\ngdbserver: Error: No such file or directory\r\n\r\nDuring startup program exited with code 127\.\r\nExiting\r\n$" { + -re "stdin/stdout redirected.*gdbserver: Cannot exec non-existing-program\r\ngdbserver: Error: No such file or directory\r\n\r\nDuring startup program exited with code 127\.\r\nExiting\r\n" { set saw_exiting 1 exp_continue } # Likewise, but with startup-with-shell enabled, which is the # default behaviour. - -re "stdin/stdout redirected.*exec: non-existing-program: not found\r\nDuring startup program exited with code 127\.\r\nExiting\r\n$" { + -re "stdin/stdout redirected.*exec: non-existing-program: not found\r\nDuring startup program exited with code 127\.\r\nExiting\r\n" { set saw_exiting 1 exp_continue } # This is what we get on Windows. - -re "Error creating process\r\n\r\nExiting\r\n$" { + -re "Error creating process\r\n\r\nExiting\r\n" { set saw_exiting 1 exp_continue } base-commit: d7f0f10189fa83a73d9819e81fd321142c0c6398 -- 2.35.3